:root {
  color-scheme: light;
  --white: #fff;
  --paper: #fff;
  --cream: #fffaf0;
  --brown: #35251d;
  --brown-light: #715846;
  --red: #c62828;
  --red-dark: #9f1f1f;
  --ink: #292521;
  --line: #e8dfd3;
  --gold: #f5bb3b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--red-dark); text-underline-offset: .18em; }
a:hover { color: var(--brown); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #aa7a36;
  outline-offset: 3px;
}

.site-header, main, .site-footer { width: 100%; margin-inline: auto; padding-inline: clamp(20px, 4vw, 72px); }
.site-header { padding-top: 0; }
.masthead {
  min-height: 92px;
  padding: 18px clamp(18px, 3vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--brown); font-size: 30px; font-weight: 850; letter-spacing: -.045em; line-height: 1.05; text-decoration: none; }
.brand span { display: block; margin-top: 5px; color: var(--red-dark); font-size: 13px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.masthead-note { margin: 0; color: var(--brown-light); font-size: 14px; font-weight: 600; text-align: right; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  background: var(--red);
  border: 1px solid var(--red-dark);
  border-top: 0;
  overflow: hidden;
}
.site-nav a { padding: 11px 17px; color: var(--white); font-size: 14px; font-weight: 700; text-decoration: none; border-right: 1px solid rgba(255,255,255,.18); transition: background-color .18s ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--red-dark); }

main { flex: 1; min-height: 55vh; padding-top: 34px; padding-bottom: 48px; }
.hero {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  min-height: min(64vh, 620px);
  overflow: hidden;
  background: var(--paper);
}
.hero-copy { align-self: center; padding: clamp(30px, 6vw, 100px); }
.hero h1, .page-heading h1 { margin: 0 0 14px; color: var(--brown); font-size: clamp(34px, 5vw, 54px); font-weight: 850; letter-spacing: -.045em; line-height: 1.04; }
.hero-copy > p:not(.eyebrow) { max-width: 470px; margin-bottom: 24px; }
.hero-image { display: block; width: 100%; height: 100%; min-height: min(64vh, 620px); object-fit: cover; background: #fff; }
.eyebrow { margin: 0 0 8px; color: var(--red); font-size: 13px; font-weight: bold; letter-spacing: .1em; text-transform: uppercase; }
.button {
  display: inline-block;
  padding: 11px 20px;
  border: 1px solid var(--red);
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(198, 40, 40, .16);
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.button:hover { background: var(--red-dark); color: white; box-shadow: 0 8px 18px rgba(159, 31, 31, .22); transform: translateY(-1px); }
.home-information { margin-top: 36px; }
.home-info-section { display: grid; grid-template-columns: minmax(220px, .7fr) 1.3fr; align-items: start; gap: clamp(20px, 5vw, 80px); padding: 30px clamp(8px, 2vw, 28px); border-bottom: 1px solid var(--line); }
.home-info-section:first-child { border-top: 1px solid var(--line); }
.home-info-section > div { width: 100%; }
.home-info-section h2 { margin: 0; color: var(--brown); font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }
.home-info-section p { margin: 0 0 12px; }
.home-info-section p:last-child { margin-bottom: 0; }
.paper-card { padding: 26px 8px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.paper-card h2, .info-panel h2, .menu-section h2 { margin: 0 0 10px; color: var(--red-dark); font-size: 22px; font-weight: 800; letter-spacing: -.025em; }
.paper-card p:last-child { margin-bottom: 0; }
.announcement { background: var(--white); }
.red-note { color: var(--red); font-weight: bold; }
.announcement .red-note { margin-top: 18px; letter-spacing: .06em; }
.visit-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; padding: 32px 8px; background: transparent; border: 0; border-top: 4px solid var(--gold); border-radius: 0; box-shadow: none; }
.visit-strip h2 { margin: 0 0 8px; color: var(--brown); font-size: 20px; }
.visit-strip p { margin: 0 0 8px; }

.page-content { padding-top: 34px; }
.page-heading { margin-bottom: 24px; }
.page-heading > p:last-child { max-width: 680px; }
.narrow-content { max-width: none; }
.prose { padding: 28px 8px; }
.prose h2:not(:first-child) { margin-top: 28px; }
.menu-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.menu-section { padding: 26px 8px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.menu-item { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px dotted var(--line); }
.menu-item h3 { margin: 0; font-size: 17px; }
.menu-item p { margin: 3px 0 0; color: #655d52; font-size: 14px; }
.menu-item strong { white-space: nowrap; color: var(--brown); }
.small-print, .optional { color: #6f685c; font-size: 13px; }
.room-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.room-grid .paper-card { min-height: 0; }
.price { color: var(--brown); font-weight: bold; }
.info-panel { margin-top: 20px; padding: 26px 8px; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.plain-list { padding-left: 22px; margin-bottom: 20px; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.contact-grid address { font-style: normal; }
.fiction-notice { margin-top: 22px; padding: 15px 0; border-left: 0; border-top: 1px solid var(--line); background: transparent; font-size: 14px; }
.reservation-form { display: grid; gap: 8px; }
.reservation-form label { margin-top: 7px; font-weight: bold; }
.reservation-form input, .reservation-form select, .reservation-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cfc2b2;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.reservation-form button { justify-self: start; margin-top: 10px; }
.form-message { margin: 0; color: var(--red-dark); font-weight: bold; }
.form-message:empty { display: none; }

.game-shell { min-height: 230px; padding: 30px 8px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.game-start { min-height: 168px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.game-start h2 { margin: 0; color: var(--red-dark); font-size: 26px; }
.game-invitation-preview { display: block; width: auto; max-width: 100%; max-height: min(55vh, 420px); margin-bottom: 18px; object-fit: contain; }
.session-body { overflow: hidden; background: #171412; }
.session-stage { position: relative; display: grid; width: 100%; min-height: 100vh; place-items: center; overflow: hidden; isolation: isolate; padding: 24px; }
.session-backdrop { position: fixed; z-index: -1; inset: -18px; background-image: var(--session-background, url("images/floor.png")); background-position: center; background-size: cover; filter: blur(12px) brightness(.55); transform: scale(1.04); transition: background-image .35s ease; }
.session-stage::after { position: fixed; z-index: -1; inset: 0; background: rgba(25, 16, 13, .22); content: ""; }
.session-panel { display: flex; width: min(900px, 100%); max-height: calc(100vh - 48px); flex-direction: column; align-items: center; gap: 18px; overflow: auto; padding: 24px; background: transparent; text-align: center; }
.session-dialogue { min-height: 1.6em; margin: 0; color: white; font-size: clamp(22px, 4vw, 34px); text-shadow: 0 2px 8px #000; }
.session-dialogue[hidden] { display: none; }
.session-invitation { display: block; width: auto; max-width: min(100%, 520px); max-height: min(72vh, 760px); object-fit: contain; }
.session-invitation[hidden] { display: none; }
.session-invitation.is-revealed { animation: invitation-reveal .8s ease-out both; }
@keyframes invitation-reveal {
  from { opacity: 0; clip-path: inset(0 100% 0 0); transform: scale(.98); }
  to { opacity: 1; clip-path: inset(0 0 0 0); transform: scale(1); }
}
.session-next { min-width: 112px; }
.session-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.session-option { max-width: min(100%, 410px); }
.session-result { color: white; text-shadow: 0 2px 8px #000; }
.session-result h1 { margin: 0 0 14px; font-size: clamp(22px, 4vw, 30px); }
.session-result p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.session-stage [hidden] { display: none; }
.session-stage.chat-open { padding: 0; }
.session-stage.chat-open .session-panel { width: min(430px, 100%); height: 100vh; max-height: 100vh; gap: 0; overflow: hidden; padding: 0; background: #08090b; }
.group-chat { display: flex; width: 100%; height: 100vh; height: 100dvh; flex-direction: column; overflow: hidden; background: #08090b; color: #f5f5f5; font: 14px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-align: left; text-shadow: none; }
.chat-header { padding: 14px 16px 10px; background: #08090b; }
.chat-title-row { display: flex; align-items: center; gap: 11px; }
.chat-icon { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.chat-title-row h1 { margin: 0; font-size: 17px; font-weight: 600; }
.chat-members { margin: 8px 0 0 53px; color: #bbb; font-size: 12px; }
.chat-members summary { width: fit-content; cursor: pointer; }
.chat-members ul { display: flex; flex-wrap: wrap; gap: 5px 12px; padding: 8px 0 0; margin: 0; list-style: none; color: #e2e2e2; }
.chat-conversation { display: flex; flex: 1; flex-direction: column; justify-content: flex-start; min-height: 100px; overflow-y: auto; overscroll-behavior: contain; padding: 18px 12px; border-top: 1px solid #222; scroll-behavior: smooth; }
.chat-message { display: flex; width: 100%; align-items: flex-end; gap: 7px; }
.chat-message:first-child { margin-top: auto; }
.chat-message-content { display: flex; max-width: 84%; flex-direction: column; gap: 3px; }
.chat-message-incoming { align-self: flex-start; }
.chat-message-outgoing { justify-content: flex-end; align-self: flex-end; text-align: right; }
.chat-sender { padding: 0 7px; color: #aaa; font-size: 10px; }
.chat-bubble { width: fit-content; padding: 9px 12px; border-radius: 17px; background: #28282c; color: #f5f5f5; font-size: 14px; text-align: left; overflow-wrap: anywhere; }
.chat-message-outgoing .chat-bubble { align-self: flex-end; border-bottom-right-radius: 5px; background: #178fe0; color: white; }
.chat-message-incoming .chat-bubble { border-bottom-left-radius: 5px; }
.chat-avatar { display: grid; width: 23px; height: 23px; flex: 0 0 23px; place-items: center; border-radius: 50%; color: white; font-size: 10px; }
.chat-avatar-0 { background: #9c68c8; }
.chat-avatar-1 { background: #d6518a; }
.chat-avatar-2 { background: #5599e8; }
.chat-avatar-3 { background: #43a885; }
.chat-avatar-4 { background: #c48444; }
.chat-photo { display: block; width: min(190px, 55vw); max-height: 250px; border-radius: 10px; object-fit: contain; }
.chat-caption { margin: 6px 0 0; }
.chat-call-bubble { color: #e0e0e4; background: #242428; }
.chat-typing-bubble { display: flex; min-width: 54px; align-items: center; justify-content: center; gap: 4px; padding: 13px 12px; }
.chat-message-outgoing .chat-typing-bubble { background: #178fe0; }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: #aaa; animation: typing-bounce 1s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation-delay: .14s; }
.typing-dot:nth-child(3) { animation-delay: .28s; }
@keyframes typing-bounce {
  0%, 60%, 100% { opacity: .45; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}
.chat-composer { display: flex; align-items: center; gap: 10px; padding: 10px 14px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid #202024; }
.chat-composer span { color: #aaa; font-size: 12px; }
.chat-composer input { min-width: 0; flex: 1; padding: 10px 13px; border: 0; border-radius: 20px; background: #1c1c20; color: #ddd; font: inherit; }
.chat-composer input::placeholder { color: #888; }
.chat-composer input:disabled { opacity: 1; }
.chat-call-invite { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid #303036; background: #141519; }
.chat-call-invite[hidden], .call-screen[hidden], .close-notice[hidden] { display: none; }
.call-invite-icon { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; }
.chat-call-invite .call-invite-icon { width: 42px; height: 42px; flex: 0 0 auto; }
.chat-call-invite-copy { min-width: 0; flex: 1; }
.chat-call-invite h2 { margin: 0; color: #f5f5f5; font-size: 14px; font-weight: 700; }
.chat-call-invite p { margin: 2px 0 0; color: #b6b7bd; font-size: 12px; }
.chat-call-invite .button { flex: 0 0 auto; padding: 8px 16px; }
.call-screen, .close-notice { position: fixed; z-index: 20; inset: 0; color: #f5f5f5; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.call-actions { display: flex; justify-content: center; gap: 36px; margin-top: 32px; }
.call-entry-actions, .call-choice-panel { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.call-entry-actions[hidden] { display: none; }
.call-choice-panel { width: 100%; align-items: center; }
.call-choice-panel[hidden] { display: none; }
.call-choice-panel p { flex: 0 0 100%; margin: 0; color: #e2e4e9; font-size: 15px; text-align: center; }
.call-choice-button { min-width: 150px; padding: 11px 20px; border: 1px solid #5b6270; border-radius: 24px; background: #303642; color: white; font: inherit; font-weight: 700; cursor: pointer; }
.call-choice-button:hover { background: #414958; }
.call-choice-button:focus-visible { outline: 3px solid #f5bb3b; outline-offset: 3px; }
.call-button { min-width: 100px; padding: 12px 20px; border: 0; border-radius: 24px; color: white; font: inherit; font-weight: bold; cursor: pointer; }
.call-decline { background: #d84048; }
.call-accept { background: #2fba68; }
.call-screen { z-index: 30; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 12px; padding: 20px; background: radial-gradient(ellipse at center, #272c35, #101216 72%); }
.call-screen-header h1 { margin: 0; font-size: 20px; }
.call-screen-header p { margin: 4px 0 0; color: #adb1ba; font-size: 12px; }
.call-grid { display: grid; min-height: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px; }
.call-person { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 8px; overflow: hidden; border: 2px solid transparent; border-radius: 12px; background: #252a32; text-align: center; }
.call-person-1 { background: #30272e; }
.call-person-2 { background: #222e37; }
.call-person-3 { background: #2d3029; }
.call-person-4 { background: #342d25; }
.call-person.is-speaking { border-color: #69d98b; box-shadow: 0 0 18px rgba(105,217,139,.35); }
.call-avatar { display: grid; width: clamp(38px, 7vw, 70px); aspect-ratio: 1; place-items: center; border-radius: 50%; background: #566a87; color: white; font-size: clamp(15px, 3vw, 24px); font-weight: bold; }
.call-person-1 .call-avatar { background: #805c75; }
.call-person-2 .call-avatar { background: #527b9c; }
.call-person-3 .call-avatar { background: #668365; }
.call-person-4 .call-avatar { background: #9a704c; }
.call-name { max-width: 100%; padding: 0 4px; overflow: hidden; color: #f2f2f3; font-size: clamp(10px, 1.5vw, 14px); text-overflow: ellipsis; white-space: nowrap; }
.call-caption { min-height: 3.2em; display: grid; place-items: center; margin: 0; padding: 12px 16px; border-radius: 10px; background: rgba(0,0,0,.58); color: white; font-size: clamp(14px, 2.4vw, 20px); text-align: center; }
.close-notice { display: grid; place-items: center; padding: 24px; background: #101216; color: white; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .session-invitation.is-revealed { animation: none; }
  .typing-dot { animation: none; }
  .chat-conversation { scroll-behavior: auto; }
}

.site-footer { padding-top: 24px; padding-bottom: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.footer-main { display: flex; justify-content: space-between; gap: 20px; }
.footer-main p { margin: 5px 0 10px; }
.footer-main a { line-height: 1.9; }
.footer-whisper { align-self: center; letter-spacing: .05em; }
.disclaimer { margin: 10px 0; padding-top: 12px; border-top: 1px solid var(--line); color: #62594d; font-size: 12px; }
.copyright { margin: 4px 0; color: #766d61; font-size: 12px; }

@media (max-width: 720px) {
  .masthead { align-items: flex-start; flex-direction: column; gap: 8px; }
  .masthead-note { text-align: left; }
  .site-nav a { flex: 1 1 30%; padding: 9px 10px; text-align: center; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 28px; }
  .hero-image { min-height: 220px; max-height: 310px; }
  .visit-strip { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: 1fr; }
  .home-info-section { grid-template-columns: 1fr; gap: 12px; }
  .footer-main { flex-wrap: wrap; }
  .footer-main > * { flex: 1 1 40%; }
}

@media (max-width: 420px) {
  .brand { font-size: 28px; }
  .site-nav a { flex-basis: 45%; }
  .visit-strip, .prose, .game-shell { padding: 18px; }
  .session-stage { padding: 12px; }
  .session-panel { max-height: calc(100vh - 24px); padding: 12px; }
  .session-options { flex-direction: column; }
}

@media (max-width: 640px) {
  .call-screen { gap: 8px; padding: max(12px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom)); }
  .call-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 7px; }
  .call-person { gap: 5px; border-radius: 9px; }
  .chat-call-invite { gap: 9px; padding: 10px; }
  .chat-call-invite .call-invite-icon { width: 36px; height: 36px; }
  .chat-call-invite .button { padding: 7px 13px; }
}
