:root{--paper-bg: #f3f9fb;--paper-card: #ffffff;--ink-dark: #1d3557;--ink-muted: #457b9d;--cinnabar: #0077b6;--cinnabar-dark: #023e8a;--gold-accent: #ffb703;--jade-green: #2ec4b6;--purple-god: #7209b7;--border-ink: rgba(69, 123, 157, .25)}*{box-sizing:border-box;margin:0;padding:0;user-select:none;-webkit-user-select:none}body{background:#0b132b;font-family:STKaiti,KaiTi,PingFang SC,Microsoft YaHei,serif;color:var(--ink-dark);height:100vh;width:100vw;overflow:hidden;display:flex;justify-content:center;align-items:center}#app-frame{position:relative;width:100%;max-width:520px;height:100vh;max-height:940px;background:var(--paper-bg);box-shadow:0 18px 60px #000000a6;overflow:hidden;display:flex;flex-direction:column;border-left:2px solid rgba(72,202,228,.35);border-right:2px solid rgba(72,202,228,.35)}.top-hud{position:absolute;top:0;left:0;right:0;z-index:20;padding:10px 12px;background:linear-gradient(180deg,#0b132bd1,#0b132b00);pointer-events:none}.town-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;pointer-events:auto}.town-seal{display:flex;align-items:center;gap:8px;background:#fffffff0;border:1.5px solid #0077b6;padding:4px 12px 4px 6px;border-radius:20px;box-shadow:0 3px 10px #0000002e}.seal-stamp{background:linear-gradient(135deg,#7209b7,#3a0ca3);color:#fff8eb;font-size:11px;font-weight:700;padding:2px 6px;border-radius:4px;letter-spacing:1px}.town-name{font-size:15px;font-weight:700;color:#1d3557}.prosperity-pill{font-size:12px;color:#0077b6;background:#48cae438;padding:2px 7px;border-radius:10px}.top-controls{display:flex;gap:6px}.mini-pill-btn{background:#ffffffeb;border:1px solid #4895ef;color:#1d3557;padding:4px 9px;border-radius:14px;font-size:12px;cursor:pointer;font-family:inherit;box-shadow:0 2px 6px #00000026}.mini-pill-btn:hover{background:#fff}.resource-bar{display:flex;gap:6px;flex-wrap:wrap;pointer-events:auto}.res-item{background:#0f1c35d6;color:#f0f9ff;border:1px solid rgba(72,202,228,.48);border-radius:14px;padding:3px 10px;font-size:12px;display:flex;align-items:center;gap:4px}.res-item b{color:#72efdd;font-family:sans-serif}.build-banner{margin-top:8px;background:#7209b7f0;color:#fff8eb;padding:6px 12px;border-radius:10px;font-size:13px;display:flex;justify-content:space-between;align-items:center;pointer-events:auto;box-shadow:0 4px 12px #00000040}#canvas-container{position:relative;flex:1;width:100%;height:100%;overflow:hidden;cursor:grab}#canvas-container:active{cursor:grabbing}.side-float-tools{position:absolute;right:12px;top:112px;z-index:15;display:flex;flex-direction:column;gap:8px}.circle-tool-btn{width:34px;height:34px;border-radius:50%;background:#ffffffeb;border:1.5px solid #4895ef;color:#1d3557;font-size:16px;font-weight:700;cursor:pointer;box-shadow:0 3px 8px #0003}.inspector-card{position:absolute;left:14px;right:14px;bottom:84px;z-index:18;background:#fffffff5;border:2px solid #0077b6;border-radius:14px;padding:12px 14px;box-shadow:0 8px 25px #00000047}.inspector-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.tag-cat{background:var(--jade-green);color:#fff;font-size:11px;padding:1px 6px;border-radius:4px;margin-right:6px}.close-mini{background:none;border:none;font-size:16px;color:var(--ink-muted);cursor:pointer}.shanhai-quote{font-size:12px;color:#6b21a8;background:#7209b712;border-left:3px solid #7209b7;padding:4px 8px;border-radius:4px;margin-bottom:6px;line-height:1.4}.shanhai-lore{font-size:11.5px;color:#0f4c5c;background:#2ec4b61c;padding:5px 8px;border-radius:6px;margin-bottom:6px;line-height:1.4}.inspector-desc{font-size:12px;color:var(--ink-muted);margin-bottom:8px;line-height:1.4}.inspector-meta{display:flex;justify-content:space-between;font-size:12px;background:#48cae424;padding:6px 10px;border-radius:8px;margin-bottom:8px}.inspector-actions{display:flex;gap:8px;align-items:center}.ancient-select{flex:1;padding:6px 8px;border-radius:8px;border:1px solid #4895ef;background:#fff;font-family:inherit;font-size:12px}.bottom-dock{position:absolute;bottom:0;left:0;right:0;z-index:20;background:linear-gradient(180deg,#f0f9fff2,#e0f2fefc);border-top:2px solid #4895ef;padding:8px 10px 12px;display:flex;justify-content:space-around;align-items:center;box-shadow:0 -4px 16px #00000026}.dock-btn{position:relative;background:#fff;border:1.5px solid #4895ef;border-radius:12px;padding:6px 7px;min-width:58px;display:flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer;font-family:inherit;transition:transform .12s,background .15s}.dock-btn:active{transform:scale(.95)}.dock-btn.highlight{background:linear-gradient(135deg,#7209b7,#3a0ca3);color:#fff8eb;border-color:#ffd166}.dock-icon{font-size:19px}.dock-label{font-size:12px;font-weight:700}.dock-badge{position:absolute;top:-6px;right:-5px;background:#e63946;color:#fff;border:1.5px solid #fff;font-size:10px;font-weight:700;min-width:18px;height:18px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-family:sans-serif}.modal-drawer{position:absolute;left:0;right:0;bottom:72px;max-height:65%;z-index:25;background:var(--paper-bg);border-top:3px solid var(--purple-god);border-radius:18px 18px 0 0;box-shadow:0 -10px 35px #00000059;display:flex;flex-direction:column;overflow:hidden}.modal-header{padding:12px 16px;background:#e0f2fe;border-bottom:1px solid var(--border-ink);display:flex;justify-content:space-between;align-items:center}.modal-header h3{font-size:16px;color:#1d3557}.modal-body{padding:12px 14px 18px;overflow-y:auto;flex:1}.card-list{display:flex;flex-direction:column;gap:10px}.card-item{background:var(--paper-card);border:1px solid #bae6fd;border-radius:12px;padding:10px 12px;display:flex;justify-content:space-between;align-items:center;gap:10px}.card-main{flex:1}.card-title-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:5px}.size-badge,.prosperity-badge,.citizen-title{font-size:11px;padding:1px 6px;border-radius:4px;background:#457b9d1f;color:#1d3557}.prosperity-badge{background:#48cae438;color:#0077b6}.card-desc{font-size:12px;color:var(--ink-muted);margin-bottom:5px;line-height:1.35}.card-cost{font-size:11px;color:#023e8a}.citizen-avatar{width:42px;height:42px;border-radius:50%;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:15px;border:2px solid #ffd166;flex-shrink:0}.ancient-btn{background:#e0f2fe;border:1.5px solid #4895ef;color:#1d3557;padding:6px 13px;border-radius:8px;font-size:12px;font-weight:700;cursor:pointer;font-family:inherit;white-space:nowrap}.ancient-btn.primary{background:linear-gradient(135deg,#0077b6,#023e8a);border-color:#90e0ef;color:#fff}.ancient-btn:disabled{opacity:.5;cursor:not-allowed}.gacha-banner{background:linear-gradient(135deg,#f3e8ff,#e0f2fe);border:1.5px solid #7209b7;border-radius:12px;padding:12px;display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.gacha-banner h4{font-size:14px;color:#5a189a;margin-bottom:4px}.gacha-banner p{font-size:12px;color:#1d3557}.section-subtitle{font-size:13px;color:#1d3557;margin-bottom:8px}.voucher-list{display:flex;flex-direction:column;gap:8px}.voucher-card{background:#fff;border:1.5px dashed #7209b7;border-radius:10px;padding:10px 12px;display:flex;align-items:center;gap:10px}.voucher-seal{background:linear-gradient(135deg,#7209b7,#3a0ca3);color:#ffd166;font-size:12px;font-weight:700;padding:6px 8px;border-radius:6px;writing-mode:vertical-rl;letter-spacing:2px}.voucher-main h4{font-size:14px;color:#5a189a;margin-bottom:3px}.voucher-main p{font-size:12px;color:#1d3557;margin-bottom:4px}.voucher-time{font-size:10px;color:#64748b}.quiz-box{background:linear-gradient(135deg,#fffdf5,#f0f9ff);border:2px solid #7209b7;border-radius:12px;padding:12px;margin-bottom:14px;box-shadow:0 4px 14px #7209b71f}.quiz-header{font-size:14px;font-weight:700;color:#5a189a;margin-bottom:6px}.quiz-question{font-size:13px;color:#1d3557;line-height:1.45;margin-bottom:10px}.quiz-options{display:flex;flex-direction:column;gap:7px}.quiz-opt-btn{text-align:left;padding:8px 12px;background:#fff;border:1.5px solid #4895ef;transition:background .15s}.quiz-opt-btn:hover{background:#e0f2fe}.quiz-feedback{border-radius:10px;padding:10px 12px;margin-bottom:14px;font-size:12px;line-height:1.45}.quiz-feedback.ok{background:#ecfdf5;border:1.5px solid #10b981;color:#065f46}.quiz-feedback.info{background:#eff6ff;border:1.5px solid #3b82f6;color:#1e3a8a}.ancient-toast{position:absolute;top:106px;left:50%;transform:translate(-50%);z-index:40;background:#0f172aeb;color:#72efdd;border:1px solid #48cae4;padding:7px 16px;border-radius:20px;font-size:12px;box-shadow:0 4px 15px #0000004d;pointer-events:none;white-space:nowrap}.hidden{display:none!important}
