.scramble-page [hidden] { display: none !important; }
.scr-skip { position: absolute; left: 1rem; top: -5rem; z-index: 5; background: #fff; padding: .75rem; }
.scr-skip:focus { top: .5rem; }
.scr-sets { margin-block: 1.4rem 1.25rem; }
.scr-sets h2 { margin: 0 0 .75rem; font-size: clamp(1.3rem, 2.1vw, 1.65rem); letter-spacing: -.045em; }
.scr-desk { padding: 0; overflow: hidden; min-width: 0; }
.scr-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(14px, 2.5vw, 26px); border-bottom: 1px solid #cbdacc; background: #eaf2e7; }
.scr-rack-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; }
.scr-rack-status p { margin: 0; color: #214d40; font-size: .94rem; font-weight: 730; }
.scr-marks { display: flex; gap: 4px; }
.scr-marks span { width: 13px; height: 13px; border: 1px solid #9db6a7; border-radius: 3px;
  background: #f8fbf5; box-shadow: 0 1px 0 #b6c5b8; }
.scr-marks .solved { background: #26725e; border-color: #26725e; }
.scr-marks .current { border: 2px solid #995632; background: #ffe7ad; }
.scr-work { padding: clamp(14px, 2.4vw, 26px); display: grid; grid-template-columns: minmax(205px, 2fr) minmax(0, 3fr); gap: clamp(18px, 3vw, 34px); align-items: start; }
.scr-clue { position: relative; isolation: isolate; padding: clamp(20px, 3.5vw, 40px) clamp(16px, 2.5vw, 26px);
  border: 1px solid #dfd4ad; border-radius: 4px 5px 13px 5px; color: #354735;
  background: linear-gradient(108deg,#fff8dc,#fff4d4); box-shadow: 1px 3px 0 #e5dcc3,2px 6px 8px -6px #645e3680; }
.scr-clue::after { content: ''; position: absolute; right: -1px; top: -1px; width: 18px; height: 18px;
  border-bottom-left-radius: 4px; background: linear-gradient(45deg,#e6cfa4 0 48%,#fffef9 52%); }
.scr-clue h2 { margin: 0; overflow-wrap: break-word; font: 710 clamp(1.27rem,2.15vw,1.85rem)/1.23 var(--display); letter-spacing: -.04em; }
.scr-clue h2:focus { outline-offset: 5px; }
.scr-play { min-width: 0; }
.scr-rack { container-type: inline-size; --tile-width: clamp(40px,3.8vw,48px); padding: clamp(17px,2.1vw,25px) 12px;
  border: 1px solid #225649; border-bottom: 5px solid #19473e; border-radius: 13px 14px 16px 15px;
  background: linear-gradient(155deg,#346f60,#2a6057); box-shadow: inset 0 2px 3px #204c3d70, 0 3px 0 #b9ccbd; }
.scr-tile-rows { width: 100%; margin: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 9px 6px; }
@container (max-width: 460px) {
  .scr-tile-rows { max-width: calc(var(--medium-row) * (var(--tile-width) + 6px) - 6px); }
}
@container (max-width: 325px) {
  .scr-tile-rows { max-width: calc(var(--small-row) * (var(--tile-width) + 6px) - 6px); }
}
.scr-tile { position: relative; display: grid; place-items: center; min-width: 0; width: var(--tile-width); height: clamp(44px,4.2vw,50px);
  padding: 0 0 3px; color: #243f34; border: 1px solid #8b977b; border-radius: 7px 8px 7px 7px;
  background: linear-gradient(125deg,#fffcef,#efe3bd); box-shadow: inset 1px 1px 0 #fffdf4,inset -1px -2px 0 #e3d4ad,0 4px 0 #b9a57e,1px 6px 4px #183e3790;
  font: 800 clamp(1.34rem,2.3vw,1.65rem)/1 var(--display); touch-action: manipulation; }
.scr-tile[aria-pressed="true"] { color: #254838; background: #a8cbb6; border-color: #88ad99; box-shadow: inset 0 2px 3px #41654e48,0 1px 0 #153e33; transform: translateY(3px); }
.scr-tile:focus-visible { outline: 3px solid #ffdb86; outline-offset: 2px; z-index: 1; }
.scr-tile:disabled { cursor: default; }
.scr-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 12px 0 21px; }
.scr-tool, .scr-action { min-height: 44px; padding: 8px 14px; border: 1px solid #abc2b2; border-radius: 12px;
  font: 700 .89rem/1.12 var(--display); display: inline-flex; gap: 7px; align-items: center; justify-content: center;
  touch-action: manipulation; }
.scr-tool { color: #245545; background: #f4f8ed; box-shadow: 0 2px 0 #c0d1c0; }
.scr-tools .scr-tool > span { font: 700 1.15rem/1 system-ui, sans-serif; }
.scr-tool:hover:enabled { background: #e2efde; }
.scr-tool:active:enabled, .scr-action:active { transform: translateY(2px); box-shadow: none; }
.scr-tool:disabled { color: #52665c; background: #f4f5f0; border-color: #c9d3c8; box-shadow: none; cursor: default; }
#scr-sound { flex: 0 0 auto; white-space: nowrap; padding-inline: 11px; }
.scr-sound-bars { width: 14px; height: 13px; background:
  linear-gradient(currentColor,currentColor) left center / 3px 5px no-repeat,
  linear-gradient(currentColor,currentColor) center / 3px 12px no-repeat,
  linear-gradient(currentColor,currentColor) right center / 3px 8px no-repeat; }
#scr-sound[aria-pressed="false"] .scr-sound-bars { height: 2px; background: currentColor; }
#scr-form label { display: inline-block; font-weight: 740; font-size: 1rem; }
.scr-entry { display: flex; align-items: stretch; gap: 8px; margin-top: 7px; }
.scr-entry input { width: 100%; min-width: 0; min-height: 48px; padding: 9px 13px; border: 1px solid #a3bcaa;
  border-radius: 11px; background: #fff; box-shadow: inset 0 2px 2px #314f3612; color: #1a4437;
  font: 650 1.12rem/1.25 var(--display); text-transform: uppercase; letter-spacing: .06em; }
.scr-entry input[aria-invalid="true"] { border: 2px solid #a84a30; }
.scr-entry input:focus-visible { outline: 3px solid #237d73; outline-offset: 2px; }
.scr-action { flex: 0 0 auto; min-height: 46px; padding-inline: 17px; border-color: #154e43; background: #1c6051;
  color: #fffef4; box-shadow: 0 3px 0 #103e36; }
.scr-action:hover { background: #236f5c; }
#scr-instructions, #scr-feedback { margin: 9px 0 0; font-size: .88rem; line-height: 1.45; color: #456052; }
#scr-feedback { font-weight: 660; }
#scr-feedback:empty { margin: 0; }
#scr-feedback[data-state="error"] { color: #923e24; }
#scr-feedback[data-state="solved"] { color: #1c6752; }
#scr-proceed { margin-top: 12px; }
.scr-record { border-top: 1px solid #cfddcc; padding: 15px clamp(14px,2.5vw,26px); background: #f3f6ed; }
.scr-record h3 { font-size: 1rem; margin: 0 0 9px; }
.scr-record ol { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.scr-record li { max-width: 100%; overflow-wrap: anywhere; padding: 6px 9px; border: 1px solid #bfcebc;
  border-radius: 6px; background: #fbfff4; color: #2b5b46; box-shadow: 0 2px 0 #d6e3d0; font-weight: 650; }
@media (max-width: 720px) {
  .scr-work { grid-template-columns: 1fr; gap: 16px; }
  .scr-clue { padding: 15px 21px 15px 16px; }
  .scr-rack { padding-inline: 8px; }
  .scr-tools { justify-content: flex-start; margin-bottom: 16px; }
}
@media (max-width: 390px) {
  .scr-toolbar { gap: 6px; }
  .scr-rack-status { display: grid; gap: 5px; }
  .scr-marks span { width: 10px; height: 10px; }
  .scr-rack { --tile-width: 39px; }
  .scr-entry { flex-wrap: wrap; }
  .scr-entry .scr-action { flex-grow: 1; }
}

.folio-portrait { --portrait:url("../press-guardians.webp"); --spot:100% 100%; --zoom:300% 200%; }
.folio-cover { display:flex; align-items:center; gap:18px; padding:clamp(18px,3vw,30px); color:#fcf1c9; background:#244438; }
.folio-cover .folio-portrait { width:68px; height:68px; flex:none; border-radius:50%; border:3px solid #dbcc98; background:#44634b var(--portrait) var(--spot) / var(--zoom) no-repeat; }
.folio-cover :is(h2,p) { margin:0; color:inherit; }
.folio-cover p { margin-bottom:4px; font-size:.87rem; }
.folio-body { padding:clamp(14px,3vw,30px); }
.folio-body > p { max-width:72ch; margin:0 0 .65em; }
.folio-body fieldset { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 20px; min-width:0; margin:18px 0; padding:12px 16px 17px; border:1px solid #cccfb7; border-radius:9px; background:#fffaf0; box-shadow:0 3px 0 #e0ddca; }
.folio-body legend { color:#285647; padding:0 6px; font-weight:750; }
.folio-body .folio-rack { grid-column:1/-1; margin:0; color:#66491f; font:700 1.05rem/1.5 ui-monospace,monospace; letter-spacing:.12em; overflow-wrap:anywhere; }
.folio-body label { display:grid; align-content:space-between; gap:7px; }
.folio-body input { box-sizing:border-box; width:100%; min-width:0; min-height:44px; border:1px solid #93a795; border-radius:8px; padding:6px 11px; background:#fff; color:#183e32; text-transform:uppercase; font:650 1rem var(--display); }
.folio-body input:focus-visible { outline:3px solid #397b67; outline-offset:2px; }
.folio-body input:disabled { color:#345546; background:#f0f4ea; }
.folio-actions,.folio-submit { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:8px 0 14px; }
.folio-submit input { width:12ch; letter-spacing:.15em; }
.scramble-page [hidden] { display:none !important; }
@media(min-width:950px) { .scr-sets .puzzle-choices { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:599px) { .folio-body fieldset { grid-template-columns:1fr; } }
