/* alushta.shop — design system
   Crimean seaside warmth + classical typography. Built for elderly users:
   - body size 20px (>= 18px everywhere)
   - generous line-height 1.65
   - high contrast (warm-charcoal on cream)
   - touch targets >= 56px
   - single column on mobile, max-width readable content area
*/

:root {
  /* Colors — sun-bleached seaside palette */
  --paper:        #FBF6EC;
  --paper-soft:   #FFFCF5;
  --paper-warm:   #F4EBD7;
  --sand:         #E8D4B0;
  --sand-deep:    #D4C091;
  --sea:          #1B4965;
  --sea-deep:     #0F2E42;
  --sea-soft:     #5B89A8;
  --terracotta:   #C84B31;
  --terracotta-d: #A0381F;
  --terracotta-s: #E4836A;
  --olive:        #8B7355;
  --ink:          #2B1810;
  --ink-soft:     #5C4738;
  --border:       #D4C091;
  --border-dim:   #E8DBB8;
  --error:        #A0381F;
  --error-bg:     #F7E3DA;
  --success:      #4F6F44;
  --success-bg:   #E4ECDD;
  --warn:         #8B5E14;
  --warn-bg:      #F4E6C3;

  /* Typography */
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-body:    "PT Serif", Georgia, "Times New Roman", serif;
  --font-mono:    "JetBrains Mono", "SF Mono", "Courier New", monospace;

  /* Type scale — elderly readable. Mobile-first. */
  --t-xs:   16px;
  --t-sm:   18px;
  --t-base: 20px;
  --t-lg:   24px;
  --t-xl:   30px;
  --t-2xl:  38px;
  --t-3xl:  48px;
  --t-4xl:  60px;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Layout */
  --content-w:  1200px;  /* default container width — wide */
  --reading-w:   720px;  /* narrower max for prose blocks (forms, auth cards, lede) */
  --radius:    6px;
  --radius-lg: 14px;
  --touch:     56px;

  /* Shadows — warm afternoon light */
  --shadow-sm: 0 2px 6px rgba(43, 24, 16, 0.07);
  --shadow:    0 8px 24px rgba(43, 24, 16, 0.10);
  --shadow-lg: 0 20px 48px rgba(43, 24, 16, 0.16);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, #FFF4DD 0%, transparent 40%),
    radial-gradient(circle at 80% 100%, #E1EEF3 0%, transparent 50%),
    var(--paper);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle paper grain */
.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.25  0 0 0 0 0.15  0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

a {
  color: var(--sea);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: var(--terracotta); }

::selection { background: var(--sand); color: var(--ink); }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--s-5);
  position: relative;
  z-index: 1;
}
.main {
  padding-top: var(--s-7);
  padding-bottom: var(--s-9);
  min-height: 60vh;
}

/* ---- Header ---- */
.site-header {
  background: var(--paper-soft);
  border-bottom: 1px solid var(--border-dim);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: 72px;
  padding-top: var(--s-3);
  padding-bottom: var(--s-3);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--sea-deep);
}
.brand-mark { width: 44px; height: 44px; flex-shrink: 0; }
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-lg);
  letter-spacing: 0.5px;
  display: flex;
  align-items: baseline;
}
.brand-line-1 { color: var(--sea-deep); }
.brand-dot { color: var(--terracotta); }
.brand-line-2 { color: var(--terracotta); font-style: italic; }

.nav {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--s-2) var(--s-4);
  font-size: var(--t-sm);
  color: var(--sea-deep);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.nav-link:hover {
  color: var(--terracotta);
  background: var(--paper-warm);
}
.nav-link--cta {
  background: var(--sea);
  color: var(--paper);
  border-color: var(--sea);
}
.nav-link--cta:hover { background: var(--sea-deep); color: var(--paper); }
.logout-form { margin: 0; }
.nav-link.as-button {
  font-family: var(--font-body);
  background: none;
  cursor: pointer;
}

