/* ============ Palette ============ */
:root {
  --bg: #0b0b0c;
  --bg-2: #101112;
  --card: #141516;
  --card-2: #1a1b1c;
  --line: rgba(236, 233, 226, 0.08);
  --line-2: rgba(236, 233, 226, 0.15);
  --text: #ece9e2;
  --text-2: #a6a49e;
  --text-3: #696864;
  --ivory: #ece9e2;
  --green: #1d3328;
  --green-2: #2c4b3c;
  --green-t: #93b8a1;
  --wine: #3d1219;
  --wine-2: #6a2231;
  --wine-t: #d48e9a;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 16px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
  --safe-t: var(--tg-content-safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--text); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.hidden { display: none !important; }
.muted { color: var(--text-3); }
.grow { flex: 1; min-width: 0; }

/* фон: глибокий зелений і бордо + зерно */
.bg-fx {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(44, 75, 60, .22), transparent 60%),
    radial-gradient(100% 50% at 100% 100%, rgba(106, 34, 49, .18), transparent 60%);
}
.bg-fx::after {
  content: ''; position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#root { position: relative; z-index: 1; height: 100%; }

/* ============ Brand ============ */
.brand { display: flex; justify-content: center; line-height: 0; }
.brand img { width: 132px; height: auto; display: block; }
.a-top .brand { justify-content: flex-start; }
.a-top .brand img { width: 84px; }

/* ============ Layout ============ */
.screen { height: 100%; display: flex; flex-direction: column; }
.content {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 20px 28px;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.content.in-right { animation: inRight .42s var(--ease); }
.content.in-left { animation: inLeft .42s var(--ease); }
@keyframes inRight { from { opacity: 0; transform: translateX(28px); } }
@keyframes inLeft { from { opacity: 0; transform: translateX(-28px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02); transition: .2s;
}
.icon-btn:active { transform: scale(.94); background: rgba(255, 255, 255, .06); }
.progress { flex: 1; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--green-t), var(--ivory)); transition: width .6s var(--ease); }
.step-count { font: 500 15px/1 var(--serif); letter-spacing: .04em; }
.step-count i { color: var(--text-3); font-style: normal; }
.save-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-t); opacity: .7; transition: .3s; }
.save-dot[data-state="saving"] { background: var(--text-2); animation: pulse 1s infinite; }
.save-dot[data-state="error"] { background: var(--wine-t); }
@keyframes pulse { 50% { opacity: .2; } }

.bottombar {
  display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--safe-b));
  background: linear-gradient(transparent, var(--bg) 30%);
  border-top: 1px solid var(--line);
}

/* ============ Buttons ============ */
.btn {
  height: 54px; padding: 0 22px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 15px; letter-spacing: .01em; transition: transform .15s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; }
.btn-primary { background: var(--ivory); color: #0d0d0d; }
.btn-primary.send { background: linear-gradient(135deg, var(--ivory), #d9d4c8); }
.btn-primary.loading span::after { content: ''; display: inline-block; width: 12px; height: 12px; margin-left: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -1px; }
.btn-outline { border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); }
.btn-ghost { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.btn-danger { background: var(--wine); color: var(--wine-t); border: 1px solid var(--wine-2); }
.btn.square { width: 54px; padding: 0; flex: none; }
.btn.wide { width: 100%; }
.btn.sm { height: 42px; font-size: 13.5px; border-radius: 11px; padding: 0 14px; }
.link-btn { color: var(--text-2); font-size: 13px; padding: 8px 0; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }

/* ============ Typography ============ */
.step-head { margin: 14px 0 26px; animation: fadeUp .5s var(--ease); }
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font: 600 10.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--text-3);
}
.eb-line { width: 22px; height: 1px; background: var(--line-2); }
.title { font: 500 36px/1.05 var(--serif); margin: 14px 0 0; letter-spacing: -.005em; }
.title.display { font-size: 44px; }
.sub { color: var(--text-2); margin: 12px 0 0; font-size: 14.5px; max-width: 34em; }
.note { color: var(--text-2); font-size: 13px; margin: 18px 0 0; padding: 12px 14px; border-left: 2px solid var(--green-2); background: rgba(44, 75, 60, .12); border-radius: 0 10px 10px 0; }
.note.wine { border-color: var(--wine-2); background: rgba(106, 34, 49, .14); color: var(--wine-t); }
.hint { font-size: 12.5px; color: var(--text-3); margin: 10px 0 0; }
.hint.wine { color: var(--wine-t); }
.section-title { font: 600 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); margin: 26px 0 12px; }

