/* The front door. The game's own palette and fonts (styles.css), restated here
   because the game's stylesheet is behind the door. */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/fraunces/fraunces-latin-full-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Literata"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url("../fonts/literata/literata-latin-opsz-normal.woff2") format("woff2");
}
:root {
  color-scheme: dark;
  --ink: #ecdfc4; --muted: #c0ad8c; --faint: #a8977a;
  --ground: #26160e; --panel: #2e2017; --raised: #3a2a1e; --sunken: #1a120c;
  --line: #4a3626; --line-strong: #6b5038;
  --accent: #d9b55c; --accent-dim: #a8873c; --bad: #e08a74;
  --paper: #efe4cc; --paper-ink: #2a1d12; --paper-line: #c9b48c;
  --ui: "Literata", "Iowan Old Style", Georgia, serif;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--ui); color: var(--ink); line-height: 1.5;
  /* The table: dark wood, lit from above. */
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 214, 150, .10), transparent 60%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.10) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, #2c1a10, #1c110a);
  background-color: var(--ground);
}
.door { max-width: 30rem; margin: 0 auto; padding: 2.5rem 1rem 2rem; }
/* An installed app on an iPhone draws under the status bar (screen pass). */
.door { padding-top: max(2.5rem, calc(env(safe-area-inset-top) + 1rem)); padding-bottom: max(2rem, calc(env(safe-area-inset-bottom) + 1rem)); }
.masthead { text-align: center; margin-bottom: 1.4rem; }
.device { width: 4.5rem; height: 4.5rem; color: var(--accent); opacity: .9; }
h1 {
  font-family: var(--display); font-weight: 600; font-size: 2.4rem; letter-spacing: .01em;
  margin: .3rem 0 .2rem; color: var(--accent);
}
.tagline { margin: 0; color: var(--muted); font-size: 1rem; }

/* The sheet: parchment on the table. */
.sheet {
  background: var(--paper); color: var(--paper-ink);
  border: 1px solid var(--paper-line); border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 0 40px rgba(120, 90, 40, .18);
  padding: 1.2rem 1.3rem 1rem;
}
.status { margin: .2rem 0; color: #6b5536; text-align: center; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--paper-line); margin-bottom: .9rem; }
.tabs button {
  font: inherit; font-family: var(--display); font-weight: 600; font-size: 1.02rem;
  background: none; border: 0; border-bottom: 2px solid transparent; color: #7a6243;
  padding: .3rem .6rem; cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--paper-ink); border-bottom-color: var(--accent-dim); }
form { display: flex; flex-direction: column; gap: .7rem; }
label { display: flex; flex-direction: column; gap: .2rem; font-size: .92rem; color: #4d3a24; }
input {
  font: inherit; font-size: 1rem; color: var(--paper-ink);
  background: #fbf5e6; border: 1px solid var(--paper-line); border-radius: 3px; padding: .45rem .55rem;
}
input:focus { outline: 2px solid var(--accent-dim); outline-offset: 0; }
.hint, .note { font-size: .82rem; color: #7a6243; }
.note { margin: 0; }
button.primary {
  font: inherit; font-weight: 600; font-size: 1rem; margin-top: .2rem;
  color: #2a1a0a; background: linear-gradient(180deg, #e2c372, #c9a14a);
  border: 1px solid #8a6a2a; border-radius: 3px; padding: .55rem .8rem; cursor: pointer;
}
button.primary:disabled { opacity: .6; cursor: wait; }
.message { min-height: 1.3em; margin: .6rem 0 0; color: #9a3a26; font-size: .92rem; }

.pitch { margin: 1.6rem .2rem 0; color: var(--muted); font-size: .95rem; }
.pitch p { margin: 0 0 .7rem; }
footer { text-align: center; margin-top: 1.2rem; font-size: .9rem; }
footer a { color: var(--faint); }

dialog {
  max-width: 34rem; background: var(--paper); color: var(--paper-ink);
  border: 1px solid var(--paper-line); border-radius: 4px; padding: 1rem 1.3rem;
}
dialog::backdrop { background: rgba(10, 6, 3, .7); }
dialog h2 { font-family: var(--display); margin: 0 0 .5rem; }
dialog li { margin-bottom: .4rem; font-size: .92rem; }
dialog form button { font: inherit; padding: .35rem .8rem; }

@media (max-width: 30rem) {
  h1 { font-size: 2rem; }
  .door { padding-top: 1.6rem; }
}
