.learn-dialog{box-sizing:border-box;width:min(520px,calc(100vw - 28px));max-height:calc(100svh - 28px);overflow:auto;padding:26px;border:1px solid #bca57a;border-radius:18px;background:#f5efdf;color:#23463e;box-shadow:0 24px 90px #102c3e55;font:15px/1.55 system-ui,sans-serif}.learn-dialog::backdrop{background:#102c3e99;backdrop-filter:blur(6px)}.learn-dialog button{font:inherit;cursor:pointer;border:1px solid #bca57a;border-radius:7px;background:#fff8e7;color:#23463e;padding:10px 16px;min-height:44px;width:auto;margin:0}.learn-dialog button:disabled{opacity:.4;cursor:default}.learn-dialog .primary{background:#254f46;color:#fff1d2}.learn-top{display:flex;justify-content:space-between;align-items:center;gap:12px;font:11px system-ui;letter-spacing:.12em}.learn-top button{font-size:24px;padding:0 12px}.learn-dialog h2{font:32px/1.15 Georgia,serif;margin:0 0 16px}.learn-dialog h2:focus{outline:none}.learn-dialog p{font:15px/1.6 system-ui;color:#23463e}.learn-art{height:90px;display:flex;align-items:center;justify-content:center;margin:12px 0 20px;background:#e5e7d8;border-radius:12px}.learn-art>.card-symbol{width:64px;height:64px;margin:0;vertical-align:0}.learn-turn{display:flex;align-items:center;gap:22px;text-align:center;font:16px/1.5 Georgia}.learn-turn b{color:#8f774f}.learn-note{padding:14px;background:#fff9ec;border-left:3px solid #bca57a;border-radius:4px}.learn-actions{display:flex;justify-content:space-between;gap:14px;margin-top:20px}.learn-dots{display:flex;gap:7px;justify-content:center;margin:18px 0;flex-wrap:wrap}.learn-dots button{padding:4px;min-width:36px;min-height:36px;font-size:12px}.learn-dots [aria-current]{background:#254f46;color:#fff1d2}.learn-check,.learn-settings label{display:flex!important;align-items:center;gap:10px;font:14px/1.5 system-ui!important;text-align:left}.learn-check input,.learn-settings input{width:19px;height:19px;flex:none;accent-color:#254f46}.learn-settings{margin:16px 0;padding:14px;border:1px solid #bca57a;border-radius:10px;background:#fff8e7;color:#23463e}.learn-settings label+label{margin-top:12px}.learn-settings p{font:12px/1.5 system-ui!important;color:#52665b}.guidance-hint{border:1px solid #c5b68c;border-radius:9px;background:#f5efdf;color:#23463e;padding:10px 12px;margin:0 0 10px;font:13px/1.45 system-ui;display:flex;gap:12px;align-items:start}.guidance-hint p{margin:3px 0 0}.guidance-hint button{margin-left:auto;flex:none;min-height:36px;min-width:36px;background:transparent;border:0;color:#23463e;cursor:pointer}.guidance-hint strong{font-weight:650}#bottom-bar>.guidance-hint{max-width:680px;margin:8px auto}button:focus-visible,input:focus-visible{outline:3px solid #327885;outline-offset:3px}@media(max-width:600px){.learn-dialog{padding:18px}.learn-dialog h2{font-size:27px}.learn-art{height:74px;margin:10px 0 16px}#bottom-bar>.guidance-hint{margin:6px 8px;font-size:12px}.learn-dots{gap:5px}.learn-dialog .learn-dots button{min-width:32px}}
/* Keep guidance outside the fixed-height card shelf so controls never reflow. */
#bottom-bar>.guidance-hint{position:absolute;bottom:calc(100% + 12px);left:16px;right:16px;max-width:600px;margin:0;box-shadow:0 4px 20px #123c3930;z-index:9}
@media(max-width:700px){#bottom-bar>.guidance-hint{left:10px;right:10px;bottom:calc(100% + 8px);margin:0;padding:8px 10px;font-size:12px}}
dialog.learn-dialog{position:fixed;inset:0;margin:auto;height:max-content;transform:none}
#drawer button[data-open-guide],#drawer button[data-reset-hints]{font:14px/1.4 system-ui;padding:11px 16px;min-height:44px;border:1px solid #bca57a;border-radius:7px;background:#fff8e7;color:#23463e;cursor:pointer}
/* Approved Painted Harbour handbook, setup and contextual guidance. */
dialog.learn-dialog{width:min(1020px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;background:#f6f0e1;border:1px solid #d4c5a4;border-radius:15px;color:#23483f;overflow:auto;overscroll-behavior:contain}.learn-dialog::backdrop{background:#123c3cd9;backdrop-filter:blur(7px)}.learn-dialog .learn-top{position:sticky;top:0;z-index:3;background:#f6f0e1;display:flex;padding:12px 22px;border-bottom:1px solid #d9ccb3;gap:20px;letter-spacing:0;font:22px/1.15 Georgia,serif}.learn-top img{width:130px;height:45px;object-fit:contain}.learn-top>span{flex:1}.learn-dialog .learn-top button{min-width:44px;min-height:44px;padding:0;border:0;background:transparent;font-size:28px}.learn-grid{display:grid;grid-template-columns:43% 57%;min-height:440px}.learn-painting{position:relative;isolation:isolate;min-height:400px;background:#71989a}.learn-painting>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}.learn-painting:after{content:'';position:absolute;inset:0;background:linear-gradient(transparent 45%,#12342be8);z-index:-1}.learn-caption{position:absolute;bottom:30px;left:28px;right:24px}.learn-caption>span{font:10px system-ui,sans-serif;letter-spacing:2px;color:#e2c99c}.learn-dialog .learn-caption p{font:29px/1.15 Georgia,serif;color:#fff4da;margin:12px 0 0}.learn-lesson{padding:28px 34px;display:flex;flex-direction:column;gap:18px;min-width:0}.learn-chapter{display:flex;align-items:center;justify-content:space-between;font:10px system-ui,sans-serif;letter-spacing:1px;color:#6d796d}.learn-chapter .card-symbol{width:39.6px;height:39.6px;vertical-align:0}.learn-dialog h2{font:39px/1.12 Georgia,serif;letter-spacing:-1px;color:#23483f;margin:0}.learn-dialog .learn-lead{font:15px/1.65 system-ui,sans-serif;color:#4d6156;margin:0}.learn-takeaway{display:flex;align-items:center;gap:14px;padding:15px 0;border-block:1px solid #d9ccb3}.learn-takeaway>.card-symbol{width:40px;height:40px;vertical-align:0}.learn-takeaway strong{display:block;font:21px/1.2 Georgia,serif}.learn-takeaway small{font:12px/1.5 system-ui,sans-serif;color:#657469}.learn-resources{display:flex;gap:7px}.learn-resources img{width:32px;height:32px;object-fit:contain}.learn-turns{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.learn-turns>div{border-top:2px solid #bca57a;padding:10px 0}.learn-turns b{font:20px Georgia,serif}.learn-turns small{display:block;font:11px/1.5 system-ui,sans-serif;color:#657469;margin-top:5px}.learn-rules{font:13px/1.65 system-ui,sans-serif;color:#53675c}.learn-rules summary{cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between;font-weight:600;color:#31584b;list-style:none;gap:15px}.learn-rules summary::-webkit-details-marker{display:none}.learn-rules summary:after{content:'+';font-size:22px;font-weight:400}.learn-rules[open] summary:after{content:'−'}.learn-dialog .learn-rules p,#voyage-setup .learn-rules p{font:13px/1.65 system-ui,sans-serif;color:#53675c;margin:0 0 10px}.learn-dialog .learn-dots{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:0;margin:0;padding:0 12px;border-top:1px solid #d9ccb3;background:#eee7d6}.learn-dialog .learn-dots button{display:flex;align-items:center;justify-content:center;gap:6px;background:transparent;border:0;border-radius:0;padding:12px 3px;min-height:54px;font:11px system-ui,sans-serif;color:#6c776b;position:relative}.learn-dots button span{font:14px Georgia,serif;color:#9f8c65}.learn-dialog .learn-dots [aria-current]{color:#204e43;font-weight:700}.learn-dots [aria-current]:after{content:'';position:absolute;bottom:0;left:12%;right:12%;height:3px;background:#a78948}.learn-footer{position:sticky;left:auto;right:auto;transform:none;bottom:0;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:14px;padding:15px 24px;border-top:1px solid #d9ccb3;background:#fbf6e9}.learn-footer .learn-actions{margin:0;gap:10px}.learn-dialog .primary{background:#204e43;color:#fff4d9;border-color:#204e43;min-width:155px}.learn-dialog .learn-check,.learn-footer-note{font:12px/1.4 system-ui,sans-serif!important;color:#657469}.learn-dialog button:focus-visible,.learn-rules summary:focus-visible{outline:3px solid #bb8f36;outline-offset:3px}.learn-dialog button:disabled{opacity:.4}
#drawer.voyage-panel{width:min(1000px,calc(100vw - 28px));max-height:calc(100dvh - 28px);background:#f6f0e1;border-radius:15px}#drawer.voyage-panel .drawer-head{padding:15px 26px;background:#f6f0e1}#drawer.voyage-panel .drawer-head h2{font:29px/1.15 Georgia,serif}#drawer.voyage-panel #drawer-body{padding:0}.voyage-layout{display:grid;grid-template-columns:38% 62%}.voyage-art{position:relative;isolation:isolate;min-height:430px}.voyage-art>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}.voyage-art:after{content:'';position:absolute;inset:0;background:linear-gradient(transparent 40%,#12342be8);z-index:-1}.voyage-art>div{position:absolute;bottom:30px;left:26px;right:24px;color:#fff4da}.voyage-art span{font:10px system-ui,sans-serif;letter-spacing:2px;color:#e2c99c}.voyage-art p{font:30px/1.15 Georgia,serif;margin:12px 0 0}.voyage-panel #voyage-setup{padding:26px 34px}.voyage-welcome{font:15px/1.6 system-ui,sans-serif;color:#657469;margin:0 0 20px}.captain-count{border:0;padding:0;margin:0 0 20px;display:flex;gap:10px}.captain-count legend{font:11px system-ui,sans-serif;letter-spacing:1px;text-transform:uppercase;margin-bottom:10px}.captain-count>label{position:relative;flex:1;cursor:pointer}.captain-count input{position:absolute;opacity:0;width:1px;height:1px}.captain-count label>span{display:flex;flex-direction:column;align-items:center;padding:9px;border:1px solid #cbbb9d;border-radius:7px;background:#fff9ec}.captain-count b{font:25px Georgia,serif}.captain-count small{font:11px system-ui,sans-serif}.captain-count input:checked+span{box-shadow:inset 0 0 0 1px #204e43;border-color:#204e43;background:#e4e9dd}.captain-count input:focus-visible+span{outline:3px solid #bb8f36;outline-offset:3px}.voyage-panel .setup-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.voyage-panel #voyage-setup label{font:12px/1.5 system-ui,sans-serif}.voyage-panel #voyage-setup :is(input:not([type=checkbox]):not([type=radio]),select){font:16px system-ui,sans-serif;min-height:46px;background:#fffbf1;border:1px solid #cbbb9d;border-radius:6px;color:#204e43;padding:10px;min-width:0;width:100%}.voyage-panel .setup-names{margin-bottom:18px}.voyage-panel .captain-name-field{margin-top:6px}.voyage-panel .captain-name-field input{border:0!important}.voyage-crew{display:flex;align-items:center;gap:7px;margin:15px 0}.voyage-crew img{width:32px;height:32px;object-fit:cover;border-radius:50%;border:1px solid #ba9e6a}.voyage-crew p{font:11px/1.5 system-ui,sans-serif;color:#657469;margin:0}.voyage-panel .learn-settings{border:0;border-top:1px solid #d9ccb3;border-radius:0;padding:15px 0 0;background:none;margin:12px 0}.voyage-actions{display:flex;gap:10px;margin:18px 0}.voyage-actions button{flex:1;min-height:46px}.voyage-back{font:12px system-ui,sans-serif;color:#52665b}.voyage-panel #setup-error:empty{display:none}
.guidance-hint{background:#f9f2e2f5;border:1px solid #cbb78e;border-radius:10px;padding:16px 18px;box-shadow:0 8px 28px #17392d22;gap:8px}.hint-copy{min-width:0;flex:1}.hint-kicker{display:flex;align-items:center;gap:8px;margin-bottom:8px;font:9px system-ui,sans-serif;letter-spacing:1.5px;text-transform:uppercase;color:#687563}.hint-kicker .card-symbol{width:25px;height:25px}.guidance-hint strong{display:block;font:23px/1.2 Georgia,serif;color:#23483f}.guidance-hint p{font:13px/1.55 system-ui,sans-serif;color:#5c6d60;margin:8px 0 0}.guidance-hint button.hint-handbook{display:block;margin:6px 0 0;padding:6px 0;min-height:36px;border:0;background:transparent;text-decoration:underline;font:11px/1.4 system-ui,sans-serif;color:#31584b;text-align:left}.guidance-hint>button{min-width:40px;min-height:40px;padding:0;font-size:24px;align-self:start}#bottom-bar>.guidance-hint{max-width:540px;max-height:36dvh;overflow:auto;overscroll-behavior:contain}
@media(max-width:700px){dialog.learn-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 20px);border-radius:12px}.learn-dialog .learn-top{padding:9px 12px;gap:10px;font-size:18px}.learn-top img{width:92px;height:33px}.learn-grid{grid-template-columns:1fr;min-height:0}.learn-painting{min-height:155px}.learn-painting>img{object-position:center 48%}.learn-caption{bottom:18px;left:22px;right:18px}.learn-caption>span{font-size:9px}.learn-dialog .learn-caption p{font-size:24px;margin-top:7px}.learn-lesson{padding:20px 22px 12px;gap:14px}.learn-dialog h2{font-size:31px;letter-spacing:-.7px}.learn-dialog .learn-lead{font-size:14px}.learn-chapter .card-symbol{width:32px;height:32px}.learn-takeaway{padding:11px 0;gap:10px}.learn-takeaway strong{font-size:20px}.learn-takeaway small{font-size:11px}.learn-takeaway>.card-symbol{width:35px;height:35px}.learn-resources{gap:4px}.learn-resources img{width:26px;height:26px}.learn-dialog .learn-dots{padding:0 6px}.learn-dialog .learn-dots button{flex-direction:column;gap:3px;font-size:9px;padding:8px 0;min-width:0;min-height:50px}.learn-footer{padding:12px 15px;flex-direction:column;gap:10px;align-items:stretch}.learn-footer-note{display:none}.learn-footer .learn-actions{width:100%}.learn-footer .learn-actions button{flex:1}.learn-dialog .learn-check{font-size:11px!important}.learn-turns b{font-size:18px}.learn-turns small{font-size:10px}#drawer.voyage-panel .drawer-head{padding:12px 20px}.voyage-layout{grid-template-columns:1fr}.voyage-art{min-height:155px}.voyage-art>img{object-position:center 47%}.voyage-art>div{bottom:18px;left:22px}.voyage-art p{font-size:25px;margin-top:7px}.voyage-panel #voyage-setup{padding:22px}.voyage-panel .setup-grid{gap:12px}.guidance-hint strong{font-size:20px}.guidance-hint p{font-size:12px}#bottom-bar>.guidance-hint{padding:12px 14px;max-height:32dvh}.hint-kicker{margin-bottom:6px}.guidance-hint .hint-kicker .card-symbol{width:22px;height:22px}}
@media(max-height:500px) and (min-width:701px){.learn-painting{min-height:260px}.learn-grid{min-height:0}.learn-lesson{padding:20px 26px}.learn-dialog h2{font-size:29px}.learn-dialog .learn-top{position:static}.learn-caption p{font-size:25px}}

/* Setup is its own screen: one harbour painting, with no game showing behind it. */
#drawer.voyage-panel{position:fixed;inset:0;transform:none;margin:0;width:100%;max-width:none;height:100dvh;max-height:100dvh;border:0;border-radius:0;box-shadow:none;overflow:auto;overscroll-behavior:contain;background:#f6f0e1}
#drawer.voyage-panel::backdrop{background:#f6f0e1;backdrop-filter:none}
#drawer.voyage-panel[open]{display:flex;flex-direction:column}
#drawer.voyage-panel .drawer-head{flex:none;padding:calc(20px + env(safe-area-inset-top,0px)) max(26px,env(safe-area-inset-right,0px)) 20px max(26px,env(safe-area-inset-left,0px))}
#drawer.voyage-panel #drawer-body{flex:1;display:flex;min-height:0;overflow:auto}
.voyage-panel .voyage-layout{width:100%;grid-template-columns:minmax(0,42%) minmax(0,58%);align-items:start}
.voyage-panel .voyage-art{position:sticky;top:0;height:100%;min-height:100%;align-self:stretch}
.voyage-panel #voyage-setup{width:100%;max-width:680px;margin:auto;padding:32px 40px calc(32px + env(safe-area-inset-bottom,0px))}
.voyage-panel .voyage-actions{align-items:stretch}
.voyage-panel .voyage-actions .primary{margin:0;width:auto}
@media(max-width:700px){
 #drawer.voyage-panel .drawer-head{padding:calc(14px + env(safe-area-inset-top,0px)) 22px 14px}
 .voyage-panel .voyage-layout{display:block}
 .voyage-panel .voyage-art{position:relative;height:180px;min-height:180px}
 .voyage-panel #voyage-setup{padding:24px 22px calc(24px + env(safe-area-inset-bottom,0px))}
}
#drawer.voyage-panel .voyage-actions .primary{margin:0;width:auto;align-self:stretch}
#drawer.voyage-panel .setup-names{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