/* ============ Fields ============ */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.lg { gap: 26px; }
.field { display: block; }
.field-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin-bottom: 10px; }
.field-label i { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-3); font-style: normal; }
.field-box {
  display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); transition: border-color .2s, background .2s;
}
.field-box:focus-within { border-color: var(--line-2); background: var(--card-2); }
.field-prefix { display: flex; align-items: center; gap: 6px; color: var(--text-3); }
.input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 16px; }
.input::placeholder { color: var(--text-3); }
.textarea { width: 100%; min-height: 150px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); resize: none; line-height: 1.55; }
.textarea:focus { border-color: var(--line-2); }

.invalid .field-box, .invalid.field-box, .invalid .textarea, .invalid .segmented, .invalid.search, .invalid .check-box, .invalid.ruler-wrap, .invalid.media-sec .tile.add {
  border-color: var(--wine-2) !important;
}
.invalid { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.seg { height: 46px; border-radius: 10px; font-weight: 600; color: var(--text-2); transition: .25s var(--ease); }
.seg.on { background: var(--green); color: var(--text); box-shadow: inset 0 0 0 1px var(--green-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 14px; color: var(--text-2); transition: .2s;
}
.chip.on { background: var(--green); border-color: var(--green-2); color: var(--text); }
.chip:active { transform: scale(.96); }
.swatch { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.swatch-none { background: conic-gradient(#3a3a3a 0 25%, #6a6a6a 0 50%, #3a3a3a 0 75%, #6a6a6a 0); }

.check { display: flex; gap: 14px; align-items: flex-start; padding: 16px; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check-box { width: 24px; height: 24px; flex: none; border-radius: 7px; border: 1.5px solid var(--line-2); display: grid; place-items: center; transition: .2s; }
.check-box svg { width: 16px; height: 16px; opacity: 0; transform: scale(.6); transition: .2s; stroke-width: 2.2; }
.check input:checked + .check-box { background: var(--green-2); border-color: var(--green-t); }
.check input:checked + .check-box svg { opacity: 1; transform: none; }
.check-label { font-size: 14px; color: var(--text-2); line-height: 1.45; }

.disabled { opacity: .35; pointer-events: none; transition: .2s; }

/* ============ Ruler ============ */
.ruler-wrap { padding: 22px 0 6px; border-radius: var(--r); border: 1px solid transparent; }
.ruler-wrap.compact { padding: 14px 0 4px; background: var(--card); border-color: var(--line); }
.ruler-label { font: 600 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); text-align: center; }
.ruler-value { display: flex; align-items: center; justify-content: center; gap: 22px; }
.ruler-num { display: flex; align-items: baseline; gap: 6px; }
.ruler-input {
  width: 3.1ch; background: none; border: 0; outline: 0; text-align: center; padding: 0;
  font: 500 92px/1 var(--serif); letter-spacing: -.02em; transition: color .3s;
}
.compact .ruler-input { font-size: 52px; }
.ruler-num small { font: 500 18px/1 var(--serif); color: var(--text-2); font-style: italic; }
.ruler-value.ghost .ruler-input { color: var(--text-3); }
.round-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2); }
.round-btn:active { background: rgba(255, 255, 255, .06); }
.compact .round-btn { width: 34px; height: 34px; }
.ruler {
  position: relative; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-top: 18px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.compact .ruler { margin-top: 10px; }
.ruler::-webkit-scrollbar { display: none; }
.ruler-track { display: flex; align-items: flex-start; height: 64px; padding: 0 calc(50% - 6px); width: max-content; }
.compact .ruler-track { height: 52px; }
.tick { position: relative; width: 12px; flex: none; height: 100%; scroll-snap-align: center; }
.tick::before { content: ''; position: absolute; left: 50%; top: 0; width: 1px; height: 14px; background: var(--line-2); }
.tick.mid::before { height: 20px; background: rgba(236, 233, 226, .3); }
.tick.major::before { height: 28px; background: rgba(236, 233, 226, .55); }
.tick b { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); font: 500 13px/1 var(--serif); color: var(--text-3); }
.compact .tick b { top: 32px; font-size: 12px; }
.ruler-box { position: relative; }
.ruler-needle {
  position: absolute; top: -4px; left: 50%; width: 2px; height: 40px; margin-left: -1px; border-radius: 2px;
  background: var(--ivory); box-shadow: 0 0 12px rgba(236, 233, 226, .35); pointer-events: none;
}
.compact .ruler-needle { top: -3px; height: 34px; }

.measure-sum { display: flex; align-items: center; justify-content: center; gap: 12px; margin: -6px 0 22px; padding: 16px; border-radius: var(--r); background: linear-gradient(135deg, rgba(44, 75, 60, .22), rgba(106, 34, 49, .15)); border: 1px solid var(--line); }
.measure-sum div { text-align: center; min-width: 64px; }
.measure-sum b { display: block; font: 500 34px/1 var(--serif); }
.measure-sum span { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); }
.measure-sum i { font: 300 30px/1 var(--serif); color: var(--text-3); font-style: normal; }

/* ============ Welcome ============ */
.welcome { padding-top: 6vh; animation: fadeUp .6s var(--ease); }
.welcome .title { margin-top: 18px; }
.points { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-direction: column; }
.points li { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.points li:last-child { border-bottom: 1px solid var(--line); }
.points span { font: italic 500 18px/1.2 var(--serif); color: var(--green-t); }

/* ============ Language ============ */
.lang-screen { justify-content: space-between; padding: calc(12vh + var(--safe-t)) 24px calc(28px + var(--safe-b)); }
.lang-hero { text-align: center; animation: fadeUp .8s var(--ease); }
.lang-hero .brand img { width: min(260px, 70vw); }
.lang-rule { width: 1px; height: 64px; background: linear-gradient(var(--line-2), transparent); margin: 30px auto 22px; }
.lang-tag { font: italic 400 19px/1.4 var(--serif); color: var(--text-2); margin: 0; }
.lang-list { display: flex; flex-direction: column; gap: 10px; }
.lang-btn {
  display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 20px; border-radius: var(--r);
  border: 1px solid var(--line); background: rgba(20, 21, 22, .7); backdrop-filter: blur(10px);
  animation: fadeUp .6s var(--ease) both; transition: .2s;
}
.lang-btn:active, .lang-btn.on { border-color: var(--green-2); background: var(--green); }
.lang-code { font: 600 11px/1 var(--sans); letter-spacing: .18em; color: var(--text-3); width: 24px; }
.lang-name { flex: 1; text-align: left; font: 500 22px/1 var(--serif); }
.lang-btn svg { color: var(--text-3); }

/* ============ Country ============ */
.search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text-3); position: sticky; top: 0; z-index: 2; }
.search.sm { height: 46px; }
.search .input { color: var(--text); }
.country-list { margin-top: 10px; display: flex; flex-direction: column; }
.country-row { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 6px; border-bottom: 1px solid var(--line); text-align: left; }
.country-row span { flex: 1; }
.country-row.on { color: var(--green-t); }
.country-row:active { background: rgba(255, 255, 255, .03); }
.list-sep { height: 1px; background: var(--line-2); margin: 10px 0; }
.flag { width: 28px; height: 20px; border-radius: 4px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); background: var(--card-2); }
.flag.lg { width: 48px; height: 34px; border-radius: 6px; }
.flag.xs { width: 16px; height: 11px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.country-selected { display: flex; align-items: center; gap: 16px; width: 100%; padding: 18px; border-radius: var(--r); background: var(--card); border: 1px solid var(--green-2); text-align: left; }
.country-selected b { display: block; font: 500 24px/1.1 var(--serif); }
.country-selected small { color: var(--text-3); font-size: 12.5px; }
.empty { padding: 40px 10px; text-align: center; color: var(--text-3); }
.empty small { display: block; margin-top: 8px; }

/* ============ Contact ============ */
.tg-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.tg-card b { display: block; }
.tg-card small { color: var(--text-2); }
.warn { color: var(--wine-t); }
.avatar { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 500 22px/1 var(--serif); background: linear-gradient(135deg, var(--green-2), var(--wine-2)); text-transform: uppercase; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: rgba(255, 255, 255, .05); color: var(--text-2); }
.pill svg { width: 14px; height: 14px; }
.pill.wine { background: var(--wine); color: var(--wine-t); }
.tg-card + .btn, .note + .btn { margin-top: 16px; }
.or { text-align: center; color: var(--text-3); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin: 18px 0; display: flex; align-items: center; gap: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ============ Examples ============ */
.ex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-card { margin: 0; }
.ex-img { position: relative; aspect-ratio: 2/3; cursor: zoom-in; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #1b1c1d, #111213); border: 1px solid var(--line); display: grid; place-items: center; }
.ex-img svg { width: 70%; height: 70%; stroke: rgba(236, 233, 226, .55); stroke-width: 1.1; }
.ex-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ex-card figcaption { display: flex; gap: 8px; align-items: baseline; padding: 8px 2px 0; font-size: 13px; color: var(--text-2); }
.ex-card figcaption span { font: italic 500 14px/1 var(--serif); color: var(--green-t); }
.card { margin-top: 14px; padding: 18px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.card-title { font: 500 21px/1.1 var(--serif); margin-bottom: 10px; }
.card ul { margin: 0; padding: 0; list-style: none; }
.card li { position: relative; padding: 6px 0 6px 20px; color: var(--text-2); font-size: 14px; }
.card li::before { content: ''; position: absolute; left: 2px; top: 15px; width: 8px; height: 1px; background: var(--green-t); }
.ex-video { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: start; }
.ex-video-media { position: relative; aspect-ratio: 9/16; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, var(--green), var(--wine)); }
.ex-video-media video { width: 100%; height: 100%; object-fit: cover; }
.ex-video-ph { position: absolute; inset: 0; display: none; place-items: center; }
.ex-video-ph svg { width: 34px; height: 34px; color: var(--ivory); opacity: .8; }
.no-video video { display: none; }
.no-video .ex-video-ph { display: grid; }

/* ============ Media ============ */
.media-sec { margin-bottom: 26px; }
.media-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.media-head span:first-child { font: 500 24px/1 var(--serif); }
.counter { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--card-2); color: var(--text-2); }
.counter.green { background: var(--green); color: var(--green-t); }
.counter.wine { background: var(--wine); color: var(--wine-t); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { position: relative; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: var(--card-2); border: 1px solid var(--line); animation: fadeUp .35s var(--ease); }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-3); }
.tile.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px dashed var(--line-2); background: rgba(255, 255, 255, .015); color: var(--text-2); font-size: 12.5px; }
.tile.add svg { width: 26px; height: 26px; stroke-width: 1.3; }
.tile.add:active { background: rgba(255, 255, 255, .05); }
.tile-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(11, 11, 12, .7); backdrop-filter: blur(6px); }
.tile-x svg { width: 14px; height: 14px; stroke-width: 2; }
.tile-badge { position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; gap: 3px; padding: 3px 8px 3px 5px; border-radius: 999px; background: rgba(11, 11, 12, .7); font-size: 11px; font-weight: 600; }
.tile-badge svg { width: 13px; height: 13px; }
.tile.uploading img { filter: brightness(.45) blur(1px); }
.tile-progress { position: absolute; inset: 0; display: grid; place-items: center; }
.tile-progress svg { width: 46px; height: 46px; transform: rotate(-90deg); }
.tile-progress circle { stroke: rgba(255, 255, 255, .15); stroke-width: 2.2; }
.tile-progress .bar { stroke: var(--ivory); stroke-dasharray: 94.2; transition: stroke-dashoffset .2s; }
.tile-progress span { position: absolute; font-size: 11px; font-weight: 700; }
.tile.failed { border-color: var(--wine-2); }
.tile.failed .tile-progress span { color: var(--wine-t); font-size: 18px; }

