/* ============================================================
   Переезд в Тай — тропический тревел-журнал
   Палитра: песок + манго + пальмовая зелень
   ============================================================ */

:root {
  --bg: #f5eddd;
  --bg-deep: #efe3cc;
  --paper: #fffcf4;
  --ink: #22312a;
  --ink-soft: #5c6b60;
  --line: rgba(34, 49, 42, 0.14);
  --mango: #f4700b;
  --mango-soft: #ffe3c9;
  --palm: #0e6b4f;
  --palm-soft: #d9ede4;
  --sun: #f2b705;
  --sun-soft: #fdf0c8;
  --coral: #e04f3f;
  --coral-soft: #fadcd6;
  --sky: #2a7ab5;
  --sky-soft: #d9eaf6;
  --grape: #7a4fb5;
  --grape-soft: #e8ddf6;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 10px rgba(34, 49, 42, 0.07), 0 12px 32px rgba(34, 49, 42, 0.06);
  --font-display: "Unbounded", sans-serif;
  --font-body: "Onest", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 500px at 85% -100px, rgba(242, 183, 5, 0.16), transparent 60%),
    radial-gradient(900px 420px at -100px 130px, rgba(14, 107, 79, 0.10), transparent 60%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* зернистость поверх фона */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

/* ============ Шапка ============ */

.hero {
  padding: 26px 20px 20px;
  border-bottom: 2px solid var(--ink);
  background:
    linear-gradient(160deg, rgba(244, 112, 11, 0.10), transparent 55%),
    linear-gradient(0deg, rgba(255, 252, 244, 0.4), transparent);
}

.hero-inner { max-width: 1060px; margin: 0 auto; }

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-brand { display: flex; align-items: center; gap: 12px; }

.hero-palm { font-size: 34px; filter: drop-shadow(0 4px 6px rgba(34,49,42,0.2)); }

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 4.5vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.hero-title em {
  font-style: normal;
  color: var(--mango);
  text-shadow: 2px 2px 0 rgba(34, 49, 42, 0.9);
  -webkit-text-stroke: 1px var(--ink);
}

.hero-actions { display: flex; gap: 8px; }

/* Обратный отсчет */
.hero-countdown {
  margin-top: 22px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.cd-block { display: flex; flex-direction: column; align-items: center; }

.cd-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 9vw, 68px);
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, var(--ink) 55%, var(--palm));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.cd-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-top: 4px;
}

.cd-sep {
  font-family: var(--font-display);
  font-size: clamp(26px, 6vw, 46px);
  color: var(--mango);
  align-self: flex-start;
  padding-top: 2px;
}

.cd-caption {
  margin-left: 10px;
  font-size: 15px;
  color: var(--ink-soft);
  align-self: center;
  max-width: 220px;
}

/* Прогресс готовности */
.hero-progress { margin-top: 18px; max-width: 520px; }

.hp-bar {
  height: 14px;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
  overflow: hidden;
}

.hp-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: repeating-linear-gradient(-45deg, var(--mango), var(--mango) 10px, var(--sun) 10px, var(--sun) 20px);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hp-caption { margin-top: 6px; font-size: 13px; color: var(--ink-soft); }

/* ============ Табы ============ */

.tabs {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(245, 237, 221, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--line);
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 0 rgba(34, 49, 42, 0.55);
}

.tab:hover { transform: translateY(-1px); }

.tab.active {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 2px 0 var(--mango);
}

.tab-ico { font-size: 15px; }

.tab-badge {
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  padding: 2px 6px;
  border-radius: 99px;
  background: var(--mango-soft);
  color: var(--ink);
  border: 1px solid rgba(34, 49, 42, 0.3);
}

.tab-badge:empty { display: none; }

.tab.active .tab-badge { background: var(--mango); color: #fff; border-color: transparent; }

/* ============ Общее ============ */

.main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 26px 16px 80px;
}