/* ---- Hero ---- */
.hero {
  padding: var(--s-6) 0 var(--s-7);
  text-align: center;
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--olive);
  font-size: var(--t-sm);
  letter-spacing: 0.5px;
  margin-bottom: var(--s-4);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--t-3xl);
  line-height: 1.1;
  color: var(--sea-deep);
  margin-bottom: var(--s-5);
}
.hero-title em {
  font-style: italic;
  color: var(--terracotta);
  font-weight: 500;
}
.hero-lede {
  font-size: var(--t-lg);
  line-height: 1.55;
  max-width: 640px;
  margin: 0 auto;
  color: var(--ink-soft);
}
.hero-decor {
  max-width: 640px;
  margin: var(--s-6) auto 0;
}
.hero-decor svg { width: 100%; height: 60px; }

/* ---- Section titles ---- */
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-2xl);
  color: var(--sea-deep);
  margin: var(--s-7) 0 var(--s-5);
  padding-bottom: var(--s-2);
  border-bottom: 2px solid var(--terracotta);
  display: inline-block;
}
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-2xl);
  color: var(--sea-deep);
  margin-bottom: var(--s-5);
}

/* ---- Object grid ---- */
.object-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 720px)  { .object-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .object-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1400px) { .object-grid { grid-template-columns: repeat(4, 1fr); } }
.object-card {
  position: relative;
  background: var(--paper-soft);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  padding-left: calc(var(--s-6) + 8px);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.object-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.object-card-stripe {
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 6px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--terracotta) 0%, var(--sea) 100%);
}
.object-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-xl);
  color: var(--sea-deep);
  line-height: 1.15;
}
.object-card-loc {
  font-size: var(--t-sm);
  color: var(--olive);
  font-style: italic;
}
.object-card-desc {
  font-size: var(--t-base);
  color: var(--ink-soft);
}
.object-card-prices {
  display: flex;
  gap: var(--s-5);
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px dashed var(--border);
}
.object-card-prices > div { display: flex; flex-direction: column; }
.object-card-prices dt {
  font-size: var(--t-sm);
  color: var(--olive);
  font-style: italic;
}
.object-card-prices dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-lg);
  color: var(--sea-deep);
  margin: 0;
}

/* ---- Object detail ---- */
.back-link {
  display: inline-block;
  font-size: var(--t-sm);
  margin-bottom: var(--s-5);
  color: var(--sea);
  text-decoration: none;
}
.back-link:hover { color: var(--terracotta); }

.object-detail {
  background: var(--paper-soft);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: var(--s-7);
  box-shadow: var(--shadow);
  max-width: var(--reading-w);
  margin: 0 auto;
}
.object-detail-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-3xl);
  line-height: 1.1;
  color: var(--sea-deep);
  margin-bottom: var(--s-3);
}
.object-detail-loc {
  font-size: var(--t-base);
  font-style: italic;
  color: var(--olive);
  margin-bottom: var(--s-5);
}
.object-detail-desc {
  font-size: var(--t-lg);
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-6);
  border-bottom: 1px dashed var(--border);
}

/* ---- Buy form ---- */
.buy-form { display: flex; flex-direction: column; gap: var(--s-5); }
.buy-row {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-bottom: 1px dashed var(--border);
}
.buy-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-4);
  font-size: var(--t-lg);
}
.buy-label-name { color: var(--sea-deep); font-weight: 400; }
.buy-label-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-xl);
  color: var(--terracotta);
}
.qty {
  display: flex;
  align-items: stretch;
  gap: var(--s-3);
  justify-content: center;
}
.qty-btn {
  flex-shrink: 0;
  width: var(--touch);
  height: var(--touch);
  font-size: var(--t-2xl);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--sea-deep);
  background: var(--paper-warm);
  border: 2px solid var(--sea-deep);
  border-radius: var(--radius);
  cursor: pointer;
  line-height: 1;
  user-select: none;
  transition: all 0.1s ease;
}
.qty-btn:hover { background: var(--sea-deep); color: var(--paper); }
.qty-btn:active { transform: scale(0.95); }
.qty-input {
  width: 100px;
  height: var(--touch);
  font-family: var(--font-mono);
  font-size: var(--t-xl);
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-hint {
  font-size: var(--t-sm);
  color: var(--ink-soft);
  background: var(--paper-warm);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius);
  border-left: 4px solid var(--olive);
}
.buy-hint--warn {
  background: var(--warn-bg);
  border-left-color: var(--warn);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--touch);
  padding: var(--s-3) var(--s-6);
  font-family: var(--font-body);
  font-size: var(--t-base);
  font-weight: 700;
  line-height: 1.2;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.1s ease, background 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-block { display: flex; width: 100%; }
