@import url("./interaction-lock.css");

:root {
  --paper: #f5f0e6; --paper-deep: #e5dac8; --white: #fffdf8; --navy: #17324d;
  --teal: #2b7a78; --mustard: #e2ad36; --coral: #d96955; --ink: #203241;
  --muted: #64727b; --line: #c9c0b2;
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  color: var(--ink); background: var(--paper);
}
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: var(--paper); }
button { font: inherit; }
.word-game { width: min(100%, 46rem); min-height: 100vh; margin: auto; padding: max(.75rem, env(safe-area-inset-top)) 1rem max(2rem, env(safe-area-inset-bottom)); }
.word-header { display: grid; grid-template-columns: 3rem 1fr 3rem; align-items: center; min-height: 4rem; border-bottom: 1px solid var(--line); }
.word-header h1 { margin: 0; color: var(--navy); font: 750 clamp(1.55rem, 5vw, 2.1rem)/1 Georgia, serif; text-align: center; letter-spacing: -.03em; }
.back, .help { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--navy); font-weight: 900; text-decoration: none; cursor: pointer; }
.intro { padding: 1.2rem 0 .75rem; text-align: center; }
.intro .date { margin: 0 0 .35rem; color: var(--teal); font-size: .72rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.intro p:last-child { max-width: 34rem; margin: 0 auto; color: var(--muted); line-height: 1.45; }
.status-row { display: flex; align-items: center; justify-content: center; gap: 1.4rem; min-height: 3.2rem; margin-bottom: .7rem; }
.status-row span { color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.status-row strong { color: var(--navy); font-size: 1rem; }
.message { min-height: 2rem; margin: .65rem 0; color: var(--navy); font-weight: 800; text-align: center; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; margin-top: 1rem; }
.game-button { min-height: 2.9rem; padding: .65rem 1.05rem; border: 2px solid var(--navy); border-radius: 999px; background: var(--white); color: var(--navy); font-weight: 850; cursor: pointer; box-shadow: 2px 3px 0 var(--paper-deep); }
.game-button.primary { background: var(--mustard); }
.game-button:disabled { opacity: .4; cursor: default; box-shadow: none; }
.game-button:focus-visible, .back:focus-visible, .help:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
dialog { width: min(calc(100% - 2rem), 30rem); padding: 0; border: 0; border-radius: 14px; background: transparent; color: var(--ink); }
dialog::backdrop { background: rgba(23,50,77,.72); backdrop-filter: blur(4px); }
.dialog-card { padding: 1.4rem; border: 2px solid var(--navy); border-radius: 14px; background: var(--white); box-shadow: 7px 7px 0 rgba(0,0,0,.2); }
.dialog-card h2 { margin: 0 0 .75rem; color: var(--navy); font: 750 1.7rem/1 Georgia, serif; }
.dialog-card p, .dialog-card li { color: var(--muted); line-height: 1.5; }
.dialog-card ol { padding-left: 1.25rem; }
@media (max-width: 420px) { .word-game { padding-inline: .7rem; } .intro { font-size: .9rem; } }
@media (max-height: 620px) and (orientation: landscape) {
  html, body { height: 100%; overflow: hidden; }
  body { min-height: 0; }
  .word-game { width: 100%; max-width: none; height: 100dvh; min-height: 0; padding: max(.3rem, env(safe-area-inset-top)) max(.55rem, env(safe-area-inset-right)) max(.3rem, env(safe-area-inset-bottom)) max(.55rem, env(safe-area-inset-left)); overflow: hidden; }
  .word-header { min-height: 2.4rem; grid-template-columns: 2.4rem 1fr 2.4rem; }
  .word-header h1 { font-size: 1.25rem; }
  .back, .help { width: 2rem; height: 2rem; }
  .intro { padding: .35rem 0 .2rem; font-size: .7rem; }
  .intro .date { margin-bottom: .12rem; font-size: .52rem; }
  .intro p:last-child { line-height: 1.25; }
  .status-row { min-height: 2rem; margin: 0; gap: .65rem; }
  .status-row span { font-size: .58rem; }
  .status-row strong { font-size: .72rem; }
  .message { min-height: 1rem; margin: .2rem 0; font-size: .7rem; }
  .actions { gap: .35rem; margin-top: .25rem; }
  .game-button { min-height: 2.1rem; padding: .3rem .65rem; font-size: .68rem; }
}
