/* Name That Molecule (/puzzle) */
.pz-hero { padding: 40px 0 8px; }
.pz-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.pz-top h1 { margin: 0 0 8px; font-size: clamp(2rem, 4.4vw, 2.9rem); }
.pz-lede { margin: 0; max-width: 56ch; color: var(--muted); font-size: 1.08rem; line-height: 1.55; }
.pz-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pz-lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; background: #fff; }
.pz-lang button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font: inherit; font-size: .9rem; font-weight: 650; color: var(--ink-2); cursor: pointer; }
.pz-lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pz-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; font: inherit; font-size: .9rem; font-weight: 650; color: var(--ink); cursor: pointer; }
.pz-chip:hover { border-color: var(--ink-2); }
.pz-chip svg { width: 16px; height: 16px; }
.pz-lang button:focus-visible, .pz-chip:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.pz-game { padding: 18px 0 56px; }
.pz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.pz-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; color: var(--ink-2); }
.pz-meta strong { font-size: 1.05rem; color: var(--ink); }
.pz-date { color: var(--muted); font-size: .92rem; }
.pz-today { margin-left: auto; font-weight: 650; color: var(--brand-ink); }
.pz-streak { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--warn-tint); color: #8a4b05; font-weight: 700; font-size: .9rem; }
.pz-streak svg { width: 16px; height: 16px; color: #e8760c; fill: #f2a73b; }
.pz-today ~ .pz-streak { margin-left: 0; }

.pz-clues { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.pz-clue { display: flex; gap: 14px; align-items: center; padding: 12px 16px; border: 1px dashed var(--line-2); border-radius: 14px; background: var(--wash); color: var(--muted); }
.pz-clue.open { border: 1px solid var(--line); background: #fff; color: var(--ink); box-shadow: var(--shadow-sm, 0 1px 3px rgba(11, 27, 63, .06)); }
.pz-clue.fresh { border-color: var(--teal); animation: pz-pop .5s ease; }
@keyframes pz-pop { from { transform: scale(.98); background: var(--teal-tint); } to { transform: none; } }
.pz-clue-n { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--line); color: var(--muted); font-weight: 700; font-size: .85rem; }
.pz-clue.open .pz-clue-n { background: var(--ink); color: #fff; }
.pz-clue-b { min-width: 0; display: grid; gap: 2px; }
.pz-clue-b small { font-size: .78rem; font-weight: 650; color: var(--muted); }
.pz-clue-v { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; color: var(--ink); overflow-wrap: anywhere; }
.pz-clue-v.muted { font-size: .95rem; font-weight: 500; color: var(--muted); }
.pz-clue-v sub { font-size: .66em; }
.pz-struct { display: block; width: min(100%, 360px); height: auto; }

.pz-play { display: grid; gap: 10px; margin-bottom: 18px; }
.pz-combo { position: relative; }
.pz-combo input { width: 100%; min-height: 54px; padding: 0 18px; border: 1.5px solid var(--line-2); border-radius: 14px; background: #fff; font: inherit; font-size: 1.08rem; color: var(--ink); }
.pz-combo input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26, 77, 216, .16); }
.pz-options { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-md, 0 14px 34px rgba(11, 27, 63, .12)); }
.pz-options[hidden] { display: none; }
.pz-options li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.pz-options li small { color: var(--muted); font-weight: 500; }
.pz-options li:hover, .pz-options li[aria-selected="true"] { background: var(--brand-tint); }
.pz-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pz-left { margin: 0; font-size: .92rem; color: var(--muted); min-height: 1.4em; }
.pz-left.bad { color: var(--danger); font-weight: 650; }

.pz-guesses { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.pz-guess { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 12px; align-items: baseline; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.pz-guess strong { font-size: 1.02rem; }
.pz-guess small { color: var(--muted); }
.pz-guess-info { text-align: right; font-size: .88rem; color: var(--ink-2); }
.pz-guess.wrong { border-left: 4px solid #d6dbe6; }
.pz-guess.right { border-left: 4px solid var(--success); background: var(--success-tint); }
.pz-guess.skip { color: var(--muted); border-style: dashed; display: block; }
@media (max-width: 560px) { .pz-guess { grid-template-columns: 1fr; } .pz-guess-info { text-align: left; } }

.pz-result { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 24px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(160deg, #fff, #f4f8ff); box-shadow: var(--shadow-md, 0 14px 34px rgba(11, 27, 63, .1)); }
.pz-result[hidden] { display: none; }
.pz-verdict { margin: 0 0 4px; font-weight: 700; color: var(--ink-2); }
.pz-verdict[data-won="1"] { color: var(--success); }
.pz-result h2 { margin: 0 0 8px; font-size: 1.8rem; letter-spacing: -.02em; }
.pz-fact { margin: 0 0 16px; color: var(--ink-2); line-height: 1.55; }
.pz-share { display: flex; gap: 10px; flex-wrap: wrap; }
.pz-next { margin: 14px 0 0; color: var(--muted); font-size: .92rem; }
.pz-next b { color: var(--ink); font-variant-numeric: tabular-nums; font-size: 1.05rem; }
@media (max-width: 640px) { .pz-result { grid-template-columns: 1fr; } }

.pz-side { display: grid; gap: 16px; }
.pz-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm, 0 1px 3px rgba(11, 27, 63, .06)); }
.pz-card h2 { margin: 0 0 6px; font-size: 1.05rem; }
.pz-small { margin: 0 0 12px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.pz-card select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font: inherit; color: var(--ink); }
@media (max-width: 900px) { .pz-grid { grid-template-columns: 1fr; } }

.pz-dialog { width: min(92vw, 460px); border: 0; border-radius: 20px; padding: 28px 26px 24px; box-shadow: 0 30px 80px rgba(11, 27, 63, .35); }
.pz-dialog::backdrop { background: rgba(11, 27, 63, .55); }
.pz-dialog h2 { margin: 0 0 14px; font-size: 1.35rem; }
.pz-x { position: absolute; right: 12px; top: 12px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--wash); cursor: pointer; color: var(--ink); }
.pz-x svg { width: 18px; height: 18px; }
.pz-howlist { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--ink-2); line-height: 1.55; }
.pz-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 18px; text-align: center; }
.pz-stat-grid dd { margin: 0; font-size: 1.7rem; font-weight: 750; letter-spacing: -.03em; }
.pz-stat-grid dt { font-size: .74rem; color: var(--muted); font-weight: 600; }
.pz-dist h3 { margin: 0 0 8px; font-size: .95rem; }
.pz-dist-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: .85rem; }
.pz-dist-row > span:first-child { width: 14px; text-align: center; color: var(--muted); }
.pz-bar { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--brand); color: #fff; font-weight: 700; text-align: right; min-width: 24px; }
@media (prefers-reduced-motion: reduce) { .pz-clue.fresh { animation: none; } }
.pz-streak[hidden] { display: none; }

/* The six clue slots are drawn by the script; their room is kept so the guess box and the page below do not jump down when they appear. */
.pz-clues { min-height: 482px; }
