:root{
  --ink:#2b1d12; --ink2:#5d4630; --paper:#f3e6c8; --paper2:#ead8b0; --edge:#b89a68;
  --accent:#8e2f22; --gold:#d6a93a; --silver:#b9bec4; --sea:#4f86a8; --ok:#3f7a3a;
  --shadow:0 2px 0 rgba(60,40,20,.15);
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:#2b2118;color:var(--ink);font-family:Georgia,"Iowan Old Style","Palatino Linotype",serif}
.hidden{display:none!important}
.screen{min-height:100vh}
.parchment-screen{display:flex;align-items:center;justify-content:center;padding:16px;
  background:radial-gradient(circle at 50% 40%,#f6ecd2 0,#e8d4a8 60%,#cdb383 100%)}
.card{background:var(--paper);border:2px solid var(--edge);border-radius:10px;padding:24px 28px;max-width:560px;width:100%;
  box-shadow:0 10px 30px rgba(40,25,10,.35), inset 0 0 40px rgba(150,110,60,.15)}
.card.wide{max-width:900px}
h1{margin:0 0 6px;font-size:30px;letter-spacing:.5px}
h1 small{font-size:14px;color:var(--ink2);font-style:italic;font-weight:normal}
h2{margin:0 0 6px}
.lead{color:var(--ink2);margin:0 0 18px;line-height:1.5}
.field{display:block;font-weight:bold;margin:14px 0 8px}
input{display:block;width:100%;margin-top:6px;padding:10px 12px;font:inherit;font-size:17px;border:1.5px solid var(--edge);border-radius:6px;background:#fbf5e6;color:var(--ink)}
.chars{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.char{border:2px solid var(--edge);border-radius:8px;background:#fbf5e6;padding:6px 4px 8px;cursor:pointer;text-align:center;transition:transform .15s}
.char:hover{transform:translateY(-2px)}
.char.sel{border-color:var(--accent);background:#f7e3d0;box-shadow:0 0 0 2px var(--accent)}
.char svg{width:100%;height:auto;display:block}
.char span{font-size:13px}
.btn{font:inherit;font-size:16px;border:2px solid var(--ink2);background:#f8eed6;color:var(--ink);padding:9px 18px;border-radius:7px;cursor:pointer;box-shadow:var(--shadow)}
.btn:hover:not(:disabled){background:#fff6df}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn.primary{background:var(--accent);color:#fbf3e2;border-color:#5e1d14;margin-top:18px}
.btn.primary:hover:not(:disabled){background:#a33a2b}
.btn.small{font-size:14px;padding:6px 12px}
.err{color:var(--accent);min-height:1em;margin:8px 0 0}

.port-pick{display:grid;grid-template-columns:1.6fr 1fr;gap:16px;align-items:start}
#port-map{width:100%;border:1.5px solid var(--edge);border-radius:8px;background:#cfe0e6}
.port-list{display:flex;flex-direction:column;gap:8px}
.port-item{border:1.5px solid var(--edge);border-radius:8px;padding:8px 10px;background:#fbf5e6;cursor:pointer}
.port-item.sel{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}
.port-item b{display:block}
.port-item small{color:var(--ink2)}
@media (max-width:700px){.port-pick{grid-template-columns:1fr}.chars{grid-template-columns:repeat(2,1fr)}}

/* Spiel */
#screen-game{display:flex;flex-direction:column;height:100vh}
.topbar{display:flex;align-items:center;gap:16px;padding:8px 14px;background:linear-gradient(#4a3423,#3a2819);color:#f3e6c8;border-bottom:3px solid #6b4a2c;flex-wrap:wrap}
.who{display:flex;align-items:center;gap:8px;min-width:170px}
.who small{display:block;color:#d8c49c;font-size:12px}
.avatar{width:38px;height:38px;border-radius:50%;background:#f3e6c8;overflow:hidden;border:2px solid var(--gold);display:inline-block}
.avatar svg{width:100%;height:100%}
.money{display:flex;align-items:center;gap:6px;font-size:20px;background:rgba(0,0,0,.25);padding:4px 12px;border-radius:20px}
.money b{min-width:28px}
.money b.bump{animation:bump .5s}
@keyframes bump{40%{transform:scale(1.35);color:#ffe69a}}
.coin{width:18px;height:18px;border-radius:50%;display:inline-block;border:2px solid rgba(0,0,0,.35)}
.coin.gold{background:radial-gradient(circle at 35% 35%,#fff2b0,var(--gold) 60%,#9c7417)}
.coin.silver{background:radial-gradient(circle at 35% 35%,#fff,var(--silver) 60%,#7d838a);margin-left:8px}
.tabs{display:flex;gap:4px;margin-left:auto}
.tabs button{font:inherit;background:transparent;color:#f3e6c8;border:1.5px solid #8b6a45;border-radius:6px;padding:6px 14px;cursor:pointer}
.tabs button.active{background:#f3e6c8;color:var(--ink)}
.speed{font-size:13px;color:#d8c49c}
.speed select{font:inherit;margin-left:4px}

.stage{position:relative;flex:1;overflow:hidden;background:#1f1812}
.view{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.view svg{width:100%;height:100%;overflow:hidden}
#view-town{background:radial-gradient(ellipse at 50% 40%,#e6d9b8 0,#cbb98f 70%,#b8a47a 100%)}
#town{cursor:grab;touch-action:none}
.zoom{position:absolute;left:12px;top:12px;display:flex;flex-direction:column;gap:6px}
.zoom button{width:36px;height:36px;font-size:22px;border-radius:8px;border:1.5px solid var(--edge);background:var(--paper);cursor:pointer}
.flagbtn{width:34px;height:24px;border-radius:4px;border:2px solid #fff;box-shadow:0 0 0 1px var(--edge);cursor:pointer}
.flagbtn.sel{box-shadow:0 0 0 3px var(--ink)}
.bld .sign{opacity:.95}
#view-map{background:#2b2118}
.own{width:100%;height:100%;overflow:auto;padding:20px;background:var(--paper)}
.own h3{margin:18px 0 8px;border-bottom:1.5px solid var(--edge);padding-bottom:4px}
.own table{border-collapse:collapse;width:100%;max-width:720px}
.own td,.own th{padding:6px 8px;border-bottom:1px solid #d9c49a;text-align:left}

.panel{position:absolute;right:12px;top:12px;bottom:12px;width:340px;max-width:calc(100% - 24px);background:var(--paper);border:2px solid var(--edge);border-radius:10px;padding:18px 18px 14px;overflow:auto;box-shadow:0 8px 30px rgba(0,0,0,.45);animation:slidein .25s}
@keyframes slidein{from{transform:translateX(30px);opacity:0}}
.panel h2{font-size:22px;margin:0 0 2px}
.panel .sub{color:var(--ink2);font-size:14px;margin:0 0 14px;line-height:1.4}
.panel .close{position:absolute;right:8px;top:6px;border:0;background:none;font-size:26px;cursor:pointer;color:var(--ink2)}
.row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px dashed #cdb383}
.row:last-child{border-bottom:0}
.row .t{flex:1}
.row .t b{display:block}
.row .t small{color:var(--ink2)}
.bar{height:10px;background:#e2cfa5;border-radius:6px;overflow:hidden;margin-top:6px;border:1px solid #c4a874}
.bar i{display:block;height:100%;background:linear-gradient(90deg,#b8862f,#e3b649);width:0;transition:width .2s linear}
.price{white-space:nowrap;font-weight:bold}
.locked{opacity:.55}
.tag{display:inline-block;font-size:12px;padding:1px 7px;border-radius:10px;background:#e7d4ac;color:var(--ink2)}

.hover-label{position:absolute;pointer-events:none;background:rgba(43,29,18,.88);color:#f3e6c8;padding:4px 10px;border-radius:6px;font-size:14px;transform:translate(-50%,-130%)}
.map-hint{position:absolute;right:12px;bottom:10px;background:rgba(243,230,200,.92);border:1px solid var(--edge);border-radius:6px;padding:4px 10px;font-size:13px}

.toasts{position:fixed;right:14px;top:66px;display:flex;flex-direction:column;gap:8px;z-index:20;pointer-events:none}
.toast{background:#f8eed6;border:2px solid var(--gold);border-radius:8px;padding:8px 14px;box-shadow:0 6px 18px rgba(0,0,0,.35);animation:toastin .35s, toastout .5s 3.6s forwards;font-size:15px}
@keyframes toastin{from{transform:translateY(-10px);opacity:0}}
@keyframes toastout{to{opacity:0;transform:translateY(-8px)}}
.reset{position:fixed;left:10px;bottom:10px;font-size:12px;opacity:.6;background:#f3e6c8;border:1px solid var(--edge);border-radius:6px;cursor:pointer}
.floatcoin{position:fixed;pointer-events:none;font-weight:bold;color:#ffe69a;text-shadow:0 1px 2px #000;font-size:20px;animation:floatup 1.1s forwards;z-index:30}
@keyframes floatup{to{transform:translateY(-60px);opacity:0}}

/* Animationen der Stadt */
.wave{animation:wave 6s ease-in-out infinite}
.wave.b{animation-duration:8s;animation-direction:reverse}
@keyframes wave{50%{transform:translateX(-30px)}}
.bob{animation:bob 3.2s ease-in-out infinite;transform-box:fill-box;transform-origin:center bottom}
@keyframes bob{50%{transform:translateY(3px) rotate(1.2deg)}}
.smoke{animation:smoke 4s ease-out infinite;opacity:0}
.smoke.d2{animation-delay:1.3s}.smoke.d3{animation-delay:2.6s}
@keyframes smoke{0%{opacity:.7;transform:translate(0,0) scale(.6)}100%{opacity:0;transform:translate(14px,-46px) scale(1.8)}}
.gull{animation:gull 18s linear infinite}
.gull.g2{animation-duration:24s;animation-delay:-9s}
@keyframes gull{from{transform:translateX(-200px)}to{transform:translateX(1300px)}}
.flag{animation:flag 1.6s ease-in-out infinite;transform-box:fill-box;transform-origin:left center}
@keyframes flag{50%{transform:skewY(6deg) scaleX(.9)}}
.crane{animation:crane 7s ease-in-out infinite;transform-box:fill-box;transform-origin:0% 100%}
@keyframes crane{50%{transform:rotate(-7deg)}}
.cloud{animation:cloud 60s linear infinite}
@keyframes cloud{from{transform:translateX(-200px)}to{transform:translateX(1100px)}}
.bld{cursor:pointer;transition:filter .15s}
.bld:hover{filter:brightness(1.12) drop-shadow(0 0 6px rgba(255,230,150,.9))}
.bld .busy{animation:pulse 1s ease-in-out infinite}
@keyframes pulse{50%{opacity:.35}}
.fishboat{transition:transform 1.2s}
.lamp{animation:lamp 2.4s ease-in-out infinite}
@keyframes lamp{50%{opacity:.55}}
.port-dot{cursor:pointer}
.port-dot:hover circle{r:9}

/* ---------- Tutorial ---------- */
.overlay{position:fixed;inset:0;background:rgba(20,12,6,.55);display:flex;align-items:center;justify-content:center;z-index:40;padding:16px;animation:fadein .3s}
@keyframes fadein{from{opacity:0}}
.intro-card{max-width:560px}
.intro-top{display:flex;gap:16px;align-items:center;margin-bottom:8px}
.intro-face{width:86px;height:100px;flex:none;border-radius:10px;overflow:hidden;border:2px solid var(--gold);display:block}
.intro-face svg{width:100%;height:100%}
.intro-steps{list-style:none;padding:0;margin:8px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:10px;counter-reset:s}
.intro-steps li{counter-increment:s;background:#fbf5e6;border:1.5px solid var(--edge);border-radius:8px;padding:10px 12px 10px 44px;position:relative}
.intro-steps li::before{content:counter(s);position:absolute;left:10px;top:10px;width:24px;height:24px;border-radius:50%;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:bold}
.intro-steps b{display:block}.intro-steps span{font-size:13px;color:var(--ink2)}
.bubble{position:absolute;z-index:30;display:flex;gap:10px;max-width:330px;background:#fff8e6;border:3px solid var(--gold);border-radius:14px;padding:12px 14px;box-shadow:0 10px 30px rgba(0,0,0,.45);animation:bubblein .45s cubic-bezier(.2,1.6,.4,1)}
@keyframes bubblein{from{transform:scale(.4);opacity:0}}
.bubble::after{content:"";position:absolute;left:-14px;top:30px;border:12px solid transparent;border-right-color:var(--gold)}
.bubble.left::after{left:auto;right:-14px;border-right-color:transparent;border-left-color:var(--gold)}
.bubble-face{width:52px;height:62px;flex:none;border-radius:8px;overflow:hidden;border:2px solid var(--edge)}
.bubble-face svg{width:100%;height:100%}
.bubble-body p{margin:0 0 8px;font-size:16px;line-height:1.4}
.bubble-body .btn.primary{margin-top:2px}
.guide-arrow{animation:arrowbounce 1s ease-in-out infinite}
@keyframes arrowbounce{50%{transform:translateY(-14px)}}
.guide-ring{animation:ringpulse 1.6s ease-out infinite;transform-box:fill-box;transform-origin:center}
@keyframes ringpulse{0%{transform:scale(.5);opacity:1}100%{transform:scale(1.7);opacity:0}}
.guide-spark{animation:spark 1.4s linear infinite;transform-box:fill-box;transform-origin:center}
@keyframes spark{0%,100%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1)}}
.me-tag{font-family:Georgia;font-size:12px;font-weight:bold}
.me-walk{animation:carry .8s ease-in-out infinite}
@keyframes carry{50%{transform:translateY(-3px)}}

/* ---------- Work screen ---------- */
.work-card{position:relative;width:420px;max-width:100%;background:radial-gradient(circle at 50% 0,#fff6df,#f0dfb8);border:3px solid var(--gold);border-radius:18px;padding:18px 20px 14px;box-shadow:0 20px 60px rgba(0,0,0,.6);text-align:center}
.work-card .close{position:absolute;right:10px;top:6px;border:0;background:none;font-size:28px;cursor:pointer;color:var(--ink2)}
.work-head h2{margin:0;font-size:26px}.work-head p{margin:2px 0 6px;color:var(--ink2)}
.work-ring{position:relative;width:220px;height:220px;margin:6px auto 10px}
.work-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.ring-bg{fill:#2b1d12;stroke:#5a3a22;stroke-width:14}
.ring-fg{fill:none;stroke:#e3b649;stroke-width:14;stroke-linecap:round;stroke-dasharray:540.4;stroke-dashoffset:540.4;transition:stroke-dashoffset .25s linear}
#ring-mini{stroke-dasharray:94.2;stroke-dashoffset:94.2;stroke-width:5}
.workbadge .ring-bg{stroke-width:5;fill:#2b1d12}
.work-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#f8e9c2}
.work-center b{font-size:56px;line-height:1;font-family:Georgia}
.work-center small{color:#d8c49c}
.coin-big{width:34px;height:34px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff,#b9bec4 60%,#7d838a);border:2px solid rgba(0,0,0,.4);margin-bottom:4px;animation:spin 2.4s linear infinite}
@keyframes spin{0%,100%{transform:scaleX(1)}50%{transform:scaleX(.15)}}
.work-ring.ding{animation:ding .6s}
@keyframes ding{20%{transform:scale(1.08)}40%{transform:scale(.97)}}
.work-ring.ding .ring-bg{fill:#7a5a1a}
.work-pop{position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);font-size:44px;font-weight:bold;color:#ffd84a;text-shadow:0 2px 0 #7a4a10,0 0 18px #fff3a0;opacity:0;pointer-events:none}
.work-pop.show{animation:pop 1.1s ease-out}
@keyframes pop{0%{opacity:0;transform:translate(-50%,-50%) scale(.3)}20%{opacity:1;transform:translate(-50%,-80%) scale(1.3)}100%{opacity:0;transform:translate(-50%,-200%) scale(1)}}
.work-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:4px 0 12px}
.work-stats div{background:#fbf5e6;border:1.5px solid var(--edge);border-radius:8px;padding:6px}
.work-stats small{display:block;color:var(--ink2);font-size:12px}.work-stats b{font-size:17px}
.work-btn{width:100%;font-size:26px;font-weight:bold;letter-spacing:2px;padding:14px;border-radius:12px;background:linear-gradient(#d84a35,#9e2a1c);color:#fff;border:3px solid #5e1d14;box-shadow:0 5px 0 #5e1d14;cursor:pointer}
.work-btn:active{transform:translateY(3px);box-shadow:0 2px 0 #5e1d14}
.work-btn.running{background:linear-gradient(#6b8a4a,#4a6a2e);border-color:#2f4a1a;box-shadow:0 5px 0 #2f4a1a;font-size:18px}
.work-hint{font-size:13px;color:var(--ink2);margin:10px 0 6px}
.ad-slot{margin-top:8px;border:2px dashed #b89a68;border-radius:10px;padding:16px;color:#a08660;font-size:13px;background:rgba(255,255,255,.35)}
.coins{position:fixed;inset:0;pointer-events:none;z-index:60}
.fly{position:absolute;width:22px;height:22px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff,#c9ced4 55%,#7d838a);border:2px solid rgba(0,0,0,.35)}
.workbadge{display:flex;align-items:center;gap:6px;background:rgba(0,0,0,.3);border:1.5px solid #d6a93a;color:#f3e6c8;border-radius:20px;padding:3px 12px 3px 4px;font:inherit;font-size:14px;cursor:pointer}
.workbadge svg{width:28px;height:28px;transform:rotate(-90deg)}
.mute{background:transparent;border:1.5px solid #8b6a45;color:#f3e6c8;border-radius:50%;width:30px;height:30px;cursor:pointer}
.mute.off{opacity:.4;text-decoration:line-through}
.btn.work-btn,.btn.work-btn:hover:not(:disabled){background:linear-gradient(#d84a35,#9e2a1c);color:#fff}
.btn.work-btn.running,.btn.work-btn.running:hover:not(:disabled){background:linear-gradient(#6b8a4a,#4a6a2e);color:#fff}
.bubble.top::after{display:none}
.blades{animation:spinb 7s linear infinite}
@keyframes spinb{to{transform:rotate(360deg)}}
.poi{cursor:help}
.foam{animation:foam 3.2s ease-in-out infinite}
@keyframes foam{50%{opacity:.35}}

/* celebration */
.party{position:fixed;inset:0;z-index:70;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle,rgba(40,20,0,.25),rgba(10,5,0,.65));animation:fadein .3s}
.party canvas{position:absolute;inset:0;width:100%;height:100%}
.party-card{position:relative;text-align:center;background:radial-gradient(circle at 50% 0,#fffbe9,#f3e1b2);border:4px solid #e0b43f;border-radius:20px;padding:22px 34px 18px;box-shadow:0 0 0 6px rgba(255,220,120,.35),0 20px 60px rgba(0,0,0,.6);animation:partyin .7s cubic-bezier(.2,1.7,.4,1);max-width:420px}
@keyframes partyin{from{transform:scale(.2) rotate(-8deg);opacity:0}}
.party-card h2{font-size:40px;margin:6px 0 4px;color:#8e2f22;letter-spacing:1px;text-shadow:0 2px 0 #f7d77a}
.party-card p{font-size:18px;margin:0 0 6px;line-height:1.4}
.party-icon{width:120px;height:96px;margin:-62px auto 0;filter:drop-shadow(0 6px 10px rgba(0,0,0,.35));animation:iconbob 1.4s ease-in-out infinite}
.party-icon svg{width:100%;height:100%}
@keyframes iconbob{50%{transform:translateY(-8px) rotate(3deg)}}
/* town numbers */
.townhud{position:absolute;left:60px;top:10px;display:flex;flex-direction:column;align-items:flex-start;gap:6px;max-width:calc(100% - 80px);z-index:5}
.townhud .chip{background:rgba(243,230,200,.94);border:1.5px solid var(--edge);border-radius:10px;padding:4px 10px;font-size:13px;box-shadow:0 2px 6px rgba(0,0,0,.2)}
.townhud .chip b{display:block;font-size:17px}
.townhud .chip small{color:var(--ink2)}
.townhud .chip.city b{font-size:19px;color:#8e2f22}

/* building speech bubbles */
.bbl{position:absolute;z-index:25;width:300px;max-width:calc(100% - 20px);background:#fffaf0;border:3px solid #d6a93a;border-radius:16px;padding:14px 16px 12px;box-shadow:0 12px 34px rgba(0,0,0,.45);animation:bubblein .35s cubic-bezier(.2,1.6,.4,1)}
.bbl::after{content:"";position:absolute;left:50%;bottom:-17px;margin-left:-14px;border:14px solid transparent;border-top-color:#d6a93a;border-bottom:0}
.bbl.below::after{bottom:auto;top:-17px;border-top:0;border-bottom:14px solid #d6a93a}
.bbl .close{position:absolute;right:8px;top:4px;border:0;background:none;font-size:22px;cursor:pointer;color:var(--ink2)}
.bbl h3{margin:0 24px 2px 0;font-size:19px}
.bbl .say{margin:0 0 10px;font-size:15px;line-height:1.4;color:var(--ink)}
.bbl .note{font-size:12.5px;color:var(--ink2);margin:8px 0 0}
.bbtn{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;margin:6px 0 0;padding:9px 12px;border-radius:10px;border:2px solid #8b6a45;background:linear-gradient(#fff6df,#f0dfb8);font:inherit;font-size:15px;color:var(--ink);cursor:pointer;text-align:left;box-shadow:0 3px 0 #b89a68}
.bbtn:hover:not(:disabled){background:linear-gradient(#fffbea,#f6e7c4)}
.bbtn:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 #b89a68}
.bbtn b{white-space:nowrap}
.bbtn.main{background:linear-gradient(#d84a35,#9e2a1c);border-color:#5e1d14;color:#fff;box-shadow:0 3px 0 #5e1d14}
.bbtn.main:hover:not(:disabled){background:linear-gradient(#e2583f,#a8301f)}
.bbtn:disabled{opacity:.5;cursor:not-allowed}
.bbtn small{display:block;font-size:11.5px;opacity:.8}
.bbl .bar{margin-top:8px}
.bbl .flags{display:flex;gap:6px;margin-top:6px}
.townhud .chip.city{cursor:pointer;font:inherit;text-align:left;color:var(--ink)}
.townhud .chip.city small{display:block;color:var(--ink2);font-size:12.5px}
.hudpop{width:250px;background:#fffaf0;border:2.5px solid #d6a93a;border-radius:12px;padding:10px 12px;box-shadow:0 10px 26px rgba(0,0,0,.35);animation:bubblein .3s cubic-bezier(.2,1.6,.4,1);font-size:14px}
.hudrow{display:flex;justify-content:space-between;gap:10px;padding:2px 0}
.hudrow.sub{font-size:12px;color:var(--ink2);margin-top:-2px}
.hudsec{font-size:12px;color:var(--ink2);margin:8px 0 3px;text-transform:none}
.hudtags{display:flex;flex-wrap:wrap;gap:4px}
.tag.good{background:#d8e8c4;color:#2f5a22}.tag.want{background:#f3d6c8;color:#7a2a1a}
.bbl{max-height:min(calc(100% - 20px),calc(100vh - 80px));overflow:auto}
.shiplist{margin-top:10px;border-top:1.5px dashed #cdb383;padding-top:6px}
.shiprow{display:flex;align-items:center;gap:8px;width:100%;padding:6px 6px;margin:4px 0;border:1.5px solid #e0cda2;border-radius:10px;background:#fffdf6;font:inherit;text-align:left;cursor:pointer;color:var(--ink)}
.shiprow:hover,.shiprow.open{border-color:#d6a93a;background:#fff7e2}
.shipicon{width:40px;height:30px;flex:none}.shipicon svg{width:100%;height:100%}
.shipmain{flex:1;min-width:0}.shipmain b{display:block;font-size:14.5px}.shipmain small{display:block;font-size:12px;color:var(--ink2)}
.shipprice{font-weight:bold;white-space:nowrap;font-size:14px}
.mini{display:block;height:5px;background:#eadbb6;border-radius:3px;margin-top:4px;overflow:hidden}.mini i{display:block;height:100%;background:linear-gradient(90deg,#b8862f,#e3b649)}
.shipmore{background:#fbf2da;border-radius:8px;padding:6px 10px;margin:-2px 0 6px;font-size:13.5px}.shipmore p{margin:4px 0}
.goods{margin-top:10px;border-top:1.5px dashed #cdb383;padding-top:6px}
.goodsh{display:flex;justify-content:space-between;font-size:14px;margin-bottom:2px}
.goodrow{display:grid;grid-template-columns:1fr 50px 64px 70px;align-items:center;gap:4px;font-size:13.5px}
.goodrow .bbtn{margin:3px 0;padding:4px 8px;font-size:13px;justify-content:center}
.leg1{animation:leg1 .5s ease-in-out infinite alternate;transform-box:fill-box;transform-origin:50% 0}
.leg2{animation:leg1 .5s ease-in-out infinite alternate-reverse;transform-box:fill-box;transform-origin:50% 0}
@keyframes leg1{from{transform:rotate(-14deg)}to{transform:rotate(14deg)}}
.skirt{animation:skirt .5s ease-in-out infinite alternate;transform-box:fill-box;transform-origin:50% 0}
@keyframes skirt{from{transform:skewX(-4deg)}to{transform:skewX(4deg)}}

.tag.prev{cursor:pointer;font:inherit;font-size:12px;border:1px solid var(--edge);background:#f3e6c8;border-radius:8px;padding:2px 8px}
.tag.prev.on{background:#8e2f22;color:#fff;border-color:#5e1d14}
button.mini{display:inline-block;width:auto;height:auto;min-height:22px;line-height:1.4;overflow:visible;font:inherit;font-size:12.5px;margin:-4px 0 4px;padding:2px 8px;color:#2b1d12;border:1px solid var(--edge);border-radius:6px;background:#f3e6c8;cursor:pointer;vertical-align:middle}
.mkrow{margin-bottom:6px}.mkbar{position:relative;height:7px;border-radius:4px;background:#efe3c6;border:1px solid #d8c49c;overflow:hidden;margin:2px 0 1px}.mkbar i{position:absolute;left:0;top:0;bottom:0;opacity:.7}.mkcap{display:block;font-size:11px;line-height:1.25;color:#6b5844}.goodrow small{font-size:10.5px;opacity:.85}
.fullbadge{animation:badgebob 1.1s ease-in-out infinite}@keyframes badgebob{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
.townhud .chip.alert{background:#c0392b;color:#fff;border-color:#7a1f14;font:inherit;font-weight:bold;cursor:pointer;animation:alertpulse 1.4s ease-in-out infinite}@keyframes alertpulse{50%{box-shadow:0 0 0 6px rgba(192,57,43,.25)}}
.botfig{pointer-events:none}
.stor{margin-top:10px}.stt{width:100%;border-collapse:collapse;font-size:12.5px;margin-top:6px}.stt th{font-weight:normal;color:var(--ink2);text-align:left;padding:2px 3px}.stt td{padding:4px 3px;border-top:1px solid #eadbb6;vertical-align:top}
.stt td small{display:block;font-size:10.5px;color:var(--ink2)}.stt select{font:inherit;font-size:12px;max-width:100%;margin-bottom:3px}.minp{display:block;font-size:11.5px;margin-bottom:3px}.minp input{width:58px;font:inherit;font-size:12px}
.minibar{display:block;height:4px;background:#efe3c6;border-radius:2px;margin-top:3px;overflow:hidden}.minibar i{display:block;height:100%;background:#8b6a45}
.bbtn.small{padding:3px 8px;font-size:12px;min-height:0;width:auto}

/* ---------- storage: icons, cards, tooltips ---------- */
.gi{display:inline-flex;width:22px;height:22px;flex:none}.gi svg{width:100%;height:100%}
.tip{position:relative;display:inline-flex;width:17px;height:17px;color:#8b6a45;cursor:help;margin-left:auto;flex:none}.tip svg{width:100%;height:100%}
[data-tip]{position:relative}
.whead{display:flex;align-items:center;gap:8px;margin:-2px 0 8px}.whead h3{margin:0;font-size:18px}
.pips{display:inline-flex;gap:3px}.pips i{width:9px;height:9px;border-radius:50%;background:#e6d8b8;border:1px solid #b89b6a}.pips i.on{background:#c08a2e;border-color:#8b6a45}
.whead .cap{font-size:13px;color:#6b5844;background:#f3e6c8;border-radius:9px;padding:1px 7px}
.upbtn{display:flex;align-items:center;gap:8px;width:100%;font:inherit;font-size:14px;padding:8px 12px;border-radius:10px;border:2px solid #5e1d14;background:linear-gradient(#e0533c,#c0392b);color:#fff;cursor:pointer;margin-bottom:8px}
.upbtn svg{width:18px;height:18px}.upbtn b{margin-left:auto}.upbtn:disabled{opacity:.5;cursor:default}
.stor{margin-top:6px}.storh{display:flex;align-items:center;gap:7px;font-size:15px}.storh b{font-size:16px}
.pill{font-size:11.5px;padding:1px 7px;border-radius:9px;background:#efe3c6;color:#4a3824;white-space:nowrap}.pill.red{background:#c0392b;color:#fff}.pill.orange{background:#f3d3a8;color:#7a4a12}.pill.green{background:#d7ecd1;color:#2f5f2a}
.capbar{height:8px;border-radius:4px;background:#efe3c6;border:1px solid #d8c49c;overflow:hidden;margin:5px 0 8px}.capbar i{display:block;height:100%;background:linear-gradient(90deg,#c08a2e,#8b6a45)}.capbar.full i{background:#c0392b}
.gcards{display:flex;flex-direction:column;gap:7px}
.gcard{background:#fff;border:1.5px solid #eadbb6;border-radius:10px;padding:7px 9px}
.gtop{display:flex;align-items:center;gap:8px}.gname{display:flex;flex-direction:column;line-height:1.15;flex:1}.gname small{font-size:11.5px;color:#6b5844}
.gbar{height:4px;border-radius:2px;background:#f1e7cf;margin:6px 0 7px;overflow:hidden}.gbar i{display:block;height:100%;background:#a8763f}
.grow{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.seg{display:inline-flex;border:1.5px solid #d8c49c;border-radius:9px;overflow:visible;background:#f6eedb}
.seg button{display:flex;flex-direction:column;align-items:center;gap:1px;width:46px;padding:4px 2px 3px;border:0;background:transparent;cursor:pointer;border-radius:7px;font:inherit;font-size:10.5px;color:#8b7a5a}.seg button svg{width:22px;height:22px}.seg button.on{color:#2b1d12;font-weight:bold}.seg button svg{opacity:.4}.seg button.on svg{opacity:1}.seg button svg{width:100%;height:100%}
.seg button.on{opacity:1;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.18)}
.minp{display:inline-flex;align-items:center;gap:3px;font-size:13px;color:#4a3824}.minp input{width:56px;font:inherit;font-size:13px;padding:2px 4px;border:1.5px solid #d8c49c;border-radius:6px}
.sellnow{display:inline-flex;align-items:center;gap:4px;margin-left:auto;font:inherit;font-size:12.5px;padding:3px 9px 3px 5px;border-radius:8px;border:1.5px solid #8b6a45;background:#f3e6c8;cursor:pointer}.sellnow svg{width:18px;height:18px}.sellnow:disabled{opacity:.45;cursor:default}
.empty{display:flex;align-items:center;gap:6px;color:#8b7a5a;font-size:13px;margin:4px 0}
.storechip{display:flex;align-items:center;gap:6px;font:inherit;font-size:16px;color:#f3e6c8;background:rgba(0,0,0,.25);border:0;padding:4px 12px 4px 8px;border-radius:20px;cursor:pointer}
.storechip svg{width:22px;height:22px}.storechip .cb{display:inline-block;width:38px;height:6px;border-radius:3px;background:rgba(255,255,255,.2);overflow:hidden}.storechip .cb i{display:block;height:100%;background:#e3c25a}
.storechip.full{background:#c0392b;animation:alertpulse 1.4s ease-in-out infinite}.storechip.full .cb i{background:#fff}
.storepop{position:absolute;top:8px;left:50%;transform:translateX(-50%);width:330px;max-width:calc(100vw - 24px);max-height:calc(100% - 20px);overflow:auto;background:#fffaf0;border:2.5px solid #d6a93a;border-radius:14px;padding:12px 12px 10px;box-shadow:0 12px 30px rgba(0,0,0,.35);z-index:40}
.storepop .x{position:absolute;right:8px;top:6px;border:0;background:none;font-size:20px;cursor:pointer;color:#6b5844}
.mklist{display:flex;flex-direction:column;gap:6px;margin:6px 0 4px}.mkline{display:flex;align-items:center;gap:8px}.mkmid{flex:1;min-width:0}.mkname{display:flex;justify-content:space-between;align-items:center}
.capbar.thin{height:5px;margin:3px 0 2px}.mkmid small{font-size:11.5px;color:#6b5844}.mkmid small b.bad{color:#a8301f}.mkmid small b.good{color:#3f7a3a}
.bbl .whead{padding-right:22px}.bbl .whead .tip{margin-left:4px}
.storepop .storh{padding-right:22px}
#tipbox{position:fixed;z-index:200;max-width:230px;background:#2b1d12;color:#fff7e6;font:13px/1.4 Georgia,serif;padding:7px 10px;border-radius:9px;box-shadow:0 8px 22px rgba(0,0,0,.35);pointer-events:none;opacity:0;transform:translateY(-3px);transition:opacity .12s,transform .12s}
#tipbox.on{opacity:1;transform:none}
.warnline{display:block;color:#a8301f;font-size:11.5px;font-weight:bold;margin-top:1px}
.gcard.idle{border-color:#e7b3a8;background:#fff8f6}
.sellnow{padding:5px 12px;font-weight:bold}

/* ---------- compact storage, phone first ---------- */
.storh{display:flex;align-items:center;gap:6px;font-size:14px;margin-bottom:6px}.storh b{font-size:14px}.storh .gi{width:18px;height:18px}
.gcards{gap:4px}
.gline{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:5px 6px;border:1px solid #eadbb6;border-radius:9px;background:#fff}
.gline.idle{border-color:#e7b3a8;background:#fff8f6}
.gline .gi{width:20px;height:20px}
.gline .gname{flex:1;min-width:70px;display:flex;flex-direction:column;line-height:1.15}.gline .gname b{font-size:13.5px}.gline .gname small{font-size:11px;color:#6b5844}
.gline .warnline{display:inline;font-size:11px;margin:0}
.gline .pill{font-size:11px;padding:1px 6px}
.gline .seg{border-width:1px;border-radius:8px}
.gline .seg button{width:26px;height:24px;padding:3px;display:block}
.gline .seg button svg{width:18px;height:18px}
.gline .sellnow{width:28px;height:26px;padding:3px;margin:0;border-radius:8px;justify-content:center}.gline .sellnow svg{width:18px;height:18px}
.sellgap{width:28px}
.gline .minp{flex-basis:100%;justify-content:flex-end;font-size:12px;color:#6b5844;margin:0}
.gline .minp input{width:52px}
.storechip{padding:4px 10px 4px 6px;font-size:15px}.storechip svg{width:20px;height:20px}
@media (max-width:600px){
  .storepop{left:8px;right:8px;width:auto;transform:none;top:6px;padding:10px 8px 8px}
  .storechip{font-size:13px;padding:3px 8px 3px 5px}.storechip svg{width:17px;height:17px}
}

/* ---------- phone first: most players look in a few times a day on their phone ---------- */
@media (max-width:600px){
  .topbar{gap:6px 8px;padding:5px 8px;border-bottom-width:2px}
  .who{min-width:0;gap:6px}.who small{display:none}.who b{font-size:13px;max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
  .avatar{width:28px;height:28px;border-width:1.5px}
  .money{font-size:14px;gap:4px;padding:2px 8px}.money b{min-width:0}.coin{width:13px;height:13px;border-width:1.5px}.coin.silver{margin-left:4px}
  .mute{width:24px;height:24px;font-size:12px}
  .tabs{margin-left:0;order:9;flex:1 1 240px;min-width:0}.tabs button{flex:1;padding:3px 6px;font-size:13px}
  .speed{order:10;font-size:11px}.speed select{font-size:11px}
  .toasts{left:8px;right:8px;top:auto;bottom:10px;align-items:center}
  .toast{font-size:12.5px;padding:6px 10px;max-width:100%}
  .map-hint{display:none}
  .bbl{width:calc(100vw - 16px);max-width:none;padding:10px 10px 8px}
  .reset{font-size:10px;bottom:4px;left:4px}
}

/* ---------- ships ---------- */
.fleetchip.busy svg{animation:bob 2.4s ease-in-out infinite}
.shipicon.sm{width:34px;height:26px;display:inline-flex;flex:none}.shipicon.sm svg{width:100%;height:100%}
.fline{display:flex;align-items:center;gap:8px;width:100%;text-align:left;font:inherit;padding:6px 8px;margin-bottom:4px;border:1px solid #eadbb6;border-radius:9px;background:#fff;cursor:pointer;color:inherit}
.fline .gname{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.2}.fline .gname b{font-size:13.5px}.fline .gname small{font-size:11.5px;color:#6b5844}
.fline .chev{font-size:20px;color:#b89a68}.fline.locked{opacity:.55;cursor:default}.fline.dest .bad,.risk{color:#a8301f}
.prog{display:block;height:4px;border-radius:2px;background:#efe3c6;overflow:hidden;margin-top:3px}.prog i{display:block;height:100%;background:#2f5f86}.prog.big{height:7px;margin:4px 0 6px}
.fhead{display:flex;align-items:center;gap:7px;margin:-2px 22px 6px 0}.fhead .gname{flex:1;display:flex;flex-direction:column;line-height:1.15}.fhead .gname small{font-size:11px;color:#6b5844}
.fhead .back{font:inherit;font-size:22px;line-height:1;border:0;background:none;cursor:pointer;color:#8b6a45;padding:0 4px}
.sail{display:flex;align-items:center;gap:8px;font-size:14px;margin:4px 0}.sail span{margin-left:auto;font-size:12.5px;color:#6b5844}
.sec{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:bold;color:#8b6a45;text-transform:uppercase;letter-spacing:.04em;margin:10px 0 4px}.sec .tip{margin-left:0}
.mini2{font:inherit;font-size:12px;padding:4px 8px;border-radius:8px;border:1.5px solid #8b6a45;background:#f3e6c8;cursor:pointer;white-space:nowrap}.mini2:disabled{opacity:.45;cursor:default}
.mini2.buy,.mini2.sell{background:linear-gradient(#e0533c,#c0392b);color:#fff;border-color:#5e1d14}
.shipbuy{margin-bottom:4px}
#fleetpop .gline{margin-bottom:4px}
@media (max-width:600px){
  .who > div{display:none}
  .storechip{padding:3px 7px 3px 5px;gap:4px}
  .fleetchip{order:2}
}

.route{margin:6px 0 4px;padding:6px 8px;border:1px solid #d8c49c;border-radius:9px;background:#fbf4e2}
.route.on{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:#eef6ea;border-color:#a9cf9c}.route .rtl{flex:1;font-size:13px;font-weight:bold;min-width:120px}
.route .sec{margin-top:0}
.rstop{display:flex;align-items:center;gap:5px;margin:4px 0}.rstop .num{width:18px;height:18px;border-radius:50%;background:#8b6a45;color:#fff;font-size:11px;display:inline-flex;align-items:center;justify-content:center;flex:none}
.rstop select{font:inherit;font-size:12.5px;padding:3px;border:1px solid #d8c49c;border-radius:6px;background:#fff;min-width:0;flex:1}
.rbtns{display:flex;gap:6px;justify-content:flex-end;margin-top:6px}
.fline small.rt{color:#3f6b3a}.fline small b.good{color:#3f7a3a}.fline small b.bad{color:#a8301f}

/* tabs as icons */
.tabicon{display:inline-flex;align-items:center;justify-content:center;width:38px;height:32px;padding:4px;border:1.5px solid #8b6a45;border-radius:8px;background:transparent;color:#f3e6c8;cursor:pointer}
.tabicon svg{width:22px;height:22px}.tabicon.active{background:#f3e6c8;color:#3a2819}
.tabs{gap:6px}.tabs button.tabicon{padding:4px;flex:none}
.who .tabicon.own{width:32px;height:30px;margin-left:2px}
@media (max-width:600px){ .tabs{flex:none}.tabs button.tabicon{flex:none;width:34px;height:28px}.tabicon svg{width:19px;height:19px}.who .tabicon.own{width:30px;height:28px} }
.storh .gi{color:#3a2819}.storh .pill{margin-left:2px}

/* ---------- possessions dashboard ---------- */
.own{padding:12px}
.dash{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px;max-width:1100px;margin:0 auto}
.dcard{background:#fffaf0;border:1.5px solid #e2cfa6;border-radius:14px;padding:10px 12px;box-shadow:0 2px 8px rgba(60,40,20,.08);text-align:left;font:inherit;color:inherit;min-width:0}
.dcard.link{cursor:pointer}.dcard.link:hover{box-shadow:0 4px 14px rgba(60,40,20,.16)}
.dcard.hero{grid-column:1/-1;display:flex;align-items:center;gap:12px;background:linear-gradient(135deg,#4a3423,#2f2015);color:#f3e6c8;border-color:#6b4a2c}
.dav{width:52px;height:52px;border-radius:50%;overflow:hidden;border:2px solid #d6a93a;background:#f3e6c8;flex:none}.dav svg{width:100%;height:100%}
.dhn{display:flex;flex-direction:column;flex:1;min-width:0}.dhn b{font-size:18px}.dhn small{opacity:.75;font-size:12px}
.dtot{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:3px}.dtot small{font-size:11px;opacity:.75}.dtot b{font-size:22px;color:#f2d36a}
.dh{display:flex;align-items:center;gap:7px;margin-bottom:6px}.dh b{font-size:15px;flex:1}.dh .gi,.dh>svg{width:20px;height:20px;flex:none}.dh .chev{color:#b89a68;font-size:18px}
.wrow{display:flex;align-items:center;gap:10px}.legend2{flex:1;display:flex;flex-direction:column;gap:3px;font-size:12px}
.legend2 div{display:flex;align-items:center;gap:6px}.legend2 i{width:10px;height:10px;border-radius:3px;flex:none}.legend2 span{flex:1;color:#6b5844}
.bars{width:100%;height:auto;display:block}
.chips{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}.chip2{font-size:12px;background:#f3e6c8;border-radius:9px;padding:2px 8px}
.mini3{display:flex;justify-content:space-between;gap:8px;font-size:13px;padding:2px 0;border-top:1px dashed #ecdcb8}.mini3 small{color:#6b5844;white-space:nowrap}
.more{display:block;color:#8b7a5a;font-size:12px;margin:2px 0}
.gicons{display:flex;flex-wrap:wrap;gap:8px}.gicons span{display:flex;flex-direction:column;align-items:center;font-size:11px;color:#6b5844}.gicons .gi{width:24px;height:24px}
.pips.wide i{width:14px;height:8px;border-radius:3px}
/* ---------- profile menu ---------- */
.tb-avatar,#tb-avatar{cursor:pointer}
.profilepop{left:8px;transform:none;width:300px}
.prof{display:flex;align-items:center;gap:10px;margin:0 22px 10px 0}.prof .dhn small{color:#6b5844;opacity:1}
.prow{display:flex;align-items:center;gap:7px;padding:7px 0;border-top:1px solid #eadbb6;font-size:13.5px}.prow>span:first-child{width:96px;flex:none}
.prow input{flex:1;min-width:0;font:inherit;font-size:13px;padding:4px 6px;border:1.5px solid #d8c49c;border-radius:7px}
.prow .flags{display:flex;gap:6px}.prow.danger{color:#a8301f}
.switch{width:42px;height:24px;border-radius:12px;border:0;background:#cfc3a8;position:relative;cursor:pointer}.switch i{position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:left .15s}
.switch.on{background:#3f7a3a}.switch.on i{left:21px}
@media (max-width:600px){ .dash{grid-template-columns:1fr 1fr}.dcard.wealth,.dcard:nth-child(3){grid-column:1/-1}.dtot b{font-size:18px}.profilepop{right:8px;width:auto} }
.tabicon svg{flex:none;min-width:18px;min-height:18px}
.wrow svg{width:112px !important;height:112px !important;flex:none}
.dcard .bars{width:100%;height:78px;display:block}
.dcard{overflow:hidden}
@media (max-width:600px){ .wrow svg{width:96px !important;height:96px !important}.legend2{font-size:11.5px}.legend2 b{white-space:nowrap} }

/* warm sunlight from the upper left and a soft painted vignette over the town */
#view-town::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:2;
  background:radial-gradient(ellipse 90% 70% at 25% 15%,rgba(255,236,190,.22),rgba(255,236,190,0) 60%),radial-gradient(ellipse 120% 100% at 50% 50%,rgba(0,0,0,0) 62%,rgba(40,25,10,.22) 100%)}
.foam{animation:foam 4.5s ease-in-out infinite}.foam.f2{animation-delay:-2.2s}@keyframes foam{0%,100%{opacity:.75}50%{opacity:.2}}
/* memory: fewer animations – lamps glow steadily, one smoke puff per chimney */
.lamp{animation:none !important}
.smoke.d2,.smoke.d3{display:none}

.adminbtn{margin-left:auto;width:30px;height:30px;border-radius:50%;border:2px solid #c0392b;background:#fff3ee;color:#c0392b;font:bold 15px Georgia,serif;cursor:pointer;flex:none}
.adminpop{left:auto;right:8px;transform:none;width:320px}.adminpop .prow{flex-wrap:wrap}.adminpop .prow small{flex:1;color:#6b5844;font-size:12px}
.lvbtns{display:flex;flex-wrap:wrap;gap:4px}.adminpop a{color:#2f5f86}
.adminpop select{font:inherit;font-size:13px}
.bbtn .gi{width:18px;height:18px;vertical-align:-4px;margin-right:2px}
@media (max-width:600px){ .adminbtn{width:26px;height:26px;font-size:13px;order:11}.adminpop{width:auto;left:8px} }

/* ---------- ranking ---------- */
.rankbtn{width:32px;height:30px;border-radius:9px;border:1.5px solid #8b6a45;background:rgba(0,0,0,.2);cursor:pointer;padding:3px;flex:none}.rankbtn svg{width:100%;height:100%}
.segtabs{display:flex;gap:4px;background:#efe3c6;border-radius:10px;padding:3px;margin:6px 0}.segtabs button{flex:1;font:inherit;font-size:13px;padding:5px 6px;border:0;border-radius:8px;background:transparent;cursor:pointer;color:#6b5844}
.segtabs button.on{background:#fff;color:#2b1d12;font-weight:bold;box-shadow:0 1px 4px rgba(0,0,0,.15)}.segtabs.small button{font-size:12px;padding:3px 6px}
.mepos{font-size:13px;color:#6b5844;margin:4px 2px 8px}.mepos b{color:#8e2f22;font-size:15px}
.rlist{display:flex;flex-direction:column;gap:4px}
.rrow{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:10px;background:#fff;border:1px solid #eadbb6}
.rrow.top{background:linear-gradient(90deg,#fff6d8,#fff)}.rrow.me{border:2px solid #c08a2e;background:#fff4d6}
.rmed{width:24px;text-align:center;font-size:18px;flex:none}.rnum{font-size:13px;font-weight:bold;color:#8b7a5a}
.rflag{width:6px;height:28px;border-radius:3px;flex:none}
.rname{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.2}.rname b{font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rname small{font-size:11px;color:#8b7a5a}
.rbar{display:block;height:4px;background:#f1e7cf;border-radius:2px;margin-top:3px;overflow:hidden}.rbar i{display:block;height:100%;background:linear-gradient(90deg,#e3c25a,#c08a2e)}
.rval{font-size:13px;font-weight:bold;white-space:nowrap}
.rankpop{width:340px}
@media (max-width:600px){ .rankbtn{width:28px;height:26px} }

/* ---------- town popup statistics ---------- */
.hudpop{width:300px;max-height:calc(100vh - 150px);overflow:auto}
.tpop .tlv{display:flex;align-items:center;gap:9px}.tlvn{width:34px;height:34px;border-radius:50%;background:linear-gradient(#e3c25a,#c08a2e);color:#3a2819;font:bold 17px Georgia;display:flex;align-items:center;justify-content:center;flex:none;box-shadow:0 2px 5px rgba(0,0,0,.2)}
.tpop .gname{flex:1;display:flex;flex-direction:column;line-height:1.2}.tpop .gname small{font-size:11.5px;color:#6b5844}
.tpop .sec .pill{margin-left:auto;text-transform:none;letter-spacing:0;font-weight:normal}
.tpop .bars{width:100%;height:60px;display:block}
.needs{display:flex;flex-direction:column;gap:3px}.need{display:flex;align-items:center;gap:7px;font-size:12.5px}.need .gi{width:18px;height:18px}.need b{width:44px}.need .capbar{flex:1;margin:0}.need .pill{font-size:11px}
.tlab{font-size:11px;color:#8b7a5a;margin-right:2px;align-self:center}
@media (max-width:600px){ .hudpop{width:calc(100vw - 78px);max-width:none} }
/* shipyard construction kit */
.shipbuy{width:100%;font:inherit;text-align:left;cursor:pointer;flex-wrap:nowrap}.shipbuy .gname{flex:1;min-width:0}.shipbuy.locked{opacity:.55;cursor:default}
.shipbuy .chev{color:#8b6a45}
.yard .ypic{background:linear-gradient(#eaf2f4,#f7efdc);border:1px solid #eadbb6;border-radius:10px;margin:4px 0 6px}
.yard .ypic svg{display:block;width:100%;height:auto;max-height:120px}
.ystats{display:grid;grid-template-columns:repeat(6,1fr);gap:3px;margin-bottom:6px}
.ycell{display:flex;flex-direction:column;align-items:center;font-size:13px;padding:3px 0;border-radius:8px;background:#f6edd8;line-height:1.15}
.ycell b{font-size:12px;color:#3a2819}.ycell.up{background:#d7ecd1}.ycell.up b{color:#2f5f2a}.ycell.down{background:#f6d3cc}.ycell.down b{color:#8e2f22}
.yopts{display:flex;flex-direction:column;gap:4px;margin-bottom:6px}
.yrow{display:flex;align-items:center;gap:4px}
.yic{width:26px;font-size:16px;text-align:center;flex:none;cursor:help}
.seg{font:inherit;font-size:12px;min-width:32px;height:28px;padding:0 6px;border-radius:8px;border:1.5px solid #c9b48c;background:#fff;cursor:pointer;color:#4a3824}
.seg.on{background:#2f5f86;border-color:#1f4363;color:#fff}.seg:disabled{opacity:.35;cursor:default}
.ynum{min-width:24px;text-align:center;font-size:14px}
.sw{width:22px;height:22px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #b9a37a;cursor:pointer;padding:0;flex:none}.sw.on{box-shadow:0 0 0 2px #2f5f86}
.ysep{width:8px}
.crewl{font-size:12px;color:#5a4630;margin:2px 0 4px;cursor:help}
.sellship{margin-top:8px;justify-content:flex-end}
.warn{color:#a86412}
.fline small .good{color:#3f7a3a}.fline small .bad{color:#a8301f}.fline small .warn{color:#a86412}
.seg{display:inline-flex;align-items:center;justify-content:center;line-height:1}.yard .ypic svg{max-height:150px}
.empty svg,.empty .gi svg{width:16px!important;height:16px!important;vertical-align:-3px}
/* full-screen shipyard kit: the town is hidden meanwhile */
.yardview{overflow-y:auto;background:linear-gradient(#f3e6c8,#ead7ae);padding:10px 12px 24px;box-sizing:border-box}
.yardview .yard{max-width:560px;margin:0 auto}
.yardview .ypic{border:0;border-radius:14px;overflow:hidden;box-shadow:0 6px 18px rgba(40,25,10,.28);margin:6px 0 10px;background:#cfe0e6}
.yardview .ypic svg{display:block;width:100%;height:auto;max-height:none}
.yardview .fhead{display:flex;align-items:center;gap:8px}
.yname,.sname{font:inherit;font-weight:bold;font-size:16px;color:#2b1d12;background:transparent;border:0;border-bottom:1px dashed transparent;padding:0;width:100%;min-width:0}
.sname{font-size:14px}
.yname:focus,.sname:focus,.yname:hover,.sname:hover{outline:none;border-bottom-color:#8b6a45}
.yardview .ystats{gap:5px}.yardview .ycell{padding:5px 0;font-size:15px}.yardview .ycell b{font-size:13px}
.yardview .seg{min-width:38px;height:32px}
.yardview .bbtn{margin-top:4px}
.yardview:not(.hidden){display:block}.yardview .ypic svg{max-height:none!important}
.ci{width:20px;height:14px;vertical-align:-2px;display:inline-block}.ycell .ci{width:22px;height:16px}.yic .ci{width:24px;height:17px}.shipbuy small .ci{width:15px;height:11px;vertical-align:-1px}
/* full pages (shipyard, market, guild): the town is hidden meanwhile */
.yardview .page{max-width:560px;margin:0 auto;position:relative}
.yardview .pageback{position:absolute;left:0;top:2px;z-index:1}
.yardview .page>.whead,.yardview .page>h3{padding-left:34px;margin-top:2px}
.yardview .page .whead h3{font-size:20px}
.yardview .page .bbtn{width:100%}
.pageback{font:inherit;font-size:26px;line-height:1;border:0;background:none;cursor:pointer;color:#8b6a45;padding:0 6px}
/* visiting another city */
#view-city{background:#a9c48a}#view-city svg{width:100%;height:100%;touch-action:none}
.cityhud{position:absolute;left:10px;right:10px;top:10px;max-width:420px;background:rgba(255,250,238,.95);border:1px solid #d9c39a;border-radius:12px;padding:6px 10px 8px;box-shadow:0 4px 12px rgba(40,25,10,.2)}
.chud{display:flex;align-items:center;gap:8px}.chud .gname{flex:1}.chud b{font-size:17px}
.chud .back{font:inherit;font-size:24px;line-height:1;border:0;background:none;cursor:pointer;color:#8b6a45;padding:0 4px}
.cityhud .hudtags{margin-top:4px}.cityhud .cinfo{display:block;margin-top:4px;color:#5a4630;font-size:12px}
#view-city .zoom{top:auto;bottom:16px}
#view-city svg{position:absolute;inset:0}#view-city .cityhud{position:absolute;z-index:2}
/* speed (2026-11-29): the town picture only moves via the graphics card while zooming/panning */
#view-town{overflow:hidden}#town{transform-origin:0 0}
#town.moving *{animation-play-state:paused!important}
/* continuous animations repaint the whole big picture every frame – keep only the small ones (ships, gulls, crane, mill) */
#town .smoke,#citysvg .smoke{display:none}

/* speed (2026-11-29, measured): every moving thing in the town forces the browser to re-sort the whole 18,000-part picture
   (~70 ms per frame). The town and visited cities therefore stand still; only the picture as a whole moves on the graphics card. */
/* measured one by one: flags, ship bob, gulls and walkers cost nothing; waves/foam, mill/crane, smoke cost 2-4x – they stay off */
#town .wave,#town .foam,#town .blades,#town .crane,#citysvg .wave,#citysvg .foam,#citysvg .blades,#citysvg .crane{animation:none!important}
#town.moving{will-change:transform}
/* leg/skirt swing ran inside every <use> copy of a walking figure (CSS from outside cannot reach those copies),
   which made the whole town redraw ~11 times a second. The player still bobs while walking (.me-walk). */
.leg1,.leg2,.skirt{animation:none!important}
/* trading posts abroad */
.brplots{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-bottom:6px}
.brplot{flex-direction:column;align-items:flex-start;min-height:46px;justify-content:center;font:inherit;text-align:left}
.brplot b{font-size:13px}.brplot small{display:flex;align-items:center;gap:3px;font-size:11.5px;color:#5a4630}.brplot small .gi svg{width:15px;height:15px}
.brplot.empty{border-style:dashed;cursor:pointer;background:#fbf5e6;align-items:center}.brplot.empty.on{border-color:#2f5f86}
.brplot.buy{cursor:pointer;flex-direction:row;justify-content:space-between;align-items:center;background:#fff8e6}
.brplot.locked{opacity:.45;align-items:center}
.brbuild{grid-column:1/-1;display:flex;flex-direction:column;gap:4px;padding:4px;border:1px solid #c9b48c;border-radius:10px;background:#fffaf0}
.brbuild .gline{font:inherit;text-align:left;cursor:pointer;flex-wrap:nowrap}.brbuild .gname{flex:1}
.seg2{display:inline-flex;gap:3px}.seg2 .seg{min-width:32px;padding:0 4px}.seg2 .seg svg{width:18px;height:18px}
.cityhud .rbtns{margin-top:6px;display:flex}
.brchip svg{width:20px;height:20px}
#brpop .fline{margin-bottom:4px}.brmakes{display:flex;gap:2px;align-items:center}.brmakes .gi svg{width:16px;height:16px}
@media (max-width:600px){ .brchip{order:10}.tabs{flex:1 1 180px} }
/* online: sign-in screen */
#loginscreen{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:16px;background:radial-gradient(circle at 50% 30%,#f6ead0,#d9c39a)}
#loginscreen.hidden{display:none}
.logincard{max-width:380px;width:100%;text-align:center;background:#fffaf0;border:3px solid #d6a93a;border-radius:18px;padding:26px 22px;box-shadow:0 12px 30px rgba(60,40,20,.3)}
.logincard h1{margin:0 0 4px;font-size:30px;color:#2b1d12}.logincard .sub{margin:0 0 18px;color:#6b5844}
.logincard .btn{width:100%}.logincard .note{color:#a8301f;min-height:18px;font-size:13px}.logincard .fine{font-size:12px;color:#8b7a5a;margin:4px 0 0}
/* tablets/phones: every pop-up can be closed, nothing hides the top bar */
#hud-pop-wrap{position:relative}#hud-pop-wrap .hudx{position:absolute;right:6px;top:2px;z-index:2;border:0;background:none;font-size:24px;line-height:1;cursor:pointer;color:#6b5844;padding:4px 8px}
.bubble .bubx{position:absolute;right:4px;top:0;border:0;background:none;font-size:24px;line-height:1;cursor:pointer;color:#6b5844;padding:4px 8px}
.storepop .x,.bbl .close{min-width:36px;min-height:36px}
html,body{overscroll-behavior:none;-webkit-text-size-adjust:100%}
.view,#world{touch-action:none}
/* the close × of every pop-up lies ON TOP of its content (it was covered by the header row and could not be tapped) */
.storepop .x{z-index:5;background:#fffaf0;border-radius:50%;display:flex;align-items:center;justify-content:center}
.storepop .storh,.storepop .fhead{padding-right:34px}
/* iPad/iPhone Safari: 100vh is taller than the visible screen, and the on-screen keyboard (name entry) scrolls the
   page up – afterwards the top bar stayed hidden above the screen. The game screen is now pinned to the visible area. */
html,body{overflow:hidden;height:100%;position:fixed;inset:0;width:100%}
#screen-game{position:fixed;inset:0;height:auto}
@supports (height:100dvh){#screen-game{height:100dvh;bottom:auto}}
.topbar{padding-top:max(5px,env(safe-area-inset-top));padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
#screen-start,#screen-port{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch}
/* the close × of the tutorial bubble: big and clearly visible */
.bubble .bubx{right:-12px;top:-12px;width:40px;height:40px;padding:0;border-radius:50%;background:#8e2f22;color:#fff;border:3px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.4);font-size:26px;line-height:1;display:flex;align-items:center;justify-content:center;font-weight:bold}
.stage{background:#7f9b5a}
/* iPhone: pop-ups and full pages must scroll with one finger (the full pages are .view, which had touch-action:none) */
.storepop,.bbl,.hudpop,#hud-pop-wrap,.yardview,#yardview,.rlist{touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#hud-pop-wrap{max-height:calc(100% - 90px);overflow:auto}
/* one big, clearly visible close button everywhere (Dai: the small arrows were not seen) */
.bigx,.storepop .x,.bbl .close{width:42px!important;height:42px!important;min-width:42px;padding:0!important;border-radius:50%!important;background:#8e2f22!important;color:#fff!important;border:3px solid #fff!important;box-shadow:0 2px 8px rgba(0,0,0,.35);font:bold 26px/1 Georgia,serif!important;display:flex!important;align-items:center;justify-content:center;cursor:pointer;z-index:6}
.bigx{position:sticky;top:0;float:right;margin:0 0 -42px auto}
.bigx.inline{position:static;float:none;margin:0;order:3}
.storepop .x{top:6px!important;right:6px!important}
.bbl .close{position:absolute;top:-14px!important;right:-14px!important}
.storepop .storh,.storepop .fhead{padding-right:50px}
.yardview .page>.whead,.yardview .page>h3{padding-left:0;padding-right:52px}
.yard .fhead{padding-right:52px}
.chud{gap:10px}
.zoom{display:none!important} /* zoom with two fingers or the mouse wheel – no +/- buttons (Dai) */
.bbl .close{top:8px!important;right:8px!important}.bbl #bbl-body>h3:first-child,.bbl #bbl-body>.whead:first-child{padding-right:50px}
.tag.gtip{cursor:pointer;text-decoration:underline dotted;text-underline-offset:2px}
/* household book, bank, guild (2026-11-29) */
.money{cursor:pointer;position:relative}
#tb-trend{font-size:10.5px;font-weight:bold;margin-left:4px;white-space:nowrap}#tb-trend.up{color:#9be08a}#tb-trend.dn{color:#ff9f86}
.bknet{display:flex;justify-content:space-between;align-items:baseline;margin:6px 0 2px}.bknet b{font-size:22px}
.good{color:#3f7a3a}.bad{color:#a8301f}
.bkwarn{background:#fbe3d6;border-radius:8px;padding:6px 8px;font-size:13px;margin:4px 0}
.seg3{display:flex;gap:4px;margin:8px 0 2px}.seg3 button{flex:1;border:1px solid var(--edge,#c9b48a);background:#f3e6c8;border-radius:8px;padding:6px 2px;font:inherit;font-size:13px;cursor:pointer}.seg3 button.on{background:#8e2f22;color:#fff;border-color:#8e2f22}
.bkrow{display:grid;grid-template-columns:minmax(0,1.3fr) 1fr auto;gap:6px;align-items:center;font-size:13px;margin:4px 0}.bkrow>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bkrow>i{display:block;height:9px;background:#efe3c6;border-radius:5px;overflow:hidden}.bkrow>i>i{display:block;height:100%;border-radius:5px}.bkrow b{font-size:12.5px;white-space:nowrap}
.bkship{display:flex;justify-content:space-between;gap:8px;font-size:13.5px;padding:5px 0;border-top:1px solid #efe3c6}
.bform{display:flex;flex-direction:column;gap:6px;margin:4px 0 8px}.bform.row{flex-direction:row;align-items:center}.bform.row input,.bform.row select{flex:1;min-width:0}
.bform input,.bform select{font:inherit;font-size:16px;padding:8px 10px;border:1px solid #c9b48a;border-radius:8px;background:#fffaf0}
.bkst{display:flex;gap:10px;align-items:center;padding:5px 0;border-top:1px solid #efe3c6}.bkst>b{min-width:64px;font-size:13px}
.garms{display:inline-flex;align-items:center;justify-content:center;width:30px;height:34px;border-radius:6px 6px 15px 15px;color:#fff;font-size:16px;flex:0 0 auto;border:2px solid #e3c25a}.garms.big{width:42px;height:48px;font-size:22px}
.ghead{display:flex;gap:10px;align-items:center;margin:6px 0}
.gpick{display:flex;flex-wrap:wrap;gap:6px}.gsw{width:34px;height:34px;border-radius:8px;border:2px solid transparent;cursor:pointer}.gsw.on{border-color:#2b1d12;box-shadow:0 0 0 2px #e3c25a}
.gsym{width:38px;height:38px;border-radius:8px;border:1px solid #c9b48a;background:#fffaf0;font-size:18px;cursor:pointer}.gsym.on{background:#e3c25a}
.gchk{font-size:13px;display:flex;gap:6px;align-items:center}
.gpost{background:#fffaf0;border:1px solid #efe3c6;border-radius:8px;padding:6px 8px;margin:4px 0;font-size:13.5px;overflow-wrap:anywhere}.gpost small{color:#8b7a5f}
.bform .gchk{justify-content:flex-start}.bform .gchk input{flex:0 0 auto;width:22px;height:22px;padding:0;margin:0}
.bknet{padding-right:52px}.bknet b{font-size:20px}
.ownx{position:sticky;top:0;float:right;margin:0 0 -40px auto;z-index:5}
.dcard.fin,.dcard.ships{grid-column:1/-1}
.ftbig{display:flex;justify-content:space-between;align-items:baseline;margin:4px 0}.ftbig b{font-size:22px}
.ftcols{display:grid;grid-template-columns:1fr 1fr;gap:14px}@media (max-width:600px){.ftcols{grid-template-columns:1fr;gap:4px}}
.ftrow{display:flex;justify-content:space-between;gap:8px;font-size:14px;padding:3px 0;border-bottom:1px dotted #e2cfa6}.ftrow.sum{border-bottom:0;border-top:1.5px solid #c9b48a;margin-top:2px;font-weight:bold}
.shrow{padding:8px 0;border-top:1px solid #efe3c6}.shtop{display:flex;gap:8px;align-items:baseline}.shtop small{flex:1;color:#8b7a5f}.shnums{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:13px;margin:3px 0}
/* warehouse as a full page: big rows and buttons (Dai 2026-11-29) */
.storepage{max-width:640px;margin:0 auto}
.storepage .gcards{gap:8px}
.storepage .gline{padding:10px 10px;gap:10px;flex-wrap:wrap;border-radius:12px}
.storepage .gline .gi svg,.storepage .gline>.gi{width:34px;height:34px}
.storepage .gname b{font-size:17px}.storepage .gname small{font-size:14px}
.storepage .pill{font-size:14px;padding:3px 9px}
.storepage .gline .seg button{width:46px;height:42px;padding:7px}
.storepage .sellnow{min-width:46px;min-height:42px;padding:6px 10px}
.storepage .storh{font-size:17px}
.storepage .minp{font-size:15px}.storepage .minp input{font-size:16px;width:70px;padding:6px}
.view svg.ci{width:20px;height:14px}.view .ycell svg.ci{width:22px;height:16px}.view .yic svg.ci{width:24px;height:17px}.view .shipbuy small svg.ci{width:15px;height:11px}
.storepage .fhead,.storepage>.storh,.storepage>.whead{padding-right:58px}
#party.bad .party-title,#party.bad h2{color:#7a2a1a}#party.bad .party-card{border-color:#8e2f22;background:#f6e6dc}
/* world map: one chart to drag and zoom, with a tooltip for ports, ships and pirate seas */
#world{cursor:grab} #world:active{cursor:grabbing}
#maptip{position:absolute;z-index:30;max-width:250px;pointer-events:none;background:#fffaf0;border:2px solid #8a6a40;border-radius:8px;padding:8px 10px;font:14px/1.35 Georgia,serif;color:#2b1d12;box-shadow:0 4px 14px rgba(0,0,0,.35)}
#maptip hr{border:0;border-top:1px solid #d6c39c;margin:6px 0} #maptip .warn{color:#a8301f} #maptip small{color:#5d4630}
/* ship missions: one row of big icon buttons at the top of the ship page */
.mbar{display:flex;gap:6px;margin:8px 0 10px;flex-wrap:wrap}
.mbtn{flex:1 1 0;min-width:46px;height:52px;border-radius:10px;border:2px solid #c9b48a;background:#fbf3e1;font-size:22px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;cursor:pointer;padding:0}
.mbtn i{font-style:normal;font-size:9.5px;color:#5d4630;line-height:1;margin-top:2px;white-space:nowrap}
.mbtn.sel{border-color:#8e2f22;background:#f3dcc0;box-shadow:inset 0 -3px 0 #8e2f22}
.mbtn.cur::after{content:'';position:absolute;top:4px;right:4px;width:9px;height:9px;border-radius:50%;background:#3f8a3a;border:1.5px solid #fff}
.mbtn.nx::after{content:'';position:absolute;top:4px;right:4px;width:9px;height:9px;border-radius:50%;background:#d6a93a;border:1.5px solid #fff}
.mini2.big{font-size:16px;padding:12px 16px;width:100%}
label.chk{display:flex;gap:8px;align-items:flex-start;font-size:14px;margin:6px 0;line-height:1.3} label.chk input{width:20px;height:20px;flex:none}
.frep{border:1px solid #d6c39c;border-radius:8px;padding:6px 8px;margin:6px 0;background:#fffaf0;font-size:13px}
.frep.taken{border-color:#3f8a3a} .frep.beaten{border-color:#a8301f} .frep small{display:block;color:#5d4630}
.frep table{border-collapse:collapse;margin:4px 0;font-size:13px} .frep td{padding:1px 10px 1px 0} .frep tr:first-child td{color:#8a6a40}
.pinfo{background:#fffaf0;border:1px solid #d6c39c;border-radius:10px;padding:2px 12px;margin:8px 0}
.pinfo div{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-top:1px solid #efe3c6;font-size:15px} .pinfo div:first-child{border-top:0} .pinfo span{color:#8b7a5f} .pinfo b{text-align:right}
/* finds of an exploration: revealed one after the other */
.findcard{background:#fffaf0;border:2px solid #d6a93a;border-radius:10px;padding:8px 10px;margin:8px 0;text-align:left;opacity:0;transform:scale(.6) rotateY(80deg);animation:findIn .6s ease-out forwards}
.findcard b{display:block;font-size:17px} .findcard small{display:block;color:#5d4630;font-size:13px;line-height:1.3}
@keyframes findIn{to{opacity:1;transform:none}}
/* storage numbers and keeping goods in stock */
.stnums{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:6px 0 10px}
.stnums div{background:#fffaf0;border:1px solid #d6c39c;border-radius:8px;padding:5px 6px;text-align:center}
.stnums span{display:block;font-size:11px;color:#8b7a5f} .stnums b{font-size:13px;white-space:nowrap}
.refbtn{width:38px;height:38px;border-radius:9px;border:1.5px solid #c9b48a;background:#fbf3e1;font-size:17px;opacity:.55;cursor:pointer;padding:0}
.refbtn.on{opacity:1;border-color:#3f7a3a;background:#e3efd9}
.minp.refl{flex-wrap:wrap} .minp.refl input{width:56px}
.refadd{display:flex;gap:8px;margin:10px 0 4px} .refadd select{flex:1;min-width:0}
/* other merchants: flag dot and the card in a visited city */
.flagdot{display:inline-block;width:14px;height:14px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #8a6a40;vertical-align:middle}
#othercard{position:absolute;left:12px;right:12px;bottom:16px;z-index:40;background:#fffaf0;border:2px solid #8a6a40;border-radius:12px;padding:10px 12px;box-shadow:0 6px 20px rgba(0,0,0,.35);max-width:420px;margin:0 auto}
#othercard .bigx{float:right}
/* mailbox and outposts */
.mailchip{font-size:17px} .mailchip b:empty{display:none} .mailchip.busy b{background:#c0392b;color:#fff;border-radius:9px;padding:0 6px;margin-left:3px}
.mailrow{background:#fffaf0;border:1px solid #d6c39c;border-radius:10px;padding:8px 10px;margin:8px 0} .mailrow.new{border:2px solid #c0392b}
.mailrow .mhead{display:flex;gap:8px;align-items:baseline} .mailrow .mhead b{flex:1} .mailrow .mhead small{color:#8b7a5f} .mailrow p{margin:4px 0;font-size:14px;line-height:1.35} .mic{font-size:18px}
.mfrom{align-self:center;margin-right:auto}
.opmap{background:#5f97b8;border-radius:10px;overflow:hidden;margin:6px 0} .opmap svg{width:100%;height:auto;display:block;touch-action:manipulation}
.findcard.rare{border-color:#c9a23a;box-shadow:0 0 14px rgba(214,169,58,.8);background:#fff6d8}
.note.bad{color:#a8301f;font-weight:bold}
.opmap{position:relative} .opzoom{position:absolute;right:8px;bottom:8px}

/* deposits of an outpost site */
.dep{display:inline-block;margin-right:2px}.dep .gi svg{width:20px;height:20px}.dep.rare{filter:drop-shadow(0 0 3px #f1c40f)}
