:root {
  --bg: #050505;
  --panel: #0f0d0c;
  --panel-2: #181412;
  --line: #3b2a1a;
  --text: #d6d0c8;
  --muted: #9a8e80;
  --copper: var(--copper);
  --copper-dark: var(--copper-dark);
  --blood: var(--blood);
  --glow: var(--glow);
  --gold: var(--gold);
  --green: #5fa05a;
  --red: #c2492f;
  --blue: #4f86a8;
  --radius: 10px;
  --soft: #cbb59c; --soft2: #e6cbb0; --dim: #8d7b68; --muted2: #a69885; --hot: #ffb36b; --btn: #6e4018;
  --deep: #0e0c0a; --deep2: #15100c; --hair: #2a1c10; --edge0: #6b4423;
  --glow-rgb: 255,69,0; --copper-rgb: 184,115,51; --blood-rgb: 138,3,3; --panel-rgb: 15,13,12; --panel2-rgb: 26,20,16;
  --bgfx: radial-gradient(circle at center, rgba(42,17,13,.8) 0%, rgba(10,10,10,.95) 60%, #000 100%);
  --btn-grad: linear-gradient(#b87333, #8b5a2b); --btn-ink: #120a04; --topbar: linear-gradient(#000, #0a0605); --input-bg: rgba(5,5,5,.85);
}

html { font-size: 15px; }
html[data-size=klein] { font-size: 15px; }
html[data-size=normal] { font-size: 16.5px; }
html[data-size=gross] { font-size: 18px; }
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bgfx) fixed, var(--bg);
  color: var(--text);
  font: 1.1rem/1.55 "Cormorant Garamond", Georgia, "Palatino Linotype", serif;
}

a { color: var(--gold); }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--deep);
  border-bottom: 2px solid var(--line);
}
.logo { font-size: 1.4rem; font-weight: bold; text-decoration: none; letter-spacing: .04em; }

.layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 20px;
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 16px;
}
.layout.guest { grid-template-columns: 1fr; max-width: 760px; }