/* ============ Review ============ */
.rv-sec { margin-bottom: 18px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.rv-title { padding: 14px 16px 6px; font: 600 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); }
.rv-row, .rv-media { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; border-top: 1px solid var(--line); }
.rv-row:first-of-type { border-top: 0; }
.rv-label { color: var(--text-2); font-size: 13.5px; flex: none; max-width: 48%; }
.rv-val { flex: 1; text-align: right; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-row svg, .rv-media svg { color: var(--text-3); width: 16px; height: 16px; }
.missing .rv-val { color: var(--wine-t); font-weight: 500; }
.rv-media { border-top: 0; }
.rv-thumbs { display: flex; }
.rv-thumbs img { width: 34px; height: 44px; object-fit: cover; border-radius: 6px; border: 2px solid var(--card); margin-left: -8px; }
.rv-thumbs img:first-child { margin-left: 0; }

/* ============ Center screens ============ */
.center-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 24px calc(30px + var(--safe-b)); height: 100%; }
.center-screen > .brand { position: absolute; top: calc(34px + var(--safe-t)); }
.big-icon { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: radial-gradient(circle, rgba(44, 75, 60, .4), transparent 70%); animation: pop .7s var(--ease); }
.big-icon svg { width: 40px; height: 40px; stroke-width: 1.3; }
.success .big-icon svg { color: var(--green-t); }
.blocked .big-icon { background: radial-gradient(circle, rgba(106, 34, 49, .45), transparent 70%); }
.blocked .big-icon svg { color: var(--wine-t); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.center-screen .title { margin-top: 28px; animation: fadeUp .6s .1s var(--ease) both; }
.center-screen .sub { animation: fadeUp .6s .18s var(--ease) both; }
.center-actions { width: 100%; max-width: 360px; margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 14px; animation: fadeUp .6s .26s var(--ease) both; }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); }
.status-pill span { width: 7px; height: 7px; border-radius: 50%; background: #c9b27a; animation: pulse 1.6s infinite; }
.status-pill.done span { background: var(--green-t); animation: none; }
.splash { height: 100%; min-height: 200px; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-2); border-top-color: var(--ivory); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Sheet ============ */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); opacity: 0; transition: opacity .28s; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto;
  padding: 8px 18px calc(20px + var(--safe-b)); border-radius: 22px 22px 0 0; background: #121314; border-top: 1px solid var(--line-2);
  transform: translateY(100%); transition: transform .32s var(--ease);
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: none; }
.sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 4px auto 14px; }
.sheet-head h3 { font: 500 28px/1.1 var(--serif); margin: 4px 0 6px; }
.sheet-head p { margin: 0 0 16px; color: var(--text-3); font-size: 13px; }
.lang-switch { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--text-3); }
.lang-switch svg { margin-right: 6px; }
.lang-switch button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--text-2); }
.lang-switch button.on { background: var(--ivory); color: #0d0d0d; border-color: var(--ivory); }
.lang-switch.mini { justify-content: center; margin-top: 10px; }
.menu-list { display: flex; flex-direction: column; margin-bottom: 14px; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.mi-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1px solid var(--line); font: 500 14px/1 var(--serif); color: var(--text-3); }
.mi-num svg { width: 15px; height: 15px; stroke-width: 2; }
.menu-item.done .mi-num { background: var(--green); border-color: var(--green-2); color: var(--green-t); }
.menu-item.need .mi-num { border-color: var(--wine-2); color: var(--wine-t); }
.menu-item.current { background: rgba(255, 255, 255, .03); border-radius: 12px; }
.menu-item.current .mi-name { color: var(--text); font-weight: 700; }
.mi-name { flex: 1; color: var(--text-2); font-weight: 500; }
.mi-val { color: var(--text-3); font-size: 12.5px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); z-index: 60; transform: translate(-50%, 20px);
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; font-size: 13.5px; text-align: center;
  background: rgba(236, 233, 226, .96); color: #111; opacity: 0; pointer-events: none; transition: .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #4a1621; color: #f1d3d8; border: 1px solid var(--wine-2); }

/* ============ Admin ============ */
.admin { background: transparent; }
.a-top { display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--safe-t)) 16px 12px; border-bottom: 1px solid var(--line); }
.a-title { flex: 1; min-width: 0; font: 500 22px/1.1 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-title small { display: block; font: 500 12px/1.4 var(--sans); color: var(--text-3); }
.a-content { flex: 1; overflow-y: auto; padding: 0 16px calc(24px + var(--safe-b)); overscroll-behavior: contain; }
.a-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 14px 0; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.a-tab { height: 40px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--text-2); display: flex; align-items: center; justify-content: center; gap: 8px; }
.a-tab.on { background: var(--ivory); color: #0d0d0d; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--wine-2); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.a-tab.on .badge { background: var(--wine); color: var(--wine-t); }
.a-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.seg-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.fchip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--text-2); white-space: nowrap; }
.fchip i { font-style: normal; color: var(--text-3); margin-left: 4px; }
.fchip.on { background: var(--green); border-color: var(--green-2); color: var(--text); }
.fchip.on i { color: var(--green-t); }
.a-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.a-card { text-align: left; animation: fadeUp .4s var(--ease) both; }
.a-cover { position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; background: var(--card-2); border: 1px solid var(--line); }
.a-cover img { width: 100%; height: 100%; object-fit: cover; }
.a-noimg { width: 100%; height: 100%; display: grid; place-items: center; font: 500 48px/1 var(--serif); color: var(--text-3); }
.a-noimg.big { aspect-ratio: 3/4; font-size: 16px; font-family: var(--sans); }
.a-num { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(11, 11, 12, .72); backdrop-filter: blur(6px); font-size: 11px; font-weight: 700; }
.a-blocked { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: var(--wine); color: var(--wine-t); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.dot { position: absolute; right: 10px; top: 11px; width: 9px; height: 9px; border-radius: 50%; background: #c9b27a; box-shadow: 0 0 0 3px rgba(11, 11, 12, .6); }
.dot.green { background: var(--green-t); }
.dot.wine { background: var(--wine-t); }
.a-meta { padding: 9px 2px 0; display: flex; flex-direction: column; gap: 2px; }
.a-meta b { font: 500 19px/1.15 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-meta small { font-size: 12.5px; color: var(--text-2); }
.a-meta small.muted { color: var(--text-3); font-size: 11.5px; }

.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; width: 100%; aspect-ratio: 3/4; max-height: 70vh; object-fit: cover; scroll-snap-align: start; background: var(--card); }
.gallery-dots { display: flex; justify-content: center; gap: 5px; margin-top: 10px; }
.gallery-dots span { width: 5px; height: 5px; border-radius: 3px; background: var(--line-2); transition: .3s; }
.gallery-dots span.on { width: 18px; background: var(--ivory); }
.a-hero { padding: 18px 0 4px; }
.a-hero .title { font-size: 38px; margin: 0; }
.a-hero-sub { color: var(--text-2); margin-top: 6px; font-size: 14px; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr 1.6fr; margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.stat-row div { padding: 14px 10px; text-align: center; border-left: 1px solid var(--line); }
.stat-row div:first-child { border: 0; }
.stat-row b { display: block; font: 500 26px/1 var(--serif); }
.stat-row span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.status-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 14px; padding: 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.status-switch button { height: 40px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.status-switch button.on { background: #2b2a24; color: #e3cf9c; }
.status-switch button.on.green { background: var(--green); color: var(--green-t); }
.status-switch button.on.wine { background: var(--wine); color: var(--wine-t); }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border: 0; padding-bottom: 0; }
.kv:first-child { padding-top: 0; }
.kv span { color: var(--text-2); }
.kv b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.quote p { margin: 0; color: var(--text-2); white-space: pre-wrap; }
.vid-row { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.vid { position: relative; width: 90px; aspect-ratio: 9/16; flex: none; border-radius: 10px; overflow: hidden; background: linear-gradient(160deg, var(--green), var(--wine)); display: grid; place-items: center; }
.vid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vid svg { position: relative; width: 26px; height: 26px; }
.vid span { position: absolute; bottom: 5px; right: 6px; font-size: 10.5px; font-weight: 700; }
.a-actions { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; margin: 16px 0 10px; }
.a-actions .btn { height: 48px; padding: 0 10px; font-size: 13.5px; gap: 6px; }
.a-actions svg { width: 18px; height: 18px; }

.chat-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 2px; border-bottom: 1px solid var(--line); text-align: left; }
.chat-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-top, .chat-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chat-top time { font-size: 11.5px; color: var(--text-3); flex: none; }
.chat-bottom span:first-child { color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row.unread .chat-bottom span:first-child { color: var(--text-2); }
.chat-screen .a-content { padding: 0; display: flex; flex-direction: column; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 80%; padding: 9px 13px 6px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 5px; }
.msg.out { align-self: flex-end; background: var(--green); border-color: var(--green-2); border-radius: 16px; border-bottom-right-radius: 5px; }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.msg img { display: block; max-width: 220px; max-height: 260px; border-radius: 10px; margin-bottom: 6px; }
.msg time { display: block; text-align: right; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.msg.out time { color: var(--green-t); }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg); }
.composer .input { min-height: 48px; max-height: 140px; padding: 13px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); resize: none; line-height: 1.4; }
.composer .btn { height: 48px; width: 48px; }

@media (min-width: 640px) {
  .content, .a-content { padding-left: max(20px, calc(50% - 300px)); padding-right: max(20px, calc(50% - 300px)); }
  .a-grid { grid-template-columns: repeat(3, 1fr); }
}
.stack > .check { margin-top: 0; }
.ruler { cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-x; }
.ruler.dragging { cursor: grabbing; scroll-snap-type: none; }
.ruler-input::placeholder { color: var(--text-3); }
.ex-zoom { width: 100%; max-height: 74vh; object-fit: contain; border-radius: 14px; display: block; margin: 0 auto 14px; }
.a-actions.web { grid-template-columns: 1fr; }
