:root {
  --ink: #24180c;
  --muted: #6d5c4b;
  --paper: #f3ecdf;
  --card: #fffaf3;
  --line: #e2d3bf;
  --amber: #b86a12;
  --amber-2: #e8a04a;
  --night: #140e0b;
  --walnut: #2a1c14;
  color-scheme: light;
  font-family: "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  background: rgba(20, 14, 11, 0.92);
  color: #f6efe4;
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.18);
}
.jumps { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.jumps a {
  text-decoration: none;
  color: #eadccb;
  padding: 6px 10px;
  border-radius: 999px;
}
.jumps a:hover, .jumps a.on { background: rgba(255, 248, 236, 0.1); color: white; }
.jumps a.on { font-weight: 650; }
.bar-user { font-size: 14px; color: var(--amber-2); text-decoration: none; white-space: nowrap; }
.bar-user:hover { text-decoration: underline; }

.hero {
  background:
    radial-gradient(880px 420px at 12% -10%, rgba(232, 160, 74, 0.34), transparent 58%),
    radial-gradient(640px 360px at 100% 80%, rgba(120, 42, 18, 0.55), transparent 60%),
    linear-gradient(165deg, #3a2418 0%, #1a100c 55%, #100c09 100%);
  color: #f6efe4;
  padding: 42px 22px 64px;
}
.hero-grid, .hero-solo {
  max-width: 1080px;
  margin: 0 auto;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 36px;
  align-items: end;
}
.page-head { padding: 28px 22px 8px; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); }
.eyebrow { margin: 0 0 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber-2); font-size: 13px; }
h1 { margin: 0; font-size: clamp(40px, 6vw, 68px); line-height: 0.95; font-weight: 720; letter-spacing: -0.03em; }
.lede { max-width: 38em; color: #eadccb; font-size: 18px; line-height: 1.5; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 18px 0 0; list-style: none; }
.pills li { border: 1px solid rgba(246, 239, 228, 0.2); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: #f6efe4; }

.auth-card {
  background: var(--card);
  color: var(--ink);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #f3ecdf; padding: 4px; border-radius: 12px; margin-bottom: 12px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 8px; }
.seg button.on { background: white; font-weight: 650; }
.auth-card label, .card label { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; font-size: 14px; }
input, select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
}
.fine { color: var(--muted); font-size: 13px; line-height: 1.45; }
.who { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--night);
  color: #f6efe4;
  font-size: 22px;
  font-weight: 700;
}
.who h2, .sheet h2, .card h3, .detail h2 { margin: 0; }
.who h2 { font-size: 26px; }

.btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 9px 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn.primary { background: var(--night); color: #fff8ec; border-color: transparent; }
.btn.ghost { background: transparent; }
.auth-card .btn.primary, .card .btn.primary { margin-top: 4px; }

main { max-width: 1080px; margin: 0 auto; padding: 8px 22px 64px; }
.sheet { padding-top: 28px; }
.sheet-head { display: flex; gap: 14px; align-items: start; margin-bottom: 14px; }
.sheet-head p { margin: 6px 0 0; color: var(--muted); }
.kicker { margin: 4px 0 0; color: var(--amber); letter-spacing: 0.14em; font-size: 13px; }
h2 { font-size: 32px; letter-spacing: -0.03em; }
.split { display: grid; grid-template-columns: 320px 1fr; gap: 14px; align-items: start; }
.card, .item, .detail {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.card.narrow { max-width: 460px; }
.stack, .lobby-grid { display: flex; flex-direction: column; gap: 10px; }
.lobby-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.item, .lobby {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--amber-2);
}
.item h3, .lobby h3 { margin: 0 0 4px; }
.meta { color: var(--muted); font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket {
  font-family: Consolas, monospace;
  letter-spacing: 0.16em;
  font-size: 20px;
  color: var(--amber);
  border: 1px dashed #e0c49a;
  border-radius: 10px;
  padding: 6px 8px;
  background: #fff6e8;
}
.detail { margin-top: 14px; }
.detail .ticket { display: inline-block; margin: 8px 0; }
.take { padding: 10px 0; border-top: 1px solid var(--line); }
.take audio { width: min(100%, 420px); margin-top: 6px; display: block; }
.empty { color: var(--muted); padding: 8px 2px; }
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.door {
  display: block;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--amber-2);
  border-radius: 18px;
  padding: 18px;
  min-height: 168px;
}
.door:hover { border-color: var(--amber); }
.door h2 { font-size: 28px; margin-bottom: 8px; }
.door p { margin: 0; color: var(--muted); line-height: 1.45; }
.profile-panel { max-width: 440px; box-shadow: none; }
.toolbar { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar h2 { margin-bottom: 4px; }
.toolbar .fine { margin: 0; }
.lobby-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.lobby-columns h2 { font-size: 26px; margin-bottom: 10px; }
.search { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; max-width: 420px; color: #eadccb; font-size: 14px; }
.search input { width: 100%; color: var(--ink); background: white; }
.shop-split { grid-template-columns: 1fr 320px; }
.sheet .card h3 { margin-top: 0; }
.up-progress {
  margin-top: 14px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background:
    radial-gradient(120px 60px at 100% 0%, rgba(232, 160, 74, 0.35), transparent 70%),
    linear-gradient(180deg, #fff8ee, #fff);
  border: 1px solid #e7d3b4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.up-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.up-top span { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.up-top strong {
  font-size: 32px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: var(--amber);
}
.up-track {
  height: 12px;
  margin-top: 10px;
  border-radius: 999px;
  background: #f3e6d2;
  overflow: hidden;
}
.up-track div {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8a4e0c, #e8a04a 72%, #ffe1a8);
  transition: width 0.12s linear;
}
.up-progress .fine { margin: 8px 0 0; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  background: var(--night);
  color: white;
  padding: 10px 14px;
  border-radius: 12px;
  max-width: min(520px, calc(100% - 24px));
}

@media (max-width: 860px) {
  body { overflow-x: hidden; }
  .hero-grid, .split { display: flex; flex-direction: column; align-items: stretch; }
  .hero-grid > *, .split > * { width: 100%; min-width: 0; max-width: 100%; }
  .auth-card, #upload-form, .card, .search { width: 100%; max-width: 100%; }
  .card label, .search { min-width: 0; }
  input, select { max-width: 100%; }
  input[type="file"] { width: 100%; }
  .doors, .lobby-columns { grid-template-columns: 1fr; }
  .bar { align-items: flex-start; flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .bar-user { display: none !important; }
  .jumps { flex: 1 1 100%; }
  .jumps a { display: inline-flex; align-items: center; min-height: 40px; }
  .hero { padding: 28px 14px 36px; }
  h1 { font-size: 42px; }
  main { padding-left: 14px; padding-right: 14px; }
  .sheet, .page-head { padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .lamp { box-shadow: none; }
}
