[data-episode-game="puzzle-online"] .at-puzzle {
  --p30-ink: #192447;
  --p30-blue: #2849ae;
  --p30-line: #d5c7a5;
  --p30-paper: #fffcf4;
  width:100%;max-width:none;margin:auto;color:var(--p30-ink);
  display:grid;gap:12px;
}
.at-puzzle .p30-layout { display:grid; grid-template-columns:minmax(0,3.25fr) minmax(205px,1fr);gap:clamp(10px,1.5vw,18px);align-items:stretch; }
[data-episode-game="puzzle-online"] .at-folio { position:relative; max-width:none; min-width:0; width:100%; margin:0; align-self:start; background:#fff7e2; border:1px solid #d8bf79; border-radius:15px; padding:clamp(5px,.65vw,9px); box-shadow:none; }
[data-episode-game="puzzle-online"] .at-viewport { width:100%;max-height:none;aspect-ratio:var(--p30-photo-ratio,1.52); border-radius:clamp(5px,.8vw,10px); overflow:auto; overscroll-behavior:contain;touch-action:pan-x pan-y; scrollbar-width:thin;scrollbar-color:#87979e #f4efdd; }
[data-episode-game="puzzle-online"] .at-board { aspect-ratio:var(--p30-photo-ratio,1.52);background:#fff3cf; }
.at-puzzle :is(.p30-side,.p30-tray-frame,.p30-gesture-note,.p30-help,.at-settings) { border:1px solid var(--p30-line);border-radius:13px;background:linear-gradient(130deg,#fffdf7,#fbf6e9); }
.at-puzzle .p30-side { display:flex; flex-direction:column; justify-content:space-evenly; padding:clamp(10px,1.2vw,20px);gap:0; min-width:0; }
.at-puzzle .p30-side strong,.at-puzzle .p30-tray-title,.at-puzzle :is(.p30-help,.at-settings) summary { display:flex;align-items:center;gap:8px;color:var(--p30-ink);font-weight:760; }
.at-puzzle :is(.p30-side,.p30-tray-title,.p30-gesture-note,.p30-help,.at-settings,.p30-quickzoom) svg { width:1.25em;height:1.25em;flex:none; }
.at-puzzle :is(.p30-count,.p30-zoom-box,.p30-preview) { display:grid; gap:10px; min-width:0; }
.at-puzzle :is(.p30-count,.p30-zoom-box) { border-bottom:1px solid var(--p30-line);padding-bottom:clamp(12px,1.5vw,20px);margin-bottom:clamp(12px,1.5vw,20px); }
.at-puzzle :is(.p30-count,.p30-preferences) select { min-height:42px;max-width:100%;min-width:0;margin:0;border-radius:9px;border:1px solid #b5b7bc;padding:5px 8px;color:var(--p30-ink);background:#fffefa;font:inherit;font-weight:650; }
.at-puzzle .p30-count select { width:100%; }
.at-puzzle .at-zoom { display:grid;grid-template-columns:auto minmax(0,1fr) auto; gap:3px; }
.at-puzzle .at-zoom span { text-align:center; min-width:0;font-size:.95em;font-weight:750; }
[data-episode-game="puzzle-online"] .at-zoom button,.at-puzzle .p30-tray-line>button,.at-puzzle .p30-quickzoom {
  display:grid;place-items:center;min-width:34px;width:42px;min-height:40px;padding:0;border-radius:50%;border:1px solid #bcbcc0;background:#fffcf6;color:var(--p30-ink);font-weight:650;line-height:1;box-shadow:0 1px 2px #15284012;
}
.at-puzzle .p30-preview { padding:0;margin:0;width:100%;border:0;background:transparent;color:var(--p30-ink);text-align:left;box-shadow:none; }
.at-puzzle .p30-preview img { width:100%;height:auto;aspect-ratio:var(--p30-photo-ratio,1.52);object-fit:cover;border:2px solid #ead387;border-radius:9px; }
.at-puzzle .p30-preview:hover img,.at-puzzle .p30-preview[aria-pressed=true] img { border-color:var(--p30-blue); }
.at-puzzle .p30-preview>span,.at-puzzle .p30-quickzoom,.at-puzzle .p30-gesture-note {display:none}
.at-puzzle .p30-tray-frame { min-width:0; padding:8px clamp(7px,1.2vw,16px); }
.at-puzzle .p30-tray-title svg { color:#b88015; }
.at-puzzle .p30-tray-line { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:clamp(3px,.65vw,9px); }
.at-puzzle .p30-tray-line>button { font-size:1.65rem; }
[data-episode-game="puzzle-online"] .at-tray { gap:clamp(2px,1.1vw,15px);padding:0;border:0;background:transparent; }
[data-episode-game="puzzle-online"] .at-puzzle .at-tile { border-radius:8px;min-width:0;min-height:42px;border:2px solid transparent;background:transparent; }
[data-episode-game="puzzle-online"] .at-puzzle .at-tile:hover { background:#fff5d8; }
[data-episode-game="puzzle-online"] .at-puzzle .at-tile[aria-pressed=true] { border-color:#2f51ab; background:#ecf1fd; }
[data-episode-game="puzzle-online"] .at-tile canvas { max-width:112px;width:100%; }
[data-episode-game="puzzle-online"] .at-feedback { margin:3px 0 0;min-height:0;color:#465671;font-size:.84rem; }
.at-puzzle :is(.p30-help,.at-settings) { padding:0 12px; }
.at-puzzle :is(.p30-help,.at-settings) summary { padding:10px 1px;min-height:44px;cursor:pointer;list-style:none; }
.at-puzzle :is(.p30-help,.at-settings) summary::-webkit-details-marker { display:none; }
.at-puzzle :is(.p30-help,.at-settings) summary::after { content:""; width:8px;height:8px;margin-inline-start:auto;border-right:2px solid;border-bottom:2px solid;transform:rotate(45deg); }
.at-puzzle :is(.p30-help,.at-settings)[open] summary::after { transform:rotate(225deg); }
.at-puzzle .p30-help>div,.at-puzzle .p30-preferences { display:flex;flex-wrap:wrap;gap:10px 16px;border-top:1px solid var(--p30-line);padding:12px 0; }
.at-puzzle .p30-help p {flex:1 1 150px;margin:0;color:#44516a;font-size:.92rem;line-height:1.4}
.at-puzzle .p30-help p strong {display:block;color:var(--p30-ink);margin-bottom:3px}
.at-puzzle .p30-preferences {align-items:center}
.at-puzzle .p30-preferences :is(label,.p30-time,button) {display:flex;gap:7px;align-items:center;max-width:100%}
.at-puzzle .p30-preferences input {accent-color:var(--p30-blue);width:17px;height:17px}
.at-puzzle .p30-preferences [hidden] {display:none}
.at-puzzle .p30-preferences .p30-time span {display:flex;align-items:center;gap:4px}
.at-puzzle .p30-preferences [data-stats] b {margin-left:6px}
.at-puzzle .p30-preferences button {min-height:40px;background:#fffdf8;border:1px solid #b8bdc5;border-radius:8px;padding:6px 12px;color:var(--p30-ink);font-weight:700}
.at-puzzle .p30-preferences button[data-new] {border-color:#223e8b;background:var(--p30-blue);color:white}
@media(max-width:720px) {
  .at-puzzle .p30-layout { grid-template-columns:minmax(0,1fr);gap:7px; }
  .at-puzzle .p30-side { display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:start;gap:0 8px;padding:9px; }
  .at-puzzle :is(.p30-count,.p30-zoom-box) { margin:0;padding:1px 0 9px;border:0;gap:5px; }
  .at-puzzle .p30-side strong { font-size:clamp(.75rem,3.28vw,1rem);gap:4px; }
  .at-puzzle .p30-count select { font-size:.88rem;min-height:38px;padding:3px 2px; }
  .at-puzzle .p30-preview { grid-column:1 / -1;grid-template-columns:1fr auto auto;align-items:center;border-top:1px solid var(--p30-line);padding-top:6px;gap:7px; }
  .at-puzzle .p30-preview img { width:76px;height:auto; }
  .at-puzzle .p30-preview>span {display:inline;font-size:1.3rem}
  .at-puzzle .p30-gesture-note {display:flex;align-items:center;gap:8px;padding:6px 8px;background:#fff8e3;}
  .at-puzzle .p30-gesture-note[hidden] {display:none}
  .at-puzzle .p30-gesture-note p {flex:1 1 auto;margin:0;font-size:.85rem;line-height:1.28}
  .at-puzzle .p30-gesture-note small {display:block;color:#47516b}
  .at-puzzle .p30-gesture-note button {align-self:start;width:34px;min-height:32px;border:0;background:transparent;color:var(--p30-ink);font-size:1.1rem}
  .at-puzzle .at-folio .p30-quickzoom {position:absolute;display:grid;right:11px;bottom:11px;width:40px;height:40px;background:white;box-shadow:0 1px 5px #1528403d}
  .at-puzzle .at-folio.p30-placing .p30-quickzoom { visibility:hidden; }
  .at-puzzle .p30-tray-line>button,[data-episode-game="puzzle-online"] .at-zoom button {width:34px;min-width:30px;min-height:36px;}
  .at-puzzle .p30-tray-frame {padding:5px}
  .at-puzzle .p30-tray-title {font-size:.9rem}
  .at-puzzle .p30-tray-line {gap:1px}
  [data-episode-game="puzzle-online"] .at-tray {gap:0}
}
@media(max-width:360px) {
  .at-puzzle .p30-side {gap:0 4px;padding:6px}
  .at-puzzle .p30-side strong {line-height:1.15}
  .at-puzzle .p30-tray-line>button {width:28px;min-width:28px}
}