.btn-large {
  font-size: var(--t-lg);
  min-height: 64px;
  padding: var(--s-4) var(--s-6);
}
.btn-primary {
  background: var(--sea);
  color: var(--paper);
  border-color: var(--sea);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--sea-deep); border-color: var(--sea-deep); color: var(--paper); }
.btn-outline {
  background: transparent;
  color: var(--sea-deep);
  border-color: var(--sea-deep);
}
.btn-outline:hover { background: var(--sea-deep); color: var(--paper); }
.btn-danger {
  background: transparent;
  color: var(--terracotta-d);
  border-color: var(--terracotta);
}
.btn-danger:hover { background: var(--terracotta); color: var(--paper); border-color: var(--terracotta); }

/* ---- Auth card ---- */
.auth-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--paper-soft);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: var(--s-7);
  box-shadow: var(--shadow);
}
.auth-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-2xl);
  color: var(--sea-deep);
  margin-bottom: var(--s-4);
  line-height: 1.1;
}
.auth-lede {
  font-size: var(--t-lg);
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: var(--s-6);
}
.auth-form { display: flex; flex-direction: column; gap: var(--s-4); }
.auth-footer {
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px dashed var(--border);
  font-size: var(--t-sm);
  color: var(--ink-soft);
  text-align: center;
}

/* ---- Form rows ---- */
.form-row { display: flex; flex-direction: column; gap: var(--s-2); }
.form-row label {
  font-size: var(--t-sm);
  color: var(--ink-soft);
  font-weight: 700;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  min-height: var(--touch);
  padding: var(--s-3) var(--s-4);
  font-family: var(--font-body);
  font-size: var(--t-base);
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--border);
  border-radius: var(--radius);
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--sea);
  background: var(--paper-soft);
  box-shadow: 0 0 0 3px rgba(27, 73, 101, 0.15);
}
.form-row textarea { min-height: 120px; resize: vertical; }
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 600px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
}

.optional-fields {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.optional-legend {
  padding: 0 var(--s-3);
  font-size: var(--t-sm);
  color: var(--olive);
  font-style: italic;
}

.token-input {
  font-family: var(--font-mono) !important;
  font-size: var(--t-lg) !important;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---- Token display ---- */
.token-card {
  background: var(--sea-deep);
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 8px);
  border: 2px solid var(--sea-deep);
  border-radius: var(--radius);
  padding: var(--s-5);
  margin: var(--s-5) 0;
  overflow-x: auto;
  text-align: center;
}
.token-card--small { padding: var(--s-4); }
.token-code {
  font-family: var(--font-mono);
  font-size: var(--t-xl);
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--paper);
  word-break: break-all;
  white-space: pre-wrap;
}
.token-card--small .token-code { font-size: var(--t-lg); }
.token-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.token-actions .btn { flex: 1 1 220px; }
.token-tips {
  background: var(--paper-warm);
  border-radius: var(--radius);
  padding: var(--s-5);
  margin-bottom: var(--s-5);
  font-size: var(--t-sm);
}
.token-tips p { margin-bottom: var(--s-2); }
.token-tips p:last-child { margin-bottom: 0; }

