:root {
  --ink: #20211e;
  --muted: #6f706a;
  --paper: #f5f3ed;
  --card: #fffefb;
  --line: #dfddd4;
  --lime: #cced70;
  --coral: #ff8368;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.game-shell { width: min(100% - 32px, 700px); margin: 0 auto; padding: 28px 0 30px; }
.site-header { display: flex; justify-content: center; align-items: baseline; margin: 0 4px 27px; text-align: center; }
.brand { color: var(--ink); font-family: Georgia, serif; font-size: clamp(1.75rem, 6vw, 2.35rem); font-weight: 700; letter-spacing: -0.08em; text-decoration: none; }
.brand span { color: #5c7625; }
.site-header p, footer { color: var(--muted); font-size: .86rem; }
.site-header p { display: none; }

.game-card { background: var(--card); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 14px 30px rgba(37, 36, 29, .06); padding: clamp(22px, 5vw, 36px); overflow: hidden; }
.heading-row { display: flex; align-items: flex-start; justify-content: center; margin-bottom: 25px; text-align: center; }
h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(1.7rem, 6vw, 2.65rem); line-height: .95; letter-spacing: -.065em; }
.guess-count { display: none; }
.guess-count span { color: var(--ink); font-size: 2.1rem; letter-spacing: -.08em; }
.guess-count small { font-size: .9rem; }

.image-frame { position: relative; height: min(68vw, 410px); min-height: 300px; border-radius: 16px; overflow: hidden; background: #1f2c22; isolation: isolate; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(90); transform-origin: center; transition: transform 850ms cubic-bezier(.2,.75,.2,1); will-change: transform; }
.image-vignette { position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle, transparent 35%, rgba(0,0,0,.22)); pointer-events: none; transition: opacity .5s; }
.reveal-label { position: absolute; z-index: 2; bottom: 12px; left: 50%; transform: translateX(-50%); width: max-content; margin: 0; padding: 7px 10px; background: rgba(255,255,255,.88); border-radius: 999px; color: var(--ink); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

.progress { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 18px 0 26px; }
.progress span { height: 5px; background: #e5e3db; border-radius: 10px; transition: background .3s; }
.progress span.active { background: #9ab74f; }
.guess-form label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .82rem; font-weight: 700; text-align: center; }
.input-row { display: flex; gap: 9px; }
input { min-width: 0; flex: 1; border: 1px solid #c9c7bd; border-radius: 11px; outline: none; background: white; padding: 14px 15px; color: var(--ink); font: inherit; text-align: left; transition: border .2s, box-shadow .2s; }
input:focus { border-color: #91ab48; box-shadow: 0 0 0 3px rgba(157, 190, 83, .18); }
button { border: 0; border-radius: 11px; background: var(--ink); color: white; cursor: pointer; padding: 0 19px; font: inherit; font-weight: 750; transition: transform .15s, background .15s; }
button:hover { background: #3d403a; transform: translateY(-1px); }
button span { margin-left: 5px; color: var(--lime); }
.message { display: none; }
.message.success { color: #53721c; font-weight: 700; }.message.failure { color: #c4543d; font-weight: 700; }
.guess-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 15px; }
.guess-tag { border: 1px solid var(--line); border-radius: 999px; background: #f8f7f2; padding: 6px 10px; color: var(--muted); font-size: .77rem; }
.guess-tag.wrong::before { content: "× "; color: var(--coral); font-size: 1rem; font-weight: 800; }.guess-tag.right { background: #eef6d7; border-color: #b8d269; color: #47631a; }
footer { margin: 25px 4px 0; text-align: center; }

.share-dialog { width: min(calc(100% - 32px), 390px); border: 0; border-radius: 22px; padding: 0; background: transparent; color: var(--ink); box-shadow: 0 24px 70px rgba(0, 0, 0, .28); }
.share-dialog::backdrop { background: rgba(31, 33, 29, .46); backdrop-filter: blur(3px); }
.share-card { position: relative; padding: 34px 28px 27px; border-radius: 22px; background: var(--card); text-align: center; }
.share-card .eyebrow { margin: 0 0 7px; color: #728c35; font-size: .73rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.share-card h2 { margin: 0; font-family: Georgia, serif; font-size: 2rem; letter-spacing: -.06em; }
.close-dialog { position: absolute; top: 11px; right: 12px; width: 32px; height: 32px; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.65rem; font-weight: 400; line-height: 1; }
.close-dialog:hover { background: #f0eee7; color: var(--ink); }
.share-summary { margin: 10px 0 18px; color: var(--muted); font-size: .9rem; }
.share-grid { display: inline-block; margin: 0 0 22px; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.28rem; letter-spacing: .16em; line-height: 1.25; white-space: pre-wrap; }
.share-button { width: 100%; min-height: 48px; background: #789335; }
.copy-note { min-height: 1.2em; margin: 11px 0 0; color: #53721c; font-size: .8rem; }

@media (max-width: 480px) { .game-shell { width: min(100% - 22px, 700px); padding-top: 24px; }.site-header { margin-bottom: 25px; }.site-header p { display: none; }.game-card { border-radius: 20px; }.image-frame { min-height: 255px; }.input-row button { padding: 0 14px; }.input-row button span { display: none; } }