.section { display: none; animation: fadeUp 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.section.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(21px, 3.6vw, 28px);
  letter-spacing: -0.02em;
}

.card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

/* Кнопки */
.btn-primary, .btn-ghost, .btn-danger {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 99px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, background 0.2s;
  border: 1.5px solid var(--ink);
}

.btn-primary {
  background: var(--mango);
  color: #fff;
  box-shadow: 0 3px 0 var(--ink);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--ink); }

.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 0 rgba(34, 49, 42, 0.4);
  font-weight: 600;
}
.btn-ghost:hover { background: var(--sun-soft); }

.btn-danger {
  background: var(--coral-soft);
  color: var(--coral);
  border-color: var(--coral);
  box-shadow: 0 2px 0 var(--coral);
}
.btn-danger:hover { background: var(--coral); color: #fff; }

/* Поля */
.field { display: flex; flex-direction: column; gap: 6px; }

.field > span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--palm);
  box-shadow: 0 0 0 3px rgba(14, 107, 79, 0.15);
}

.field textarea { resize: vertical; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid .span2 { grid-column: span 2; }

/* Статусные пилюли */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1.5px solid var(--ink);
}

.pill-gray  { background: #ece9e1; color: var(--ink-soft); }
.pill-red   { background: var(--coral-soft); color: var(--coral); }
.pill-amber { background: var(--sun-soft); color: #9a7404; }
.pill-green { background: var(--palm-soft); color: var(--palm); }
.pill-teal  { background: var(--ink); color: var(--paper); }
.pill-blue  { background: var(--sky-soft); color: var(--sky); }
.pill-grape { background: var(--grape-soft); color: var(--grape); }
.pill-mango { background: var(--mango-soft); color: #b1520a; }

/* ============ Документы ============ */

.doc-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.doc-summary .status-pill { font-size: 12px; }

.doc-list { display: flex; flex-direction: column; gap: 10px; }

.doc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  cursor: pointer;
  transition: transform 0.13s, box-shadow 0.15s;
  box-shadow: 0 2px 0 rgba(34, 49, 42, 0.25);
}

.doc-row:hover { transform: translateX(3px); box-shadow: -3px 2px 0 rgba(34, 49, 42, 0.25); }

.doc-status-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  flex-shrink: 0;
}

.doc-name { font-weight: 600; font-size: 15px; flex: 1; min-width: 0; }

.doc-note { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30%; }

.doc-row .status-pill { flex-shrink: 0; font-size: 12px; padding: 4px 11px; }

.doc-row.done { opacity: 0.72; }
.doc-row.done .doc-name { text-decoration: line-through; text-decoration-color: var(--palm); text-decoration-thickness: 2px; }

/* Группы документов */
.doc-group { margin-bottom: 26px; }

.group-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.group-count {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--palm-soft);
  color: var(--palm);
  border: 1px solid rgba(14, 107, 79, 0.35);
}

.doc-group .doc-list-inner { display: flex; flex-direction: column; gap: 8px; }

/* ============ Виза ============ */

.visa-intro {
  margin-bottom: 22px;
  font-size: 14.5px;
  line-height: 1.65;
  border-left: 6px solid var(--mango);
}

.visa-group { margin-bottom: 26px; }

.visa-list { display: flex; flex-direction: column; gap: 8px; }

.visa-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.13s, box-shadow 0.15s;
  box-shadow: 0 2px 0 rgba(34, 49, 42, 0.25);
}

.visa-row:hover { transform: translateX(3px); box-shadow: -3px 2px 0 rgba(34, 49, 42, 0.25); }

.visa-check {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  transition: background 0.15s;
  margin-top: 1px;
}

.visa-row.done .visa-check { background: var(--palm); border-color: var(--palm); }

.visa-text { flex: 1; min-width: 0; }

.visa-name { font-weight: 600; font-size: 14.5px; line-height: 1.35; }

.visa-note { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.5; }