/* ---- Cabinet ---- */
.cabinet { max-width: 1000px; margin: 0 auto; }
.cabinet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  margin-bottom: var(--s-6);
}
@media (min-width: 760px) {
  .cabinet-grid { grid-template-columns: 1fr 1fr; }
}
.cab-card {
  background: var(--paper-soft);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-sm);
}
.cab-card--token { background: linear-gradient(180deg, var(--paper-soft) 0%, var(--paper-warm) 100%); }
.cab-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-xl);
  color: var(--sea-deep);
  margin-bottom: var(--s-2);
}
.cab-card-lede {
  font-size: var(--t-sm);
  color: var(--ink-soft);
  margin-bottom: var(--s-3);
}

/* ---- Ticket list ---- */
.ticket-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.ticket-row {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  background: var(--paper-soft);
  border: 1px solid var(--border-dim);
  border-left: 6px solid var(--terracotta);
  border-radius: var(--radius);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 600px) {
  .ticket-row { flex-direction: row; align-items: center; justify-content: space-between; }
}
.ticket-row--void { border-left-color: var(--olive); opacity: 0.75; }
.ticket-row-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-lg);
  color: var(--sea-deep);
}
.ticket-row-loc { font-size: var(--t-sm); color: var(--olive); font-style: italic; }
.ticket-row-meta { font-size: var(--t-base); color: var(--ink-soft); }

/* ---- Ticket print ---- */
.ticket-print {
  background: var(--paper-soft);
  border: 2px solid var(--sea-deep);
  border-radius: var(--radius-lg);
  padding: var(--s-7);
  box-shadow: var(--shadow);
  margin: 0 auto var(--s-6);
  max-width: 900px;
}
.tp-head { text-align: center; margin-bottom: var(--s-6); padding-bottom: var(--s-5); border-bottom: 2px dashed var(--border); }
.tp-eyebrow { font-style: italic; color: var(--olive); font-size: var(--t-sm); letter-spacing: 1px; }
.tp-title { font-family: var(--font-display); font-size: var(--t-2xl); color: var(--sea-deep); line-height: 1.1; margin: var(--s-2) 0; }
.tp-loc { font-size: var(--t-base); color: var(--ink-soft); font-style: italic; }
.tp-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  align-items: center;
  margin-bottom: var(--s-6);
}
@media (min-width: 680px) {
  .tp-body { grid-template-columns: auto 1fr; }
}
.tp-qr { text-align: center; }
.tp-qr img { max-width: 100%; height: auto; background: white; padding: 12px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.tp-qr-cap { font-size: var(--t-sm); color: var(--ink-soft); margin-top: var(--s-3); font-style: italic; }
.tp-meta { display: flex; flex-direction: column; gap: var(--s-3); }
.tp-meta > div { display: flex; justify-content: space-between; gap: var(--s-4); padding-bottom: var(--s-2); border-bottom: 1px dashed var(--border); }
.tp-meta dt { color: var(--ink-soft); font-size: var(--t-sm); }
.tp-meta dd { color: var(--sea-deep); font-weight: 700; }
.tp-actions { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-4); }
@media (min-width: 600px) { .tp-actions { flex-direction: row; } .tp-actions .btn { flex: 1; } }
.tp-tip { font-size: var(--t-sm); color: var(--ink-soft); background: var(--paper-warm); padding: var(--s-4); border-radius: var(--radius); border-left: 4px solid var(--olive); }

/* ---- Scan view (kassir / public) ---- */
.scan { max-width: 800px; margin: 0 auto; }
.scan-card {
  border-radius: var(--radius-lg);
  padding: var(--s-7);
  box-shadow: var(--shadow);
  border: 2px solid;
}
.scan-card--ok   { background: var(--success-bg); border-color: var(--success); }
.scan-card--void { background: var(--paper-warm); border-color: var(--olive); }
.scan-status {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-2xl);
  margin-bottom: var(--s-4);
}
.scan-status-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  font-size: var(--t-2xl);
  color: var(--paper);
  flex-shrink: 0;
}
.scan-status--ok .scan-status-mark { background: var(--success); }
.scan-status--ok .scan-status-text { color: var(--success); }
.scan-status--void .scan-status-mark { background: var(--olive); }
.scan-status--void .scan-status-text { color: var(--ink); }
.scan-when {
  font-size: var(--t-lg);
  color: var(--ink);
  padding: var(--s-3) var(--s-4);
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius);
  margin-bottom: var(--s-5);
}
.scan-meta { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-5); }
.scan-meta > div { display: flex; justify-content: space-between; gap: var(--s-4); padding-bottom: var(--s-2); border-bottom: 1px dashed var(--border); }
.scan-meta dt { color: var(--ink-soft); font-size: var(--t-sm); }
.scan-meta dd { color: var(--sea-deep); font-weight: 700; }
.scan-actions { margin-top: var(--s-5); }

