:root{
  --bg:#000000;
  --panel:#0a0a0a;
  --panel-2:#101010;
  --line:rgba(212,177,102,.16);
  --line-2:rgba(212,177,102,.32);
  --gold:#d4b166;
  --gold-soft:#f0d39a;
  --text:#f3efe7;
  --muted:#aaa198;
  --discord:#5865f2;
}
*{box-sizing:border-box}
html,body{min-height:100%;margin:0}
body{background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;overflow-x:hidden}
a{color:inherit}
.plain-bg{position:fixed;inset:0;background:radial-gradient(circle at 50% 0%, rgba(212,177,102,.08), transparent 20%), #000;z-index:-1}
.topbar{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid rgba(255,255,255,.05)}
.brand-mark{font:700 .86rem system-ui,sans-serif;letter-spacing:.22em;color:#85795f}
.topbar-actions,.user-actions{display:flex;align-items:center;gap:12px}
.toplink{text-decoration:none;color:#e9e4da;padding:10px 14px;border-radius:10px;background:rgba(255,255,255,.02);border:1px solid rgba(255,255,255,.06);font:500 14px system-ui,sans-serif}
.toplink:hover{background:rgba(255,255,255,.05)}
.toplink.logout{color:#d9cfbf}
.discord-login-min{background:linear-gradient(180deg,#6672ff,#4856e2);border-color:rgba(255,255,255,.08)}
.top-avatar{width:34px;height:34px;border-radius:50%;border:1px solid rgba(255,255,255,.14)}
.top-user{font:500 14px system-ui,sans-serif;color:#cfc7bc}
.landing-shell{min-height:calc(100vh - 72px);display:grid;place-items:center;padding:28px}
.minimal-message{max-width:700px;text-align:center}
.minimal-message p{margin:0;color:#d9d2c7;font-size:1rem}
.minimal-message.muted p{color:#847d74}
.primary-inline{display:inline-block;margin-top:14px;text-decoration:none;color:#f3efe7;border-bottom:1px solid rgba(255,255,255,.3)}
.flash{padding:12px 14px;border:1px solid rgba(239,94,94,.28);background:rgba(125,33,33,.18);color:#ffdada;border-radius:12px;font:14px system-ui,sans-serif}
.flash.success{border-color:rgba(103,201,134,.28);background:rgba(25,95,48,.16);color:#d9ffe5}
.landing-flash{position:fixed;top:88px;left:50%;transform:translateX(-50%);min-width:min(540px,calc(100vw - 24px));max-width:90vw;text-align:center}
.setup-shell{min-height:100vh;display:grid;place-items:center;padding:32px 16px}
.setup-card{width:min(760px,95vw);background:rgba(8,8,8,.97);border:1px solid var(--line);box-shadow:0 20px 60px rgba(0,0,0,.55);padding:2rem;border-radius:20px}
.setup-logo{display:block;width:118px;margin:-60px auto 0;filter:drop-shadow(0 10px 14px rgba(0,0,0,.55))}
.setup-card h1{text-align:center;font-size:2rem;font-family:Georgia,serif;color:var(--gold-soft)}
.setup-lead,.privacy-note,.setup-card p{color:#c4bcaf;line-height:1.6}
.setup-note{background:rgba(212,177,102,.08);border:1px solid rgba(212,177,102,.18);padding:14px 16px;border-radius:12px;margin:18px 0;font-size:14px}
.setup-note code,.setup-card>code{display:block;color:#f4cf83;margin-top:8px;word-break:break-all}
.setup-card label{display:block;font:600 13px system-ui,sans-serif;color:#d5c9b4;margin:14px 0}
.setup-card label small{font-weight:400;color:#928b80}.setup-card input{display:block;width:100%;margin-top:7px;background:#111;color:#fff;border:1px solid #2f2f2f;border-radius:10px;padding:13px 14px;font:15px system-ui,sans-serif;outline:none}
.setup-card input:focus{border-color:var(--gold)}
.primary-button,.setup-card .discord-button{display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:54px;border:none;border-radius:12px;padding:0 20px;background:linear-gradient(180deg,#6672ff,#4654df);color:#fff;font:600 1rem system-ui,sans-serif;cursor:pointer;text-decoration:none;box-shadow:0 10px 24px rgba(36,48,169,.18)}
.primary-button:hover,.setup-card .discord-button:hover{filter:brightness(1.05)}
.app-shell{min-height:calc(100vh - 72px);padding:32px 24px 24px}
.onboarding-wrap{max-width:980px;margin:0 auto;display:grid;grid-template-columns:1.1fr .9fr;gap:28px;align-items:start;padding-top:6vh}
.onboarding-copy{padding-top:20px}
.eyebrow{margin:0 0 10px;font:700 .72rem system-ui,sans-serif;letter-spacing:.22em;color:#8c7a56}
.onboarding-copy h1,.map-overlay h1{margin:0 0 16px;font:600 clamp(2.4rem,5vw,4.4rem) Georgia,serif;line-height:1.02;color:#f0ddbb}
.lead{margin:0;color:#b5aca2;line-height:1.8;font-size:1rem;max-width:640px}
.onboarding-panel{background:linear-gradient(180deg,rgba(14,14,14,.98),rgba(7,7,7,.98));border:1px solid var(--line);border-radius:20px;padding:24px;box-shadow:0 18px 40px rgba(0,0,0,.35)}
.kingdom-form label{display:block;margin:0 0 18px}
.kingdom-form span{display:block;margin-bottom:8px;color:#ddd3c3;font-weight:600;font-size:14px}
.kingdom-form input{width:100%;height:52px;border-radius:12px;border:1px solid rgba(255,255,255,.08);background:#090909;color:#fff;padding:0 16px;font-size:15px;outline:none}
.kingdom-form input:focus{border-color:var(--line-2)}
.form-note{margin:4px 0 18px;color:#8f8679;font-size:.92rem;line-height:1.7}
.map-placeholder{position:relative;min-height:calc(100vh - 72px - 56px);border:1px solid rgba(255,255,255,.04);border-radius:24px;background:
    radial-gradient(circle at 15% 20%, rgba(212,177,102,.06), transparent 20%),
    radial-gradient(circle at 85% 32%, rgba(212,177,102,.04), transparent 16%),
    linear-gradient(transparent 95%, rgba(255,255,255,.03) 95%),
    linear-gradient(90deg, transparent 95%, rgba(255,255,255,.03) 95%),
    #020202;
  background-size:auto,auto,64px 64px,64px 64px,auto;
  overflow:hidden;
}
.map-overlay{position:absolute;top:32px;left:32px;max-width:760px;padding:26px 28px;background:rgba(0,0,0,.45);border:1px solid rgba(212,177,102,.14);border-radius:20px;backdrop-filter:blur(4px)}
.kingdom-meta{display:flex;flex-wrap:wrap;gap:20px;margin:0 0 14px;color:#d8d0c4}
.kingdom-meta span{font-size:.95rem}
.kingdom-meta strong{color:#fff}
.bottom-toolbar{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);display:flex;align-items:center;gap:10px;padding:10px;background:rgba(12,12,12,.94);border:1px solid rgba(255,255,255,.07);border-radius:18px;box-shadow:0 16px 30px rgba(0,0,0,.35)}
.bottom-toolbar button{height:46px;min-width:88px;padding:0 16px;border-radius:12px;border:1px solid rgba(255,255,255,.06);background:#111;color:#eee;font:500 14px system-ui,sans-serif;cursor:pointer}
.bottom-toolbar button:hover{background:#171717}
@media(max-width:900px){.onboarding-wrap{grid-template-columns:1fr;padding-top:16px}.map-overlay{left:16px;right:16px;top:16px;max-width:none}.bottom-toolbar{width:calc(100vw - 20px);overflow:auto;justify-content:flex-start}}
@media(max-width:640px){.topbar{padding:0 12px;height:64px}.brand-mark{font-size:.72rem}.toplink{padding:9px 12px;font-size:13px}.landing-shell{min-height:calc(100vh - 64px)}.app-shell{min-height:calc(100vh - 64px);padding:18px 14px 80px}.landing-flash{top:76px;min-width:calc(100vw - 20px)}.onboarding-copy h1,.map-overlay h1{font-size:2.2rem}.lead{font-size:.95rem}.onboarding-panel{padding:18px}.map-placeholder{min-height:calc(100vh - 64px - 90px)}.kingdom-meta{gap:8px;flex-direction:column}.bottom-toolbar{bottom:10px;padding:8px}.bottom-toolbar button{min-width:78px;height:42px;padding:0 12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* v3.1 — Login/Favicon/Toast fixes */
.login-page{min-height:100vh;background:#000}
.login-wrap{min-height:calc(100vh - 42px);display:grid;place-items:center;padding:4rem 1rem 2rem}
.royal-card{position:relative;width:min(455px,92vw);padding-top:82px;filter:drop-shadow(0 18px 48px rgba(0,0,0,.62))}
.royal-face{position:absolute;width:164px;max-width:40vw;top:0;left:50%;transform:translateX(-50%);z-index:3;filter:drop-shadow(0 10px 16px rgba(0,0,0,.72))}
.card-inner{position:relative;background:linear-gradient(180deg,rgba(12,12,12,.985),rgba(5,5,5,.985));border:1px solid rgba(212,177,102,.42);padding:4.05rem 1.8rem 1.75rem;text-align:center;border-radius:18px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.018),0 20px 60px rgba(0,0,0,.28)}
.card-inner:before{content:"";position:absolute;inset:10px;border:1px solid rgba(212,177,102,.09);border-radius:12px;pointer-events:none}
.ornament{display:flex;align-items:center;gap:10px;color:var(--gold);margin:0 auto .8rem;max-width:210px}
.ornament span{height:1px;flex:1;background:linear-gradient(90deg,transparent,var(--gold),transparent)}
.ornament b{font-size:.7rem}
.login-page h1{font:600 clamp(1.85rem,4vw,2.45rem)/1.04 Georgia,"Times New Roman",serif;letter-spacing:.005em;color:#f0ddbb;margin:.15rem 0 .8rem}
.tagline{text-transform:uppercase;letter-spacing:.13em;color:#a98e60;font-size:.62rem;margin:0 auto 1.5rem;line-height:1.8;max-width:305px}
.tagline i{font-style:normal;color:var(--gold);margin:0 .24rem}
.discord-button{border:1px solid rgba(212,177,102,.52);background:linear-gradient(180deg,#6571fa,#4855dc);color:#fff;text-decoration:none;display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:54px;padding:0 16px;font:600 1rem Georgia,"Times New Roman",serif;box-shadow:inset 0 0 0 2px rgba(13,16,36,.2),0 9px 22px rgba(36,48,169,.16);cursor:pointer;transition:.18s ease;border-radius:11px}
.discord-button:hover{transform:translateY(-1px);filter:brightness(1.045)}
.discord-button svg{width:23px;height:23px}.discord-button b{margin-left:auto;font-size:1.55rem;font-family:Arial,sans-serif;font-weight:300;line-height:1}.discord-button span{margin-left:auto}
.divider{display:flex;align-items:center;gap:12px;color:var(--gold);margin:1.35rem auto .85rem;max-width:250px}.divider span{height:1px;flex:1;background:linear-gradient(90deg,transparent,rgba(212,177,102,.48),transparent)}.divider em{font-style:normal;font-size:.9rem}
.first-login{color:#8f877e;line-height:1.5;font-size:.82rem;margin:0}.first-login strong{color:#cfc0a5;font-weight:600}
.developer-footer{height:42px;display:flex;align-items:center;justify-content:center;color:#6f6961;font:12px system-ui,sans-serif}.developer-footer a{color:#b8aa92;text-decoration:none;border-bottom:1px solid rgba(184,170,146,.25)}.developer-footer a:hover{color:#ead8b5}
.app-toast{position:fixed;z-index:5000;top:86px;right:24px;min-width:280px;max-width:min(420px,calc(100vw - 32px));box-shadow:0 16px 45px rgba(0,0,0,.5);transition:opacity .25s ease,transform .25s ease}.app-toast.is-hiding{opacity:0;transform:translateY(-8px)}

@media(max-width:640px){.login-wrap{padding:3.2rem .8rem 1.5rem}.royal-card{width:min(415px,94vw);padding-top:70px}.royal-face{width:142px}.card-inner{padding:3.55rem 1rem 1.5rem}.app-toast{top:74px;right:10px;min-width:0;width:calc(100vw - 20px)}}

/* v3.2 — Transport-Fever-inspirierte Game-HUD */
.has-toolbar{padding-bottom:112px}
.game-hud{
  position:fixed;
  z-index:1000;
  left:0;
  right:0;
  bottom:0;
  height:86px;
  display:grid;
  grid-template-columns:minmax(310px,1fr) auto minmax(310px,1fr);
  align-items:end;
  background:linear-gradient(180deg,rgba(16,22,29,.2) 0,rgba(16,22,29,.88) 26%,rgba(9,13,18,.97) 100%);
  border-top:1px solid rgba(162,190,216,.28);
  box-shadow:0 -14px 34px rgba(0,0,0,.34);
  backdrop-filter:blur(11px);
  -webkit-backdrop-filter:blur(11px);
}
.hud-status{
  height:86px;
  min-width:0;
  display:flex;
  align-items:center;
  gap:13px;
  padding:11px 22px 10px 18px;
  border-right:1px solid rgba(255,255,255,.06);
  background:linear-gradient(90deg,rgba(22,31,40,.96),rgba(14,20,27,.74),transparent);
}
.hud-crest{
  width:46px;height:46px;border-radius:50%;display:grid;place-items:center;
  border:1px solid rgba(193,214,231,.34);background:rgba(8,14,20,.72);
  color:#e2c47b;font:700 22px Georgia,serif;box-shadow:inset 0 0 0 3px rgba(255,255,255,.025)
}
.hud-status-copy,.hud-status-stat{display:flex;flex-direction:column;min-width:0}
.hud-status-copy span,.hud-status-stat span{font:700 9px/1.2 system-ui,sans-serif;letter-spacing:.13em;color:#7f91a2}
.hud-status-copy strong{margin-top:3px;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 16px/1.2 system-ui,sans-serif;color:#eef3f6}
.hud-status-stat{margin-left:18px;padding-left:18px;border-left:1px solid rgba(255,255,255,.07)}
.hud-status-stat strong{margin-top:3px;white-space:nowrap;font:600 13px/1.2 system-ui,sans-serif;color:#cfd9df}
.hud-tools-wrap{position:relative;align-self:end;padding:0 9px 9px}
.hud-section-title{
  position:absolute;left:13px;bottom:74px;height:26px;min-width:142px;padding:6px 14px 0;
  background:rgba(17,28,39,.92);border:1px solid rgba(162,190,216,.18);border-bottom:0;
  border-radius:7px 7px 0 0;color:#bac8d2;font:600 10px system-ui,sans-serif;letter-spacing:.08em
}
.hud-tools{height:67px;display:flex;align-items:center;gap:12px;padding:8px 13px;background:rgba(18,27,35,.96);border:1px solid rgba(162,190,216,.25);border-radius:10px 10px 0 0;box-shadow:0 -5px 18px rgba(0,0,0,.25)}
.hud-tool{
  width:50px;height:50px;border-radius:50%;display:grid;place-items:center;padding:0;
  color:#e7eef3;background:linear-gradient(180deg,#253746,#172631);border:1px solid rgba(194,213,226,.48);
  box-shadow:inset 0 0 0 3px rgba(6,12,17,.55),0 3px 9px rgba(0,0,0,.28);cursor:pointer;transition:.14s ease
}
.hud-tool svg,.hud-mini svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.hud-tool:hover{transform:translateY(-2px);background:linear-gradient(180deg,#334b5d,#1d303e);color:#fff}
.hud-tool.is-active{color:#f0d56d;border-color:#d2ba60;background:linear-gradient(180deg,#31434c,#1b2b34);box-shadow:inset 0 0 0 3px rgba(6,12,17,.55),0 0 0 2px rgba(210,186,96,.1),0 3px 9px rgba(0,0,0,.28)}
.hud-utility{
  height:86px;display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:13px 20px 10px 22px;
  border-left:1px solid rgba(255,255,255,.06);background:linear-gradient(270deg,rgba(22,31,40,.96),rgba(14,20,27,.74),transparent)
}
.hud-mini{
  width:39px;height:39px;border-radius:50%;display:grid;place-items:center;padding:0;color:#dce5eb;
  background:#182730;border:1px solid rgba(194,213,226,.32);cursor:pointer;box-shadow:inset 0 0 0 2px rgba(6,12,17,.52)
}
.hud-mini svg{width:19px;height:19px;stroke-width:1.8}
.hud-mini:hover{background:#243945;color:#fff}

@media(max-width:1180px){
  .game-hud{grid-template-columns:240px auto 220px}
  .hud-status-stat{display:none}
  .hud-tool{width:46px;height:46px}.hud-tools{gap:8px}.hud-tool svg{width:22px;height:22px}
}
@media(max-width:900px){
  .game-hud{height:78px;grid-template-columns:1fr auto}.hud-status{display:none}.hud-utility{padding-left:12px;padding-right:12px;height:78px}.hud-tools-wrap{padding-bottom:7px}.hud-tools{height:61px;gap:7px;padding:7px 9px}.hud-tool{width:44px;height:44px}.hud-section-title{display:none}.has-toolbar{padding-bottom:98px}
}
@media(max-width:640px){
  .game-hud{display:block;height:72px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;background:rgba(11,17,22,.97)}
  .hud-tools-wrap{display:inline-block;padding:5px 8px 5px 10px;vertical-align:top}.hud-tools{height:62px;border-radius:9px;gap:7px;padding:7px 9px}
  .hud-utility{display:inline-flex;height:72px;padding:8px 12px;vertical-align:top;background:none;border-left:0}.hud-tool{width:44px;height:44px}.hud-mini{width:38px;height:38px}.has-toolbar{padding-bottom:88px}
}

/* v3.3 — clean main login + cache-safe favicon release */
.login-page,
.login-page .plain-bg{
  background:#000 !important;
  background-image:none !important;
}
.login-page .plain-bg{inset:0}
.login-wrap{
  min-height:calc(100vh - 36px);
  padding:2.9rem 1rem 1.25rem;
}
.royal-card{
  width:min(390px,91vw);
  padding-top:64px;
  filter:drop-shadow(0 16px 42px rgba(0,0,0,.65));
}
.royal-face{
  width:126px;
  max-width:34vw;
  top:1px;
}
.card-inner{
  padding:3.15rem 1.35rem 1.35rem;
  border-radius:15px;
}
.card-inner:before{inset:8px;border-radius:10px}
.ornament{max-width:180px;margin-bottom:.6rem}
.login-page h1{font-size:clamp(1.6rem,3.5vw,2.05rem);margin-bottom:.65rem}
.tagline{font-size:.55rem;letter-spacing:.11em;line-height:1.7;max-width:270px;margin-bottom:1.15rem}
.discord-button{min-height:48px;font-size:.92rem;border-radius:10px}
.discord-button svg{width:20px;height:20px}
.divider{margin:1.05rem auto .65rem;max-width:215px}
.first-login{font-size:.75rem;line-height:1.45}
.developer-footer{height:36px;font-size:11px}
@media(max-width:640px){
  .login-wrap{padding:2.5rem .75rem 1rem}
  .royal-card{width:min(365px,94vw);padding-top:57px}
  .royal-face{width:112px}
  .card-inner{padding:2.85rem .95rem 1.2rem}
}


/* v3.4 — developer credit only on login; transparent favicon release */
.login-page .developer-footer{background:#000;color:#6f6961}
.login-page .developer-footer a{color:#b8aa92;text-decoration:none;border-bottom:1px solid rgba(184,170,146,.25)}
.login-page .developer-footer a:hover{color:#ead8b5}