.visa-row.done { opacity: 0.62; }
.visa-row.done .visa-name { text-decoration: line-through; text-decoration-color: var(--palm); text-decoration-thickness: 2px; }

.visa-edit {
  flex-shrink: 0;
  border: 1.5px solid var(--line);
  background: transparent;
  border-radius: 50%;
  width: 30px; height: 30px;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 13px;
  transition: border-color 0.15s, color 0.15s;
}

.visa-edit:hover { border-color: var(--ink); color: var(--ink); }

/* ============ Билеты ============ */

.form-card { margin-bottom: 20px; }

.ticket-visual { margin-top: 4px; }

.boarding-pass {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow);
}

.bp-main { padding: 22px 26px; }

.bp-route {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(19px, 4.5vw, 30px);
  letter-spacing: -0.01em;
}

.bp-route .bp-plane { color: var(--mango); font-size: 0.85em; animation: fly 3s ease-in-out infinite; }

@keyframes fly {
  0%, 100% { transform: translateX(0) rotate(0); }
  50% { transform: translateX(7px) rotate(4deg); }
}

.bp-meta {
  margin-top: 16px;
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.bp-meta div { display: flex; flex-direction: column; gap: 3px; }

.bp-meta dt { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.65; }
.bp-meta dd { font-size: 16px; font-weight: 700; }

.bp-stub {
  border-left: 2px dashed rgba(255, 252, 244, 0.4);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: rgba(244, 112, 11, 0.14);
}

.bp-stub .stub-emoji { font-size: 34px; }
.bp-stub .stub-text { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; text-align: center; opacity: 0.8; }

/* ============ Жилье ============ */

.stepper {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.step {
  flex: 1;
  min-width: 108px;
  text-align: center;
  position: relative;
  padding-top: 26px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.step::before {
  content: "";
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line);
  z-index: 1;
}

.step::after {
  content: "";
  position: absolute;
  top: 16px; left: calc(50% + 11px);
  right: calc(-50% + 11px);
  height: 2px;
  background: var(--line);
}

.step:last-child::after { display: none; }

.step.done { color: var(--palm); }
.step.done::before { background: var(--palm); border-color: var(--palm); }
.step.done::after { background: var(--palm); }

.step.current { color: var(--ink); font-weight: 800; }
.step.current::before {
  background: var(--mango);
  border-color: var(--ink);
  box-shadow: 0 0 0 5px rgba(244, 112, 11, 0.25);
}

/* ============ Карты ============ */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 16px;
}

.bank-card {
  position: relative;
  aspect-ratio: 1.62;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s;
  color: #fff;
}

.bank-card:hover { transform: translateY(-4px) rotate(-0.6deg); }

.bank-card::before {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 170px; height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.bank-card::after {
  content: "";
  position: absolute;
  bottom: -80px; left: -40px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.10);
}

.bank-card .bc-chip {
  width: 38px; height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f7d774, #d9a832);
  border: 1px solid rgba(0,0,0,0.25);
  position: relative;
  z-index: 1;
}

.bank-card .bc-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  word-break: break-word;
}

.bank-card .bc-bottom { display: flex; justify-content: space-between; align-items: flex-end; z-index: 1; gap: 8px; }