/* ---- Owner ---- */
.owner { max-width: 1100px; margin: 0 auto; }
.object-list-flat { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.object-row {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  background: var(--paper-soft);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: var(--s-5);
}
.object-row-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
@media (min-width: 600px) {
  .object-row-body { flex-direction: row; align-items: center; justify-content: space-between; }
}
.object-row-title { font-family: var(--font-display); font-size: var(--t-xl); color: var(--sea-deep); font-weight: 700; }
.object-row-loc { font-size: var(--t-sm); color: var(--olive); font-style: italic; }
.object-row-meta { font-size: var(--t-sm); color: var(--ink-soft); }
.object-row-actions { display: flex; flex-direction: column; gap: var(--s-2); flex-shrink: 0; }
.object-row-actions form { margin: 0; }
.object-row-actions .btn { width: 100%; min-width: 200px; }
.object-edit { border-top: 1px solid var(--border-dim); padding-top: var(--s-3); }
.object-edit-toggle {
  cursor: pointer;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--sea-deep);
  width: max-content;
}
.object-edit-toggle:hover { color: var(--terracotta); }
.object-edit[open] .object-edit-toggle { margin-bottom: var(--s-4); }
.object-edit-form { margin: 0; }
.object-edit-buttons { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.object-edit-buttons .btn { flex: 1; min-width: 140px; }
.test-clear-all { margin-bottom: var(--s-5); }
.test-ticket-sublist {
  list-style: none;
  padding: 0;
  margin-top: var(--s-2);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  font-size: var(--t-sm);
  color: var(--ink-soft);
}
.test-ticket-link { margin-left: var(--s-2); font-size: var(--t-xs); }

/* ---- Legal note on object page ---- */
.buy-legal {
  margin-top: var(--s-4);
  font-size: var(--t-sm);
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ---- Legal documents page ---- */
.legal { max-width: 820px; margin: 0 auto; }
.legal-seller { font-size: var(--t-base); color: var(--ink-soft); margin-bottom: var(--s-5); }
.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  padding: var(--s-4);
  margin-bottom: var(--s-6);
  background: var(--paper-soft);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
}
.legal-doc { margin-bottom: var(--s-7); }
.legal-doc-title {
  font-family: var(--font-display);
  font-size: var(--t-xl);
  color: var(--sea-deep);
  border-bottom: 2px solid var(--terracotta);
  padding-bottom: var(--s-2);
  margin-bottom: var(--s-4);
}
.legal-doc h3 {
  font-size: var(--t-lg);
  color: var(--sea-deep);
  margin-top: var(--s-4);
  margin-bottom: var(--s-2);
}
.legal-doc p { margin-bottom: var(--s-3); line-height: 1.6; }
.legal-req { display: flex; flex-direction: column; gap: var(--s-2); }
.legal-req div { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.legal-req dt { min-width: 180px; color: var(--ink-soft); font-weight: 700; }
.legal-req dd { color: var(--ink); }
.legal-list { margin: 0 0 var(--s-3) var(--s-5); display: flex; flex-direction: column; gap: var(--s-1); line-height: 1.6; }

/* ---- Consent checkbox ---- */
.consent-row {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  margin: var(--s-4) 0;
  font-size: var(--t-sm);
  color: var(--ink-soft);
  line-height: 1.5;
}
.consent-row input { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; }
/* Single-line consent: vertically center the label against the checkbox. */
.consent-row--center { align-items: center; }
.consent-row--center input { margin-top: 0; }
.btn.is-disabled { opacity: 0.45; pointer-events: none; }
.btn-small { min-height: 40px; padding: var(--s-2) var(--s-3); font-size: var(--t-sm); margin-top: var(--s-2); }

/* ---- Admin ---- */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  margin-bottom: var(--s-6);
}
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(5, 1fr); } }
.stat {
  background: var(--paper-soft);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: var(--s-4);
  text-align: center;
}
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: var(--t-xl); color: var(--sea-deep); }
.stat-label { font-size: var(--t-xs); color: var(--ink-soft); font-style: italic; }

