*{box-sizing:border-box}:root{font-family:'Microsoft YaHei',system-ui,sans-serif;color:#345763;background:#c9e8ef;font-synthesis:none}body{margin:0}button{font:inherit;cursor:pointer;touch-action:manipulation;color:inherit;border:0}button:disabled{opacity:.42;cursor:default}button:focus-visible{outline:3px solid #92c7b5;outline-offset:3px}[hidden]{display:none!important}#game{width:100%;max-width:480px;height:100dvh;min-height:540px;position:relative;overflow:hidden;margin:auto;isolation:isolate;background:#75cae8}#sea{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;image-rendering:pixelated}.sky-vignette{position:absolute;inset:0;pointer-events:none;background:linear-gradient(#7bc1de15,transparent 25%,transparent 70%,#41678925)}.hud{position:absolute;top:max(18px,env(safe-area-inset-top));left:22px;right:22px;z-index:2}.brand{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.brand>span{font-size:23px;font-weight:700;letter-spacing:2px;color:#fffef0;text-shadow:0 2px 7px #34728b38}.brand small{display:block;font-size:9px;font-weight:400;letter-spacing:3px;margin-top:5px}.brand button{display:flex;align-items:center;gap:7px;background:#f8fcf0dd;border:1px solid #ffffffa8;border-radius:24px;padding:9px 12px;font-size:11px;box-shadow:0 4px 16px #2b6a8220}.brand svg{width:19px;height:19px;color:#599eab}.resourcebar{height:42px;display:flex;align-items:center;justify-content:space-around;border:1px solid #fff9ebc4;border-radius:16px;background:#f6faf0df;box-shadow:0 5px 18px #357a8b13;padding:5px 8px}.resourcebar>span{display:flex;gap:6px;align-items:center;font-size:13px}.resourcebar svg{width:21px;height:21px;color:#679e91}.resourcebar b{font-weight:600}.resourcebar .floor{font-size:10px;color:#6e948b;padding:5px 9px;background:#dbeae1;border-radius:10px}.quick-stats{display:flex;justify-content:space-between;padding:10px 6px 2px;color:#fffdf2;font-size:9px;text-shadow:0 1px 3px #39667b}.quick-stats b{margin-left:3px;font-size:11px}.quick-stats [data-low=true]{color:#fff3ad}.dayline{display:flex;justify-content:space-between;gap:8px;font-size:9px;color:#f5fcf5bf;margin-top:8px}.hud nav{position:fixed;bottom:max(19px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(calc(100vw - 36px),436px);height:66px;display:flex;justify-content:space-around;border:1px solid #fffdf4be;border-radius:24px;background:#f9fcf2eb;box-shadow:0 8px 28px #345d7120;padding:9px 5px;z-index:3;backdrop-filter:blur(12px)}nav button{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:48px;background:transparent;color:#71948f;padding:2px 5px;border-radius:14px}nav svg{width:23px;height:23px}nav span{font-size:9px}nav button.active{color:#367e70;background:#deeee3}.actions{position:absolute;bottom:106px;left:24px;right:24px;display:grid;grid-template-columns:1.35fr 1fr;gap:12px}.actions button{border-radius:18px;padding:12px 8px;min-height:54px;background:#fbf5e4ed;border:1px solid #fff6df;font-weight:600;font-size:13px;box-shadow:0 5px 0 #48697825,0 8px 20px #466c7c20}.actions small{display:block;font-size:9px;letter-spacing:1px;margin-top:5px;opacity:.65;font-weight:400}.primary{background:#6baf99!important;border:1px solid #8ec7ad!important;color:#fffdf0!important;border-radius:13px;padding:11px 14px}.secondary{background:#e7f0e7;border:1px solid #cfdfd5;border-radius:12px;padding:10px 14px;font-size:11px}.version{display:none}#bubble{position:absolute;bottom:29%;left:50%;transform:translateX(-50%);background:#fffdf0e8;border:1px solid #ffffffa8;box-shadow:0 4px 16px #345b7414;border-radius:15px;padding:8px 13px;font-size:10px;max-width:88%;width:max-content;color:#5c827f}#bubble:after{content:'';position:absolute;width:7px;height:7px;bottom:-4px;left:24px;background:#fffdf0;transform:rotate(45deg)}.construction-hud,.rest-hud{position:absolute;top:27%;left:23%;right:23%;padding:9px 12px;border:1px solid #ffffffb0;border-radius:15px;background:#fbfbeaeb;box-shadow:0 3px 12px #48758516;font-size:10px;text-align:center}.rest-hud{top:35%}.cancel-fishing{position:absolute;bottom:169px;right:26px;background:#f9f6e6df;border-radius:12px;padding:6px 11px;font-size:9px}.fishing-meter{position:absolute;bottom:29%;left:20%;right:20%;background:#fffdebe8;border:1px solid #fff9dd;border-radius:15px;padding:8px 11px;font-size:9px;text-align:center}.meter{height:10px;position:relative;background:#edc9aa;border-radius:7px;margin-top:7px;overflow:visible}.target-zone{position:absolute;left:22%;width:56%;height:100%;background:#8fc49e}.meter i{position:absolute;height:16px;width:3px;top:-3px;background:#fff;box-shadow:0 0 0 1px #579486;border-radius:3px}.wood-modal{position:fixed;inset:0;width:min(calc(100vw - 36px),420px);height:min(77dvh,650px);max-height:calc(100dvh - 36px);margin:auto;border:1px solid #fffefa;border-radius:28px;padding:28px 23px 24px;background:linear-gradient(145deg,#fffdf4,#f0f6ed);box-shadow:0 18px 65px #274f7350;overflow:visible}.wood-modal::backdrop{background:#29566a25;backdrop-filter:blur(3px)}.wood-modal .close{position:absolute;top:15px;right:15px;width:30px;height:30px;background:#e9f0e6;color:#688e86;border-radius:50%;font-size:23px;line-height:25px;z-index:2}.paper{height:100%;overflow:auto;scrollbar-width:thin;scrollbar-color:#cee0d3 transparent;padding:0 1px 4px}.panel-heading{margin:4px 30px 22px 0}.panel-heading h2{margin:0;font-size:23px;font-weight:700;letter-spacing:1px;color:#365b60}.panel-heading span{display:block;font-size:10px;margin-top:6px;color:#8ca296}.grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(5,41px);gap:4px;position:relative;touch-action:none;background:#e6eee2;padding:7px;border-radius:16px;border:1px solid #d8e4d7}.cell{padding:0;min-width:0;background:#f5f7ed;border:1px solid #d8e2d4;border-radius:7px;box-shadow:inset 0 1px 2px #82988508}.item{min-width:0;padding:0;overflow:hidden;z-index:1;display:flex;align-items:center;justify-content:center;position:relative;touch-action:none;user-select:none;-webkit-user-select:none;border-radius:8px;border:1px solid #6a887755;box-shadow:inset 0 1px 1px #ffffff80,0 2px 3px #62786c15}.item svg{width:42px;max-width:90%;height:30px;pointer-events:none;image-rendering:pixelated}.item b{position:absolute;bottom:3px;right:5px;font-size:10px;pointer-events:none;color:#355d68}.item.selected{outline:2px solid #6eaf95;outline-offset:1px}.bagtools{display:flex;flex-wrap:wrap;gap:7px;margin-top:15px;align-items:center;font-size:11px}.bagtools span{flex:1;min-width:55px}.bagtools button{padding:9px 10px;background:#e2ece0;border:1px solid #cadcc9;border-radius:10px;min-height:36px;font-size:10px}.note{font-size:10px;color:#8b9e92;line-height:1.85;margin:14px 0}.drag-origin{opacity:.2}.drag-ghost{position:fixed;pointer-events:none;z-index:100;border:2px solid #69a385;border-radius:9px;opacity:.85;display:flex;justify-content:center;align-items:center;box-shadow:0 8px 20px #35624b22}.drag-ghost svg{width:40px;height:30px}.drag-ghost b{position:absolute;bottom:3px;right:4px;font-size:10px}.drag-ghost[data-valid=false]{border-color:#cb7569}.cell.drop-good{background:#b1d9b5;border-color:#7cad86}.cell.drop-bad{background:#efc5b9;border-color:#d59684}.stats{display:none;grid-template-columns:repeat(3,1fr);gap:12px;padding:12px 10px;margin:17px 0;background:#e6eee2;border-radius:14px;font-size:10px}.stats strong{float:right}.wood-modal[data-tab=status] .stats{display:grid}.quest{display:none;padding:12px;margin:10px 0 16px;background:#e9efe1;border-radius:12px;font-size:11px}.quest span{display:block;color:#8c9d85;font-size:9px;margin-bottom:6px}.wood-modal[data-tab=journal] .quest{display:block}#questProgress{float:right}progress{display:block;width:100%;height:5px;border:0;border-radius:6px;overflow:hidden;margin-top:8px;appearance:none;background:#dce7d8}progress::-webkit-progress-bar{background:#dce7d8}progress::-webkit-progress-value{background:#7bb29a}#hungerBar::-webkit-progress-value{background:#d6b175}#thirstBar::-webkit-progress-value{background:#8dbbc9}.craft-tabs{display:flex;gap:8px;padding:5px;border-radius:15px;background:#e6eee2;margin-bottom:12px}.craft-tabs button{flex:1;font-size:12px;padding:8px;border-radius:11px;background:transparent;color:#8ea18e}.craft-tabs button.active{background:#fffdf4;box-shadow:0 2px 8px #4c725510;color:#4c8d76}.recipe{display:grid;grid-template-columns:75px 1fr;gap:14px;padding:15px 0;border-bottom:1px solid #dce6d9}.recipe i{display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:12px;background:#d9ecdd;border:1px solid #c3dcd1;font-style:normal}.recipe svg{width:100%;height:90px;image-rendering:pixelated}.recipe strong,.recipe small{display:block}.recipe strong{font-size:13px;color:#47685e}.recipe p{font-size:10px;line-height:1.6;margin:6px 0;color:#98a68f}.recipe small{font-size:10px;color:#89a091}.recipe button{display:block;padding:8px 12px;margin-top:8px;font-size:10px;border-radius:10px;background:#74ae96;color:#fffdf2}.pending,.job,.life-card,.cook-card{background:#eaf1e5;border:1px solid #d8e5d5;border-radius:16px;padding:14px;margin:12px 0;font-size:12px}.job p,.life-card p,.cook-card p{font-size:10px;color:#8a9f8e;line-height:1.7}.job button,.pending button,.cook-card button{border-radius:10px;padding:8px 11px;margin:5px 5px 0 0;background:#cfe2ce;font-size:10px}.cook-card small{display:block;font-size:10px;margin-top:6px;color:#8da184}.cook-card button{background:#7bae96;color:#fffdf4}.weather-card{display:flex;align-items:center;gap:13px;border-radius:16px;background:linear-gradient(120deg,#dceef0,#eaf2e3);padding:14px;margin-bottom:16px}.weather-card svg{width:34px;height:34px;color:#87acb5}.weather-card strong{font-size:13px}.weather-card small{display:block;font-size:10px;color:#8b9c8a;margin-top:5px}.difficulty-options{display:grid;gap:10px;margin-bottom:20px}.difficulty-options button{border:1px solid #dbe5d4;border-radius:16px;background:#f7f8ef;padding:15px;text-align:left}.difficulty-options button.chosen{border:2px solid #88b49b;background:#e7f1e5}.difficulty-options strong{display:block;font-size:13px}.difficulty-options small{display:block;font-size:10px;margin-top:7px;color:#8e9f89}h3{font-size:15px;margin-top:24px;color:#557b68}.collection>div{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #dee7d8;font-size:12px}.collection svg{width:45px;height:30px}.collection small{display:block;font-size:10px;margin-top:5px;color:#8d9e88}.logs{font-size:10px;line-height:1.9;padding-left:18px;color:#8a9d89}.danger{padding:10px 14px;border:1px solid #e4cfc2;border-radius:12px;background:#f0e0cf;font-size:11px}.help-modal{width:min(86vw,380px);max-height:85dvh;overflow:auto;border:1px solid #fffdf4;background:#f7f9ee;border-radius:24px;padding:26px;color:#688873}.help-modal::backdrop{background:#254e6d30;backdrop-filter:blur(3px)}.help-modal h2{font-size:20px}.help-modal p{font-size:11px;line-height:1.9}.help-modal button{width:100%}#toast{position:fixed;bottom:92px;left:50%;transform:translateX(-50%);max-width:90%;width:max-content;background:#4e8279ed;color:#fffdf1;border:1px solid #bedecd;border-radius:14px;padding:10px 15px;font-size:11px;pointer-events:none;opacity:0;z-index:8;transition:opacity .2s}#toast.show{opacity:1}
@media(max-width:360px){.hud{left:17px;right:17px}.brand>span{font-size:20px}.wood-modal{padding:24px 17px 20px}.grid{grid-template-rows:repeat(5,34px);gap:3px;padding:5px}.panel-heading h2{font-size:21px}.recipe{grid-template-columns:62px 1fr;gap:10px}.actions{left:22px;right:22px}.bagtools{gap:5px}.bagtools button{padding:8px}.hud nav{height:60px;bottom:15px}}
@media(max-height:650px){.hud{top:12px}.brand{margin-bottom:9px}.brand small{display:none}.resourcebar{height:36px}.quick-stats{padding-top:7px}.dayline{margin-top:5px}.wood-modal{height:80dvh;padding-top:23px}.panel-heading{margin-bottom:14px}.grid{grid-template-rows:repeat(5,29px)}.actions{bottom:89px}.actions button{min-height:45px;padding:9px 7px}.actions small{font-size:8px}.hud nav{height:59px}.construction-hud,.rest-hud{top:31%}#bubble{bottom:32%;font-size:9px}.recipe{padding:12px 0}}
/* 0.0.5 exploration uses the same cream and mint card language. */
nav button{min-width:40px}.explore-map{border:1px solid #d6e7de;border-radius:18px;overflow:hidden;background:linear-gradient(145deg,#e0f1ef,#edf3e6);margin-bottom:16px}.explore-map svg{width:100%;display:block}.destination{border:1px solid #dbe7d8;border-radius:18px;background:#edf3e8;margin:14px 0;padding:16px}.destination>strong{display:block;font-size:16px;letter-spacing:1px;margin:7px 0;color:#49796d}.destination p{font-size:11px;line-height:1.8;color:#8a9e8c}.destination small,.voyage-card small,.event-card small{display:block;font-size:10px;line-height:1.9;color:#8ca18d}.destination button{margin-top:12px;font-size:11px;min-height:39px}.eyebrow{font-size:9px;letter-spacing:1px;color:#8eafa0}.voyage-card progress{margin-bottom:12px}.event-card{background:#f5eedb;border-color:#e8dfc5}.event-card h3{margin:9px 0}.event-card button,.harbor button{font-size:10px;display:inline-block;margin:10px 7px 0 0}.island-resource{display:flex;gap:11px;align-items:center;padding:12px 0;border-bottom:1px solid #dce7d8}.island-resource svg{width:42px;height:29px;image-rendering:pixelated}.island-resource>div{flex:1}.island-resource strong{font-size:12px}.island-resource small{display:block;margin-top:5px;font-size:10px;color:#98a88e}.island-resource button{font-size:10px;padding:9px 10px}.voyage-hud{position:absolute;top:27%;left:19%;right:19%;background:#f8fbeeea;border:1px solid #fffdf5;border-radius:17px;padding:12px;font-size:11px;color:#689385;text-align:center}.voyage-hud small{display:block;font-size:8px;letter-spacing:1px;color:#9caf97;margin-top:7px}.wood-modal[data-tab=explore] .paper>.stats{display:none}.paper>.secondary{margin:12px 7px 0 0}.world-label{display:none}@media(max-width:360px){nav button{min-width:36px;padding:2px}.island-resource button{padding:8px;font-size:9px}}@media(max-height:650px){.voyage-hud{top:32%;padding:9px;font-size:10px}.voyage-hud small{margin-top:4px}}
.voyage-active .actions{display:none}.voyage-active #bubble{bottom:26%}.voyage-active .cancel-fishing{display:none}
.sound-card{background:#e9f1e7;border:1px solid #d5e5d7;border-radius:18px;padding:16px;margin:18px 0;color:#577c70}.sound-card h3{display:flex;align-items:center;gap:9px;margin:0 0 10px;font-size:15px}.sound-card h3 svg{width:21px;height:21px}.sound-card>p{font-size:10px;line-height:1.8;color:#839b8c}.sound-option{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:12px 0;border-bottom:1px solid #d7e5d5}.sound-option strong{font-size:12px}.sound-option small{display:block;font-size:9px;line-height:1.6;margin-top:4px;color:#8da290}.sound-option button{flex-shrink:0;min-height:36px;font-size:10px;padding:8px}.sound-option button[aria-pressed=true]{background:#78ac96;color:#fffdf1;border-color:#78ac96}.sound-volume{display:block;margin:16px 0;font-size:11px}.sound-volume span{display:flex;justify-content:space-between}.sound-volume input{width:100%;accent-color:#72a88e;margin-top:11px;min-height:28px}.sound-card>.secondary{font-size:10px;margin:0 5px 0 0}
button{transition:transform .12s ease,filter .12s ease}button:active:not(:disabled){transform:scale(.96);filter:brightness(.97)}.wood-modal[open]{animation:modal-appear .2s ease-out}#bubble{animation:bubble-appear .35s ease-out}@keyframes modal-appear{from{opacity:.1;translate:0 8px}to{opacity:1;translate:0 0}}@keyframes bubble-appear{from{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){button{transition:none}.wood-modal[open],#bubble{animation:none}}
/* Keep the central house and its reflection open; controls float above the scene. */
#game{min-height:0}#sea{cursor:pointer}
.floor-controls{position:absolute;right:12px;top:54%;display:flex;flex-direction:column;gap:6px;z-index:2}.floor-controls button{min-width:44px;min-height:44px;padding:7px;border-radius:14px;background:#f7fbefdd;border:1px solid #fff9;font-size:11px}.floor-controls button[aria-pressed=true]{background:#6ca895;color:#fff}.tower-card details{margin-top:14px;font-size:12px}.tower-card summary{min-height:44px;cursor:pointer;padding:12px 0}.tower-card details p{border-top:1px solid #d8e5dc;padding-top:8px}
.actions{top:37%;bottom:auto;left:50%;right:auto;transform:translateX(-50%);width:240px;gap:10px}
.actions button{min-height:42px;padding:8px 9px;border-radius:15px;font-size:11px;box-shadow:0 3px 12px #466c7c18}
.actions small{font-size:8px;margin-top:3px;letter-spacing:0}
.hud nav{position:fixed;bottom:max(7px,env(safe-area-inset-bottom));width:min(calc(100vw - 16px),464px);height:52px;background:transparent;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;padding:3px 8px;gap:3px}
nav button{background:#f7fbf0c9;border:1px solid #ffffff7a;min-width:44px;flex:1;max-width:58px;border-radius:14px;gap:2px;box-shadow:0 2px 9px #21536712;backdrop-filter:blur(3px)}
nav svg{width:20px;height:20px}nav span{font-size:8px}
#bubble,.voyage-active #bubble{top:30.5%;bottom:auto;font-size:9px;padding:6px 11px}
.cancel-fishing{top:44%;bottom:auto;right:20px}
.fishing-meter{top:45%;bottom:auto;left:24%;right:24%;padding:7px 10px}
#toast{bottom:70px}
@media(max-width:360px){.actions{width:216px}.hud nav{bottom:7px;height:49px}nav button{min-width:36px}nav svg{width:18px;height:18px}}
@media(max-height:650px){.hud{top:8px}.brand{margin-bottom:5px}.brand>span{font-size:17px}.resourcebar{height:30px}.quick-stats{padding-top:5px}.dayline{margin-top:3px}.actions{top:37%}.actions button{min-height:38px;padding:6px}.actions small{display:none}#bubble{top:31%;font-size:8px}.hud nav{height:48px}.fishing-meter{top:44%}}

.save-card{margin:16px 0;padding:17px;border-radius:20px;background:#f5f7ef;border:1px solid #d8e5dc}.save-card h3{margin:0 0 8px;color:#426d66}.save-card p{font-size:13px;line-height:1.6}.save-card button{margin:5px 6px 5px 0}.save-summary{color:#457b70}.import-preview{background:#fffdf4;border-radius:14px;padding:12px;margin-top:12px;border:1px solid #a7c9b8}.import-preview p{white-space:pre-line}.import-preview label{display:block;font-size:13px}.offline-card{border-top:1px solid #d8e5dc;margin-top:14px;padding-top:8px}.save-warning{background:#fff0d8;padding:10px;border-radius:12px;color:#98663c}

.chapter-hud{position:absolute;top:25%;left:20%;right:20%;padding:9px 12px;border-radius:18px;background:#f9fcf0d9;border:1px solid #fff9;font-size:11px;color:#4d796b;z-index:2}.guide-hud{position:absolute;top:25%;left:8%;right:8%;z-index:3;padding:14px;border-radius:18px;background:#f9fcf0ed;border:1px solid #fff9;box-shadow:0 8px 25px #37627a15}.guide-hud strong{font-size:14px}.guide-hud p{font-size:12px;line-height:1.7;margin:8px 0}.guide-hud button{font-size:11px;padding:8px 12px;margin:0 8px 0 0;border-radius:12px}.guided .actions{top:49%}.guided #bubble{display:none}.guide-target{outline:2px solid #f0dfa3;outline-offset:3px}.journey-card{border:1px solid #d8e5dc;background:#f6f8ed;border-radius:18px;padding:16px;margin-bottom:16px}.journey-card h3{margin:0 0 8px}.journey-card p{font-size:12px;line-height:1.7}.journey-goal{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:8px 0;padding:9px 0;border-bottom:1px solid #dce5d9;font-size:12px}.journey-goal span{flex:1}.journey-goal small{width:100%;color:#829689;font-size:10px}.journey-card button{font-size:11px;padding:8px 12px;border-radius:12px}.journey-card>.primary{margin-top:10px}@media(max-height:650px){.guide-hud{top:27%;padding:10px;max-height:122px;overflow:auto}.guide-hud strong{font-size:12px}.guide-hud p{font-size:10px;margin:5px 0}.guide-hud button{padding:6px 9px}.guided .actions{top:51%}.chapter-hud{top:27%;padding:7px;left:16%;right:16%;font-size:10px}}

.journey-card>.primary:disabled{background:#dce6d9;color:#728572;opacity:1}

/* 0.1.1 portrait touch layout: controls stay above the house and water reflection. */
body{overscroll-behavior:none}#game{--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);height:100svh;height:100dvh}button{-webkit-tap-highlight-color:transparent}.hud{top:max(16px,var(--safe-top))}.hud nav{position:absolute;top:calc(100dvh - max(16px,var(--safe-top)) - max(14px,var(--safe-bottom)) - 66px);bottom:auto;width:calc(100% + 8px);max-width:none;min-height:66px;backdrop-filter:none;background:transparent;touch-action:manipulation}nav button{min-width:44px;min-height:44px;padding:3px}.actions{width:min(280px,calc(100% - 40px));top:37%}.actions button{min-height:48px;font-size:13px}.actions small{font-size:10px}.chapter-hud{top:25%;min-height:44px;left:12%;right:12%;font-size:12px}.cancel-fishing{min-height:44px;top:calc(37% + 55px);bottom:auto;right:7%;font-size:11px}.guide-hud button{min-height:44px;font-size:12px}.guided .actions{top:49%}.supply-hud{position:absolute;top:calc(37% + 58px);left:6%;right:6%;display:flex;justify-content:center;gap:8px;z-index:2}.supply-hud button{min-height:44px;border:1px solid #fff8;background:#fbf4ddef;border-radius:14px;padding:8px 13px;font-size:12px}.guided .supply-hud{top:calc(49% + 58px)}.voyage-active .supply-hud{top:calc(27% + 100px)}.fishing-meter{pointer-events:none}.wood-modal{width:min(calc(100vw - 20px),440px);height:min(86dvh,740px);max-height:calc(100dvh - max(12px,var(--safe-top,0px)) - max(12px,var(--safe-bottom,0px)));padding:54px 18px 18px;overflow:hidden;border-radius:26px}.wood-modal .close{width:44px;height:44px;top:6px;right:8px;font-size:26px}.paper{overscroll-behavior:contain;touch-action:pan-y;scroll-padding:8px;padding:0 2px 8px}.paper button:not(.cell):not(.item){min-height:44px;font-size:12px}.panel-heading{margin-top:0}.panel-heading h2{font-size:22px}.panel-heading span,.note,.job p,.life-card p,.cook-card p,.destination small,.destination p,.journey-goal small{font-size:12px;line-height:1.75;color:#6d8579}.grid{grid-template-rows:repeat(5,minmax(36px,1fr));gap:4px;padding:6px}.grid .cell{min-height:36px}.bagtools{position:sticky;bottom:-8px;background:#f2f6ee;padding:10px 0;z-index:2;gap:7px}.bagtools span{flex-basis:100%;font-size:12px}.bagtools button{min-height:44px}.item.selected{outline:3px solid #5c9e82}.item b{font-size:11px}.quality-options{margin:15px 0}.quality-options button{margin-right:8px}.quality-options .chosen{background:#6baf99;color:#fff}.travel-supplies button{margin:0 8px 0 0}#toast{bottom:calc(max(14px,env(safe-area-inset-bottom)) + 80px);max-width:calc(100% - 32px);font-size:12px}#bubble{max-width:85%;font-size:11px;pointer-events:none}.wood-modal::backdrop{backdrop-filter:none;background:#29566a38}
@media(max-width:360px){.hud{left:16px;right:16px}.wood-modal{padding-left:12px;padding-right:12px}.grid{gap:3px;padding:5px}.recipe{grid-template-columns:58px 1fr;gap:10px}.recipe small,.recipe p{font-size:11px}.guide-hud{left:6%;right:6%}.guide-hud p{font-size:11px}}
@media(max-height:650px){.hud{top:max(10px,env(safe-area-inset-top))}.brand{margin-bottom:8px}.brand>span{font-size:19px}.resourcebar{height:36px}.hud nav{top:calc(100dvh - max(10px,env(safe-area-inset-top)) - max(10px,env(safe-area-inset-bottom)) - 58px);min-height:58px;height:58px;padding:5px}.quick-stats{padding-top:6px}.dayline{margin-top:4px}.chapter-hud{top:max(145px,25%);left:12%;right:12%;font-size:11px}.actions{top:max(212px,37%)}.cancel-fishing,.supply-hud{top:calc(max(212px,37%) + 55px)}.guide-hud{top:max(145px,25%);max-height:152px;padding:10px}.guide-hud p{font-size:11px}.guided .actions{top:max(310px,54%)}.guided .supply-hud{top:calc(max(310px,54%) + 55px)}.wood-modal{height:90dvh;padding-top:50px}.grid{grid-template-rows:repeat(5,36px)}.voyage-hud{top:max(198px,32%)}.voyage-active .supply-hud{top:calc(max(198px,32%) + 100px)}.fishing-meter{top:auto;bottom:29%}}
@media(orientation:landscape) and (max-height:500px){#game{max-width:360px}.hud nav{width:calc(100% + 8px)}.brand,.dayline{display:none}.chapter-hud{top:90px}.actions{top:155px}.guide-hud{top:90px;max-height:130px}.guided .actions{top:230px}.wood-modal{height:94dvh}.supply-hud{top:210px}.quick-stats{font-size:9px}}

.wood-modal{max-width:min(calc(100vw - 20px),440px)}

.chapter-hud{white-space:pre-line;line-height:1.5}.construction-hud,.rest-hud{display:none}.voyage-active .chapter-hud{display:none}

#bubble{top:calc(37% + 58px);bottom:auto}.voyage-active #bubble{top:calc(27% + 88px);bottom:auto}.fishing-active #bubble,.supply-visible #bubble{display:none}@media(max-height:650px){#bubble{display:none}}

.brand button{min-height:44px}.sound-volume input{min-height:44px}.tower-built #bubble{display:none}.floor-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0}.production-card button{margin:5px 7px 0 0}.production-card>.production-card{background:#f7f6e9}.production-card p{font-size:12px;line-height:1.7}@media(max-height:650px){.floor-controls{top:45%;gap:2px}}

/* Keep portrait controls below the header on notched phones as well. */
.chapter-hud,.guide-hud{top:max(calc(135px + env(safe-area-inset-top,0px)),25%)}.actions{top:max(calc(202px + env(safe-area-inset-top,0px)),37%)}.cancel-fishing,.supply-hud{top:calc(max(calc(202px + env(safe-area-inset-top,0px)),37%) + 55px)}.guided .actions{top:max(calc(300px + env(safe-area-inset-top,0px)),49%)}.guided .supply-hud{top:calc(max(calc(300px + env(safe-area-inset-top,0px)),49%) + 55px)}
@media(max-height:650px){.chapter-hud,.guide-hud{top:max(calc(145px + env(safe-area-inset-top,0px)),25%)}.actions{top:max(calc(212px + env(safe-area-inset-top,0px)),37%)}.cancel-fishing,.supply-hud{top:calc(max(calc(212px + env(safe-area-inset-top,0px)),37%) + 55px)}.guided .actions{top:max(calc(310px + env(safe-area-inset-top,0px)),54%)}.guided .supply-hud{top:calc(max(calc(310px + env(safe-area-inset-top,0px)),54%) + 55px)}.voyage-hud{top:max(calc(198px + env(safe-area-inset-top,0px)),32%)}.voyage-active .supply-hud{top:calc(max(calc(198px + env(safe-area-inset-top,0px)),32%) + 100px)}}

.production-links{display:flex;gap:8px;position:sticky;top:0;background:#f3f6ee;z-index:3;padding:6px 0}.production-links button{min-height:44px;flex:1}.production-card{scroll-margin-top:60px}

.ocean-card>strong{display:block;margin-bottom:8px}.farm-choice{display:flex;align-items:center;gap:8px;margin:5px 0}.farm-choice small{font-size:11px;color:#748c7f}.ocean-card>progress{display:block;width:100%}
.ocean-card{scroll-margin-top:100px}

/* Keep the tall lighthouse and upper facades clear of the action buttons. */
.viewing-upper .actions{transform:none;top:47%;bottom:auto;left:12px;right:auto;width:78px;display:flex;flex-direction:column;gap:8px}.viewing-upper .actions button{min-height:44px;padding:9px 5px;font-size:11px;border-radius:14px}.viewing-upper .actions small{display:none}


.item svg{width:64px;height:48px;max-width:calc(100% - 10px);max-height:calc(100% - 8px)}.item b{background:#fffdf0db;border-radius:4px;padding:1px 3px;line-height:1.1}.drag-ghost svg{width:56px;height:38px;max-width:90%;max-height:90%}
