:root{--paper:#fbf8ef;--ink:#213f44;--muted:#627571;--teal:#27675e;--line:#ddd7c6;--coral:#b85740;--serif:"Palatino Linotype","Book Antiqua",Palatino,Georgia,serif;--sans:"Nunito","Avenir Next",Avenir,system-ui,sans-serif;color:var(--ink);font-family:var(--sans);font-size:15px}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:var(--paper) url('assets/grain.png');-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid #e78141;outline-offset:3px}button{border:0;background:none}h1,h2,h3,p{margin:0}h1,h2,h3,.brand{font-family:var(--serif)}button svg,.meter svg,.location-tag svg,.story-kicker svg{flex-shrink:0;width:18px;height:18px}button svg{pointer-events:none}button img{pointer-events:none}button:disabled{cursor:default}button{transition:background .14s,transform .14s}.mast{background:#faf8f0;border-bottom:1px solid #dedbcc}.mast-in,.wrap{width:min(1140px,calc(100% - 84px));margin:auto}.mast-in{height:72px;display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:#234b49;font-weight:bold;font-size:29px;letter-spacing:-1.3px;white-space:nowrap}.brand img{width:42px;height:47px}.mast-actions{display:flex;align-items:center;gap:10px}.meter{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:5px 12px;min-height:32px;border-radius:20px;border:1px solid;font-size:14px;font-weight:750;font-variant-numeric:tabular-nums}.meter.coins{background:#fbefca;border-color:#e8d39e;color:#775117}.meter.energy{background:#e8f0e2;border-color:#ccdbbf;color:#385a3d}.meter.coins svg,.reward svg{width:19px;height:19px}.meter .max{font-weight:500;color:#5c7657;margin-left:-5px}.header-line{height:24px;width:1px;background:var(--line);margin:0 6px}.nav-journal,.quiet-btn{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:650}.nav-journal{padding:9px 3px}.icon-btn{width:37px;height:37px;display:grid;place-items:center;border-radius:50%}.icon-btn:hover,.nav-journal:hover,.quiet-btn:hover{background:#eae9dc}.settings{margin-left:3px}.wrap{padding:20px 0 32px}.hero{height:clamp(155px,14.4vw,202px);border-radius:17px;overflow:hidden;isolation:isolate;position:relative;display:flex;align-items:center;padding:24px 38px;background:#377e79 url('assets/harbor.webp') center 3%/cover no-repeat;box-shadow:0 2px 4px #4739261b}
.hero::before{content:"";z-index:-1;position:absolute;inset:0;background:linear-gradient(90deg,rgba(19,60,59,.91),rgba(28,72,63,.76) 27%,rgba(29,68,62,.33) 50%,transparent 71%)}.hero-content{max-width:58%;color:#fff9ec}.chapter-kicker,.story-kicker,.eyebrow{font-size:10px;font-weight:800;letter-spacing:1.9px;text-transform:uppercase}.chapter-kicker{display:flex;align-items:center;gap:9px;color:#ffe4ab}.chapter-kicker::before{content:"";width:22px;height:2px;background:#e8bd77}.hero h1{font-size:clamp(37px,4vw,59px);line-height:1.09;letter-spacing:-2px;margin:9px 0 8px;font-weight:600;text-shadow:0 2px 3px #19343140}.hero p{font-size:14px;color:#fff9ec;line-height:1.5;text-wrap:pretty}.location-tag{position:absolute;right:17px;bottom:16px;display:flex;align-items:center;gap:5px;padding:5px 10px;border-radius:15px;color:#fffaf1;background:#254743c9;font-size:11px;font-weight:650;backdrop-filter:blur(4px)}.location-tag svg{width:13px;height:13px}
.play-layout{display:grid;grid-template-columns:minmax(0,1.68fr) minmax(295px,1fr);gap:28px;margin-top:22px;align-items:start}.section-head{height:45px;margin-bottom:9px;display:flex;align-items:center;justify-content:space-between;gap:8px}.section-head h2{font-size:29px;letter-spacing:-1.05px;line-height:1.15;font-weight:650}.quiet-btn{font-size:12px;color:#566e66;border:1px solid #d9d9c9;border-radius:18px;padding:5px 10px}.quiet-btn svg{width:15px;height:15px}.orders-count{display:grid;place-items:center;border:1px solid #d7ddc9;background:#eaf0df;font-size:12px;font-weight:700;width:26px;height:24px;border-radius:12px}
.board-frame{--rim:#af7c4e;background:repeating-linear-gradient(1deg,transparent 0px,transparent 5px,#75442312 6px,transparent 7px),linear-gradient(110deg,#bd8d60,#c59970 38%,#b58256 70%,#bf9265);border:1px solid #986b46;border-radius:17px;padding:10px;box-shadow:inset 0 2px 0 #f0c998,inset 0 -3px 0 #946742,0 4px 6px #7160441a}.board{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));overflow:hidden;border:2px solid #a57a54;background:#cbb89b;gap:1px;border-radius:8px;box-shadow:0 1px 0 #dab68c;user-select:none;-webkit-user-select:none}.tile{isolation:isolate;position:relative;overflow:hidden;display:grid;place-items:center;aspect-ratio:1/1;padding:0;min-width:0;min-height:0;background:#f4e8d0 url('assets/grain.png');box-shadow:inset 0 1px 0 #fff8e890}.tile:nth-child(even){background-color:#eadebf}.tile.filled{touch-action:none}.tile .sprite{height:84%;width:84%;object-fit:contain;position:relative;z-index:1;transform:translateY(-1%);filter:drop-shadow(0 2px 1px #71502c25)}.tile.producer .sprite{width:91%;height:91%}.tile.lock{background:repeating-linear-gradient(135deg,#d6cbb4,#d6cbb4 5px,#d9ceb8 5px,#d9ceb8 10px);color:#8c806c}.tile.lock svg{width:22%;height:22%;opacity:.74}.pips{position:absolute;bottom:4%;left:0;right:0;display:flex;align-items:center;justify-content:center;gap:2px;z-index:2;pointer-events:none}.pips i{width:3px;height:3px;border-radius:50%;background:#8e7653}.tile .source-tag{position:absolute;bottom:5%;right:5%;z-index:2;display:grid;place-items:center;width:22%;aspect-ratio:1/1;border-radius:50%;background:#fff2bc;border:1px solid #b28d42;box-shadow:0 1px 1px #7563342e}.source-tag svg{width:75%;height:75%}.tile.selected::after,.tile.matches::after,.tile.over::after,.tile.hinted::after{content:"";position:absolute;z-index:2;inset:2px;pointer-events:none;border-radius:7px;border:3px solid #378677}.tile.matches::after{border:2px dashed #6a9c7b}.tile.over::after,.tile.hinted::after{border-color:#d08435}.tile::before{content:"";position:absolute;inset:0;z-index:0}.tile.selected::before,.tile.matches::before{background:#a9d7b855}.tile:focus-visible{outline-offset:-4px;z-index:3}.tile.dragging .sprite{opacity:.26}.drag-ghost{position:fixed;z-index:70;pointer-events:none;filter:drop-shadow(2px 7px 5px #4d392a6b);transform:translate(-50%,-57%) rotate(-5deg)}.tile.pop .sprite{animation:pop .42s ease-out}.tile.pop::before{animation:glow .52s ease-out}.item-info{min-height:52px;display:flex;align-items:center;gap:10px;border:1px solid #dcdccb;border-radius:11px;background:#f0f1e5;padding:9px 13px;margin-top:13px;color:#53685c;font-size:12px;line-height:1.45}.item-info b{color:#385543}.info-icon{display:grid;place-items:center;flex-shrink:0;width:30px;height:30px;border-radius:50%;background:#e0e7d3;color:#557349}.info-icon svg{width:17px;height:17px}.info-thumb{width:32px;height:32px;object-fit:contain}.item-info .info-copy{flex:1}.inline-act{font-size:12px;font-weight:700;color:var(--teal);border:1px solid #bdccb5;padding:6px 10px;border-radius:8px;white-space:nowrap}
.orders{display:grid;gap:12px}.order-card{background:#fffcf4;border:1px solid #dcd6c5;box-shadow:0 2px 2px #7768470b;border-radius:13px;padding:14px 16px 13px}.order-top,.person,.order-foot,.order-items,.reward,.story-kicker,.story-meta,.book-tabs{display:flex;align-items:center}.order-top{justify-content:space-between;gap:8px}.person{gap:10px;min-width:0}.portrait{width:45px;height:45px;object-fit:cover;object-position:center 37%;border-radius:50%;border:2px solid #fff9ea;outline:1px solid #d7ccb3}.person h3{font-size:21px;line-height:1.05;letter-spacing:-.5px}.role{font-size:11px;color:var(--muted);margin-top:4px}.reward{gap:4px;color:#8c6426;font-weight:750;font-size:13px}.order-foot{justify-content:space-between;gap:10px;margin-top:12px;padding-top:11px;border-top:1px dashed #d9d2bd}.order-items{gap:7px}.wanted{position:relative;display:grid;place-items:center;width:46px;height:43px;border:1px solid #d7cbb1;border-radius:9px;background:#f2e8d3;padding:2px}.wanted.have{background:#edf1df;border-color:#b9c9ac}.wanted img{width:100%;height:100%;object-fit:contain}.wanted .check{position:absolute;right:-3px;bottom:-3px;display:grid;place-items:center;width:14px;height:14px;border:1px solid #fffaf0;border-radius:50%;color:white;background:#507d55}.check svg{width:9px;height:9px;stroke-width:3.4}.action{font-size:12px;font-weight:720;padding:9px 14px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:6px;background:#28695f;color:white;border:1px solid #245e55;box-shadow:0 1px 0 #164940}.action:hover{background:#215c54}.action svg{width:14px;height:14px}.action.secondary{background:#f4efe1;color:#665e4b;border-color:#ded6c2;box-shadow:none}.action.secondary:hover{background:#eae3d2}.action:disabled{opacity:.6}
.story-card{margin-top:16px;position:relative;isolation:isolate;overflow:hidden;padding:17px 20px 15px;border:1px solid #afc6b5;border-radius:13px;background:#e4eee2;color:#254e48}.story-card::after{content:"";position:absolute;z-index:-1;width:105px;height:100%;right:0;top:0;background:url('assets/harbor.webp') 88% 35%/auto 100% no-repeat;opacity:.23;mask-image:linear-gradient(90deg,transparent,black 72%)}.story-kicker{letter-spacing:1.55px;color:#486b5e;gap:6px}.story-kicker svg{width:15px;height:15px}.story-card h3{font-size:23px;letter-spacing:-.7px;margin:6px 0 4px}.story-card p{font-size:12px;line-height:1.45;max-width:90%;color:#526b60}.story-meta{margin-top:10px;justify-content:space-between;gap:10px}.progress-group{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:bold}.progress{width:50px;height:5px;background:#c2d3bf;border-radius:4px;overflow:hidden}.progress i{display:block;height:100%;background:#52816d;border-radius:inherit}.text-btn{display:inline-flex;align-items:center;gap:4px;color:#24574b;font-size:12px;font-weight:bold;padding:3px 0}.text-btn svg{width:13px;height:13px}
.toast{position:fixed;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translate(-50%,8px);opacity:0;z-index:20;background:#203f3b;color:#fff9ed;border-radius:12px;padding:11px 18px;text-align:center;font-size:13px;line-height:1.45;max-width:min(90vw,470px);width:max-content;pointer-events:none;transition:opacity .18s,transform .18s;box-shadow:0 3px 15px #213b3a30}.toast.show{opacity:1;transform:translate(-50%,0)}
dialog{width:min(480px,calc(100vw - 30px));max-height:min(83dvh,730px);overscroll-behavior:contain;border:1px solid #c8c7af;border-radius:19px;padding:0;background:var(--paper);color:var(--ink);box-shadow:0 20px 60px #173b3a50}dialog::backdrop{background:#16373173;backdrop-filter:blur(3px)}.modal-head{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;align-items:center;padding:16px 20px 10px;background:var(--paper);border-bottom:1px solid #e1ddcf}.modal-head h2{font-size:27px;letter-spacing:-1px}.modal-head .icon-btn{background:#edece0}.modal-head .icon-btn svg{width:16px;height:16px}#modalContent{padding:18px 21px 22px;font-size:14px;line-height:1.55}.modal-intro{color:var(--muted);margin-bottom:14px}.help-step,.setting-row,.log-row{display:flex;align-items:center;gap:12px;padding:10px 0}.help-step+.help-step,.setting-row+.setting-row,.log-row+.log-row{border-top:1px solid var(--line)}.help-step>img{width:46px;height:46px;object-fit:contain}.help-step b,.setting-row b{display:block}.help-step p,.setting-row p,.log-row p,.book-note{font-size:12px;color:var(--muted)}.wide{width:100%;margin-top:14px;min-height:39px}.setting-row{justify-content:space-between}.setting-row .action{flex-shrink:0}.book-tabs{gap:8px;margin:0 0 13px}.book-tabs button{border-radius:20px;padding:6px 12px;border:1px solid #d6d6c3;font-size:12px;font-weight:650}.book-tabs button.on{background:#2b685e;color:white;border-color:transparent}.log-row{align-items:flex-start}.log-row .num{display:grid;place-items:center;min-width:28px;height:28px;border-radius:50%;background:#e6eadc;color:#55715f;font-size:12px;font-weight:700}.log-row strong{font-family:var(--serif);font-size:18px}.log-row button{margin-top:6px}.log-row p{line-height:1.55}.book-chain{margin:13px 0 17px}.book-chain h3{font-size:19px}.chain-items{display:flex;gap:4px;margin:7px 0}.chain-item{width:24%;text-align:center;font-size:10px;line-height:1.3;color:#53665d}.chain-item img{display:block;width:100%;height:44px;object-fit:contain;margin-bottom:4px}.chain-item.unknown img{filter:grayscale(1);opacity:.45}.chain-item.wanted-item{background:#e0ecdb;border-radius:8px}.story-img{width:100%;height:108px;object-fit:cover;object-position:65% 35%;border-radius:10px;margin-bottom:11px}.story-text{font-family:var(--serif);font-size:18px;line-height:1.55}.eyebrow{color:#897044;margin:0 0 5px}.story-sub{font-size:12px;color:var(--muted);margin-top:12px}
@keyframes pop{0%{transform:scale(.72)}55%{transform:scale(1.16)}100%{transform:scale(1)}}@keyframes glow{0%{background:#fff1a0}100%{background:transparent}}
@media(min-width:1450px){.wrap{padding-top:24px}.play-layout{gap:32px;margin-top:25px}}
@media(max-width:950px){.mast-in,.wrap{width:calc(100% - 42px)}.play-layout{gap:18px;grid-template-columns:minmax(0,1.55fr) minmax(245px,.95fr)}.hero{padding:20px 29px}.order-card{padding:12px}.order-foot{gap:6px}.action{padding:8px 11px}.story-card{padding:14px}.section-head h2{font-size:25px}.board-frame{padding:8px}.order-items{gap:5px}.wanted{width:39px;height:38px}}
@media(max-width:700px){.mast-in,.wrap{width:calc(100% - 28px)}.mast-in{height:59px;gap:6px}.brand{font-size:22px;gap:5px;letter-spacing:-1px}.brand img{width:32px;height:39px}.mast-actions{gap:5px}.meter{font-size:12px;padding:4px 7px;gap:3px;min-height:28px}.meter.coins svg,.meter.energy svg{width:15px;height:15px}.meter .max{margin-left:-3px}.header-line,.nav-label{display:none}.nav-journal,.settings{width:31px;height:40px;padding:0;margin:0;display:grid;place-items:center}.nav-journal svg,.settings svg{width:18px;height:18px}.wrap{padding-top:12px}.hero{height:135px;border-radius:12px;padding:16px 18px;background-position:66% 8%}.hero::before{background:linear-gradient(90deg,#1a413deb,rgba(25,65,60,.72) 41%,rgba(29,68,62,.09) 83%)}.hero-content{max-width:73%}.chapter-kicker{font-size:8px;letter-spacing:1.6px}.chapter-kicker::before{width:15px}.hero h1{font-size:clamp(27px,6.4vw,38px);letter-spacing:-1.3px;margin:6px 0}.hero p{font-size:11px;line-height:1.45}.location-tag{font-size:9px;right:8px;bottom:8px;padding:3px 7px}.location-tag svg{width:10px;height:10px}.play-layout{display:flex;flex-direction:column;margin-top:12px;gap:14px}.counter,.side,.orders-section{width:100%}.section-head{height:32px;margin-bottom:8px}.section-head h2{font-size:25px}.quiet-btn{font-size:11px;min-height:30px}.board-frame{border-radius:13px;padding:6px}.board{border-width:1px;border-radius:7px}.item-info{margin-top:8px;min-height:40px;padding:6px 9px;font-size:11px;gap:7px}.info-icon{width:25px;height:25px}.pips i{width:2.5px;height:2.5px}.pips{bottom:4%}.orders{grid-template-columns:1fr 1fr;gap:9px}.order-card{padding:10px}.order-top{gap:3px}.person{gap:6px}.portrait{width:33px;height:33px}.person h3{font-size:18px}.role{font-size:9px}.reward{font-size:11px;gap:1px}.reward svg{width:14px;height:14px}.order-foot{margin-top:8px;padding-top:8px;flex-wrap:wrap}.wanted{width:34px;height:34px}.order-foot .action{font-size:10px;min-height:32px;padding:5px 8px}.story-card{margin-top:12px}.story-card h3{font-size:22px}.orders-count{font-size:11px;width:22px;height:22px}}
@media(max-width:415px){.mast-in,.wrap{width:calc(100% - 20px)}.mast-actions{gap:3px}.brand{font-size:20px}.brand img{width:29px}.settings,.nav-journal{width:28px}.hero{height:118px;padding:14px}.order-foot .action{flex:1 0 100%}.wanted{width:39px;height:36px}.order-foot{row-gap:7px}.order-top{position:relative}.role{font-size:8.5px}.portrait{width:29px;height:29px}.reward svg{width:12px}.tile .source-tag{width:26%}}
@media(max-width:345px){.brand{font-size:17px;gap:2px}.meter{padding:4px 5px}.mast-actions{gap:1px}.hero-content{max-width:80%}.role{display:none}.hero h1{font-size:26px}.section-head h2{font-size:22px}.person{gap:4px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

@media(max-width:345px){.mast-in{gap:3px}.brand{font-size:16px;line-height:.96}.brand span{max-width:67px;white-space:normal}.brand img{width:26px}.nav-journal,.settings{width:25px}.hero .location-tag{display:none}.hero-content{max-width:88%}}
.hero.beacon::after{content:"";position:absolute;right:10%;top:0;height:68%;width:43%;z-index:-1;background:conic-gradient(from 235deg at 82% 15%,transparent 0 7deg,#f6f3bccc 13deg,#edf4cc00 21deg);transform-origin:82% 15%;animation:beacon 6s ease-in-out infinite}
@keyframes beacon{0%,100%{opacity:.3;transform:rotate(-7deg)}50%{opacity:1;transform:rotate(7deg)}}