.table-wrap { overflow-x: auto; background: var(--paper-soft); border-radius: var(--radius); border: 1px solid var(--border-dim); }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.admin-table th, .admin-table td { padding: var(--s-3) var(--s-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-dim); }
.admin-table th { background: var(--paper-warm); color: var(--sea-deep); font-family: var(--font-display); font-size: var(--t-base); }
.admin-table tr:last-child td { border-bottom: none; }
.inline-form { margin: 0; }
.inline-form select { min-height: 44px; padding: var(--s-2) var(--s-3); font-size: var(--t-sm); }
.inline-form-stack {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-top: var(--s-3);
  padding: var(--s-4);
  background: var(--paper-warm);
  border-radius: var(--radius);
}
.inline-form-stack label { font-size: var(--t-sm); display: flex; flex-direction: column; gap: var(--s-1); }
.inline-form-stack input { min-height: 44px; padding: var(--s-2) var(--s-3); font-size: var(--t-sm); border-radius: var(--radius); border: 1px solid var(--border); }
.small { font-size: var(--t-xs); }
.mono { font-family: var(--font-mono); }

/* ---- Misc ---- */
.muted { color: var(--ink-soft); font-size: var(--t-sm); }
.empty-state {
  text-align: center;
  padding: var(--s-7);
  color: var(--ink-soft);
  font-style: italic;
  background: var(--paper-warm);
  border-radius: var(--radius);
}
.alert { padding: var(--s-4) var(--s-5); border-radius: var(--radius); margin-bottom: var(--s-4); font-size: var(--t-base); }
.alert-error { background: var(--error-bg); color: var(--error); border-left: 4px solid var(--error); }
.alert-warn  { background: var(--warn-bg);  color: var(--warn);  border-left: 4px solid var(--warn); }
.alert-ok    { background: var(--success-bg); color: var(--success); border-left: 4px solid var(--success); }

.badge {
  display: inline-block;
  padding: 2px var(--s-3);
  border-radius: 999px;
  font-size: var(--t-xs);
  font-weight: 700;
  font-family: var(--font-body);
  font-style: normal;
  letter-spacing: 0.5px;
  vertical-align: middle;
}
.badge-ok   { background: var(--success-bg); color: var(--success); }
.badge-void { background: var(--paper-warm); color: var(--olive); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border-dim);
  background: var(--paper-soft);
  padding: var(--s-6) 0;
  margin-top: var(--s-8);
  position: relative;
  z-index: 1;
}
.footer-line { font-family: var(--font-display); font-style: italic; font-size: var(--t-lg); color: var(--sea-deep); text-align: center; }
.footer-fine { font-size: var(--t-xs); color: var(--ink-soft); text-align: center; margin-top: var(--s-2); }

/* ---- Print (ticket) ---- */
@media print {
  body { background: white; }
  .paper-grain, .site-header, .site-footer, .back-link, .tp-actions, .tp-tip { display: none !important; }
  .main { padding: 0; }
  .ticket-print { box-shadow: none; border: 2px solid #000; }
}

/* ---- Larger screens ---- */
@media (min-width: 900px) {
  .container { padding: 0 var(--s-6); }
  body { font-size: 21px; }
  .hero-title { font-size: var(--t-4xl); }
}