.bank-card .bc-note { font-size: 11.5px; opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bank-card .status-pill { border-color: rgba(255,255,255,0.8); font-size: 11px; padding: 4px 10px; flex-shrink: 0; }

.bc-theme-0 { background: linear-gradient(135deg, #0e6b4f, #0b4d3a); }
.bc-theme-1 { background: linear-gradient(135deg, #f4700b, #c1470a); }
.bc-theme-2 { background: linear-gradient(135deg, #2a7ab5, #174e77); }
.bc-theme-3 { background: linear-gradient(135deg, #7a4fb5, #4d2f78); }
.bc-theme-4 { background: linear-gradient(135deg, #22312a, #101a15); }

.card-add-tile {
  aspect-ratio: 1.62;
  border-radius: var(--radius);
  border: 2px dashed rgba(34, 49, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-soft);
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.card-add-tile:hover { border-color: var(--mango); color: var(--mango); background: rgba(244, 112, 11, 0.05); }
.card-add-tile .plus { font-size: 30px; line-height: 1; }

/* ============ Наличные ============ */

.cash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.cash-card {
  text-align: center;
  padding: 22px 16px;
  position: relative;
  overflow: hidden;
}

.cash-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  pointer-events: none;
}

.cash-usd::before { background: linear-gradient(160deg, var(--palm-soft), transparent 65%); }
.cash-rub::before { background: linear-gradient(160deg, var(--sky-soft), transparent 65%); }
.cash-thb::before { background: linear-gradient(160deg, var(--mango-soft), transparent 65%); }

.cash-flag { font-size: 30px; position: relative; }

.cash-cur {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin: 6px 0 12px;
  position: relative;
}

.cash-input-wrap { position: relative; display: flex; align-items: center; }

.cash-input-wrap input {
  width: 100%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(19px, 3vw, 26px);
  text-align: center;
  padding: 10px 34px 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.cash-input-wrap input:focus { outline: none; border-color: var(--palm); box-shadow: 0 0 0 3px rgba(14,107,79,0.15); }

/* убрать спиннеры */
.cash-input-wrap input::-webkit-outer-spin-button,
.cash-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cash-input-wrap input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.cash-sign {
  position: absolute;
  right: 13px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--mango);
}

.rates-card { max-width: 560px; }

.rates-head { font-weight: 700; margin-bottom: 12px; }
.rates-hint { font-weight: 400; font-size: 13px; color: var(--ink-soft); }

.rates-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }

.cash-total {
  border-top: 1.5px dashed var(--line);
  padding-top: 14px;
  font-size: 15px;
  line-height: 1.65;
}

.cash-total b { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.cash-total .ct-main { color: var(--palm); }

/* ============ Вещи ============ */

.stuff-toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }

.filters { display: flex; gap: 7px; flex-wrap: wrap; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 99px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s, background 0.15s;
}

.filter-chip:hover { transform: translateY(-1px); }
.filter-chip.active { background: var(--ink); color: var(--paper); }

.filter-chip .fc-count {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(34, 49, 42, 0.1);
}

.filter-chip.active .fc-count { background: rgba(255, 252, 244, 0.2); }

.stuff-search {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
  color: var(--ink);
  width: 100%;
  max-width: 420px;
}

.stuff-search:focus { outline: none; box-shadow: 0 0 0 3px rgba(14, 107, 79, 0.18); }

.stuff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}

.stuff-card {
  position: relative;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.stuff-card:hover { transform: translateY(-4px) rotate(0.4deg); }

.stuff-photo {
  aspect-ratio: 4 / 3;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  overflow: hidden;
  border-bottom: 1.5px solid var(--ink);
}

.stuff-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.stuff-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.stuff-name { font-weight: 700; font-size: 15px; line-height: 1.3; }

.stuff-fate { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.stuff-fate .status-pill { font-size: 11.5px; padding: 4px 11px; }

.stuff-giveto { font-size: 12.5px; color: var(--ink-soft); }

.stuff-price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--mango);
}

.stuff-price s, .share-price s {
  color: var(--ink-soft);
  font-weight: 400;
  font-size: 0.8em;
  text-decoration-color: var(--coral);
  margin-left: 4px;
}

.photo-count {
  position: absolute;
  bottom: 7px;
  right: 7px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(34, 49, 42, 0.75);
  color: #fff;
  border-radius: 99px;
  padding: 3px 9px;
  pointer-events: none;
}

.stuff-photo { position: relative; }

.stuff-share {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(34, 49, 42, 0.45);
  transition: transform 0.13s, background 0.15s;
  z-index: 2;
}

.stuff-share:hover { transform: scale(1.12); background: var(--sun-soft); }
.stuff-share.shared { background: var(--palm-soft); border-color: var(--palm); }

.stuff-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; }

.mini-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--bg-deep);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.stuff-card.fate-trashed { opacity: 0.55; }
.stuff-card.fate-trashed .stuff-name { text-decoration: line-through; }

.stuff-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 420px;
  margin: 0 auto;
}

.empty-emoji { font-size: 52px; margin-bottom: 12px; }

/* Выбор судьбы в модалке */
.fate-picker { display: flex; gap: 7px; flex-wrap: wrap; }

.fate-opt {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 99px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}

.fate-opt:hover { border-color: var(--ink); }

.fate-opt.active {
  border-color: var(--ink);
  box-shadow: 0 2px 0 var(--ink);
  transform: translateY(-1px);
}

/* ============ Модалки ============ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(34, 49, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(34, 49, 42, 0.35);
  animation: popIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-wide { max-width: 640px; }

@keyframes popIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 0;
}

.modal-head h3 { font-family: var(--font-display); font-weight: 600; font-size: 19px; }

.btn-close {
  border: 1.5px solid var(--ink);
  background: var(--paper);
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: 15px;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.15s, transform 0.15s;
}

.btn-close:hover { background: var(--coral-soft); transform: rotate(90deg); }

.modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 22px 20px;
}

.modal-foot .btn-danger { margin-right: auto; }

/* Модалка вещи */
.item-modal-body { flex-direction: row; align-items: flex-start; }

.photo-zone { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }

.photo-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--line);
}

.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-thumb:first-child { border-color: var(--mango); box-shadow: 0 0 0 2px rgba(244, 112, 11, 0.3); }

.photo-del {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(34, 49, 42, 0.8);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}

.photo-del:hover { background: var(--coral); }

.photo-add {
  aspect-ratio: 1;
  border: 2px dashed rgba(34, 49, 42, 0.35);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 22px;
  color: var(--ink-soft);
  font-family: var(--font-body);
  transition: border-color 0.2s, color 0.2s;
}

.photo-add span { font-size: 11px; font-weight: 700; }
.photo-add:hover { border-color: var(--mango); color: var(--mango); }

.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.item-fields { flex: 1; display: flex; flex-direction: column; gap: 13px; min-width: 0; }

/* Шер-ссылка в модалке вещи */
.share-controls { display: flex; gap: 8px; flex-wrap: wrap; }

.share-hint {
  font-size: 12.5px;
  color: var(--ink-soft);
  word-break: break-all;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  user-select: all;
}

.share-hint:empty { display: none; }

/* Публичная страница вещи */
.share-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 34px 16px 60px;
}

.share-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  margin-bottom: 20px;
}

.share-brand em {
  font-style: normal;
  color: var(--mango);
  text-shadow: 2px 2px 0 rgba(34, 49, 42, 0.9);
  -webkit-text-stroke: 1px var(--ink);
}

.share-card { padding: 0; overflow: hidden; }

.share-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-deep);
  border-bottom: 1.5px solid var(--ink);
}

