:root {
  --bg: #f3efe8;
  --bg-2: #fffdf9;
  --ink: #1c1612;
  --muted: #6f645b;
  --line: #e4d9cc;
  --card: #fffdfb;
  --accent: #8c3f2a;
  --accent-2: #5c2416;
  --on-accent: #fff8f4;
  --warn: #9a3412;
  --ok: #1f6b45;
  --shadow: 0 1px 1px rgba(28, 22, 18, .04), 0 18px 40px rgba(28, 22, 18, .08);
  --radius: 22px;
  --font: "Readex Pro", "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .8, .28, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #100e0c;
  --bg-2: #1a1714;
  --ink: #f6f0e8;
  --muted: #b3a69a;
  --line: #322c26;
  --card: #1c1916;
  --accent: #e7b08a;
  --accent-2: #f3d2b8;
  --on-accent: #2a140c;
  --warn: #ffb4a2;
  --ok: #8ed7ae;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(700px 320px at 0% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
}
body, .mast, .tile, .sheet, .summary, .dock, .btn, .btn-line, .choice, input, select, textarea {
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }

.mast {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  animation: drop .55s var(--ease) both;
}
.mast-inner, .page { width: min(1160px, calc(100% - 2rem)); margin-inline: auto; }
.mast-inner { display: flex; align-items: center; gap: 1rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.mark {
  width: 42px; height: 42px; border-radius: 14px; overflow: hidden; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  color: var(--on-accent); font-weight: 700;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.mark img { width: 100%; height: 100%; object-fit: cover; }
.brand strong { display: block; letter-spacing: -.03em; }
.brand small { color: var(--muted); font-size: .75rem; }
.nav { display: flex; gap: .35rem; margin-inline-start: auto; }
.nav a {
  position: relative; color: var(--muted); font-size: .92rem;
  padding: .45rem .7rem; border-radius: 999px;
}
.nav a::after {
  content: ""; position: absolute; inset-inline: .7rem; bottom: .28rem; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: center;
  transition: transform .35s var(--ease);
}
.nav a:hover, .nav a.active { color: var(--ink); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.nav a.active::after, .nav a:hover::after { transform: scaleX(1); }
.tools { display: flex; align-items: center; gap: .4rem; }
.lang { display: flex; padding: 3px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.lang a { padding: .28rem .55rem; border-radius: 999px; font-size: .72rem; letter-spacing: .06em; color: var(--muted); }
.lang a.on { background: var(--ink); color: var(--bg); }
.icon-btn, .theme-btn {
  width: 40px; height: 40px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); display: grid; place-items: center; cursor: pointer; position: relative; color: var(--ink);
}
.icon-btn:hover, .theme-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.theme-btn i { transition: transform .45s var(--ease); }
.theme-btn:hover i { transform: rotate(-18deg) scale(1.08); }
.badge {
  position: absolute; top: -5px; inset-inline-end: -5px;
  min-width: 18px; height: 18px; border-radius: 999px; padding: 0 4px;
  background: var(--accent); color: var(--on-accent); font-size: .65rem;
  display: grid; place-items: center;
}
[data-theme="light"] .when-light, [data-theme="dark"] .when-dark { display: none; }

.page { padding: 1.4rem 0 7rem; animation: pageIn .5s var(--ease) both; }
.site-foot {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 6.5rem;
  color: var(--muted);
}
.site-foot .mast-inner { min-height: 0; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-title { position: relative; }
.page-title::after {
  content: ""; display: block; width: 3.2rem; height: 3px; margin-top: .7rem;
  border-radius: 999px; background: linear-gradient(90deg, var(--accent), transparent);
}
.kicker {
  margin: 0 0 .35rem; letter-spacing: .18em; text-transform: uppercase;
  font-size: .72rem; color: var(--accent);
}
.page-title, .hero h1 {
  margin: 0 0 .45rem;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: .96; letter-spacing: -.05em; font-weight: 650;
}
.lede { margin: 0; max-width: 38rem; color: var(--muted); font-size: 1.05rem; }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.15rem; }
.btn, .btn-line, .btn-warn {
  border: 0; cursor: pointer; border-radius: 999px;
  padding: .82rem 1.2rem; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
.btn {
  position: relative; overflow: hidden;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 28%, transparent);
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 32%, rgba(255,255,255,.32), transparent 68%);
  transform: translateX(-130%);
}
.btn:hover::after { animation: sheen .75s var(--ease); }
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active, .btn-line:active { transform: translateY(0) scale(.98); }
.btn-line { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-line:hover { border-color: var(--accent); transform: translateY(-2px); }
.btn-warn { background: transparent; color: var(--warn); border: 1px solid var(--warn); }
.btn-block { width: 100%; }
.btn-sm { padding: .48rem .85rem; font-size: .85rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.hero { display: grid; gap: 1.4rem; align-items: center; }
.hero-side {
  position: relative; border-radius: 28px; overflow: hidden; min-height: 280px;
  background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line);
}
.hero-side img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; transform: scale(1.04); animation: drift 14s ease-in-out infinite alternate; }
.hero-meta {
  position: absolute; inset-inline-start: 1rem; bottom: 1rem;
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  backdrop-filter: blur(10px);
  border-radius: 16px; padding: .75rem .9rem; max-width: 78%;
}
.links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.links a { color: var(--accent-2); border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }

.section { margin-top: 2.6rem; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem;
}
.section-head h2 { margin: 0; font-size: 1.45rem; letter-spacing: -.03em; }
#booking-form { counter-reset: step; }
.step { counter-increment: step; }
.step .section-head h2::before {
  content: counter(step);
  display: inline-grid; place-items: center;
  width: 1.7rem; height: 1.7rem; margin-inline-end: .55rem;
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: .8rem; vertical-align: middle;
}
.auth .sheet, .account .sheet, #booking-form .sheet { max-width: none; margin: 0; height: auto; }
#booking-form .step.sheet { margin-top: 1rem; }
.section-head a { color: var(--accent); font-size: .92rem; }

.grid { display: grid; gap: 1rem; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.tile, .summary, .sheet, .banner {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.tile { display: flex; flex-direction: column; }
.tile:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.media { width: 100%; aspect-ratio: 5/4; object-fit: cover; background: color-mix(in srgb, var(--line) 70%, var(--bg)); transition: transform .7s var(--ease); }
.grid > .media, .work .media { border-radius: 18px; border: 1px solid var(--line); }
.tile:hover .media { transform: scale(1.06); }
.tile .body, .pad { padding: 1rem 1rem 1.1rem; }
.tile h3 { margin: 0 0 .25rem; font-size: 1.02rem; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.price { font-variant-numeric: tabular-nums; font-weight: 650; }
.price s { color: var(--muted); font-weight: 450; margin-inline-start: .4rem; }
.banner {
  min-height: 180px; display: flex; align-items: flex-end; padding: 1.1rem;
  background: #3a241c center/cover no-repeat; color: #fff8f3; border: 0;
}
.banner:hover { transform: translateY(-4px); }
.filters { display: flex; gap: .45rem; overflow: auto; padding-bottom: .2rem; }
.filters a {
  flex: none; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  padding: .42rem .85rem; font-size: .88rem;
}
.filters a.on, .filters a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.messages { display: grid; gap: .5rem; margin-bottom: 1rem; }
.msg {
  border-radius: 16px; padding: .8rem 1rem; background: var(--card); border: 1px solid var(--line);
  animation: rise .45s var(--ease) both;
}
.msg.error { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.msg.success { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }

.sheet { max-width: 560px; margin: .4rem auto; padding: 1.4rem 1.3rem 1.5rem; }
.auth {
  display: grid; gap: 1rem; align-items: stretch;
}
.auth-panel {
  border-radius: 28px; min-height: 220px; padding: 1.5rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 88%, black), var(--accent-2));
  color: var(--on-accent);
  box-shadow: var(--shadow);
}
.auth-panel h2 { margin: .3rem 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.04em; line-height: 1; }
label { display: block; margin: .9rem 0 .35rem; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
input, select, textarea {
  width: 100%; border-radius: 14px; border: 1px solid var(--line); background: var(--bg);
  padding: .8rem .9rem; outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice {
  border-radius: 16px; border: 1px solid var(--line); background: var(--card);
  padding: .75rem .9rem; cursor: pointer; box-shadow: none;
}
.choice:hover { transform: translateY(-2px); border-color: var(--accent); }
.choice.active {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
  transform: translateY(-2px) scale(1.02);
}
.summary { padding: 1rem 1.05rem 1.1rem; }
.line { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.empty { padding: 2.2rem 0; color: var(--muted); }
.masonry { columns: 2; column-gap: .8rem; }
.masonry img { width: 100%; margin: 0 0 .8rem; border-radius: 18px; border: 1px solid var(--line); transition: transform .45s var(--ease); }
.masonry img:hover { transform: scale(1.02); }

.dock {
  position: fixed; z-index: 40; left: 50%; bottom: .7rem; transform: translateX(-50%);
  width: min(460px, calc(100% - 1.2rem));
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow); padding: .35rem;
}
.dock a {
  text-align: center; font-size: .68rem; color: var(--muted);
  border-radius: 16px; padding: .35rem 0;
}
.dock a i { display: block; font-size: 1.15rem; transition: transform .35s var(--ease); }
.dock a.active { color: var(--accent-2); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.dock a.active i { transform: translateY(-2px); }

.js .tile, .js .summary, .js .sheet, .js .hero, .js .banner, .js .auth-panel, .js .masonry img {
  opacity: 0;
}
.rise { animation: rise .7s var(--ease) both; animation-delay: var(--d, 0ms); }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes drop {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: none; }
}
@keyframes drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(0, -2%, 0); }
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes sheen { to { transform: translateX(130%); } }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

.step.sheet { margin-top: 1rem; padding: 1.05rem 1.1rem 1.15rem; }
.sheet .page-title, .account .page-title { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.status {
  display: inline-flex; align-items: center; gap: .4rem;
  border-radius: 999px; padding: .22rem .7rem; font-size: .78rem; font-weight: 650;
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
}
.status::before {
  content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor;
}
.status-pending { color: #9a5b12; }
[data-theme="dark"] .status-pending { color: #f0c27a; }
.status-pending::before { animation: pulse 1.6s ease-in-out infinite; }
.status-confirmed, .status-completed { color: var(--ok); }
.status-cancelled { color: var(--warn); }
.account { display: grid; gap: 1rem; align-items: start; }
.account-side { padding: 1.2rem; }
.account-nav { display: grid; gap: .45rem; margin: 1rem 0; }
.account-nav a {
  display: flex; align-items: center; gap: .65rem;
  padding: .75rem .85rem; border-radius: 16px;
  border: 1px solid var(--line); background: var(--bg);
}
.account-nav a:hover { border-color: var(--accent); transform: translateY(-2px); }
.account-nav i { color: var(--accent); font-size: 1.05rem; }
.empty-state {
  padding: 2.4rem 1.2rem; text-align: center; border-radius: var(--radius);
  border: 1px dashed var(--line); background: var(--card); color: var(--muted);
}
.cart-row .actions { align-items: center; }
.cart-row input { max-width: 92px; }
.commerce { align-items: start; }
.settled { opacity: 1 !important; }

.legal { max-width: 760px; }
.legal .page-title { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.legal h2 {
  margin: 1.6rem 0 .45rem;
  font-size: 1.15rem;
  letter-spacing: -.02em;
}
.legal p, .legal li { color: var(--muted); }
.legal ul { margin: .4rem 0 0; padding-inline-start: 1.2rem; }
.legal a { color: var(--accent-2); }
.legal-note { margin: 1rem 0 0; color: var(--muted); font-size: .92rem; }
.contact-box {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  border: 1px solid var(--line);
}
.contact-box p { margin: .2rem 0; color: var(--ink); }

@media (min-width: 900px) {
  .hero, .auth, .account { grid-template-columns: 1.05fr .95fr; }
  .account { grid-template-columns: .82fr 1.18fr; }
  .masonry { columns: 3; }
  .page { padding-bottom: 3rem; }
  .dock, .site-foot { padding-bottom: 1.6rem; }
  .dock { display: none; }
  .commerce > :last-child { position: sticky; top: 96px; }
}
@media (max-width: 899px) {
  .nav { display: none; }
  .cols-4, .cols-3 { grid-template-columns: 1fr 1fr; }
  .brand small { display: none; }
}
@media (max-width: 560px) {
  .pair, .cols-2 { grid-template-columns: 1fr; }
  .page-title, .hero h1 { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important; transition: none !important;
  }
  .js .tile, .js .summary, .js .sheet, .js .hero, .js .banner, .js .auth-panel, .js .masonry img { opacity: 1; }
}

.challenge-box {
  margin: .4rem 0 1rem;
  padding: 1rem 1rem .2rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  text-align: center;
}
.challenge-box p { margin: 0 0 .35rem; }
.challenge-code {
  display: block;
  margin: 0 0 .8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: .28em;
}
.challenge-box input { text-align: center; letter-spacing: .2em; font-weight: 700; }
