@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800&display=swap');
:root{color-scheme:light;--ink:#263f3d;--muted:#7c8b81;--line:#e2e8dd;--teal:#275b50;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}*{box-sizing:border-box}body{margin:0;background:#d4e0d5;font-family:'Noto Sans KR',system-ui,sans-serif;color:var(--ink);overflow:hidden}button{font:inherit;cursor:pointer;border:0;min-height:46px;touch-action:manipulation}button:disabled{opacity:.38;cursor:default}button:focus-visible,canvas:focus-visible{outline:3px solid #bb8650;outline-offset:3px}.city-app{height:100dvh;min-height:500px;position:relative;max-width:1500px;margin:auto;overflow:hidden}.city-top{position:absolute;z-index:2;top:calc(18px + var(--safe-top));left:22px;right:22px;display:flex;align-items:center;gap:14px;pointer-events:none}.wordmark{pointer-events:auto}.wordmark span{font:600 24px Georgia,serif;letter-spacing:2px}.wordmark small{display:block;letter-spacing:3px;font-size:8px;margin-top:5px}.date-control{margin-left:auto;text-align:right;font-size:11px;letter-spacing:1px}.city-top button{pointer-events:auto;background:#f7f7ece6;color:#385448;border-radius:50%;width:46px;box-shadow:0 5px 20px #31564912;font-size:20px}.city-top #speed{font-size:12px;width:38px;min-height:38px}.city-meters{position:absolute;top:calc(85px + var(--safe-top));left:22px;z-index:2;display:flex;gap:0;padding:13px 0;border-radius:18px;background:#fbf9eff0;box-shadow:0 8px 35px #254e3e12;min-width:355px}.city-meters>div{padding:0 22px;border-right:1px solid #d7ddcf}.city-meters>div:last-child{border:0}.city-meters small{font-size:9px;color:#7d8f80;display:block;letter-spacing:1px}.city-meters b{display:block;font-size:23px;line-height:1.5;font-weight:600;font-variant-numeric:tabular-nums}.city-meters em{font-style:normal;font-size:9px;color:#518569}.negative{color:#ad6450!important}#city-map{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:grab}#city-map:active{cursor:grabbing}.advisor{position:absolute;bottom:calc(132px + var(--safe-bottom));left:28px;max-width:350px;pointer-events:none}.advisor small{color:#4b7563;font-size:8px;letter-spacing:3px}.advisor p{font-size:13px;line-height:1.7;margin:8px 0;color:#355c4e;text-shadow:0 1px 12px #e6eddf}.city-bottom{position:absolute;bottom:calc(24px + var(--safe-bottom));left:24px;right:24px;z-index:2;display:flex;align-items:center;gap:18px}.build-main{background:#285a4e;color:#fff9df;padding:0 32px;border-radius:50px;height:62px;font-size:17px;box-shadow:0 8px 25px #284d3b35;display:flex;gap:12px;align-items:center;white-space:nowrap}.build-main span{font-size:25px;font-weight:400}.city-goal{background:#f8f8eee8;border-radius:18px;min-height:62px;padding:12px 16px;max-width:310px;box-shadow:0 8px 30px #3b5e3e12}.city-goal small{display:block;font-size:9px;color:#7b8b76}.city-goal button{background:none;color:#386449;padding:2px 0;min-height:25px;font-size:12px;text-align:left}.map-tools{position:absolute;right:24px;bottom:calc(140px + var(--safe-bottom));display:flex;flex-direction:column;gap:2px;z-index:2;border-radius:30px;overflow:hidden;box-shadow:0 8px 22px #31533d12}.map-tools button{background:#f5f6e8e8;width:40px;min-height:40px;color:#5c7765;font-size:23px}.tool-hint{position:absolute;z-index:2;top:calc(188px + var(--safe-top));left:22px;right:22px;display:flex;align-items:center;gap:8px;pointer-events:none}.tool-hint span{font-size:10px;color:#426c59;background:#eef4e4bb;border-radius:20px;padding:6px 12px}.tool-hint button{pointer-events:auto;min-height:32px;padding:4px 10px;background:#fff9e7;border-radius:25px;font-size:11px;color:#66785e}dialog{color:var(--ink);background:#fbfaf2;border:1px solid #eef0e7;padding:0;border-radius:26px;width:min(580px,calc(100% - 20px));max-height:78dvh;box-shadow:0 20px 80px #20463d40;overflow:auto}dialog::backdrop{background:#163f3a45;backdrop-filter:blur(4px)}.sheet-head{padding:23px 24px 10px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:#fbfaf2;z-index:1}.sheet-head h2{font-size:20px;font-weight:600;margin:0;letter-spacing:-1px}.sheet-head button{background:#ebeee3;border-radius:50%;width:36px;min-height:36px;font-size:20px;color:#7b8978}#sheet-content{padding:10px 24px 26px}.category-tabs{display:flex;gap:8px;margin-bottom:16px}.category-tabs button{flex:1;background:#ebeee3;border-radius:40px;color:#738575;font-size:13px}.category-tabs button.active{background:#2e5b4b;color:#fff7dc}.build-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.build-list button{background:#eef0e5;border:1px solid #e0e7d7;border-radius:17px;padding:8px;display:flex;flex-direction:column;align-items:center;color:#3f624c}.build-list b{font-size:13px;font-weight:600}.build-list small{font-size:11px;display:block;margin-top:6px;color:#8d8a66}.building-art{display:block;width:100px;height:100px;background-image:url('assets/city-buildings-real-v2.webp');background-size:400% 300%;background-position:calc(var(--col)*100%/3) calc(var(--row)*50%);filter:drop-shadow(0 3px 4px #57704115)}.road-art{height:100px;display:grid;place-items:center;font-size:65px;color:#82998a}.sheet-note{font-size:12px;color:#84917d;line-height:1.8}.building-detail{display:flex;align-items:center;gap:10px;margin:0 0 24px}.building-detail>.building-art{width:135px;height:135px;flex:none}.building-detail h3{margin:6px 0;font-size:20px}.building-detail p{font-size:12px;color:#84917e;line-height:1.7}.eyebrow{font-size:9px;letter-spacing:2px;color:#96a084}.status-pill{font-size:10px;border-radius:30px;background:#e1eddb;color:#60825b;padding:5px 8px}.status-pill.warn{color:#a16c45;background:#f4e5cc}.primary{background:#305f4c;color:#fff8df;border-radius:35px;padding:13px 20px;font-weight:500}.full{width:100%;margin:6px 0}.quiet{background:transparent;color:#8a927e;font-size:12px}.hall-summary{display:flex;gap:16px;padding:8px 0 20px}.hall-summary span{flex:1;background:#edf1e5;border-radius:16px;padding:16px;font-size:11px;color:#8b977f}.hall-summary b{display:block;font-size:28px;color:#486c4f;font-weight:500;margin-top:5px}#sheet-content h3{font-size:16px}.tax-options{display:flex;gap:9px}.tax-options button{flex:1;border-radius:14px;background:#edf0e6;color:#829276;padding:10px;font-size:20px}.tax-options button.active{background:#dce7cb;outline:1px solid #aac18a;color:#41663e}.tax-options small{display:block;font-size:10px;margin-top:5px}.city-stats{display:grid;grid-template-columns:1fr 1fr;margin:20px 0;gap:16px}.city-stats span{display:block;font-size:10px;color:#97a086}.city-stats b{display:block;font-size:13px;font-weight:500;margin-top:5px}details{border-top:1px solid #dce4d4;padding:12px 0;color:#7a8c70;font-size:13px}summary{cursor:pointer;min-height:42px;line-height:42px}details p{font-size:12px;line-height:1.9}.goal-row{display:flex;gap:12px;align-items:center;padding:16px 0;border-bottom:1px solid #dce5d2}.goal-row>div{flex:1}.goal-row h3{margin:0 0 6px}.goal-row p{font-size:12px;color:#85947b;margin:0 0 5px}.goal-row small{font-size:10px;color:#ac966b}.goal-row button{background:#e3ecd8;color:#6d865c;border-radius:24px;padding:8px 16px;font-size:12px}#toast{position:fixed;z-index:8;bottom:calc(108px + var(--safe-bottom));left:50%;transform:translate(-50%,15px);background:#294c3ff5;color:#fff7da;border-radius:40px;padding:12px 20px;font-size:12px;max-width:90%;width:max-content;text-align:center;opacity:0;pointer-events:none;transition:.2s}#toast.show{opacity:1;transform:translate(-50%,0)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.sdk-boot{position:fixed;inset:0;z-index:15;background:#edf1e3;display:grid;place-items:center;color:#54754b}.sdk-exit{position:absolute;right:85px;top:16px;border-radius:50%;width:38px;background:#f7f7ec;color:#668159;font-size:10px}.exit-dialog{padding:24px}.exit-dialog h2{font-size:20px}.exit-dialog p{font-size:13px;line-height:1.8}
@media(max-width:600px){.city-top{top:calc(16px + var(--safe-top));left:20px;right:20px;gap:8px}.wordmark span{font-size:21px}.wordmark small{font-size:7px;letter-spacing:2.5px}.date-control{font-size:9px}.city-top button{width:40px;min-height:40px;font-size:18px}.city-meters{left:16px;right:16px;min-width:0;top:calc(81px + var(--safe-top));padding:12px 0;border-radius:18px;justify-content:space-around}.city-meters>div{padding:0 15px;flex:1}.city-meters b{font-size:22px}.city-meters small{font-size:8px}.tool-hint{left:18px;top:calc(188px + var(--safe-top))}.tool-hint span{font-size:10px}.city-bottom{left:18px;right:18px;gap:12px;bottom:calc(21px + var(--safe-bottom))}.build-main{padding:0 25px;height:58px;font-size:15px}.city-goal{padding:9px 13px;flex:1;min-width:0;min-height:58px}.city-goal small{font-size:8px;line-height:1.6}.city-goal button{font-size:11px}.advisor{left:24px;bottom:calc(120px + var(--safe-bottom));max-width:260px}.advisor small{font-size:7px}.advisor p{font-size:12px;line-height:1.8}.map-tools{right:18px;bottom:calc(124px + var(--safe-bottom))}.map-tools button{width:34px;min-height:34px;font-size:20px}dialog{margin:auto auto 10px;border-radius:24px;max-height:77dvh}.sheet-head{padding:20px 20px 10px}.sheet-head h2{font-size:18px}#sheet-content{padding:8px 18px 20px}.building-art{width:88px;height:88px}.build-list{gap:8px}.build-list button{padding:6px 4px}.build-list b{font-size:12px}.sheet-note{font-size:11px}.building-detail>.building-art{width:110px;height:110px}.building-detail h3{font-size:18px}.building-detail p{font-size:11px}.sdk-exit{right:70px;top:14px}}

.league-status-bar{position:absolute;top:calc(220px + var(--safe-top));left:22px;right:22px;display:flex;gap:8px;align-items:center;z-index:2}.league-status-bar span{background:#35564af2;color:#f6ecd3;padding:7px 13px;border-radius:24px;font-size:11px}.league-status-bar button{background:#f4f2e5;min-height:34px;padding:5px 13px;font-size:11px;border-radius:20px;color:#53694e}.league-mode .city-goal,.visit-mode .city-goal,.visit-mode #build-open{display:none}.league-intro>span,.league-result>span{font-size:9px;letter-spacing:2px;color:#ac956f}.league-intro h3{font:35px Georgia,serif!important;line-height:1.3}.league-intro p{font-size:13px;line-height:1.9;color:#7a8e73}.league-result{text-align:center;padding:20px 0}.league-result h3{font:44px Georgia,serif!important;color:#436c50}.league-result small{display:block;font-size:11px;line-height:1.8;margin:20px 0;color:#85947d}.leader-row{display:flex;align-items:center;width:100%;gap:15px;background:none;border-bottom:1px solid #dfe7d7;padding:17px 4px;text-align:left;color:#436049}.leader-row>b{font:25px Georgia,serif;color:#ae9968;width:30px}.leader-row>span{flex:1;font-size:13px}.leader-row small{display:block;font-size:10px;color:#8c9a82;margin-top:6px}.leader-row strong{font-weight:500;color:#7b8c62}.empty-league{text-align:center;padding:40px 10px}.empty-league p{font-size:13px;line-height:1.9;color:#8b9b80}.city-ad-box{border-top:1px solid #e0e7d8;margin-top:16px;padding-top:10px}@media(max-width:600px){.wordmark span{font-size:18px;letter-spacing:1px}.wordmark small{font-size:7px;letter-spacing:1px}.city-top{gap:5px}.city-top button{width:36px;min-height:36px;flex-shrink:0}.city-top #speed{width:31px;min-height:34px}.date-control{font-size:8px}.league-status-bar{left:18px;right:18px}}

/* Mobile release pass: stable touch targets and reachable controls. */
.city-app{min-height:0}.map-tools button,.sheet-head button,.tool-hint button,.league-status-bar button{min-height:44px;min-width:44px}.city-goal{position:relative}.city-goal button{min-height:44px}.city-goal small{pointer-events:none}.map-tools{border-radius:24px}.sdk-exit{position:static!important;flex:none!important;min-width:44px!important;font-size:11px!important}.build-list button{min-height:130px}.build-list button:active,.primary:active{transform:scale(.98)}
@media(max-width:600px){.city-top{left:14px;right:14px;gap:4px}.wordmark span{font-size:16px}.city-top button,.city-top #speed{width:44px;min-height:44px}.date-control{position:absolute;top:49px;right:3px;font-size:10px}.city-meters{top:calc(96px + var(--safe-top))}.tool-hint{top:calc(197px + var(--safe-top));right:16px}.tool-hint span{flex:1;line-height:1.6}.map-tools{bottom:calc(130px + var(--safe-bottom))}.map-tools button{width:44px;min-height:44px}.city-bottom{gap:10px;left:16px;right:16px}.build-main{padding:0 20px}.city-goal{padding:6px 12px}.city-goal button{padding:0;width:100%}.advisor{bottom:calc(115px + var(--safe-bottom));max-width:235px}.sheet-head button{width:44px;min-height:44px}dialog{max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 24px);margin-bottom:calc(10px + var(--safe-bottom))}.building-detail{margin-bottom:12px}.sheet-note{font-size:12px}.sdk-exit{width:44px!important}.city-top:has(.sdk-exit) .wordmark span{font-size:13px}.city-top:has(.sdk-exit) .wordmark small{letter-spacing:0;font-size:6px}}
@media(max-height:680px){.advisor{display:none}.city-meters{padding:6px 0}.city-meters b{font-size:19px}.tool-hint{top:calc(173px + var(--safe-top))}.city-bottom{bottom:calc(12px + var(--safe-bottom))}.map-tools{bottom:calc(104px + var(--safe-bottom))}.build-main{height:54px}.city-goal{min-height:54px}.league-status-bar{top:calc(224px + var(--safe-top))}}

/* City life: an architectural journal, with one clear next action. */
.city-top .wordmark{color:#173f3c}.city-meters{border:1px solid #fff8;box-shadow:0 10px 35px #244f5024;backdrop-filter:blur(12px)}.build-main{background:linear-gradient(145deg,#397568,#1d4945);border:1px solid #648e7d;box-shadow:0 8px 24px #173f3f40,inset 0 1px #ffffff30}.city-goal{border:1px solid #fff9}.city-goal button.ready{color:#8a5e24;font-weight:800}.life-tabs{position:sticky;top:64px;z-index:1;background:#fbfaf2;padding:6px 0}.life-tabs button{font-size:12px;min-height:46px}.citizen-letter{border:1px solid #d9dfd0;background:linear-gradient(130deg,#fffcf0,#f1eee0);padding:22px;border-radius:18px;box-shadow:0 7px 18px #536c4810}.letter-meta{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:600}.letter-meta small{display:block;font-size:10px;font-weight:400;margin-top:3px;color:#798671}.citizen-seal{border-radius:50%;width:44px;height:44px;display:grid;place-items:center;background:#d5e4cf;color:#42634c;font:24px Georgia,serif}.postmark{margin-left:auto;border:1px dashed #b8b69a;transform:rotate(8deg);padding:6px;font:9px Georgia,serif;color:#9a967b}.citizen-letter h3{font-size:23px!important;letter-spacing:-1px;margin:24px 0 12px}.citizen-letter p{font-size:14px;line-height:1.9;color:#60735e}.order-progress,.letter-reward{display:flex;justify-content:space-between;gap:10px;font-size:12px;margin:20px 0 10px}.order-progress b{font-variant-numeric:tabular-nums}.letter-reward{padding-top:12px;border-top:1px dashed #cdd5bf;color:#857148}progress{width:100%;height:9px;border:0;border-radius:8px;overflow:hidden;accent-color:#4b8063}progress::-webkit-progress-bar{background:#e2e7d8}progress::-webkit-progress-value{background:linear-gradient(90deg,#83a878,#3d765d);border-radius:8px}.collection-heading>span,.life-complete>span{font-size:9px;letter-spacing:2px;color:#a38d5e}.collection-heading h3{font:38px Georgia,serif!important;margin:8px 0}.collection-heading h3 small{font:12px system-ui;color:#8b977c}.collection-heading p{font-size:12px;color:#74836b;line-height:1.8}.collection-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.collection-card{position:relative;border:1px solid #dbe3ce;background:radial-gradient(ellipse at 50% 40%,#fbf9e8,#e4eadb);border-radius:16px;padding:10px;text-align:center}.collection-card .building-art{width:110px;height:110px;max-width:100%;margin:auto;filter:drop-shadow(0 6px 5px #415c3926)}.collection-card h3{font-size:12px!important;margin:7px 0}.collection-card>span{font-size:9px;color:#577957}.collection-card>small{font-size:10px;color:#78876e}.collection-card.undiscovered{background:#edf0e8}.undiscovered .building-art{filter:grayscale(1);opacity:.3}.undiscovered>span{color:#8b917f}.collection-rewards{display:flex;gap:6px;margin-top:18px}.collection-rewards button{flex:1;background:#dfe9d5;color:#4e704c;border-radius:12px;padding:12px 3px;font-size:11px}.collection-rewards small{display:block;font-size:9px;margin-top:5px}.life-complete{text-align:center;padding:30px 8px}.life-complete p{font-size:13px;line-height:1.8;color:#71846b}@media(max-width:380px){.citizen-letter{padding:16px}.citizen-letter h3{font-size:21px!important}.life-tabs button{font-size:11px}.city-goal small{font-size:9px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.city-top{padding-top:max(env(safe-area-inset-top),var(--safe-top,0px))}.city-bottom{padding-bottom:max(env(safe-area-inset-bottom),var(--safe-bottom,0px))}
/* 튜토리얼 */
.tut{position:fixed;inset:0;z-index:9000;pointer-events:none}
.tut-ring{position:fixed;border:3px solid #ffd166;border-radius:16px;box-shadow:0 0 0 9999px #0f2d3333,0 0 18px #ffd166;animation:tutPulse 1.2s ease-in-out infinite;pointer-events:none}
@keyframes tutPulse{50%{transform:scale(1.04)}}
.tut-card{position:fixed;left:50%;bottom:calc(110px + var(--safe-bottom,0px));transform:translateX(-50%);width:min(92vw,420px);background:#fffdf6;color:#173c3a;border-radius:18px;padding:14px 16px 10px 62px;box-shadow:0 10px 30px #0f2d3355;pointer-events:auto;font-size:15px;line-height:1.6}
.tut.low .tut-card{bottom:auto;top:calc(80px + var(--safe-top,0px))}
dialog .tut-card{bottom:auto;top:12px}
.tut-face{position:absolute;left:12px;top:12px;width:40px;height:40px;border-radius:50%;background:#7bc4c4;color:#fff;display:grid;place-items:center;font-size:22px}
.tut-text{margin:0 0 8px}
.tut-actions{display:flex;justify-content:flex-end;gap:8px}
.tut-actions button{border:0;border-radius:10px;padding:8px 14px;font-weight:700;background:#e7efe9;color:#244f48}
.tut-actions .primary{background:#244f48;color:#fff}
.tut-step{display:block;color:#6b8a85;font-size:11px;margin-top:4px}
.tut-tile{position:fixed;z-index:8999;pointer-events:none;clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);background:#ffd166aa;animation:tutBlink .8s ease-in-out infinite alternate}
@keyframes tutBlink{to{background:#ffd16633}}
#help-open{min-width:34px;font-weight:800}
/* 재미 요소 */
.city-fx{position:fixed;inset:0;pointer-events:none;z-index:50}
.city-coin{position:fixed;transform:translate(-50%,-50%);width:38px;height:38px;border-radius:50%;border:2px solid #fff;background:radial-gradient(circle at 35% 30%,#ffe9a3,#f2b632);color:#7a4b00;font-weight:900;font-size:18px;pointer-events:auto;box-shadow:0 4px 10px #0003;animation:coinBob 1s ease-in-out infinite alternate}
.city-coin.heart{background:radial-gradient(circle at 35% 30%,#ffd1dc,#f27a9b);color:#fff}
@keyframes coinBob{to{margin-top:-6px}}
.city-talk{position:fixed;transform:translate(-50%,-50%);background:#fff;color:#244f48;font-size:12px;font-weight:700;padding:5px 9px;border-radius:12px;white-space:nowrap;box-shadow:0 3px 8px #0002;animation:fadeTalk 3.5s forwards}
@keyframes fadeTalk{0%{opacity:0}10%,85%{opacity:1}100%{opacity:0}}
.city-float{position:fixed;transform:translateX(-50%);color:#fff;font-weight:900;text-shadow:0 2px 4px #0008;white-space:nowrap;animation:floatUp 1.3s forwards}
@keyframes floatUp{to{transform:translate(-50%,-50px);opacity:0}}
.city-meters{position:relative}
.cash-float{position:absolute;left:12%;top:-4px;color:#2e7d4f;font-weight:900;font-size:13px;animation:floatUp 1.2s forwards;pointer-events:none}
.celebrate-pop{position:fixed;left:50%;top:38%;transform:translate(-50%,-50%);background:#244f48;color:#ffe9a3;font-weight:900;font-size:20px;padding:14px 22px;border-radius:18px;box-shadow:0 10px 30px #0004;animation:popIn 2.2s forwards}
@keyframes popIn{0%{transform:translate(-50%,-50%) scale(.6);opacity:0}12%{transform:translate(-50%,-50%) scale(1.06);opacity:1}85%{opacity:1}100%{opacity:0}}
.confetti{position:fixed;top:30%;width:8px;height:12px;border-radius:2px;animation:conf 1.6s ease-in forwards}
@keyframes conf{to{transform:translateY(60vh) rotate(540deg);opacity:0}}

.tut.inline{position:static;inset:auto;margin:0 0 12px}.tut.inline .tut-card{position:relative;left:auto;top:auto;bottom:auto;transform:none;width:auto;box-shadow:0 0 0 2px #ffd166}