.share-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.share-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.share-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 12px; }

.share-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 5vw, 26px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.share-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--mango);
  letter-spacing: -0.01em;
}

.share-giveto { font-size: 15px; font-weight: 600; color: var(--palm); }

.share-note { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); white-space: pre-wrap; }

.share-loading { padding: 40px 24px; text-align: center; color: var(--ink-soft); font-size: 15px; }

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  flex-wrap: wrap;
}

.g-thumb {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--line);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
}

.g-thumb:hover { transform: scale(1.05); }
.g-thumb.active { border-color: var(--mango); }

.m-photo { cursor: pointer; }

.book-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1.5px dashed var(--line);
  padding-top: 14px;
}

.share-foot {
  margin-top: 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* Витрина (публичная страница) */
.market-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 34px 16px 60px;
}

.market-intro {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 24px;
}

.market-card { cursor: default; }
.market-card:hover { transform: none; }

.market-card.is-booked { opacity: 0.6; }

.market-book {
  width: 100%;
  margin-top: 6px;
  font-size: 13px;
  padding: 9px 14px;
}

.market-booked {
  margin-top: 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 99px;
  background: var(--bg-deep);
  border: 1.5px dashed rgba(34, 49, 42, 0.35);
  color: var(--ink-soft);
}

.market-grid .share-loading { grid-column: 1 / -1; }