.stats, .card, .content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.content { padding: 8px 24px 24px; min-width: 0; }
.stats { padding: 14px 16px; align-self: start; font-size: 1.03rem; }
.stats h2 { margin: 0 0 8px; font-size: 1.1rem; color: var(--gold); }
.stats dl { margin: 0; }
.stats dt { color: var(--muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: .06em; margin-top: 8px; }
.stats dd { margin: 2px 0 0; }

h1 { color: var(--gold); font-size: 1.6rem; margin: 16px 0 12px; }
h2 { font-size: 1.15rem; margin: 18px 0 8px; }
.card { padding: 4px 16px 16px; background: var(--panel-2); }
.card h2 { margin-top: 12px; }

.flavor { font-style: italic; color: var(--muted); }
.muted { color: var(--muted); font-size: 1rem; }
small { color: var(--muted); }

.notice { padding: 10px 14px; border-radius: 8px; border-left: 4px solid var(--blue); background: #1b2a33; }
.notice.error { border-color: var(--red); background: #33201b; }
.notice.success { border-color: var(--green); background: #1d2c1c; }
.notice.dead { border-color: #777; background: #2a2a2a; }

.log { padding: 10px 14px; border-radius: 8px; border-left: 4px solid var(--gold); background: #2b2415; margin-bottom: 12px; }
.log ul { margin: 6px 0 0; padding-left: 20px; }

.bar { position: relative; height: 20px; background: var(--deep); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--green); }
.bar.hp.low .fill { background: var(--red); }
.bar.foe .fill { background: var(--red); }
.bar.exp .fill { background: var(--blue); }
.bar span { position: absolute; inset: 0; text-align: center; font-size: 0.86rem; line-height: 20px; text-shadow: 0 1px 2px #000; }

.menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 16px 0; }
.tile {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; text-decoration: none; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.tile:hover { border-color: var(--gold); }
.tile span { color: var(--muted); font-size: 0.96rem; }
.tile.highlight { border-color: var(--gold); box-shadow: 0 0 10px #d99a6c55; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.btn {
  display: inline-block; padding: 9px 16px; margin: 4px 4px 4px 0;
  background: var(--panel-2); color: var(--text); font: inherit; font-size: 1.05rem;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; text-decoration: none;
}
.btn:hover:not(:disabled) { border-color: var(--gold); }
.btn.primary { background: var(--btn); border-color: var(--gold); }
.btn.danger { background: #5a2418; border-color: var(--red); }
.btn.small { padding: 4px 10px; margin: 0; font-size: 0.96rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--gold); font: inherit; cursor: pointer; text-decoration: underline; }

form.inline { display: inline; margin: 0; }
.actionrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.fightbtns { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

label { display: block; margin: 10px 0; font-size: 1rem; color: var(--muted); }
input {
  display: block; width: 100%; margin-top: 4px; padding: 9px 10px;
  background: var(--deep); color: var(--text); font: inherit;
  border: 1px solid var(--line); border-radius: 8px;
}
input:focus { outline: 2px solid var(--gold); }
.bankform { max-width: 380px; }

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 1.02rem; }
th, td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: .05em; }
tr.own td { background: #2b2415; }
.online { color: var(--green); }
.tag { background: var(--red); color: #fff; border-radius: 4px; padding: 1px 6px; font-size: 0.86rem; }

ul.news { list-style: none; padding: 0; margin: 0; }
ul.news li { padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 1.02rem; }
time { color: var(--muted); font-size: 0.92rem; }

.chat { max-height: 340px; overflow-y: auto; background: var(--deep); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; }
.chat p { margin: 5px 0; font-size: 1.02rem; }
.chatform { display: flex; gap: 8px; margin-top: 10px; }
.chatform input { margin: 0; }

.foot { text-align: center; color: var(--muted); font-size: 0.92rem; padding: 20px; }

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .two, .versus { grid-template-columns: 1fr; }
  .content { padding: 4px 14px 18px; }
}

/* --- Städte, Häuser, Tiere, Spieler-Orte --- */
.topnav { display: flex; gap: 14px; align-items: center; }
.crumbs { color: var(--muted); font-size: 1rem; margin: 8px 0; }
.placeimg { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; }
.placeimg.small { max-width: 260px; }
.rich { margin: 10px 0; }
.rich p { margin: 0 0 10px; }
.placelist { list-style: none; padding: 0; margin: 8px 0; }
.placelist li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.tag.ok { background: var(--green); }
.petcard.active { border-color: var(--gold); box-shadow: 0 0 8px #d99a6c44; }
.petcard h2 small { font-weight: normal; }
input.short { max-width: 260px; display: inline-block; margin: 0; }
input.num { max-width: 110px; display: inline-block; margin: 0; }
textarea {
  display: block; width: 100%; margin-top: 4px; padding: 9px 10px; resize: vertical;
  background: var(--deep); color: var(--text); font: inherit;
  border: 1px solid var(--line); border-radius: 8px;
}
textarea:focus { outline: 2px solid var(--gold); }
label.check { display: flex; gap: 8px; align-items: center; color: var(--text); }
label.check input { width: auto; margin: 0; }
.editform { max-width: 720px; }
details.card summary { cursor: pointer; padding: 10px 0; color: var(--muted); }
td.actions { white-space: nowrap; }
.reason { color: var(--gold); }

/* --- Totenreich, Begegnungen, Admin --- */
.realm { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 10px; }
.realm1 { background: linear-gradient(180deg, #2a2f3a, #1f2430); border-color: #8fb4e3; }
.realm2 { background: linear-gradient(180deg, #3a1b14, #261109); border-color: var(--red); }
.encounter { border-color: var(--gold); box-shadow: 0 0 10px #d99a6c33; }
.adminnav { margin: 6px 0 14px; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; }
.statgrid label { margin: 6px 0; }
.statgrid input, .statgrid select { margin-top: 2px; }
select {
  display: block; width: 100%; padding: 9px 10px; background: var(--deep); color: var(--text); font: inherit;
  border: 1px solid var(--line); border-radius: 8px;
}
.pill { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 0.86rem; background: var(--line); }
.pill.red { background: var(--red); color: #fff; }
.pill.green { background: var(--green); color: #fff; }
.pill.gold { background: var(--gold); color: #1a1208; }
td.nowrap { white-space: nowrap; }
.logdetails { color: var(--muted); font-size: 0.96rem; }

/* Lager vor den Toren */
.campscene { display: flex; justify-content: center; align-items: flex-end; gap: 2.2rem; font-size: 3.2rem; padding: 1.2rem 0 .8rem; margin-bottom: 1rem;
  background: linear-gradient(#141226, #2a1a12); border-radius: 10px; border: 1px solid #3a2b20; }
.camp-fire { font-size: 2.6rem; filter: drop-shadow(0 0 14px #ff9a3c); }
.camp-tent { font-size: 3.6rem; }

/* Abenteurergilde */
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.guildcard { display: flex; gap: 1.2rem; align-items: center; }
.guildcard > div:last-child { flex: 1; }
.rankbadge { flex: 0 0 4.2rem; height: 4.2rem; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: bold;
  border-radius: 50%; border: 3px solid #8a7a5a; background: #1a140e; color: #d8c8a0; }
.rankbadge.rankE, .rankbadge.rankD { border-color: #6aa27a; color: #9ad8aa; }
.rankbadge.rankC, .rankbadge.rankB { border-color: #5a8ac8; color: #9ac0f0; }
.rankbadge.rankA { border-color: #c87a3a; color: #f0b070; }
.rankbadge.rankS { border-color: #e0b830; color: #ffe070; box-shadow: 0 0 14px #e0b83088; }
.questcard h3 { margin-top: 0; }


/* Dungeons */
.dungeon.locked { opacity: .78; }
.dungeon h2 { margin-top: 0; }
.unmet { list-style: none; padding: 0; margin: .4rem 0; color: #c88a7a; }
.dungeon, .guildcard, .questcard { margin-bottom: 1rem; }
.three .questcard { margin-bottom: 0; }

.promo { border-color: var(--gold); box-shadow: 0 0 10px #d99a6c55; }

.racelist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.racecard { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; margin: 0; }
.racecard input { margin-top: .3rem; width: auto; }
.racecard:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }

.item.r1 { border-color: #7d7d7d; } .item.r1 h3 { color: #a8a8a8; }
.item.r2 { border-color: #2f9e50; } .item.r2 h3 { color: #4cc26f; }
.item.r3 { border-color: #3a63b8; } .item.r3 h3 { color: #6a92e0; }
.item.r4 { border-color: #22a8a8; } .item.r4 h3 { color: #3fcaca; }
.item.r5 { border-color: #e0089f; box-shadow: 0 0 8px rgba(224,8,159,.35); } .item.r5 h3 { color: #f24cc0; }
.item.r6 { border-color: #daa520; box-shadow: 0 0 10px rgba(218,165,32,.4); } .item.r6 h3 { color: #f0c040; }
.item.r7 { border-color: #dc3535; box-shadow: 0 0 14px rgba(220,53,53,.5); } .item.r7 h3 { color: #ff6060; }

.steps { display: flex; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; flex-wrap: wrap; }
.steps li { padding: .25rem .8rem; border: 1px solid #3a2f26; border-radius: 999px; color: #8a7a66; font-size: 1rem; }
.steps li.done { color: var(--gold); border-color: var(--copper-dark); }
.steps li.now { background: var(--btn); color: #f3e3c0; border-color: var(--gold); }

.worldbar { margin: 6px 0; padding: 6px 10px; border: 1px solid var(--border, #3a3a4a); border-radius: 6px; background: #ffffff08; font-size: 1rem; }
.chain li.done { color: var(--muted); text-decoration: line-through; }
.chain li.now { font-weight: bold; }

/* Dorfplatz: oben große Tageskacheln, darunter Gruppen mit kompakten Linkzeilen */
.menu.today { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 8px 0 18px; align-items: start; }
.group { padding: 10px 12px; }
.group h2 { margin: 0 0 6px; font-size: 1.05rem; color: var(--gold); letter-spacing: .04em; }
.group nav { display: flex; flex-direction: column; }
.linkrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--text); text-decoration: none; border-bottom: 1px solid #ffffff0d; }
.linkrow:hover { background: var(--panel-2); }
.linkrow strong { font-weight: normal; }
.linkrow.highlight strong { color: var(--gold); }
.badge { font-size: 0.84rem; color: var(--muted); white-space: nowrap; }
.highlight .badge { color: var(--gold); font-weight: bold; }
.tile .badge { align-self: flex-start; }
.stats details { margin-top: 10px; }
.stats summary { cursor: pointer; color: var(--gold); font-size: 0.96rem; }

/* Dorfplatz-Feinschliff */
.menu.today { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 800px) {
  .menu.today { grid-template-columns: 1fr 1fr; }
  header.top { flex-wrap: wrap; gap: 6px 14px; }
  .topnav { flex-wrap: wrap; gap: 6px 12px; }
  .layout { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 480px) {
  .menu.today { grid-template-columns: 1fr; }
}

/* Titelleiste: aufklappbare Fenster für Post und Freunde */
.topnav { position: relative; }
.dd { position: relative; }
.dd summary { list-style: none; cursor: pointer; color: var(--gold); padding: 4px 8px; border-radius: 6px; user-select: none; }
.dd summary::-webkit-details-marker { display: none; }
.dd[open] summary, .dd summary:hover { background: var(--panel-2); }
.bubble { display: inline-block; min-width: 18px; padding: 0 5px; text-align: center; font-size: 0.84rem; font-weight: bold; color: #1a1208; background: var(--gold); border-radius: 9px; }
.bubble.ok { background: #5fae5f; }
.ddpanel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 330px; max-width: 92vw; max-height: 75vh; overflow: auto;
  padding: 12px 14px; background: var(--panel); border: 1px solid var(--gold); border-radius: var(--radius); box-shadow: 0 8px 24px #000a; color: var(--text); }
.ddpanel h3 { margin: 0 0 8px; font-size: 1rem; color: var(--gold); }
.ddrow { margin: 0; padding: 6px 4px; border-bottom: 1px solid #ffffff12; font-size: 0.98rem; }
.ddrow.unread { background: #d99a6c14; border-left: 3px solid var(--gold); padding-left: 8px; }
.ddform { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ddform input, .ddform textarea { width: 100%; box-sizing: border-box; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #555; }
.dot.on { background: #5fae5f; box-shadow: 0 0 6px #5fae5f; }
@media (max-width: 800px) { .dd { position: static; } .ddpanel { left: 8px; right: 8px; width: auto; max-width: none; top: 100%; } header.top { position: relative; } }

.epithet { margin: -10px 0 8px; color: var(--gold); font-style: italic; letter-spacing: .06em; }


/* ===== Abyssguard-Design: Kupfer, Blutrot und Glut ===== */
h1, h2, h3, .stats h2, .group h2 { font-family: Cinzel, "Palatino Linotype", "Book Antiqua", Georgia, serif; }
h1 { color: var(--copper); text-shadow: 0 2px 6px #000; letter-spacing: .02em; }
h2 { color: var(--gold); }
.top { background: var(--topbar); border-bottom: 1px solid var(--copper-dark); box-shadow: 0 2px 14px rgba(var(--blood-rgb),.35); }
.top .logo { display: flex; align-items: center; letter-spacing: 0; }
.top .logo img { height: 40px; width: auto; display: block; filter: drop-shadow(0 2px 8px rgba(var(--blood-rgb),.6)); }
.stats, .card, .content { border-color: var(--copper-dark); }
.content, .stats { background: rgba(var(--panel-rgb),.92); box-shadow: 0 0 15px rgba(var(--copper-rgb),.12), inset 0 0 30px rgba(0,0,0,.8); }
.card { background: rgba(var(--panel2-rgb),.9); }
.btn { font-family: Cinzel, serif; font-size: 0.94rem; letter-spacing: .05em; }
.btn.primary { background: var(--btn-grad); border-color: var(--gold); color: var(--btn-ink); font-weight: bold; text-transform: uppercase; text-shadow: 0 1px 1px rgba(255,255,255,.35); transition: all .25s; }
.btn.primary:hover:not(:disabled) { background: linear-gradient(var(--gold), var(--copper)); color: #fff; border-color: var(--glow); box-shadow: 0 0 18px var(--blood), 0 0 8px var(--glow); text-shadow: 0 1px 2px #000; }
.btn.danger { background: linear-gradient(var(--blood), #5a0202); border-color: var(--glow); color: #fff; }
.btn:hover:not(:disabled) { border-color: var(--glow); }
.tile:hover, .linkrow:hover { border-color: var(--glow); }
input, textarea, select { background: var(--input-bg); border-color: #333; color: #fff; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--copper); box-shadow: 0 0 8px rgba(var(--copper-rgb),.5); }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 30px #0a0a0a inset !important; -webkit-text-fill-color: #f8f8f8 !important; }
a:hover { color: var(--glow); }
.bar.hp .fill { background: linear-gradient(#b01010, #7a0000); }
.bar.hp.low .fill { background: linear-gradient(var(--glow), #b01010); }
.bar.exp .fill { background: linear-gradient(var(--gold), var(--copper-dark)); }
.notice { background: #15110d; border-left-color: var(--copper); }
.log { background: #1a120a; }
.foot { font-family: Marcellus, Georgia, serif; letter-spacing: .12em; color: #888; }

/* Gast-Seiten: Logo-Kopf, kupferne Box mit Ornament-Ecken, Glutfunken */
body.guestpage { min-height: 100vh; background:
  radial-gradient(ellipse at 50% 105%, rgba(var(--blood-rgb),.45) 0%, rgba(60,14,8,.25) 35%, transparent 65%),
  var(--bgfx) fixed, var(--bg); }
.foot a { color: var(--dim); text-decoration: none; } .foot a:hover { color: var(--glow); }
.reportbtn { opacity: .35; font-size: 0.92rem; padding: 0 4px; cursor: pointer; background: none; border: 0; color: inherit; } .reportbtn:hover { opacity: 1; color: var(--glow); }
.legal h2 { margin-top: 26px; } .legal p, .legal li { max-width: 70ch; }
.hero { position: relative; z-index: 1; display: flex; justify-content: center; padding: 34px 16px 6px; }
.hero::before { content: ""; position: absolute; inset: 0 12% 0; background: var(--glow); opacity: .18; filter: blur(70px); border-radius: 50%; }
.hero a { position: relative; width: 100%; max-width: 760px; }
.hero img { position: relative; width: 100%; height: auto; display: block; filter: drop-shadow(0 15px 35px rgba(var(--blood-rgb),.5)); }
.layout.guest { position: relative; z-index: 1; max-width: 900px; }
.layout.guest .content { position: relative; padding: 28px 40px 36px; background: rgba(var(--panel-rgb),.9); backdrop-filter: blur(8px); border-radius: 2px; }
.layout.guest .content h1 { font-size: 2rem; margin-top: 8px; }
.layout.guest .flavor { color: var(--soft2); font-size: 1.2rem; }
.orn { position: absolute; width: 24px; height: 24px; border: 2px solid var(--copper-dark); opacity: .85; pointer-events: none; }
.orn.tl { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.orn.tr { top: -2px; right: -2px; border-left: 0; border-bottom: 0; }
.orn.bl { bottom: -2px; left: -2px; border-right: 0; border-top: 0; }
.orn.br { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.layout.guest .two { gap: 56px; position: relative; }
.layout.guest .two::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: linear-gradient(transparent, var(--copper-dark), transparent); opacity: .6; }
.layout.guest .two .card { background: none; border: 0; padding: 0; }
.layout.guest .two h2 { font-size: 1.2rem; color: var(--gold); border-bottom: 1px solid #2a2a2a; padding-bottom: 6px; margin: 0 0 14px; }
.layout.guest .two label { font-family: Cinzel, serif; font-size: 0.84rem; text-transform: uppercase; letter-spacing: .08em; color: #9ca3af; }
.layout.guest .two .btn.primary { padding: 11px 26px; margin-top: 10px; }
.embers { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ember { position: absolute; bottom: -10px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 8px 3px var(--glow), 0 0 15px 4px var(--blood); opacity: 0; animation: floatUp 5s infinite ease-in; }
@keyframes floatUp { 0% { transform: translate(0,0) scale(1); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; transform: translate(20px,-80vh) scale(.8); } 100% { transform: translate(-20px,-100vh) scale(.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ember { animation: none; opacity: 0; } }
@media (max-width: 800px) {
  .layout.guest .content { padding: 20px 18px 26px; }
  .layout.guest .two { gap: 28px; }
  .layout.guest .two::before { display: none; }
  .top .logo img { height: 32px; }
}
input[type=radio], input[type=checkbox] { accent-color: var(--copper); }
.layout.guest .content { border: 1px solid var(--copper); }


/* ===== Feinschliff v0.1 ===== */
:root { --edge: var(--edge0); }
.stats, .card, .content, .group, .tile { border-color: var(--edge); border-radius: 4px; }
.card, .tile, .group { border-radius: 3px; }
.content { border-top: 2px solid var(--copper-dark); position: relative; }
.stats { border-top: 2px solid var(--copper-dark); }
.top { padding: 8px 22px; }
.topnav a, .topnav button.link, .dd summary { font-family: Cinzel, "Palatino Linotype", Georgia, serif; font-size: 0.92rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--soft); transition: color .2s, text-shadow .2s; }
.topnav a:hover, .topnav button.link:hover, .dd summary:hover { color: var(--glow); text-shadow: 0 0 10px rgba(var(--glow-rgb),.7); background: none; }
.dd[open] summary { color: var(--glow); background: none; }
.topnav { gap: 20px; }
h1 { color: var(--copper); font-size: 1.7rem; padding-bottom: 10px; margin-bottom: 16px; background: linear-gradient(90deg, var(--copper-dark), transparent 70%) bottom / 100% 1px no-repeat; }
h2 { color: var(--gold); }
.card h2, .card h3, .group h2 { color: var(--gold); }
.stats h2 { color: var(--copper); }
.stats dt { color: var(--dim); }
.tile { background: rgba(var(--panel2-rgb),.85); }
.tile:hover { box-shadow: 0 0 14px rgba(var(--glow-rgb),.25); }
.tile strong { font-family: Cinzel, Georgia, serif; font-size: 1.05rem; letter-spacing: .03em; }
.linkrow { border-bottom-color: var(--hair); }
.muted, small, .flavor { color: var(--muted2); }
.notice { border-radius: 2px; }
.foot { padding: 26px 20px 30px; font-size: 0.9rem; text-transform: uppercase; }
.foot .ver { color: var(--copper); }
.campscene { background: linear-gradient(#0c0a12, #2a1409); border-color: var(--edge); }
.campscene span, .campscene { filter: saturate(.85); }
/* Gast-Seiten: kleineres Logo */
.hero { padding-top: 26px; }
.hero a { max-width: 520px; }
.hero::before { inset: 10% 20% 0; }
.layout.guest .content { border-top-width: 1px; }
.layout.guest h1 { background: none; padding: 0; }
@media (max-width: 800px) { .hero a { max-width: 82%; } .topnav { gap: 10px 14px; } }
.foot .ver { text-transform: none; letter-spacing: .08em; }

/* Reiter (Gilde/Clan, Marktplatz) */
.tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 16px;border-bottom:1px solid var(--edge);padding-bottom:0}
.tabs .tab{display:inline-block;padding:8px 16px;border:1px solid var(--edge);border-bottom:0;border-radius:6px 6px 0 0;background:var(--deep2);color:var(--soft);text-decoration:none;font-family:'Cinzel',serif;font-size:0.92rem;letter-spacing:.08em}
.tabs.sub{margin-top:-4px}
.tabs.sub .tab{font-size:.84rem;padding:6px 14px}
.tabs .tab:hover{color:#fff;background:#18110b}
.tabs .tab.on{background:linear-gradient(#2a1a0e,var(--deep2));color:var(--hot);box-shadow:0 -2px 0 var(--copper) inset}

/* Drei Spalten: Held | Szene und Text | Aktionen */
.layout.has-menu { grid-template-columns: 250px minmax(0, 1fr) 290px; max-width: 1500px; }
.layout.has-menu .stats, .layout.has-menu .actions { position: sticky; top: 12px; }
.actions { align-self: start; padding: 14px; background: rgba(var(--panel-rgb),.92); border: 1px solid var(--copper-dark); border-radius: 6px; box-shadow: 0 0 15px rgba(var(--copper-rgb),.12), inset 0 0 30px rgba(0,0,0,.8); max-height: calc(100vh - 24px); overflow-y: auto; }
.actions h3 { font-family: Cinzel, serif; font-size: 0.86rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 14px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--hair); }
.actions h3:first-child { margin-top: 0; }
.actions .quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.actions .qk { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 9px 4px; min-height: 40px; border: 1px solid var(--edge); border-radius: 6px; background: var(--deep2); color: var(--soft2); text-decoration: none; font-size: 0.9rem; line-height: 1.25; }
.actions .qk strong { font-family: Cinzel, serif; font-weight: 600; letter-spacing: .04em; }
.actions .qk:hover, .actions .qk.on { border-color: var(--glow); color: #fff; }
.actions .qk.highlight { border-color: var(--glow); box-shadow: 0 0 10px #ff450044; }
.actions .badge { font-style: normal; font-size: 0.8rem; background: var(--blood); color: #fff; border-radius: 8px; padding: 1px 7px; margin-top: 3px; }
.actions .who { margin: 0; padding: 0; list-style: none; font-size: 0.98rem; }
.actions .who li { padding: 2px 0; }
.actions details.g { border: 1px solid var(--hair); border-radius: 6px; margin-bottom: 6px; background: var(--deep2); }
.actions details.g summary { cursor: pointer; padding: 8px 10px; font-family: Cinzel, serif; font-size: 0.92rem; letter-spacing: .08em; color: var(--soft2); list-style: none; }
.actions details.g summary::-webkit-details-marker { display: none; }
.actions details.g[open] summary { border-bottom: 1px solid var(--hair); color: var(--hot); }
.actions .row { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 12px; color: var(--soft); text-decoration: none; font-size: 1rem; border-bottom: 1px dotted var(--hair); }
.actions .row:last-child { border-bottom: 0; }
.actions .row:hover, .actions .row.on { background: #1a120c; color: #fff; }
.actions .row.highlight span { color: var(--hot); }
.actions .row .badge { margin: 0; white-space: nowrap; }

/* Szenenbild */
.scene { margin: 4px 0 14px; height: 230px; position: relative; overflow: hidden; border: 1px solid var(--edge); border-radius: 6px; }
.scene svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene figcaption { position: absolute; left: 14px; bottom: 10px; font-family: Cinzel, serif; letter-spacing: .12em; text-transform: uppercase; color: var(--soft2); text-shadow: 0 2px 6px #000, 0 0 14px #000; font-size: 0.92rem; }
.scene.district { height: 190px; }
.scene.slim, .scene.district.slim { height: 88px; }
.scene.slim figcaption { font-size: .8rem; bottom: 6px; }
.scene.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 1150px) {
  .layout.has-menu { grid-template-columns: 220px minmax(0, 1fr); }
  .layout.has-menu .actions { grid-column: 1 / -1; position: static; max-height: none; }
  .layout.has-menu .actions .quick { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .layout.has-menu { grid-template-columns: 1fr; }
  .layout.has-menu .stats { position: static; }
  .scene { height: 170px; }
  .scene.district { height: 130px; }
}

/* Lebensbalken: Farbe nach Zustand */
.bar.hp.hp-5 .fill { background: linear-gradient(#37b24a, #1f7a2e); }
.bar.hp.hp-4 .fill { background: linear-gradient(#8fcf2a, #5c9a14); }
.bar.hp.hp-3 .fill { background: linear-gradient(#e6cf2a, #a89412); }
.bar.hp.hp-2 .fill { background: linear-gradient(#f59a22, #b8600a); }
.bar.hp.hp-1 .fill { background: linear-gradient(#ff4a2a, #a80d0d); animation: hppulse 1.4s ease-in-out infinite; }
@keyframes hppulse { 50% { filter: brightness(1.35); } }
@media (prefers-reduced-motion: reduce) { .bar.hp.hp-1 .fill { animation: none; } }
.hpwarn { display: block; margin-top: 4px; color: var(--hot); font-size: 0.9rem; }
.actions .who { max-height: 190px; overflow-y: auto; }

/* Manabalken: blau, mit sinkendem Mana heller bis fast weiß */
.bar.mp.mp-5 .fill { background: linear-gradient(#2f6fe0, #1a3f9a); }
.bar.mp.mp-4 .fill { background: linear-gradient(#4f8cf0, #2c5fc0); }
.bar.mp.mp-3 .fill { background: linear-gradient(#7fb0f5, #4a82d8); }
.bar.mp.mp-2 .fill { background: linear-gradient(#b7d4fa, #8ab4ec); }
.bar.mp.mp-1 .fill { background: linear-gradient(#ffffff, #dbe9fb); box-shadow: 0 0 8px #ffffff88; }
.bar.mp span { text-shadow: 0 0 3px #000, 0 1px 2px #000; }
.rankbadge.rankSS { border-color: #f0a040; color: #ffd890; box-shadow: 0 0 16px #f0a04099; }
.rankbadge.rankSSS { border-color: #ff6a30; color: #ffd0a8; box-shadow: 0 0 20px #ff6a30aa; font-size: 1.7rem; }
.rankbadge.rankEX { border-color: #e8e8ff; color: #fff; background: radial-gradient(#3a1a5a, #0a0510); box-shadow: 0 0 24px #c8a0ffcc, inset 0 0 14px #8a4acc; font-size: 1.9rem; }

/* Bosskampf: angekündigter Großangriff */
.notice.warn { border-color: #ff8a3d; background: #2a1409; color: #ffd2a8; box-shadow: 0 0 12px #ff450033; }

/* Dungeons: kompakte Karten, Laufansicht */
.card.compact{padding:12px 16px}
.card.compact h3{margin:0 0 4px}
.card.compact.cleared{opacity:.85}
details.more summary{cursor:pointer;color:var(--gold);font-size:0.96rem;margin:4px 0}
details.more .flavor{margin:6px 0}
.floormap{list-style:none;margin:10px 0 14px;padding:0}
.floormap li{display:flex;gap:12px;align-items:center;padding:4px 8px;border-left:3px solid transparent;color:var(--muted)}
.floormap li.now{border-left-color:var(--copper);background:rgba(var(--glow-rgb),.07);color:inherit}
.floormap li.done{opacity:.7}
.floormap .fl{min-width:5.5em;font-family:'Cinzel',serif;font-size:0.92rem;letter-spacing:.06em}
.chapters{margin:6px 0 10px 18px;padding:0}
.chapters li.done{color:var(--gold)}

.trader h2 small { font-weight: normal; font-size: 0.86rem; }
.shoplist { list-style: none; padding: 0; margin: 0; }
.shoplist li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.shoplist input.qty { width: 3.5rem; }
ul.news time { color: var(--muted, #888); font-size: 0.92rem; margin-right: .4em; }

/* ===== Footer ===== */
.foot { line-height: 1.7; }
.foot .copy { margin: 0 0 18px; }
.foot .legalnav { margin: 0; padding-top: 14px; border-top: 1px solid var(--hair); display: inline-block; min-width: 220px; }
.foot .themes { margin: 0 0 14px; font-size: .9rem; text-transform: none; letter-spacing: .04em; }
.foot .themes a.on { color: var(--glow); }

/* ===== Einstellungen ===== */
.themeopts { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 14px; }
.themeopt { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border: 1px solid var(--edge); border-radius: 6px; background: var(--deep2); cursor: pointer; color: var(--text); }
.themeopt:has(input:checked) { border-color: var(--glow); box-shadow: 0 0 10px rgba(var(--glow-rgb), .35); }
.themeopt .sw { display: inline-block; width: 38px; height: 22px; border-radius: 4px; border: 1px solid #fff3; }
.sw.glut { background: linear-gradient(90deg, #8a0303, #ff4500 55%, #b87333); }
.sw.eis { background: linear-gradient(90deg, #0a2a50, #00e5ff 55%, #a0b0c0); }
.sw.smaragd { background: linear-gradient(90deg, #0a3a1a, #00ff66 55%, #d4af37); }
.sw.asche { background: linear-gradient(90deg, #050608, #4a5361 45%, #d8e1ed); }

/* ===== Themen ===== */
html[data-theme=eis] {
  --bg: #02050a; --panel: #07101c; --panel-2: #0c1828; --line: #1d3550; --text: #e0f0ff; --muted: #8fa6bd; --muted2: #9db3c8;
  --copper: #5fa8d8; --copper-dark: #2f6c9a; --blood: #0a4c8a; --glow: #00e5ff; --gold: #a0c8e8; --soft: #b8d0e6; --soft2: #e0f0ff;
  --dim: #7f95aa; --hot: #7fe8ff; --btn: #1d4468; --deep: #040b14; --deep2: #081423; --hair: #14283d; --edge0: #3a5f82; --edge: #3a5f82;
  --glow-rgb: 0,229,255; --copper-rgb: 95,168,216; --blood-rgb: 10,76,138; --panel-rgb: 6,14,26; --panel2-rgb: 10,22,40;
  --bgfx: radial-gradient(circle at center, rgba(0,150,255,.15) 0%, rgba(10,30,60,.5) 40%, #02050a 80%);
  --btn-grad: linear-gradient(135deg, #203040, #607080 50%, #203040); --btn-ink: #e0f0ff; --topbar: linear-gradient(#02060c, #07101c); --input-bg: rgba(0,5,15,.7);
}
html[data-theme=smaragd] {
  --bg: #020a05; --panel: #07120a; --panel-2: #0c1d10; --line: #1d4a28; --text: #d0f0d0; --muted: #8fb08f; --muted2: #9cc09c;
  --copper: #d4af37; --copper-dark: #aa8000; --blood: #0e5a24; --glow: #00ff66; --gold: #e6c866; --soft: #c8e0b8; --soft2: #f3e5ab;
  --dim: #7fa07f; --hot: #f3e5ab; --btn: #1c4a26; --deep: #040d07; --deep2: #08160c; --hair: #143020; --edge0: #6a7a30; --edge: #6a7a30;
  --glow-rgb: 0,255,102; --copper-rgb: 212,175,55; --blood-rgb: 14,90,36; --panel-rgb: 5,18,10; --panel2-rgb: 9,28,15;
  --bgfx: radial-gradient(circle at center, rgba(0,255,100,.15) 0%, rgba(10,40,20,.5) 40%, #020a05 80%);
  --btn-grad: linear-gradient(135deg, #102a15, #2a5030 50%, #102a15); --btn-ink: #f3e5ab; --topbar: linear-gradient(#010603, #07120a); --input-bg: rgba(0,15,5,.7);
}
html[data-theme=asche] {
  --bg: #050608; --panel: #0e1116; --panel-2: #14171d; --line: #2f3640; --text: #cdd6e3; --muted: #8394a8; --muted2: #9ab0c8;
  --copper: #9ab0c8; --copper-dark: #4a5361; --blood: #222731; --glow: #d8e1ed; --gold: #d8e1ed; --soft: #b6c4d6; --soft2: #eaf0fa;
  --dim: #68788c; --hot: #ffffff; --btn: #262c37; --deep: #07090c; --deep2: #0c0f13; --hair: #1f2530; --edge0: #3b4350; --edge: #3b4350;
  --glow-rgb: 216,225,237; --copper-rgb: 154,176,200; --blood-rgb: 34,39,49; --panel-rgb: 14,17,22; --panel2-rgb: 20,23,31;
  --bgfx: radial-gradient(ellipse at 50% 20%, rgba(35,48,66,.35) 0%, rgba(14,18,24,.7) 45%, #050608 85%);
  --btn-grad: linear-gradient(135deg, #171b22 0%, #262c37 50%, #15181e 100%); --btn-ink: #d8e1ed; --topbar: linear-gradient(#030405, #0e1116); --input-bg: rgba(7,9,12,.92);
}
html[data-theme=eis] .notice, html[data-theme=smaragd] .notice, html[data-theme=asche] .notice { background: var(--deep2); }
html[data-theme=eis] .log, html[data-theme=smaragd] .log, html[data-theme=asche] .log { background: var(--deep2); }
html[data-theme=eis] .foot a, html[data-theme=smaragd] .foot a, html[data-theme=asche] .foot a { color: var(--dim); }
html[data-theme=eis] .btn.primary, html[data-theme=smaragd] .btn.primary, html[data-theme=asche] .btn.primary { text-shadow: 0 1px 1px #000; }
html[data-theme=eis] .btn.danger, html[data-theme=smaragd] .btn.danger, html[data-theme=asche] .btn.danger { background: linear-gradient(#8a0303, #5a0202); color: #fff; border-color: #ff4500; }
html[data-theme=eis] input, html[data-theme=eis] textarea, html[data-theme=eis] select, html[data-theme=smaragd] input, html[data-theme=smaragd] textarea, html[data-theme=smaragd] select, html[data-theme=asche] input, html[data-theme=asche] textarea, html[data-theme=asche] select { border-color: var(--edge0); color: var(--text); }

/* Anmeldeseite: Eissplitter und Runenringe statt Glut */
.shard { position: absolute; bottom: -50px; background: linear-gradient(135deg, rgba(255,255,255,.85), rgba(0,229,255,.4)); opacity: 0; animation: floatShard linear infinite; }
@keyframes floatShard { 0% { transform: translateY(0) translateX(0) rotate(0) scale(.5); opacity: 0; } 15% { opacity: .7; } 85% { opacity: .5; } 100% { transform: translateY(-120vh) translateX(150px) rotate(180deg) scale(1.2); opacity: 0; } }
.runes { position: fixed; top: 50%; left: 50%; width: 110vmin; height: 110vmin; margin: -55vmin 0 0 -55vmin; pointer-events: none; z-index: 0; animation: runepulse 8s ease-in-out infinite; }
.rring { position: absolute; top: 50%; left: 50%; border-radius: 50%; }
.rring b { position: absolute; left: 50%; top: 50%; font-weight: normal; font-family: serif; }
.rring.o { width: 105vmin; height: 105vmin; margin: -52.5vmin 0 0 -52.5vmin; animation: spinr 220s linear infinite; color: #00ff66; text-shadow: 0 0 10px #00ff66; font-size: 2.5vmin; border: 1px solid rgba(0,255,100,.1); }
.rring.m { width: 76vmin; height: 76vmin; margin: -38vmin 0 0 -38vmin; animation: spinl 150s linear infinite; color: #8fbc8f; text-shadow: 0 0 8px #8fbc8f; font-size: 2vmin; border: 1px dashed rgba(143,188,143,.2); }
.rring.i { width: 46vmin; height: 46vmin; margin: -23vmin 0 0 -23vmin; animation: spinr 100s linear infinite; color: #d4af37; text-shadow: 0 0 15px #d4af37; font-size: 1.8vmin; border: 2px solid rgba(212,175,55,.15); }
@keyframes spinr { to { transform: rotate(360deg); } } @keyframes spinl { to { transform: rotate(-360deg); } }
@keyframes runepulse { 0%, 100% { opacity: .15; } 50% { opacity: .4; } }
.wisp { position: absolute; bottom: -10vh; border-radius: 50%; opacity: 0; animation: floatUp 12s infinite linear; }
@media (prefers-reduced-motion: reduce) { .shard, .rring, .runes, .wisp { animation: none; } }
.shoplist .actionrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.shoplist .actionrow > .muted:last-of-type { margin-left: auto; }
.themeopt input { width: auto; padding: 0; margin: 0; }

/* Avatare und Bewohnerliste */
.av { border-radius: 22%; object-fit: cover; border: 1px solid var(--edge); vertical-align: middle; background: var(--deep2); flex: none; }
.av0 { display: inline-flex; align-items: center; justify-content: center; color: var(--gold); font-weight: bold; }
.herohead { display: flex; align-items: center; gap: 10px; }
.herohead .av { border-color: var(--gold); }
.who li { display: flex; align-items: center; gap: 6px; }
table.residents { width: 100%; border-collapse: collapse; }
table.residents td, table.residents th { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--hair); }
table.residents td.who { display: flex; align-items: center; gap: 8px; border-bottom: 0; }
table.residents tr.off { opacity: .65; }
.avedit { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }


/* Clanbanner */
.clanbanner { display: block; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line, #444); margin: 0 0 10px; }
.claninfo .clanbanner { margin-bottom: 12px; }

/* Wohnviertel */
.chatbox { max-height: 260px; overflow-y: auto; margin: 0 0 10px; padding: 8px 12px; background: var(--deep2); border: 1px solid var(--edge); border-radius: 8px; }
.chatbox p { margin: 4px 0; }
.chatbox time { color: var(--soft); font-size: .85em; }
.furn { list-style: none; padding: 0; margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.card.room textarea, .card textarea { width: 100%; box-sizing: border-box; }

/* Countdown bis zum nächsten Tag – rein per CSS (kein JavaScript), ohne calc()/round() in Zählern (läuft so auch in Firefox) */
@property --h { syntax: '<integer>'; inherits: true; initial-value: 0; }
@property --m { syntax: '<integer>'; inherits: true; initial-value: 0; }
@property --s { syntax: '<integer>'; inherits: true; initial-value: 0; }
@keyframes cds { from { --s: 59; } to { --s: -1; } }
@keyframes cdm { from { --m: 59; } to { --m: -1; } }
@keyframes cdh { from { --h: 99; } to { --h: -1; } }
@keyframes cdend { from { --h: 0; --m: 0; --s: 0; } to { --h: 0; --m: 0; --s: 0; } }
.cd { animation: cds 60s steps(60, end) var(--sd) infinite, cdm 3600s steps(60, end) var(--md) infinite, cdh 360000s steps(100, end) var(--hd) forwards, cdend 1s steps(1, end) var(--rest) forwards; counter-reset: h var(--h) m var(--m) s var(--s); font-variant-numeric: tabular-nums; }
.cd .cd-static { display: none; }
.cd::after { content: counter(h, decimal-leading-zero) ":" counter(m, decimal-leading-zero) ":" counter(s, decimal-leading-zero); }

/* Erfolgs-Popup unten rechts (wie bei Steam) */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { display: flex; gap: 12px; align-items: center; width: min(340px, calc(100vw - 32px)); padding: 12px 14px; background: #14100c; color: #f0e6d2; border: 1px solid #daa520; border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.6), 0 0 14px rgba(218,165,32,.3); text-decoration: none; opacity: 0; transform: translateX(120%); animation: toastin 8s ease forwards; animation-delay: var(--delay, 0s); pointer-events: auto; }
.toast .ti { font-size: 28px; }
.toast small { display: block; color: #daa520; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.toast em { display: block; font-style: normal; color: #bda98a; font-size: 13px; }
@keyframes toastin { 0% { opacity: 0; transform: translateX(120%); } 6% { opacity: 1; transform: none; } 88% { opacity: 1; transform: none; visibility: visible; } 100% { opacity: 0; transform: translateX(120%); visibility: hidden; } }

/* Seltenheitsfarben als Textklassen (Schmiedetabelle u. a.) */
.r1 { color: #a8a8a8; } .r2 { color: #4cc26f; } .r3 { color: #6a92e0; } .r4 { color: #3fcaca; } .r5 { color: #f24cc0; } .r6 { color: #f0c040; } .r7 { color: #ff6060; }

/* Beutel: Filter-Chips und Vergleich */
.chip { display: inline-block; padding: 2px 10px; margin: 2px 2px; border: 1px solid #5a4630; border-radius: 12px; color: #cdb892; text-decoration: none; font-size: 13px; }
.chip.on { background: #5a4630; color: #fff; }
.cmp-up { color: #5fd07f; } .cmp-down { color: #e86a6a; }
.small { font-size: 13px; }
/* Mouseover-Vergleich in der Ausrüstung (ohne JavaScript; auch per Tastatur oder Antippen) */
.tip { position: relative; cursor: help; outline: none; display: block; }
.tip-hint { color: var(--copper); font-size: .8em; opacity: .8; }
.tip-box { display: none; position: absolute; left: 0; top: 100%; z-index: 30; min-width: 220px; max-width: 300px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--copper); border-radius: 4px; box-shadow: 0 6px 20px rgba(0,0,0,.7); font-size: 14px; line-height: 1.45; color: var(--text, #d8cbb8); }
.tip-box hr { border: 0; border-top: 1px solid #3a2e24; margin: 6px 0; }
.tip:hover .tip-box, .tip:focus .tip-box, .tip:focus-within .tip-box { display: block; }

/* ===== Thema „Schwarze Asche“ (Portal der Schatten): Silber auf Obsidian, Runenringe, Aschefunken ===== */
html[data-theme=asche] .rring.o { color: #d8e1ed; text-shadow: 0 0 14px rgba(216,225,237,.7); border-color: rgba(154,176,200,.12); }
html[data-theme=asche] .rring.m { color: #9ab0c8; text-shadow: 0 0 10px rgba(154,176,200,.5); border-color: rgba(154,176,200,.25); }
html[data-theme=asche] .rring.i { color: #68788c; text-shadow: 0 0 15px rgba(104,120,140,.6); border-color: rgba(154,176,200,.18); }
html[data-theme=asche] .runes { animation-name: runepulse2; }
@keyframes runepulse2 { 0%, 100% { opacity: .22; filter: drop-shadow(0 0 15px rgba(154,176,200,.08)); } 50% { opacity: .55; filter: drop-shadow(0 0 35px rgba(216,225,237,.25)); } }
html[data-theme=asche] body.guestpage { background: var(--bgfx) fixed, radial-gradient(circle at 50% 90%, rgba(18,23,31,.6) 0%, transparent 60%) fixed, #050608; }
html[data-theme=asche] body.guestpage::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 2; background: radial-gradient(circle, transparent 60%, rgba(2,3,4,.85) 100%); }
html[data-theme=asche] .hero::before { background: #cbd5e1; opacity: .12; filter: blur(80px); }
html[data-theme=asche] .hero img { filter: drop-shadow(0 0 22px rgba(216,225,237,.35)) drop-shadow(0 0 45px rgba(154,176,200,.18)); }
html[data-theme=asche] .hero a { max-width: 640px; }
html[data-theme=asche] .layout.guest .content { background: linear-gradient(180deg, rgba(20,24,31,.88), rgba(12,14,18,.94)); border: 1px solid rgba(154,176,200,.16); border-radius: 2px; box-shadow: 0 30px 80px rgba(0,0,0,.95), 0 0 40px rgba(154,176,200,.05), inset 0 1px 0 rgba(234,240,250,.18), inset 0 0 30px rgba(0,0,0,.7); }
html[data-theme=asche] .orn { border-color: rgba(216,225,237,.45); opacity: 1; width: 22px; height: 22px; }
html[data-theme=asche] .layout.guest .two h2 { color: #d8e1ed; border-bottom-color: rgba(59,67,80,.4); display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; letter-spacing: .04em; }
html[data-theme=asche] .layout.guest .two h2 small { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: #68788c; font-weight: normal; }
html[data-theme=asche] .layout.guest .two label { color: #9ab0c8; letter-spacing: .16em; }
html[data-theme=asche] .layout.guest input { background: linear-gradient(180deg, rgba(7,9,12,.92), rgba(12,15,20,.95)); border: 1px solid rgba(74,83,97,.45); color: #f1f5f9; border-radius: 2px; transition: border-color .3s, box-shadow .3s; }
html[data-theme=asche] .layout.guest input:focus { outline: none; border-color: #9ab0c8; box-shadow: 0 0 18px rgba(154,176,200,.28), inset 0 0 10px rgba(0,0,0,.8); }
html[data-theme=asche] .layout.guest .btn.primary { background: linear-gradient(135deg, #171b22 0%, #262c37 50%, #15181e 100%); color: #d8e1ed; border: 1px solid rgba(154,176,200,.35); text-transform: uppercase; letter-spacing: .2em; font-weight: 700; width: 100%; padding: 14px 20px; border-radius: 2px; box-shadow: 0 6px 20px rgba(0,0,0,.7), inset 0 1px 1px rgba(255,255,255,.18); transition: all .35s cubic-bezier(.16,1,.3,1); }
html[data-theme=asche] .layout.guest .btn.primary:hover { color: #fff; border-color: #d8e1ed; box-shadow: 0 0 25px rgba(154,176,200,.38), 0 10px 30px rgba(0,0,0,.9); transform: translateY(-2px); }
.portalhead { text-align: center; margin-bottom: 26px; }
.portalhead .cap { display: inline-flex; align-items: center; gap: 12px; font-family: Cinzel, serif; font-size: .72rem; letter-spacing: .35em; text-transform: uppercase; color: #68788c; }
.portalhead .cap::before, .portalhead .cap::after { content: ""; width: 48px; height: 1px; background: linear-gradient(90deg, transparent, rgba(104,120,140,.6)); }
.portalhead .cap::after { transform: scaleX(-1); }
.portalhead h1 { margin: 6px 0 8px; font-size: 2.1rem; letter-spacing: .06em; color: #eaf0fa; text-shadow: 0 2px 10px rgba(0,0,0,.9); }
.portalhead p { margin: 0 auto; max-width: 42rem; font-style: italic; color: rgba(154,176,200,.85); }
@media (max-width: 800px) { .portalhead h1 { font-size: 1.5rem; } }
html[data-theme=asche] .layout.guest .content > h1:first-child { display: none; }
html[data-theme=asche] .layout.guest .two .card { display: flex; flex-direction: column; }
html[data-theme=asche] .layout.guest .two .card form { display: flex; flex-direction: column; flex: 1; }
html[data-theme=asche] .layout.guest .two .card form .btn.primary { margin-top: auto; }

/* Asche: Schmiede-Effekte der Buttons wie im Portal-Entwurf (Glanzstreifen, Anheben, Leuchten, Eindrücken) */
html[data-theme=asche] .btn, html[data-theme=asche] button.btn { position: relative; overflow: hidden; background: linear-gradient(135deg, #171b22 0%, #262c37 50%, #15181e 100%); color: #d8e1ed; border: 1px solid rgba(154,176,200,.35); text-shadow: 0 1px 3px rgba(0,0,0,.9); box-shadow: 0 6px 20px rgba(0,0,0,.7), inset 0 1px 1px rgba(255,255,255,.18), inset 0 -1px 2px rgba(0,0,0,.8); transition: all .35s cubic-bezier(.16,1,.3,1); }
html[data-theme=asche] .btn::before { content: ""; position: absolute; top: 0; left: -150%; width: 80%; height: 100%; background: linear-gradient(90deg, transparent, rgba(234,240,250,.2), transparent); transform: skewX(-25deg); transition: left .85s ease; pointer-events: none; }
html[data-theme=asche] .btn:hover { color: #fff; border-color: #d8e1ed; box-shadow: 0 0 25px rgba(154,176,200,.38), 0 10px 30px rgba(0,0,0,.9); text-shadow: 0 0 10px rgba(255,255,255,.9); transform: translateY(-2px); }
html[data-theme=asche] .btn:hover::before { left: 200%; }
html[data-theme=asche] .btn:active { transform: translateY(1px); box-shadow: 0 2px 8px rgba(0,0,0,.8); }
html[data-theme=asche] .btn.danger { background: linear-gradient(135deg, #3a0a0a, #6a1212 50%, #3a0a0a); border-color: rgba(255,120,100,.45); }
html[data-theme=asche] .btn.small { box-shadow: 0 3px 10px rgba(0,0,0,.6), inset 0 1px 1px rgba(255,255,255,.15); }
html[data-theme=asche] .btn[disabled], html[data-theme=asche] .btn.disabled { opacity: .5; transform: none; }
@media (prefers-reduced-motion: reduce) { html[data-theme=asche] .btn, html[data-theme=asche] .btn::before { transition: none; } }

/* Ortsbilder (Banner unter der Überschrift) */
.pageimg { margin: 0 0 16px; border: 1px solid var(--edge); border-radius: 6px; overflow: hidden; line-height: 0; box-shadow: 0 4px 18px rgba(0,0,0,.45); }
.pageimg img { width: 100%; height: auto; aspect-ratio: 10 / 3; object-fit: cover; display: block; }

.confession { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--edge); color: var(--soft2); }
.gravegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.grave { border: 1px solid var(--edge); border-radius: 6px; padding: 8px 12px; background: rgba(0,0,0,.18); }
.grave h3 { margin: 0 0 2px; font-size: 1rem; }
.gnote { font-size: .85rem; margin: 2px 0; }

/* Tagesbericht */
.newday .nd th { width: 190px; text-align: left; vertical-align: top; }
.readylist { list-style: none; padding: 0; margin: 0 0 14px; }
.readylist li { padding: 4px 0; }

/* Dateiauswahl im Spielstil (ohne JavaScript) */
input[type=file]{color:var(--muted,#b9a88f);font:inherit;max-width:100%}
input[type=file]::file-selector-button{font:inherit;font-family:inherit;letter-spacing:.08em;text-transform:uppercase;font-size:.8rem;color:inherit;background:rgba(255,255,255,.04);border:1px solid var(--border,#5a3a22);border-radius:4px;padding:8px 14px;margin-right:12px;cursor:pointer}
input[type=file]::file-selector-button:hover{background:rgba(255,255,255,.1)}
.danger-zone{border-color:#7a2a22}
label.check{display:flex;gap:8px;align-items:center;margin:10px 0}
.tabs[aria-label="Marktplatz"] .tab{padding:8px 9px;letter-spacing:.02em}
details.street{margin:10px 0;border:1px solid var(--edge);border-radius:6px;padding:0 12px}details.street>summary{cursor:pointer;padding:10px 0;font-family:'Cinzel',serif;letter-spacing:.06em}
.todaycard{margin:12px 0 8px;padding:10px 12px;border:1px solid var(--edge);border-radius:6px;background:var(--deep2);font-size:.88rem}.todaycard>strong{font-family:'Cinzel',serif;letter-spacing:.1em;text-transform:uppercase;font-size:.78rem;color:var(--soft)}.todaycard ul{list-style:none;margin:6px 0 0;padding:0}.todaycard li{padding:3px 0}.todaycard li span{display:inline-block;width:1.4em}

/* Einheitliche Abschnittsüberschriften: freie h2 im Inhalt sehen aus wie Kartenüberschriften (Cinzel, Gold, feine Linie) */
main.content > h2{font-family:'Cinzel',serif;letter-spacing:.08em;margin:26px 0 12px;padding-bottom:6px;border-bottom:1px solid var(--edge)}
main.content > h2 small{font-family:inherit;letter-spacing:0}

/* Klassenkarten: Chips, ausklappbare Fertigkeiten, gewählte Karte hervorgehoben */
.chip{display:inline-block;padding:2px 9px;margin:4px 4px 0 0;border-radius:999px;font-size:.78rem;border:1px solid var(--edge);white-space:nowrap}
.chip.pos{color:#9fd49a;border-color:#3f6b3a;background:rgba(80,140,70,.12)}
.chip.neg{color:#e49a8e;border-color:#7a2e26;background:rgba(160,60,50,.12)}
.classlist .racecard:has(input:checked){border-color:var(--gold);box-shadow:0 0 0 1px var(--gold) inset}
details.skillfold{margin-top:6px}details.skillfold>summary{cursor:pointer;font-size:.8rem;color:var(--soft)}
.tabs .tab.backtab{margin-left:auto;font-size:.95rem;padding:8px 9px;color:var(--soft2,var(--soft));background:transparent}
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 4px 0; }
ul.plain form.inline { margin-left: 8px; }
