/* Sordino — warm paper, deep plum, brass. */

:root {
  --bg: #f6f1e9;
  --surface: #fffdf9;
  --surface-2: #f1eadf;
  --ink: #1f1724;
  --ink-2: #4a4150;
  --muted: #6e6474;
  --line: #e4dacb;
  --brand: #5b1f48;
  --brand-2: #7d2c5f;
  --brand-ink: #ffffff;
  --brass: #c8923f;
  --brass-ink: #2a1a05;
  --brass-text: #85571a;
  --ok: #276b4c;
  --ok-bg: #e2f1e8;
  --warn: #8a5300;
  --warn-bg: #fbecd2;
  --danger: #a3261e;
  --danger-bg: #fbe3e0;
  --info-bg: #ece4f3;
  --hero-1: #2a1430;
  --hero-2: #4a1b45;
  --logo-bg: #2a1430;
  --logo-strings: #f3e6d4;
  --shadow: 0 1px 2px rgba(40, 20, 40, .06), 0 8px 24px rgba(40, 20, 40, .07);
  --shadow-lg: 0 20px 60px rgba(30, 10, 30, .22);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --top-h: 64px;
  --tab-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141016;
    --surface: #1d171f;
    --surface-2: #261f29;
    --ink: #f3ece4;
    --ink-2: #d4cad6;
    --muted: #a99fae;
    --line: #342b37;
    --brand: #c97aa9;
    --brand-2: #e095c0;
    --brand-ink: #1a0f17;
    --brass: #dcaa5c;
    --brass-text: #e2b569;
    --ok: #74c69d;
    --ok-bg: #18301f;
    --warn: #f0b860;
    --warn-bg: #33260f;
    --danger: #f08a80;
    --danger-bg: #3a1a17;
    --info-bg: #2a2133;
    --logo-bg: #3a1d3c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141016; --surface: #1d171f; --surface-2: #261f29; --ink: #f3ece4; --ink-2: #d4cad6; --muted: #a99fae;
  --line: #342b37; --brand: #c97aa9; --brand-2: #e095c0; --brand-ink: #1a0f17; --brass: #dcaa5c; --brass-text: #e2b569; --ok: #74c69d;
  --ok-bg: #18301f; --warn: #f0b860; --warn-bg: #33260f; --danger: #f08a80; --danger-bg: #3a1a17; --info-bg: #2a2133;
  --logo-bg: #3a1d3c; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* A word or link longer than its line breaks instead of pushing the page wide. */
body, h1, h2, h3, h4, p, li, td, .pre { overflow-wrap: anywhere; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.pre { white-space: pre-wrap; }
.spacer { flex: 1; }
[hidden] { display: none !important; }

.ico { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.ico.fill { fill: currentColor; }
.ico.big { width: 44px; height: 44px; stroke-width: 1.4; }
.ico.ok { color: var(--ok); }

/* --- Top bar & tab bar ---------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.topbar-inner { max-width: 1200px; margin: 0 auto; height: calc(var(--top-h) - 1px); padding: 0 16px; display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; }
.logo-word { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 25px; letter-spacing: -.02em; }
.logo.small .logo-mark { width: 26px; height: 26px; }
.logo.small .logo-word { font-size: 19px; }
.topnav { display: none; gap: 4px; }
.topnav a { position: relative; color: var(--ink-2); padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 15px; }
.topnav a:hover { background: var(--surface-2); text-decoration: none; }
.topnav a.active { background: var(--ink); color: var(--bg); }
.topnav .badge { position: absolute; top: 0; right: -2px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
@media (min-width: 900px) {
  .topnav { display: flex; }
  .tabbar { display: none !important; }
}
@media (max-width: 520px) { .hide-sm { display: none; } }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.tabbar a:hover { text-decoration: none; }
.tabbar a .ico { width: 23px; height: 23px; }
.tabbar a.active { color: var(--brand); }
.tabbar a.active::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.tabbar .badge { position: absolute; top: 7px; left: calc(50% + 6px); }

.badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font: 700 11px var(--font); }

/* --- Layout --------------------------------------------------------------- */

/* dvh, not vh: on an iPhone 100vh is the screen without Safari's toolbars,
   taller than what shows, and the page scrolls by the difference. */
.main { min-height: calc(100vh - var(--top-h)); min-height: calc(100dvh - var(--top-h)); outline: none; }
.main.loading { opacity: .6; transition: opacity .2s .15s; }
.page { max-width: 1200px; margin: 0 auto; padding: 28px 16px; }
.page.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { margin: 0; max-width: 60ch; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.link { font-weight: 600; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 6px; margin: -6px 0 8px -6px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 15px; }
.back-link:hover { text-decoration: none; background: var(--surface-2); color: var(--ink); }
.act-hero .back-link:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.block { margin-bottom: 32px; }
.grid { display: grid; gap: 18px; }
.acts-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.list { display: flex; flex-direction: column; gap: 12px; }

/* --- Buttons & forms ------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 15px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s, background .15s, box-shadow .15s, border-color .15s;
}
.btn:hover { text-decoration: none; border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid currentColor; border-color: var(--brand-ink) var(--brand-ink) transparent transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.ghost.busy::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.brass { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger-text { color: var(--danger); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn.big { min-height: 52px; padding: 12px 26px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.icon-only { width: 46px; padding: 0; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 8px; }
.actions.wrap { flex-wrap: wrap; justify-content: flex-start; }

.form { display: flex; flex-direction: column; gap: 16px; }
.form label, .field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.label { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; margin: 0; }
.req { color: var(--danger); }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font: 400 16px var(--font);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.form label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--ink); font-size: 15px; }
.check input { width: 20px; min-height: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.form-error { color: var(--danger); font-weight: 500; margin: 0; min-height: 0; }
.form-error:empty { display: none; }
.row2, .row3 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 1.3fr 1fr 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 16px; }
legend { font-family: var(--serif); font-size: 20px; font-weight: 600; padding: 0; margin-bottom: 12px; color: var(--ink); }
.card-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card-form fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 22px; }
.sticky-actions { position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); background: var(--surface); padding: 12px 0 4px; margin-top: 0; }
@media (min-width: 900px) { .sticky-actions { bottom: 0; } }
.inline-form { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { flex: 1; min-width: 160px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 500; border: 1px solid transparent; }
.chip.big { padding: 10px 18px; font-size: 15px; background: var(--surface); border-color: var(--line); color: var(--ink); }
.chip.big:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.chip.muted { color: var(--muted); }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.toggle { cursor: pointer; font: 500 14px var(--font); padding: 8px 14px; min-height: 38px; background: var(--surface); border-color: var(--line); color: var(--ink); }
.chip.toggle.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip.on.removable { background: var(--brand); color: var(--brand-ink); border: 0; cursor: pointer; font: 500 13px var(--font); padding: 6px 12px; }

.multi { display: flex; flex-direction: column; gap: 8px; }
.multi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.multi-chips:empty { display: none; }
.multi-box { position: relative; }
.multi-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow: auto; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.multi-list li { display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 8px; cursor: pointer; font-weight: 400; color: var(--ink); }
.multi-list li:hover { background: var(--surface-2); }
.multi-list li .ico { opacity: 0; color: var(--brand); }
.multi-list li.on .ico { opacity: 1; }
.multi-list li.on { font-weight: 600; }

.photo-field { display: flex; flex-direction: column; gap: 8px; }
.photo-row { display: flex; gap: 14px; align-items: center; }
.photo-row > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-preview { width: 104px; height: 78px; border-radius: 12px; background: var(--surface-2) center/cover; display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--line); }
.photo-preview.busy { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.file-btn { cursor: pointer; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photo-grid:empty { display: none; }
.photo-tile { aspect-ratio: 4/3; border-radius: 12px; background: center/cover; position: relative; }
.photo-tile .icon-btn { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; background: rgba(0, 0, 0, .55); color: #fff; }

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden; color: #f8efe6;
  background:
    radial-gradient(80% 120% at 85% 0%, #8a3a5f 0%, transparent 55%),
    radial-gradient(60% 90% at 0% 100%, #6a4a1c 0%, transparent 60%),
    linear-gradient(160deg, var(--hero-1), var(--hero-2));
}
.role-cards { display: grid; gap: 14px; grid-template-columns: 1fr; max-width: 820px; }
@media (min-width: 640px) { .role-cards { grid-template-columns: 1fr 1fr; } }
.role-card {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 20px; border-radius: 20px; color: #fff;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .2s, background .2s, border-color .2s;
}
.role-card:hover { text-decoration: none; transform: translateY(-3px); background: rgba(255, 255, 255, .14); border-color: rgba(232, 183, 102, .7); }
.role-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #e8b766; color: #2a1430; margin-bottom: 8px; }
.role-ico .ico { width: 24px; height: 24px; }
.role-title { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.role-text { color: #e4d3c6; font-size: 15px; }
.role-go { margin-top: 8px; font-weight: 700; color: #e8b766; }

.how { }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps li p { margin: 0; color: var(--muted); font-size: 15px; }
.steps h3 { margin-bottom: 4px; }
.step-n { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-family: var(--serif); font-weight: 700; }

.share-band { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 28px; border-radius: 24px; background: linear-gradient(120deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); }
.share-band h2 { margin-bottom: 4px; }
.share-band p { margin: 0; color: var(--muted); }

.footer { border-top: 1px solid var(--line); margin-top: 20px; }
.footer .page { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding-top: 20px; padding-bottom: 28px; font-size: 14px; }

/* --- Cards ---------------------------------------------------------------- */

.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
a.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .cover { position: relative; aspect-ratio: 16/10; background: var(--surface-2) center/cover; }
.cover-letter { position: absolute; left: 18px; bottom: 6px; font-family: var(--serif); font-style: italic; font-size: 72px; line-height: 1; color: rgba(255, 255, 255, .85); }
.cover-tag { position: absolute; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(20, 10, 20, .55); color: #fff; font-size: 13px; font-weight: 600; backdrop-filter: blur(6px); }
.cover-tag .ico { width: 15px; height: 15px; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-size: 19px; }
.card .meta { margin: 0; font-size: 14px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.price { font-weight: 700; font-size: 16px; }
.price small, .side-price small { font-weight: 500; color: var(--muted); }
.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.rating .ico { width: 16px; height: 16px; color: var(--brass); }
.skeleton .cover, .skeleton i { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton i { display: block; height: 14px; border-radius: 6px; }
.skeleton i + i { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.row-card { display: flex; gap: 16px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.row-card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); transform: translateY(-1px); }
.row-card h3 { margin: 0 0 2px; font-size: 18px; }
.row-card p { margin: 0 0 6px; font-size: 14px; }
.row-main { flex: 1; min-width: 0; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
@media (max-width: 560px) { .row-card { flex-wrap: wrap; } .row-side { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; } }
.date-block { flex: none; width: 58px; height: 62px; border-radius: 14px; background: var(--info-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--brand); }
.date-block b { font-family: var(--serif); font-size: 26px; line-height: 1; }
.date-block span { font-size: 12px; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }

.status { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.s-your_turn { background: var(--warn-bg); color: var(--warn); }
.s-waiting { background: var(--info-bg); color: var(--brand); }
.s-unpaid { background: var(--warn-bg); color: var(--warn); }
.s-confirmed { background: var(--ok-bg); color: var(--ok); }
.s-done { background: var(--surface-2); color: var(--ink-2); }
.s-declined, .s-cancelled { background: var(--danger-bg); color: var(--danger); }

.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; color: #fff; font-weight: 700; background: var(--surface-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.md { width: 44px; height: 44px; font-size: 15px; }
.avatar.xl { width: 92px; height: 92px; font-size: 30px; font-family: var(--serif); }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 48px 16px; color: var(--muted); }
.empty h2, .empty h3 { color: var(--ink); margin: 6px 0 2px; }
.empty .btn { margin-top: 10px; }
.empty.small { padding: 24px 16px; }
.empty.wide { grid-column: 1 / -1; }

/* --- Filters -------------------------------------------------------------- */

.filters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
.filters .grow, .filters .filter-toggle { grid-column: 1 / -1; }
.more-filters { display: contents; }
@media (max-width: 899px) { .filters:not(.open) .more-filters { display: none; } }
@media (min-width: 900px) { .filters { grid-template-columns: 2fr repeat(6, 1fr); } .filters .grow { grid-column: auto; } .filter-toggle { display: none; } }
.grid + .section-head, .empty + .section-head, .venue-list + .section-head { margin-top: 32px; }
@media (max-width: 600px) {
  .acts-grid .card .cover { aspect-ratio: 16/8; }
  .page .stepper li { min-width: 0; font-size: 11.5px; }
}
.result-count { margin: 0 0 12px; font-size: 14px; }

/* --- Act page ------------------------------------------------------------- */

.act-hero { position: relative; min-height: 300px; background: center/cover; color: #fff; display: flex; align-items: flex-end; }
.act-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 8, 20, .15), rgba(20, 8, 20, .78)); }
.act-hero-inner { position: relative; width: 100%; padding-top: 24px; padding-bottom: 28px; }
.act-hero h1 { color: #fff; font-size: clamp(32px, 6vw, 54px); margin: 10px 0 12px; }
.act-hero .back-link { color: rgba(255, 255, 255, .85); }
.act-hero .chip { background: rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(6px); }
.owner { display: inline-flex; align-items: center; gap: 8px; color: inherit; font-weight: 600; min-height: 40px; }
.owner:hover { text-decoration: none; opacity: .85; }
.act-hero .owner { color: #fff; }
.act-layout { display: grid; gap: 24px; grid-template-columns: 1fr; padding-top: 24px; }
@media (min-width: 900px) { .act-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .act-side { position: sticky; top: calc(var(--top-h) + 16px); } }
.page .act-layout { padding-top: 8px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.side-card h3 { margin: 0; }
.side-price { font-family: var(--serif); font-size: 30px; font-weight: 600; }
.side-actions { display: flex; flex-direction: column; gap: 8px; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.facts li { display: flex; gap: 10px; align-items: center; }
.facts .ico { color: var(--brand); }
.facts.big { gap: 14px; font-size: 17px; margin: 18px 0 26px; }
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.repertoire { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .repertoire { grid-template-columns: 1fr 1fr; } }
.repertoire li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.repertoire .ico { color: var(--brass); width: 16px; height: 16px; }
.quote { font-family: var(--serif); font-style: italic; color: var(--ink-2); margin: 0; }

.rating-summary { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.rating-big { font-family: var(--serif); font-size: 52px; font-weight: 600; line-height: 1; display: flex; flex-direction: column; }
.rating-big small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 4px; }
.crits { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 8px; }
.crit { display: grid; grid-template-columns: 150px 1fr 34px; gap: 10px; align-items: center; font-size: 14px; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brass), var(--brand)); border-radius: 99px; }
.reviews { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.review p { margin: 0; }

/* --- Auth ----------------------------------------------------------------- */

.auth-page { display: grid; place-items: start center; padding-top: 40px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px 24px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 560px; }
.auth-card h1 { font-size: 32px; }
.demo-hint { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--info-bg); font-size: 13px; color: var(--ink-2); }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; font: 400 14px var(--font); }
.role-opt .ico { color: var(--brand); width: 24px; height: 24px; }
.role-opt b { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.role-opt small { color: var(--muted); }
.role-opt.on { border-color: var(--brand); background: var(--info-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }

.prose h2 { margin-top: 26px; }
.draft-note { padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-weight: 500; }

/* --- Offer / booking ------------------------------------------------------ */

.mini-act { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); margin-bottom: 18px; }
.mini-act > div { display: flex; flex-direction: column; }
.commission-note { display: flex; gap: 12px; padding: 14px; border-radius: 12px; background: var(--info-bg); }
.commission-note .ico { color: var(--brand); width: 24px; height: 24px; }
.commission-note p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }

.booking-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.booking-head h1 { margin-bottom: 8px; }
.booking-head-side { display: flex; align-items: center; gap: 10px; }
.stepper { list-style: none; padding: 0; margin: 0 0 22px; display: flex; gap: 0; overflow-x: auto; }
.stepper li { flex: 1; min-width: 74px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }
.stepper li::before { content: ''; position: absolute; top: 15px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper .dot { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); font-weight: 700; }
.stepper .dot .ico { width: 16px; height: 16px; }
.stepper li.done { color: var(--ink); }
.stepper li.done .dot { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.stepper li.done::before, .stepper li.now::before { background: var(--brand); }
.stepper li.now { color: var(--brand); }
.stepper li.now .dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.stepper.failed li.now .dot { border-color: var(--danger); color: var(--danger); box-shadow: none; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel h3 { margin-bottom: 6px; }
.panel p:last-child { margin-bottom: 0; }
.action-panel { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 8%, transparent), var(--shadow); }
.pay-panel { background: linear-gradient(135deg, var(--surface), var(--warn-bg)); }
.muted-panel { background: var(--surface-2); box-shadow: none; }
.contract-panel { display: flex; gap: 16px; align-items: flex-start; }
.contract-panel .ico { color: var(--brand); }
.counter-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.rate-form .rate-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.star-input { display: inline-flex; gap: 2px; }
.star-input button { border: 0; background: none; padding: 4px; cursor: pointer; color: var(--line); width: 40px; height: 40px; }
.star-input button .ico { width: 30px; height: 30px; }
.star-input button.on { color: var(--brass); }
.star-input button.on .ico { fill: currentColor; }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: flex; gap: 14px; padding: 0 0 16px; }
.tl-dot { flex: none; width: 14px; height: 14px; margin-top: 5px; border-radius: 50%; background: var(--brand); border: 3px solid var(--bg); position: relative; z-index: 1; }
.tl-note { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }

.gig-head { display: flex; gap: 16px; align-items: center; }
.gig-head h1 { margin-bottom: 2px; }
.proposal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.proposal-list a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--ink); }
.proposal-list a:hover { background: var(--surface-2); text-decoration: none; }
.proposal-list a > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.tabs a:hover { text-decoration: none; }
.tabs a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs .count { font-size: 12px; opacity: .7; }

/* --- Chat ----------------------------------------------------------------- */

.chat-layout { display: grid; grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); height: calc(100dvh - var(--top-h) - var(--tab-h) - env(safe-area-inset-bottom)); max-width: 1200px; margin: 0 auto; }
@media (min-width: 900px) { .chat-layout { grid-template-columns: 340px 1fr; height: calc(100dvh - var(--top-h)); border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.conv-pane { border-right: 1px solid var(--line); overflow-y: auto; background: var(--surface); }
.conv-head { padding: 18px 16px 8px; }
.conv-head h1 { font-size: 28px; margin: 0; }
.conv-list { list-style: none; margin: 0; padding: 4px 8px 16px; }
.conv-list a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; color: var(--ink); }
.conv-list a:hover { background: var(--surface-2); text-decoration: none; }
.conv-list a.on { background: var(--info-bg); }
.conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.preview { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-list a.unread b, .conv-list a.unread .preview { color: var(--ink); font-weight: 700; }
.conv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.thread-pane { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
@media (max-width: 899px) {
  .chat-layout.has-thread .conv-pane { display: none; }
  .chat-layout:not(.has-thread) .thread-pane { display: none; }
}
@media (min-width: 900px) { .back-only-sm { display: none !important; } }
.thread-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.thread-who { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.thread-who:hover { text-decoration: none; }
.thread-who > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.venue-where { margin-bottom: 8px; }
.venue-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.venue-photo { aspect-ratio: 4/3; border: 0; padding: 0; border-radius: 12px; background: var(--surface-2) center/cover; cursor: zoom-in; transition: transform .15s, box-shadow .15s; }
.venue-photo:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.modal.wide { max-width: min(1000px, 100%); }
.lightbox { padding-top: 26px; }
.lightbox img { display: block; width: 100%; max-height: calc(100dvh - 160px); object-fit: contain; border-radius: 12px; background: #000; }
.lightbox-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 10px; }
.icon-btn.flip .ico { transform: rotate(180deg); }
.contact-card { margin-top: 16px; }
.contact-card.locked { flex-direction: row; align-items: center; gap: 12px; background: var(--surface-2); box-shadow: none; }
.contact-card.locked .ico { color: var(--brand); width: 24px; height: 24px; }
.contact-card.locked p { margin: 0; }
.contact-card a { overflow-wrap: anywhere; }
.chip.new { background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.due-line { font-weight: 600; }
.messages { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; }
#msg-items { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.load-more { align-self: center; margin-bottom: 10px; }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.bubble { max-width: min(78%, 560px); padding: 9px 13px 6px; border-radius: 18px 18px 18px 6px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); border-radius: 18px 18px 6px 18px; }
.bubble time { display: block; text-align: right; font-size: 11px; opacity: .72; margin-top: 2px; }
.msg.mine .bubble time { opacity: .9; }
.sys-msg { align-self: center; margin: 8px 0; }
.sys-msg a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--info-bg); color: var(--brand); font-size: 13px; font-weight: 600; }
.sys-msg .ico { width: 16px; height: 16px; }
.day-sep { text-align: center; margin: 12px 0 6px; }
.day-sep span { font-size: 12px; color: var(--muted); font-weight: 600; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.composer textarea { min-height: 46px; max-height: 160px; border-radius: 22px; padding: 12px 16px; resize: none; }
.banned-note { margin: 0; padding: 14px; text-align: center; color: var(--danger); background: var(--danger-bg); }

/* --- Profile / admin ------------------------------------------------------ */

.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 26px; }
.profile-head h1 { margin-bottom: 2px; }
.profile-head p { margin: 0 0 4px; }
.profile-head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.profile-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .profile-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } }
.venue-list { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.venue-list li { display: flex; align-items: center; gap: 14px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.venue-list li > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.venue-thumb { width: 64px; height: 52px; border-radius: 10px; background: center/cover; flex: none; }
.pw-box { margin-top: 18px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pw-box summary { cursor: pointer; font-weight: 600; }
.pw-box form { margin-top: 14px; }
.lead-text { font-size: 18px; max-width: 70ch; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 28px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; }
.tile b { font-family: var(--serif); font-size: 34px; line-height: 1.1; }
.tile span { color: var(--muted); font-size: 14px; }
.money-list, .admin-list { list-style: none; padding: 0; margin: 14px 0 26px; display: flex; flex-direction: column; gap: 8px; }
.money-list li { display: flex; justify-content: space-between; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.admin-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.admin-list li > div { display: flex; flex-direction: column; min-width: 0; }
.admin-list .muted { font-size: 13px; overflow-wrap: anywhere; }
#user-q { margin-top: 6px; }

/* --- Modal & toast -------------------------------------------------------- */

.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(15, 8, 15, .5); opacity: 0; transition: opacity .2s; }
.modal-wrap.in { opacity: 1; }
.modal { position: relative; width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); border-radius: 22px; padding: 26px 22px 22px; box-shadow: var(--shadow-lg); transform: translateY(12px) scale(.98); transition: transform .2s; }
.modal-wrap.in .modal { transform: none; }
.modal-close { position: absolute; top: 10px; right: 10px; }
.confirm-text { font-size: 17px; margin: 8px 30px 18px 0; }
.checkout h2 { margin-bottom: 14px; }
.checkout-sum { display: flex; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 12px; background: var(--surface-2); margin-bottom: 16px; }
.checkout-sum b { font-family: var(--serif); font-size: 20px; }
.demo-ribbon { display: inline-block; margin: 0 0 12px; padding: 4px 10px; border-radius: 6px; background: var(--warn-bg); color: var(--warn); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.checkout.done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; }

.toasts { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
@media (min-width: 900px) { .toasts { bottom: 24px; } }
.toast { padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.toast.in { opacity: 1; transform: none; }
.toast.ok { background: var(--ok); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }

body[data-view="messages"] .footer { display: none; }
body[data-view="messages"] { padding-bottom: 0; }
@media (max-width: 899px) { body[data-view="messages"] .chat-layout { margin-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); } }
/* The thread scrolls inside itself; the page never does, so the header with
   the back arrow and the composer always stay on screen. */
body[data-view="messages"] .main { min-height: 0; }
/* While typing on a phone the keyboard needs the room the tab bar takes. */
@media (max-width: 899px) {
  html.typing .tabbar { display: none; }
  html.typing body[data-view="messages"] .chat-layout { margin-bottom: 0; height: calc(100dvh - var(--top-h)); }
}

/* ===========================================================================
   Design pass 2: the concert-hall hero, the header, our own select, covers
   with drawn instruments, tiles, and finer controls.
   ======================================================================== */

:root {
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Header */
.top-right { gap: 8px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2);
  font: 700 12.5px var(--font); letter-spacing: .04em; cursor: pointer; transition: border-color .15s, color .15s;
}
.lang-btn:hover { border-color: var(--brand); color: var(--brand); }
.lang-btn .ico { width: 17px; height: 17px; }
.login-btn { border-color: var(--line); background: var(--surface); }
.login-btn .ico { width: 18px; height: 18px; }
.login-btn.current { border-color: var(--brand); color: var(--brand); }
.topnav a.active { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 30%, transparent); }
@media (max-width: 480px) {
  .topbar-inner { gap: 10px; }
  .logo-word { display: none; }
  .top-right .btn.small { padding: 6px 12px; }
}
@media (max-width: 360px) { .login-btn span { display: none; } .login-btn { width: 40px; padding: 0 !important; } }

/* Buttons with a little depth */
.btn.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-2) 85%, #fff 15%), var(--brand) 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 18px color-mix(in srgb, var(--brand) 32%, transparent);
}
.btn.primary:hover { background: linear-gradient(180deg, var(--brand-2), var(--brand-2)); }
.btn.brass { background: linear-gradient(180deg, #e3b062, var(--brass)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 18px rgba(200, 146, 63, .35); }
.btn:focus-visible, .sel-btn:focus-visible, .lang-btn:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }

/* Hero: a dark hall, three warm spotlights, a staff drawn in light, a level meter. */
.hero {
  position: relative; overflow: hidden; color: #f8efe6; isolation: isolate;
  background: radial-gradient(120% 80% at 50% 120%, #3a1534 0%, transparent 60%), linear-gradient(170deg, #1b0c1f 0%, #2a1430 45%, #3d1739 100%);
}
.hero::after { content: ''; position: absolute; inset: 0; background-image: var(--grain); opacity: .22; mix-blend-mode: overlay; pointer-events: none; z-index: -1; }
.hero-light { position: absolute; z-index: -2; pointer-events: none; border-radius: 50%; filter: blur(60px); opacity: .55; }
.hero-light.l1 { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; right: 0; top: -12vw; background: radial-gradient(circle, #b8476f 0%, transparent 65%); animation: glow 9s ease-in-out infinite; }
.hero-light.l2 { width: 38vw; height: 38vw; max-width: 520px; max-height: 520px; left: 0; bottom: -10vw; background: radial-gradient(circle, #c8923f 0%, transparent 65%); opacity: .4; animation: glow 11s ease-in-out infinite reverse; }
.hero-light.l3 { width: 30vw; height: 30vw; max-width: 420px; max-height: 420px; left: 38%; top: -10vw; background: radial-gradient(circle, #7a3fa0 0%, transparent 65%); opacity: .35; animation: glow 13s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .25; } }
.hero-staff {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 21px, rgba(243, 217, 184, .14) 21px 22px) center 46% / 100% 110px no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
}
.hero-inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 72px 16px 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 700; color: #ecbd6e; margin-bottom: 16px; }
.eyebrow.dark { color: var(--brass-text); margin-bottom: 6px; }
.hero h1 { font-size: clamp(44px, 9vw, 92px); font-weight: 600; letter-spacing: -.035em; line-height: .98; margin-bottom: 20px; color: #fff; }
.hero h1 em {
  font-style: italic; font-weight: 500; padding-right: .1em;
  background: linear-gradient(100deg, #f6d48f 0%, #e3a54b 45%, #f3c9d8 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: clamp(17px, 2.2vw, 22px); max-width: 36ch; color: #ecdccd; margin-bottom: 36px; }
.hero-login { margin: 22px 0 0; color: #d9c5b6; font-size: 15px; }
.hero-login a { color: #f0c27a; font-weight: 700; display: inline-block; padding: 10px 0; }
.role-card { background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.role-ico { background: linear-gradient(160deg, #f3c97f, #c8923f); box-shadow: 0 8px 24px rgba(200, 146, 63, .35); }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 64px; padding: 0 16px; max-width: 1200px; margin: 0 auto; opacity: .75; }
.eq i { flex: 1; height: var(--h); border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #f0c27a, rgba(184, 71, 111, .2)); transform-origin: bottom; animation: level var(--s) ease-in-out var(--d) infinite alternate; }
@keyframes level { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@media (max-width: 640px) { .eq i:nth-child(n+33) { display: none; } }
@media (prefers-reduced-motion: reduce) { .eq i, .hero-light { animation: none; } }

/* Section kickers */
.kicker { margin: 0 0 6px; color: var(--brass-text); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; }
.page > h2, .section-head h2 { font-size: clamp(24px, 3vw, 32px); }

/* Covers: colour, a drawn instrument, a spot of light */
.card .cover, .act-hero { overflow: hidden; }
.cover .motif { position: absolute; right: -6%; bottom: -14%; width: 66%; height: auto; color: rgba(255, 255, 255, .26); transform: rotate(-12deg); transition: transform .5s cubic-bezier(.2, .7, .2, 1), color .3s; }
.cover-glow { position: absolute; inset: 0; background: radial-gradient(60% 70% at 20% 20%, rgba(255, 255, 255, .22), transparent 60%); }
.cover::after { content: ''; position: absolute; inset: 0; background-image: var(--grain); opacity: .25; mix-blend-mode: overlay; }
a.card:hover .cover .motif { transform: rotate(-6deg) scale(1.06); color: rgba(255, 255, 255, .36); }
.cover-tag { z-index: 1; }
.hero-motif { position: absolute; right: 4%; top: 50%; width: min(42vw, 360px); height: auto; transform: translateY(-50%) rotate(-12deg); color: rgba(255, 255, 255, .2); }
@media (max-width: 640px) { .hero-motif { width: 52vw; right: 0; } }

/* Who-tiles */
.who-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.who-tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 128px; padding: 16px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.who-tile:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.who-motif { width: 46px; height: 46px; color: var(--brand); stroke-width: 2.4; }
.who-tile::before { content: ''; position: absolute; width: 120px; height: 120px; right: -40px; top: -40px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brass) 28%, transparent), transparent 70%); }
@media (max-width: 400px) { .who-tiles { grid-template-columns: 1fr 1fr; } }

/* Steps */
.steps li { position: relative; overflow: hidden; }
.step-n { background: linear-gradient(160deg, var(--brand-2), var(--brand)); }

/* Our select */
.sel { position: relative; min-width: 0; }
.sel select { display: none; }
.sel-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 46px; padding: 10px 12px 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  font: 400 16px var(--font); text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.sel-btn:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.sel-btn[aria-expanded="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.sel-btn[aria-expanded="true"] .ico { transform: rotate(180deg); }
.sel-btn .ico { color: var(--muted); transition: transform .2s; }
.sel-val { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-val.placeholder { color: var(--muted); }
.sel-pop {
  position: fixed; z-index: 200; display: flex; flex-direction: column; max-height: 340px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top; transition: opacity .14s, transform .14s;
}
.sel-pop.up { transform-origin: bottom; transform: translateY(4px) scale(.98); }
.sel-pop.in { opacity: 1; transform: none; }
.sel-pop ul { list-style: none; margin: 0; padding: 6px; overflow-y: auto; overscroll-behavior: contain; }
.sel-pop li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 9px 12px; border-radius: 9px; cursor: pointer; color: var(--ink); }
.sel-pop li.opt-none { color: var(--muted); }
.sel-pop li .ico { width: 18px; height: 18px; color: var(--brand); opacity: 0; flex: none; }
.sel-pop li.on { font-weight: 600; color: var(--brand); }
.sel-pop li.on .ico { opacity: 1; }
.sel-pop li.active { background: var(--surface-2); }
.sel-search-wrap { display: flex; align-items: center; gap: 8px; margin: 8px 8px 0; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.sel-search-wrap .ico { color: var(--muted); width: 18px; height: 18px; }
.sel-search { border: 0; background: transparent; min-height: 40px; padding: 8px 0; box-shadow: none !important; }
.sel-pop.sheet {
  left: 0; right: 0; bottom: 0; max-height: min(72dvh, 560px); border-radius: 22px 22px 0 0; border-bottom: 0;
  padding-bottom: env(safe-area-inset-bottom); transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .1s;
}
.sel-pop.sheet.in { transform: none; }
.sel-pop.sheet li { min-height: 50px; font-size: 17px; }
.sheet-head { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 16px 6px; }
.sheet-head b { font-family: var(--serif); font-size: 19px; }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line); }
.sel-backdrop { position: fixed; inset: 0; z-index: 199; background: rgba(15, 8, 15, .45); opacity: 0; transition: opacity .2s; }
.sel-backdrop.in { opacity: 1; }

/* Fields */
input[type="date"], input[type="time"] { appearance: none; -webkit-appearance: none; min-height: 46px; text-align: left; }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
input[type="number"]::-webkit-inner-spin-button { opacity: .4; }
.check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; display: grid; place-items: center; width: 22px; height: 22px; min-height: 22px; padding: 0;
  border: 1.5px solid color-mix(in srgb, var(--ink) 30%, var(--line)); border-radius: 6px; background: var(--surface); cursor: pointer;
}
.check input[type="checkbox"]::after { content: ''; width: 11px; height: 6px; border: solid var(--brand-ink); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input[type="checkbox"]:checked { background: var(--brand); border-color: var(--brand); }
.check input[type="checkbox"]:checked::after { opacity: 1; }
.filters { background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 70%, var(--bg))); box-shadow: var(--shadow); }

/* Cards: a touch more presence */
.card { border-radius: 20px; }
a.card:hover { box-shadow: 0 22px 50px rgba(40, 15, 40, .18); }
.price { font-family: var(--serif); font-size: 18px; }

/* Footer */
.footer { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--brand) 6%, transparent)); }

/* A fieldset is as wide as its content by default: a long venue name in a
   select would push the whole form past a phone's screen. */
fieldset, .form label, .field { min-width: 0; }

/* Narrow phones. A grid track of 1fr will not shrink below its content, so a
   long word or a nowrap button pushes the whole column past the screen; every
   track may shrink instead. */
.act-layout, .profile-grid, .role-pick, .row2, .row3, .steps, .role-cards { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .row2, .role-pick { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .row3 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 640px) { .role-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .act-layout { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (min-width: 980px) { .profile-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.role-pick { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.role-opt { min-width: 0; overflow-wrap: anywhere; }
.contract-panel > div, .venue-list li > div, .row-main, .conv-main { min-width: 0; }
.panel .btn, .side-card .btn, .contract-panel .btn { white-space: normal; text-align: center; }
@media (max-width: 420px) {
  .contract-panel { flex-direction: column; gap: 10px; }
  .venue-list li { flex-wrap: wrap; }
  .auth-card { padding: 22px 16px; }
}

/* Booking tabs: one segmented control that always fits, never a strip that
   scrolls with its last tab sliced off. */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; overflow: visible; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.tabs a { justify-content: center; gap: 6px; min-height: 42px; padding: 6px 8px; border: 0; background: transparent; white-space: nowrap; min-width: 0; }
.tabs a.on { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 28%, transparent); }
.tabs .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); opacity: 1; font-weight: 700; }
.tabs a.on .count { background: rgba(255, 255, 255, .22); color: inherit; }
@media (max-width: 400px) { .tabs a { font-size: 13.5px; gap: 4px; padding: 6px 4px; } .tabs .count { min-width: 18px; height: 18px; padding: 0 4px; font-size: 11px; } }
/* Tabs share the width by their words: "Folyamatban" needs more than "Lezárt". */
.tabs { display: flex; }
.tabs a { flex: 1 1 auto; }

/* Forgotten password, notification switches */
.forgot-link { align-self: center; font-size: 14px; font-weight: 600; padding: 10px; }
.sent-note { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.sent-note .ico { color: var(--brand); }
.notify-set { gap: 12px; margin-top: 4px; }
.notify-set legend { font-size: 18px; margin-bottom: 8px; }
.check.switch span { display: flex; flex-direction: column; gap: 2px; }

/* Fingers: the small buttons and the send button get a size a thumb can hit. */
@media (pointer: coarse) {
  .btn.small { min-height: 44px; }
  .sys-msg a { min-height: 40px; }
  .composer .btn.icon-only { min-width: 44px; }
}

/* A phone on its side has ~300px of height: a slimmer tab bar, and an open
   conversation alone on the screen (its back arrow leads out). */
@media (max-width: 899px) and (max-height: 500px) and (orientation: landscape) {
  :root { --tab-h: 46px; }
  .tabbar a { flex-direction: row; gap: 6px; }
  body[data-view="messages"]:has(.chat-layout.has-thread) { --top-h: 0px; --tab-h: 0px; }
  body[data-view="messages"]:has(.chat-layout.has-thread) .topbar,
  body[data-view="messages"]:has(.chat-layout.has-thread) .tabbar { display: none; }
}
