.exploration-panel{margin:10px 0;padding:12px 16px;border:1px solid #8cb6bb;border-radius:16px;background:#f2faf9;color:#234e5e}.exploration-heading{display:flex;justify-content:space-between;gap:10px;align-items:center}.exploration-heading strong,.exploration-heading small{display:block}.exploration-panel p{margin:6px 0}.exploration-panel button{min-height:42px}
#exploration-dialog{width:min(700px,calc(100vw - 16px));height:min(720px,calc(100dvh - 16px));max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:12px;border:1px solid #8fb2b7;border-radius:18px;box-sizing:border-box;color:#244a5a;background:#f3faf8;overflow:hidden;position:fixed}#exploration-dialog[open]{display:flex;flex-direction:column;gap:8px}#exploration-dialog::backdrop{background:#153c50b8}#exploration-dialog *{box-sizing:border-box}#exploration-dialog button{width:auto;margin:0;min-height:40px;padding:7px 10px;touch-action:manipulation;font-size:14px;line-height:1.25}#exploration-dialog button:focus-visible{outline:3px solid #08768b;outline-offset:-3px}#exploration-dialog button[aria-pressed=true]{box-shadow:inset 0 0 0 3px #267b8e;background:#d2e9eb}.puzzle-header{display:flex;gap:12px;align-items:center;flex:none}.puzzle-header h2{font-size:17px;margin:0;line-height:1.3}.puzzle-header small{font-size:12px}.puzzle-header>button{flex:none}.puzzle-goal{padding:8px 10px;margin:0;background:#dbeee7;border-radius:9px;font-size:14px;line-height:1.4;flex:none}.puzzle-board{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;overflow:hidden}.puzzle-message{text-align:center;font-size:13px;line-height:1.4;flex:none}.puzzle-art{display:block;width:100%;height:100%;max-height:100%;pointer-events:none}.puzzle-buttons{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;max-width:100%;flex:none}.picture-buttons{width:100%;max-width:480px}.picture-buttons button{position:relative;flex:0 1 74px;min-width:48px;display:flex;flex-direction:column;align-items:center;gap:2px}.picture-buttons .puzzle-art{height:56px;width:56px}.picture-buttons small{font-size:11px}.picture-buttons b{position:absolute;top:5px;right:5px;background:#fffae7;border-radius:12px;padding:1px 6px;color:#315260}.puzzle-nine{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex:none;aspect-ratio:1;max-width:100%}#exploration-dialog .puzzle-nine button{position:relative;aspect-ratio:1;min-height:0;padding:0;border:1px solid #86aeb4;border-radius:9px;background:#dceaea;overflow:hidden}.puzzle-nine .lit{background:#fff3b5!important}.puzzle-nine.mosaic{gap:3px}.mosaic button small{position:absolute;bottom:2px;left:3px;background:#fffbe5da;padding:0 3px;font-size:10px;color:#304e57}.puzzle-maps{display:flex;gap:10px;justify-content:center;align-items:center;flex:none;max-width:100%;--tile:32px}.puzzle-map{display:grid;grid-template-columns:repeat(var(--cols),var(--tile));grid-template-rows:repeat(var(--rows),var(--tile));border-radius:8px;overflow:hidden;box-shadow:0 0 0 2px #90b0b1}.puzzle-tile{position:relative;display:flex;align-items:center;justify-content:center;background:#e4eee2;border:1px solid #ccddcc;min-width:0;min-height:0}.puzzle-tile.wall{background:#b0c1bc}.puzzle-tile.goal{background:#eee8ba}.puzzle-tile.water{background:#a2d9e5}.puzzle-person{width:100%;height:100%;object-fit:contain}.puzzle-person.echo{filter:hue-rotate(100deg);opacity:.8}.puzzle-directions{display:flex;justify-content:center;gap:7px;flex:none}#exploration-dialog .puzzle-directions button{width:46px;height:44px;font-size:18px}.puzzle-scales{display:flex;align-items:center;justify-content:center;gap:15px;max-height:35%;flex:1;min-height:70px}.puzzle-scales .puzzle-art{width:110px}.puzzle-scales b{white-space:nowrap}.puzzle-jugs{display:flex;justify-content:center;min-height:0;flex:1;max-height:220px;gap:25px}.puzzle-jugs figure{margin:0;display:flex;flex-direction:column;align-items:center;min-height:0}.puzzle-jugs svg{min-height:0;flex:1;width:100px}.puzzle-jugs figcaption{flex:none;font-size:14px}.jug-buttons{display:grid;grid-template-columns:1fr 1fr;width:100%;max-width:360px}.puzzle-shores{display:flex;gap:22px;width:100%;max-width:440px;min-height:100px;background:#afdae3;border-radius:12px;padding:8px}.puzzle-shores section{width:50%;background:#e7dfbf;border-radius:10px;padding:6px}.puzzle-shores section>div{display:grid;grid-template-columns:1fr 1fr}.puzzle-shores svg{height:65px}.puzzle-equations{display:flex;flex-direction:column;gap:5px}.puzzle-equations span{display:flex;align-items:center;gap:7px;font-weight:bold}.puzzle-equations svg{width:38px;height:38px}.puzzle-sequence{width:100%;max-width:440px}.shell-line{display:flex;align-items:center;justify-content:center;min-height:40px;gap:3px;padding:3px;border-radius:8px;background:#e2efeb;margin:3px 0 8px}.shell-line svg{width:30px;height:40px;min-width:0}.shell-line span{font-size:12px}.puzzle-tools{display:flex;gap:6px;flex:none;border-top:1px solid #b6cdce;padding-top:8px}.puzzle-tools button{flex:1}.puzzle-help{position:absolute;inset:8px;background:#f3faf8;z-index:2;overflow:auto;padding:14px;border:1px solid #94b7b7;border-radius:12px}.puzzle-help[hidden]{display:none}.puzzle-help p{font-size:15px;line-height:1.65}.puzzle-help button{margin:4px}.puzzle-complete{text-align:center}.puzzle-complete svg{width:110px;height:110px;margin:auto}@media(max-width:380px){#exploration-dialog{padding:8px;gap:6px}.puzzle-header{gap:7px}.puzzle-header h2{font-size:15px}.picture-buttons{gap:5px}.picture-buttons button{flex-basis:62px}.picture-buttons .puzzle-art{width:44px;height:44px}.puzzle-goal{font-size:12px}.puzzle-scales{gap:8px}.puzzle-shores{gap:14px}.puzzle-shores svg{height:48px}}@media(max-height:510px){#exploration-dialog{width:min(920px,calc(100vw - 12px));padding:6px;gap:4px}.puzzle-header h2{font-size:14px}.puzzle-header small{display:none}.puzzle-goal{font-size:12px;padding:3px 8px}.puzzle-board{gap:4px}.puzzle-tools{padding-top:4px}.puzzle-shores{min-height:70px;max-height:110px}.puzzle-shores svg{height:35px}.picture-buttons .puzzle-art{width:32px;height:32px}.picture-buttons button{min-height:40px!important}.puzzle-equations{flex-direction:row;gap:7px}.puzzle-equations svg{width:25px;height:25px}.shell-line{min-height:24px;margin:0}.shell-line svg{height:25px}.puzzle-scales{min-height:40px}.puzzle-jugs{max-height:90px}.jug-buttons{grid-template-columns:repeat(3,1fr);max-width:540px}.puzzle-directions button{height:40px!important;min-height:40px!important}}

#clue-document-dialog{width:min(480px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:calc(100dvh - 28px);padding:0;border:0;border-radius:16px;background:transparent;overflow:auto;color:#354d51;box-shadow:0 20px 65px #15363d80}
#clue-document-dialog::backdrop{background:#173d4cad;backdrop-filter:blur(3px)}
#clue-document-dialog .clue-document{position:relative;display:flex;flex-direction:column;align-items:center;gap:14px;width:100%;margin:0;padding:26px 28px 20px;border:0;border-radius:16px;white-space:normal;text-align:left;color:inherit;font:inherit;cursor:pointer;transform:none;transition:none;min-height:330px}
#clue-document-dialog.clue-tablet .clue-document{background:linear-gradient(125deg,#d1d9cd,#eef0df 42%,#b9c7bd);border:9px ridge #b9c7ba;border-radius:23px 14px 19px 11px;box-shadow:inset 0 0 26px #66867a45}
#clue-document-dialog.clue-letter .clue-document{background:repeating-linear-gradient(3deg,#fff8df 0 3px,#fbf1d7 4px 5px);border:1px solid #dfcda4;color:#654e3b;box-shadow:inset 0 0 35px #d6b77b48}
#clue-document-dialog.clue-letter .clue-document:before{content:'';position:absolute;top:0;right:0;width:0;height:0;border-style:solid;border-width:0 0 27px 27px;border-color:transparent transparent #dcc39a transparent}
.clue-document-kicker{font-size:11px;letter-spacing:.12em;opacity:.8}.clue-document-emblem{width:52px;height:52px;opacity:.75}.clue-tablet .clue-document-emblem{filter:grayscale(1);mix-blend-mode:multiply}
#clue-document-title{display:block;font:24px/1.5 'Yu Mincho',serif;letter-spacing:.16em;text-align:center}.clue-document-copy{display:flex;flex-direction:column;gap:10px;width:100%;font:17px/1.85 'Yu Mincho',serif;overflow-wrap:anywhere;border-top:1px solid #748d7655;border-bottom:1px solid #748d7655;padding:18px 0}.clue-document-footer{align-self:flex-end;font:13px/1.5 'Yu Mincho',serif;opacity:.8}.clue-document-dismiss{font-size:12px;letter-spacing:.08em;margin-top:6px;opacity:.8}
#clue-document-dialog .clue-document:focus-visible{outline:3px solid #789786;outline-offset:-7px}
@media(max-width:380px),(max-height:550px){#clue-document-dialog .clue-document{padding:18px;gap:9px;min-height:0}.clue-document-copy{font-size:15px;line-height:1.7;padding:12px 0;gap:8px}.clue-document-emblem{width:38px;height:38px}#clue-document-title{font-size:21px}}

.order-direction{display:flex;justify-content:space-between;width:100%;max-width:480px;padding:0 4px;font-size:12px;color:#315260;flex:none}
#exploration-dialog .order-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;width:100%;max-width:480px;flex:none}
#exploration-dialog .order-row button{min-width:0;width:100%;padding:6px 2px;gap:3px;min-height:64px}
#exploration-dialog .order-row .puzzle-art{width:100%;max-width:48px;height:40px}
#exploration-dialog .order-row b{position:static;font-size:14px;line-height:18px;padding:0 5px}
@media(max-height:510px){#exploration-dialog .order-row button{min-height:54px;padding:3px 2px}#exploration-dialog .order-row .puzzle-art{height:30px}}

#exploration-dialog .order-row[data-count="6"]{grid-template-columns:repeat(6,minmax(0,1fr))}