/* Бронь на карточке хозяина */
.stuff-booked {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sky);
  background: var(--sky-soft);
  border: 1px solid rgba(42, 122, 181, 0.4);
  border-radius: 99px;
  padding: 3px 10px;
  align-self: flex-start;
}

/* Коробки по людям */
.section-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.boxes-card { margin-bottom: 20px; }

.boxes-head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.boxes-hint {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--sun-soft);
  border: 1px solid rgba(34, 49, 42, 0.25);
  border-radius: 99px;
  padding: 2px 10px;
}

.box-person { padding: 12px 0 4px; border-top: 1.5px dashed var(--line); margin-top: 10px; }
.box-person:first-of-type { border-top: none; margin-top: 4px; }

.box-person-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--palm);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.box-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
}

.box-item-name b { color: var(--mango); font-weight: 700; }

.box-unbook {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.box-unbook:hover { border-color: var(--coral); color: var(--coral); background: var(--coral-soft); }

.boxes-open { font-size: 12px; padding: 6px 12px; margin-left: auto; }

/* Страница коробок */
.bp-person { margin-bottom: 34px; }

.bp-person-head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 4vw, 23px);
  letter-spacing: -0.01em;
  color: var(--palm);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px dashed var(--line);
}

.bp-date { font-size: 12px; color: var(--ink-soft); }

.bp-unbook {
  width: 100%;
  margin-top: 4px;
  font-size: 13px;
  padding: 8px 14px;
}

.bp-unbook:hover { background: var(--coral-soft); border-color: var(--coral); color: var(--coral); }

.boxes-back { color: var(--palm); font-weight: 600; text-decoration: none; }
.boxes-back:hover { text-decoration: underline; }

/* Вход */
.auth-modal { max-width: 360px; }

.auth-error {
  font-size: 13px;
  font-weight: 600;
  color: var(--coral);
  background: var(--coral-soft);
  border: 1.5px solid var(--coral);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
}

.auth-foot { justify-content: space-between; }

/* ============ Прочее ============ */

.footer {
  text-align: center;
  padding: 26px 16px 40px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 99px;
  border: 1.5px solid var(--paper);
  box-shadow: 0 10px 30px rgba(34, 49, 42, 0.4);
  animation: toastIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ============ Мобилка ============ */

@media (max-width: 720px) {
  .hero { padding: 18px 14px 16px; }
  .hero-actions { width: 100%; justify-content: flex-start; }
  .hero-countdown { gap: 6px; }
  .cd-caption { width: 100%; margin-left: 0; }

  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: span 1; }

  .cash-grid { grid-template-columns: 1fr; }
  .rates-grid { grid-template-columns: 1fr 1fr; }

  .stuff-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stuff-photo { font-size: 32px; }
  .stuff-body { padding: 10px 11px 12px; }
  .stuff-name { font-size: 13.5px; }

  .cards-grid { grid-template-columns: 1fr; }

  .item-modal-body { flex-direction: column; }
  .photo-zone { width: 100%; }

  .boarding-pass { grid-template-columns: 1fr; }
  .bp-stub {
    border-left: none;
    border-top: 2px dashed rgba(255, 252, 244, 0.4);
    flex-direction: row;
    padding: 14px;
  }
  .bp-stub .stub-emoji { font-size: 24px; }

  .doc-note { display: none; }

  .modal { max-height: calc(100dvh - 28px); }
}

@media (max-width: 380px) {
  .stuff-grid { grid-template-columns: 1fr; }
}
