/* Daily puzzle presentation shared by Produce Code and Aisle Sort. */
.opener-game .game-topbar :is(.back-hub-label,#wrapper-streak){display:none}
.opener-wordmark{width:125px;height:auto}
.game-topbar .more-games{min-height:38px;padding:8px 10px;font-size:14px;white-space:nowrap;gap:7px}
.modal-overlay:has([data-games-drawer]){place-items:stretch end;padding:0}
.modal-panel:has([data-games-drawer]){width:min(420px,100vw);max-width:unset;max-height:100dvh;border-radius:10px 0 0 10px;overflow:auto;padding:30px 24px}
.drawer-games{display:grid;gap:8px;margin-top:22px}
.drawer-games>a,.drawer-games>div{display:grid;grid-template-columns:49px minmax(0,1fr) auto;align-items:center;gap:10px;padding:5px 11px;border:1px solid #655065;border-radius:6px;background:#241a2d}
.drawer-games>div{color:#b59bb9}
.drawer-games img{object-fit:contain}
.drawer-games span{font-size:12px;color:#cfb8cd;text-align:right}
.drawer-games a:hover{border-color:#ddf3a0}
.drawer-hub{display:flex;margin-top:19px}
.opener-events{font-size:12px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.opener-game #play-more{grid-column:1/-1;grid-row:1;font-size:21px;min-height:53px}
.opener-game #share-result{grid-column:1/-1}
.daily-puzzle-game .game-main{width:min(1180px,calc(100% - 52px));max-width:none;background:none}
.daily-puzzle-game .game-surround{background:radial-gradient(ellipse at 32% 30%,#30233950,transparent 80%);place-items:start stretch}
.daily-puzzle-game .game-loading,.daily-puzzle-game .game-error{justify-self:center;align-self:center}
.daily-puzzle-game .game-caption{padding:13px 0}
.puzzle-screen{width:100%;padding:27px 0 9px}
.puzzle-title{display:flex;align-items:end;justify-content:space-between;gap:8px;margin-bottom:18px}
.puzzle-title h1{font-size:clamp(35px,4.2vw,55px);line-height:1.06;letter-spacing:-.04em;text-shadow:0 4px #0e0913;margin:0 0 6px}
.puzzle-title p{font-size:17px;color:#cfb8cd}
.puzzle-title time,.puzzle-chip{border:1px solid #655065;border-radius:5px;background:#241a2d;color:#cfb8cd;padding:7px 10px;white-space:nowrap;font-size:12px}
.puzzle-layout{display:grid;grid-template-columns:minmax(0,2.08fr) minmax(0,1fr);gap:22px}
.puzzle-panel,.puzzle-side{background:linear-gradient(125deg,#33273c,#2a2033 45%,#22192a);border:1px solid #655065;border-radius:9px;box-shadow:4px 6px 0 #08050d;min-width:0;padding:21px}
.puzzle-panel h2,.puzzle-side h2{font-size:24px;line-height:1.15}
.puzzle-panel-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:15px}
.puzzle-panel-head p,.puzzle-help{font-size:14px;color:#cfb8cd;margin-top:4px}
.puzzle-chip{color:#ddf3a0;border-color:#71835d;background:#293022}
.puzzle-icon{display:block;image-rendering:pixelated;object-fit:contain;flex:none}
.code-layout{display:grid;grid-template-columns:minmax(230px,.78fr) minmax(0,1.18fr);gap:17px}
.guess-paper{min-width:0;padding:12px 12px 20px;color:#362739;background:repeating-linear-gradient(0deg,#f8e4b92c 0 1px,transparent 1px 3px),linear-gradient(135deg,#f6e4bf,#e4c99d);border-top:4px solid #b19873;position:relative}
.guess-paper:after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:8px;background:conic-gradient(from 135deg at 50% 0,#312638 90deg,transparent 90.1deg) repeat-x;background-size:13px 10px}
.guess-paper-head{display:flex;justify-content:space-between;gap:5px;align-items:center;border-bottom:1px dashed #9d7e63;margin-bottom:9px;padding-bottom:10px}
.guess-paper-head small{color:#73594d;font-size:11px}
.code-line{display:grid;grid-template-columns:13px repeat(5,minmax(0,1fr));gap:5px;align-items:center;margin:0 0 5px}
.code-line>small{color:#745847;text-align:center;font-size:11px}
.code-letter{aspect-ratio:.82;max-height:61px;display:grid;place-items:center;align-content:center;gap:2px;background:#efd7ae88;border:1px dashed #ae907977;border-radius:4px;color:#38283b;position:relative}
.code-letter b{font-size:clamp(19px,2.4vw,30px);line-height:1}
.code-letter .puzzle-icon{width:20px;height:20px}
.code-line.active .code-letter{border:2px solid #937453;background:#fff1d7}
.code-letter.code-G,.stamp-code.code-G,.register-key.code-G{background:#b9e66e;border:1px solid #88ae4b;color:#172611}
.code-letter.code-A,.stamp-code.code-A,.register-key.code-A{background:#eab477;border:1px solid #c18a51;color:#2f201d}
.code-letter.code-X,.stamp-code.code-X,.register-key.code-X{background:#4c4356;border:1px solid #70627c;color:#fff3e7}
.code-letter.code-X .puzzle-icon,.stamp-code.code-X .puzzle-icon{filter:brightness(2.1) saturate(.55)}
.stamp-shape{display:none;font-style:normal;font-size:13px;line-height:1}
.stamp-shapes .code-letter .puzzle-icon,.stamp-shapes .stamp-code .puzzle-icon{display:none}
.stamp-shapes .stamp-shape{display:inline}
.stamp-shapes .code-letter.code-G,.stamp-shapes .register-key.code-G{box-shadow:inset 0 0 0 2px #263d21}
.stamp-shapes .code-letter.code-A,.stamp-shapes .register-key.code-A{border-style:dashed}
.stamp-shapes .code-letter.code-X,.stamp-shapes .register-key.code-X{background-image:repeating-linear-gradient(135deg,transparent 0 4px,#ad9abd32 4px 6px)}
.register-station{min-width:0;display:flex;flex-direction:column;border:1px solid #76617b;border-radius:7px;background:linear-gradient(160deg,#211829,#2c2034);padding:12px}
.register-display{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:94px;margin-bottom:14px;padding:8px 13px;background:radial-gradient(ellipse at 50% 110%,#3d5029,#1c271e 75%);border:1px solid #657956;border-radius:5px;box-shadow:inset 3px 3px #0e170d;color:#ddf3a0}
.register-display small{display:block;font-size:11px;letter-spacing:1.6px;margin-bottom:6px}
.register-display strong{font-size:clamp(24px,2.3vw,34px);letter-spacing:.6px;white-space:nowrap}
.register-display .puzzle-icon{width:min(65px,20%);height:auto}
.register-keys{display:grid;gap:7px}
.register-row{display:flex;justify-content:center;gap:4px}
.register-key{width:calc((100% - 36px)/10);min-width:0;height:46px;display:grid;place-items:center;align-content:center;gap:1px;background:#3a2c45;border:1px solid #896e8d;color:#fff0d9;box-shadow:0 3px #100b15,inset 0 1px #ac8eae55;border-radius:5px;font-size:17px;font-weight:750;padding:2px}
@media(hover:hover){.register-key:hover{filter:brightness(1.13)}}
.register-key:active{transform:translateY(2px) scale(.97)}
.puzzle-actions{margin-top:auto;display:flex;align-items:stretch;gap:8px}
.puzzle-actions .primary,.puzzle-actions .secondary{min-height:43px;padding:8px 12px;font-size:15px}
.puzzle-actions .primary{flex:1}
.puzzle-actions button:disabled{opacity:.58;cursor:default;box-shadow:none}
.puzzle-side{display:flex;flex-direction:column;gap:14px}
.stamp-guide{display:grid;gap:8px}
.stamp-guide-row{display:flex;align-items:center;gap:10px;border:1px solid #65506588;border-radius:5px;padding:8px;background:#221829}
.stamp-code{width:31px;height:31px;display:grid;place-items:center;border-radius:4px}
.stamp-guide-row b,.stamp-guide-row small{display:block}.stamp-guide-row small{font-size:12px;color:#cfb8cd}
.puzzle-bird-note{display:flex;align-items:center;gap:11px;margin-top:auto;border-top:1px solid #65506588;padding-top:12px;color:#cfb8cd;font-size:14px}
.puzzle-bird-note>img{width:81px;height:81px;object-fit:contain}
.puzzle-bird-note b{color:#ddf3a0}
.bird-stamp .puzzle-bird-note img{animation:stamp-bird .35s ease both}
.puzzle-status{margin:9px 0;min-height:20px;font-weight:750;color:#ddf3a0;font-size:14px}
.puzzle-status.warning{color:#ffc795}
.stamping .code-letter{animation:stamp-flip 208ms cubic-bezier(.32,.1,.24,1) both;animation-delay:calc(var(--stamp-order)*94ms);backface-visibility:hidden}
.code-won .stamping .code-letter{animation:code-solved 550ms ease both}
.code-won #puzzle-status{color:#ddf3a0;font-size:17px;font-weight:750}
@keyframes stamp-flip{0%{transform:perspective(210px) rotateX(0);filter:brightness(.58) saturate(.25)}49%{transform:perspective(210px) rotateX(90deg);filter:brightness(.58) saturate(.25)}50%{transform:perspective(210px) rotateX(-90deg)}100%{transform:perspective(210px) rotateX(0)}}
@keyframes code-solved{40%{transform:translateY(-6px);box-shadow:0 0 20px #bbec826f}100%{transform:none}}
.puzzle-shake{animation:puzzle-sway .3s ease-in-out}
@keyframes puzzle-sway{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
@keyframes stamp-bird{40%{transform:translateY(-9px) rotate(-5deg)}}
@keyframes shelf-settle{0%{opacity:.2;transform:translateY(-9px) scale(.96)}65%{transform:scale(1.03)}100%{opacity:1;transform:none}}
.sort-panel{min-height:560px;display:flex;flex-direction:column}
.solved-shelves{display:grid;gap:8px;margin-bottom:9px}
.solved-shelves:empty{display:none}
.solved-shelf{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px;border:1px solid #8fa66d;border-radius:6px;background:#46563a;color:#fff4dc;box-shadow:0 3px #1d231b}
.solved-shelf>div{min-width:0}
.solved-shelf small,.loose-tag-count{font:700 10px/1.3 Bahnschrift,Arial,sans-serif;color:#ded0b8;text-transform:uppercase;letter-spacing:1px}
.solved-shelf strong{display:block;font-size:20px;margin-top:5px}
.shelf-label-tags{display:flex;justify-content:end;gap:6px;flex-wrap:wrap}
.shelf-label-tags b{border:1px solid #e0e5ba55;border-radius:4px;background:#180f2340;padding:6px 7px;box-shadow:0 2px #170f1f70;font-size:13px;text-align:center}
.loose-tag-count{margin:8px 0 10px;color:#cfb8cd}
.shelf-color-2{background:#685039;border-color:#be9c6f}.shelf-color-3{background:#544064;border-color:#b18abe}.shelf-color-4{background:#374d61;border-color:#7ea9c4}
.shelf-snap{animation:shelf-settle .33s ease-out}
.grocery-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.grocery-tag{min-width:0;min-height:65px;position:relative;display:grid;place-items:center;background:linear-gradient(148deg,#4b3853,#31263b);border:1px solid #8a7190;border-radius:6px;color:#fff0d9;box-shadow:0 3px #140d1a;font-size:17px;font-weight:730;line-height:1.1;padding:8px;overflow-wrap:anywhere;text-align:center}
.grocery-tag:before{content:'';position:absolute;left:6px;top:6px;width:5px;height:5px;border-radius:50%;background:#9e7c9c}
.grocery-tag:after{content:"";position:absolute;right:7px;bottom:6px;width:13px;height:6px;background:repeating-linear-gradient(90deg,#bca5be66 0 1px,transparent 1px 3px)}
.grocery-tag:hover{transform:translateY(-4px);border-color:#c6a6bd}
.grocery-tag[aria-pressed=true]{background:#4a4934;color:#fff0cc;border-color:#bba56d;animation:shelf-settle .22s}
.sorting-belt{height:28px;margin:15px 0 8px;border:1px solid #655065;border-radius:4px;background:repeating-linear-gradient(90deg,#4e3b55 0 18px,#2d2136 18px 22px);box-shadow:0 4px #140d1a}
.checkout-basket{display:grid;grid-template-columns:1fr 1fr;gap:9px;align-content:center;min-height:163px;padding:12px;border:2px solid #8f7397;border-radius:8px;background:repeating-linear-gradient(135deg,#57405e55 0 6px,transparent 6px 17px),#221829}
.checkout-basket .grocery-tag,.basket-empty{min-height:57px}
.basket-empty{border:1px dashed #9c809569;border-radius:5px}
.mistakes{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px;border:1px solid #655065;border-radius:6px;background:#211829}
.mistakes strong{flex-basis:100%}.mistakes small{color:#cfb8cd}
.mistakes span{display:flex;gap:5px}
.mistakes i{width:26px;height:26px;display:grid;place-items:center;border:1px solid #8d7293;border-radius:4px;background:#241a2d;color:#cfb8cd;font-style:normal}
.mistakes i.used{color:#ffd9a1;border-color:#c48588;background:#66414e}
.puzzle-result{width:min(945px,100%);display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:36px;align-items:center;margin:34px auto}
.game-receipt{min-width:0}.puzzle-result .result-paper{animation:print-daily .55s cubic-bezier(.2,.75,.3,1) both}
@keyframes print-daily{from{transform:translateY(-13px) scaleY(.94);opacity:.24}to{transform:none;opacity:1}}
.puzzle-result .result-paper h1{margin-top:16px}
.puzzle-result .result-marks{margin-top:16px;padding:11px 0;letter-spacing:normal}
.puzzle-result .result-score{font-size:62px}
.receipt-grid,.receipt-grid-row{display:flex;gap:4px;align-items:center;justify-content:center}
.receipt-grid{flex-direction:column}
.result-square{display:grid;place-items:center;width:17px;height:15px;border:1px solid #392b3e55;border-radius:2px;background:var(--square);color:#242123;font:700 11px Bahnschrift,Arial,sans-serif}
.result-square[title="Absent"],.result-square[title="Group X"]{color:#fff0d9}
.puzzle-share{gap:11px}.puzzle-share-head{display:flex;align-items:center;justify-content:space-between;gap:6px}
.puzzle-share-image{position:relative;min-height:267px;overflow:hidden;border:1px solid #8e7499;border-radius:6px;padding:16px;background:radial-gradient(ellipse at 87% 46%,#554062,#33263e 48%,#211829 90%);box-shadow:0 4px #08050d;display:flex;align-items:start;flex-direction:column}
.puzzle-share-image .share-studio-word{width:148px;height:auto;margin-bottom:12px}
.puzzle-share-image .puzzle-share-bird{position:absolute;right:6%;bottom:13%;width:min(38%,145px);height:auto}
.puzzle-share-image>strong{position:relative;font-size:29px;line-height:1.12}.puzzle-share-image>p{color:#ddf3a0;margin:5px 0 10px;font-size:17px;position:relative}
.puzzle-share-image>small{color:#cfb8cd;margin-top:auto;padding-top:8px}
.puzzle-share-rank:not([hidden]){margin:0;color:#ddf3a0;font-size:14px}
.puzzle-share-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;color:#cfb8cd;font-size:13px}
.puzzle-share-tools details{min-width:0}
.puzzle-share-tools pre{white-space:pre-wrap;overflow-wrap:anywhere}
.puzzle-share-tools summary{cursor:pointer}
.puzzle-result #share-fallback:not([hidden]){grid-column:1/-1}
.reduce .puzzle-screen *,.reduce .puzzle-result .result-paper{animation:none!important}
@media(max-width:1020px) and (min-width:701px){
  .puzzle-layout{grid-template-columns:minmax(0,2.35fr) minmax(190px,1fr);gap:14px}
  .puzzle-panel,.puzzle-side{padding:14px}
  .daily-puzzle-game .game-main{width:calc(100% - 35px)}
  .code-layout{grid-template-columns:minmax(176px,.9fr) minmax(180px,1.1fr);gap:9px}
  .register-key{font-size:14px;height:38px}
  .register-station,.guess-paper{padding-left:7px;padding-right:7px}
  .register-row{gap:3px}.register-key{width:calc((100% - 27px)/10)}
}
@media(max-width:760px){
  .daily-puzzle-game .game-title-wrap,.opener-game .game-title-wrap{display:none}
  .game-topbar .nav-inner{padding:0 10px;gap:5px}
  .game-topbar .nav-inner nav,.game-topbar .nav-tools{gap:5px}
  .opener-game .brand-bird{width:32px;height:32px}
  .opener-game .opener-wordmark{width:76px}
  .opener-game .game-topbar .back-link{gap:4px}
  .opener-game .game-topbar .more-games{font-size:12px;padding:6px 7px;min-height:34px;gap:3px}
  .opener-game .mini-streak,.opener-game .mini-streak b{font-size:12px;gap:3px}
  .game-topbar .nav-tools .icon-button{width:32px;height:33px;padding:5px}
}
@media(max-width:700px){
  .daily-puzzle-game .game-main{width:calc(100% - 24px)}
  .puzzle-screen{padding-top:16px}
  .puzzle-title{margin-bottom:13px;align-items:start}
  .puzzle-title h1{font-size:35px}.puzzle-title p{font-size:14px}
  .puzzle-title time{padding:4px 6px;font-size:10px;margin-top:5px}
  .puzzle-layout,.code-layout,.puzzle-result{grid-template-columns:minmax(0,1fr);gap:13px}
  .puzzle-result{width:100%;margin:15px auto 24px}
  .puzzle-panel,.puzzle-side{padding:12px}
  .puzzle-panel-head{margin-bottom:9px}
  .puzzle-panel h2,.puzzle-side h2{font-size:19px}
  .puzzle-panel-head p,.puzzle-help{font-size:12px}
  .guess-paper{padding:8px 8px 15px}
  .guess-paper-head{margin-bottom:6px;padding-bottom:5px;font-size:13px}
  .code-line{margin:0 0 4px;gap:4px;grid-template-columns:13px repeat(5,minmax(0,1fr))}
  .code-letter{height:36px;max-height:none;aspect-ratio:auto;gap:0}
  .code-letter b{font-size:19px}.code-letter .puzzle-icon{width:15px;height:15px}
  .register-station{padding:8px}
  .register-display{min-height:48px;margin-bottom:8px;padding:4px 8px}
  .register-display .puzzle-icon{width:37px}.register-display small{font-size:8px;margin-bottom:2px}
  .register-display strong{font-size:21px}
  .register-keys{gap:5px}
  .register-row{gap:4px}
  .register-key{height:40px;font-size:15px}
  .puzzle-status{min-height:16px;margin:5px 0;font-size:13px}
  .puzzle-actions .primary,.puzzle-actions .secondary{min-height:38px;font-size:13px}
  .puzzle-side{gap:9px}
  .stamp-guide{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
  .stamp-guide-row{padding:5px;gap:3px;flex-wrap:wrap}.stamp-guide-row b{font-size:12px}.stamp-guide-row small{font-size:10px}.stamp-code{width:23px;height:23px}.stamp-code .puzzle-icon{width:22px;height:22px}
  .puzzle-bird-note{display:none}
  .sort-panel{min-height:0}
  .grocery-grid{gap:5px}
  .grocery-tag{min-height:48px;padding:7px 4px;font-size:13px}
  .checkout-basket{min-height:96px;gap:6px;padding:6px}
  .checkout-basket .grocery-tag,.basket-empty{min-height:39px}
  .sorting-belt{height:20px;margin:9px 0 3px}
  .solved-shelf{padding:7px}.solved-shelf strong{font-size:14px}.solved-shelf span{font-size:11px}
  .puzzle-share-image{min-height:249px}
  .opener-game #play-more{font-size:17px;min-height:46px}
}
