/* Riftmere-Wiki (#225, Oberfläche): Stil der Webseite (start.css) – dunkles Pergament, Gold, Cinzel/Cormorant/Inter.
   Am Handy (auch quer) eine Spalte, nie seitlich scrollen: Tabellen brechen um, die Infobox steht oben. */
:root {
  --gold: #d9b25f; --gold-hell: #f3d895; --gold-dunkel: #8a6a2a; --pergament: #efe5cf; --text: #e6dcc6; --leise: #b7aa8e; --linie: #5d4c35;
  --grund: #120e14; --tafel: rgba(22,17,13,.94); --zeile: rgba(255,240,200,.035);
  --titel: "Cinzel", "Trajan Pro", Georgia, serif; --schrift: "Cormorant Garamond", Georgia, serif; --klein: "Inter", system-ui, sans-serif;
  --anfaenger: #b7aa8e; --gewoehnlich: #e6dcc6; --set: #7fd4ff; --selten: #5aa0ff; --episch: #b26cff; --legendaer: #ff9c3a; --mythisch: #ff5a7a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund) url("/img/echtzeit/start/hintergrund.webp") center top / cover no-repeat fixed; color: var(--text); font: 400 19px/1.5 var(--schrift); -webkit-font-smoothing: antialiased; }
@media (max-width: 900px) { body { background-image: url("/img/echtzeit/start/hintergrund-klein.webp"); background-attachment: scroll; } }
a { color: var(--gold-hell); text-decoration: none; } a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Kopf: Name, Suche, Hauptkategorien */
.wkopf { position: sticky; top: 0; z-index: 5; background: linear-gradient(rgba(14,10,8,.97), rgba(14,10,8,.9)); border-bottom: 1px solid var(--gold-dunkel); box-shadow: 0 4px 16px rgba(0,0,0,.6); }
.wkopf .innen { max-width: 1120px; margin: 0 auto; padding: 8px max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.wname { display: flex; align-items: baseline; gap: 8px; color: var(--gold-hell); font: 600 22px/1 var(--titel); letter-spacing: .06em; text-shadow: 0 2px 0 #5a3d12; white-space: nowrap; }
.wname small { font: 600 12px var(--titel); letter-spacing: .28em; color: var(--gold); }
.wsuche { position: relative; flex: 1 1 260px; max-width: 460px; margin-left: auto; }
.wsuche input { width: 100%; height: 38px; padding: 0 12px 0 36px; border-radius: 9px; border: 1.5px solid var(--linie); background: rgba(0,0,0,.45); color: var(--pergament); font: 400 15px var(--klein); outline: 0; }
.wsuche input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(217,178,95,.25); }
.wsuche svg { position: absolute; left: 10px; top: 10px; width: 18px; height: 18px; fill: var(--gold); pointer-events: none; }
.wsuche ul { position: absolute; left: 0; right: 0; top: 42px; margin: 0; padding: 4px; list-style: none; background: #17110c; border: 1.5px solid var(--gold-dunkel); border-radius: 9px; box-shadow: 0 10px 24px rgba(0,0,0,.7); max-height: min(60vh, 420px); overflow-y: auto; }
.wsuche ul[hidden] { display: none; }
.wsuche li a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; color: var(--text); font: 400 14px var(--klein); text-decoration: none; }
.wsuche li a.an, .wsuche li a:hover { background: rgba(217,178,95,.14); }
.wsuche li img { width: 28px; height: 28px; object-fit: contain; flex: none; } .wsuche li b { font-weight: 600; color: var(--pergament); } .wsuche li small { margin-left: auto; color: var(--leise); font-size: 12px; white-space: nowrap; }
.wsuche .nichts { padding: 8px; color: var(--leise); font: 400 14px var(--klein); }
.wnav { width: 100%; display: flex; gap: 4px 16px; flex-wrap: wrap; font: 600 13px var(--titel); letter-spacing: .05em; }
.wnav a { color: var(--leise); padding: 2px 0; } .wnav a.an, .wnav a:hover { color: var(--gold-hell); text-decoration: none; }

/* Inhalt */
.wseite { max-width: 1120px; margin: 0 auto; padding: 16px max(14px, env(safe-area-inset-right)) 40px max(14px, env(safe-area-inset-left)); }
.brot { font: 400 13px var(--klein); color: var(--leise); margin: 0 0 10px; } .brot a { color: var(--leise); } .brot a:hover { color: var(--gold-hell); }
.wtafel { position: relative; background: var(--tafel); border: 1.5px solid var(--gold-dunkel); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.55), inset 0 0 0 1px rgba(217,178,95,.08); padding: 20px clamp(14px, 3vw, 30px) 26px; }
.wtafel h1 { margin: 0 0 2px; font: 600 clamp(24px, 4vw, 34px)/1.15 var(--titel); color: var(--gold-hell); letter-spacing: .03em; text-shadow: 0 2px 0 #3a280c; }
.wtafel .unter { margin: 0 0 14px; font: 400 15px var(--klein); color: var(--leise); }
.wtafel h2 { margin: 26px 0 8px; padding-bottom: 5px; font: 600 19px var(--titel); color: var(--gold); letter-spacing: .04em; border-bottom: 1px solid var(--linie); }
.wtafel p { margin: 0 0 12px; }
.zitat { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--gold-dunkel); background: rgba(0,0,0,.25); font-style: italic; color: var(--pergament); }

/* Aufbau: Text links, Infobox rechts – am Handy die Infobox oben */
.zwei { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.zwei > .infobox { grid-column: 2; grid-row: 1 / span 3; }
@media (max-width: 760px) { .zwei { grid-template-columns: minmax(0, 1fr); } .zwei > .infobox { grid-column: 1; grid-row: auto; } }
.infobox { border: 1.5px solid var(--gold-dunkel); border-radius: 10px; background: rgba(0,0,0,.35); overflow: hidden; font: 400 14px/1.4 var(--klein); }
.infobox .bild { display: grid; place-items: center; padding: 14px; background: radial-gradient(#2a2117, #120d08); border-bottom: 1px solid var(--linie); }
.infobox .bild img { width: 128px; height: 128px; object-fit: contain; } .infobox .bild img.gross { width: 100%; height: auto; max-height: 220px; border-radius: 6px; }
.infobox dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); }
.infobox dt, .infobox dd { margin: 0; padding: 6px 10px; border-bottom: 1px solid rgba(93,76,53,.5); } .infobox dt { color: var(--leise); } .infobox dd { color: var(--pergament); text-align: right; overflow-wrap: anywhere; }
@media (max-width: 760px) { .infobox:has(.bild) { display: grid; grid-template-columns: 96px minmax(0, 1fr); } .infobox .bild { border-bottom: 0; border-right: 1px solid var(--linie); padding: 8px; } .infobox .bild img { width: 76px; height: 76px; } }

/* Seltenheit */
.s-anfaenger { color: var(--anfaenger); } .s-gewoehnlich { color: var(--gewoehnlich); } .s-set { color: var(--set); } .s-selten { color: var(--selten); } .s-episch { color: var(--episch); } .s-legendaer { color: var(--legendaer); } .s-mythisch { color: var(--mythisch); }
.marke { display: inline-block; padding: 1px 8px; border-radius: 9px; font: 600 12px var(--klein); border: 1px solid currentColor; background: rgba(0,0,0,.35); white-space: nowrap; }

/* Tabellen: feste Breite, Zellen brechen um – nie seitlich scrollen */
table.wt { width: 100%; border-collapse: collapse; table-layout: fixed; font: 400 14px/1.4 var(--klein); margin: 4px 0 12px; }
.wt th { text-align: left; font-weight: 600; color: var(--gold); padding: 7px 8px; border-bottom: 1.5px solid var(--gold-dunkel); background: rgba(0,0,0,.3); }
.wt td { padding: 6px 8px; border-bottom: 1px solid rgba(93,76,53,.45); vertical-align: middle; overflow-wrap: anywhere; }
.wt tr:nth-child(even) td { background: var(--zeile); }
.wt .z { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .wt .lv { width: 52px; text-align: center; font-weight: 700; color: var(--gold-hell); }
.wt .ding { display: flex; align-items: center; gap: 8px; min-width: 0; } .wt .ding img { width: 32px; height: 32px; object-fit: contain; flex: none; }
.wt .zut { display: flex; flex-wrap: wrap; gap: 4px 10px; } .wt .zut span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; } .wt .zut img { width: 20px; height: 20px; object-fit: contain; }
.chance { white-space: nowrap; } .chance small { display: block; color: var(--leise); font-size: 11.5px; }
.selten-zeile td:first-child { box-shadow: inset 3px 0 0 var(--legendaer); }
@media (max-width: 560px) { table.wt { font-size: 13px; } .wt th, .wt td { padding: 5px 5px; } .wt .ding img { width: 26px; height: 26px; } .wt .weg { display: none; } }

/* Quest-Schritte */
ol.schritte { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: s; }
ol.schritte li { counter-increment: s; position: relative; padding: 8px 10px 8px 44px; border-bottom: 1px solid rgba(93,76,53,.45); }
ol.schritte li::before { content: counter(s); position: absolute; left: 6px; top: 7px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--klein); color: #1a120a; background: linear-gradient(var(--gold-hell), var(--gold)); }
details.loesung { margin: 0 0 12px; border: 1px solid var(--linie); border-radius: 9px; background: rgba(0,0,0,.25); }
details.loesung summary { cursor: pointer; padding: 9px 12px; font: 600 15px var(--titel); color: var(--gold-hell); } details.loesung[open] summary { border-bottom: 1px solid var(--linie); }
details.loesung > *:not(summary) { margin: 10px 12px; }

/* Übersicht / Kategorie: Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.kachel { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1.5px solid var(--linie); border-radius: 10px; background: rgba(0,0,0,.3); color: var(--text); text-decoration: none !important; transition: border-color .15s, background .15s; }
.kachel:hover { border-color: var(--gold); background: rgba(217,178,95,.08); }
.kachel img { width: 44px; height: 44px; object-fit: contain; flex: none; } .kachel b { display: block; font: 600 15px var(--titel); color: var(--pergament); } .kachel small { display: block; font: 400 12.5px var(--klein); color: var(--leise); }
.bereiche { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.bereich { display: block; padding: 16px; border: 1.5px solid var(--gold-dunkel); border-radius: 12px; background: linear-gradient(rgba(42,32,18,.9), rgba(20,14,9,.92)); text-decoration: none !important; }
.bereich:hover { border-color: var(--gold-hell); } .bereich b { display: block; font: 600 20px var(--titel); color: var(--gold-hell); } .bereich span { display: block; margin-top: 4px; font: 400 14px var(--klein); color: var(--leise); } .bereich em { font-style: normal; color: var(--gold); }

.wfuss { max-width: 1120px; margin: 0 auto; padding: 0 14px 30px; text-align: center; font: 400 12.5px var(--klein); color: var(--leise); } .wfuss a { color: var(--leise); }
.wtafel h3 { margin: 16px 0 6px; font: 600 15px var(--titel); color: var(--gold-hell); letter-spacing: .03em; }
.wtafel ul { margin: 0 0 12px; padding-left: 22px; } .wtafel li { margin: 2px 0; }
.brot { display: inline-block; padding: 3px 10px; border-radius: 8px; background: rgba(10,7,5,.78); }
.wfuss { text-shadow: 0 1px 3px #000; } .wfuss span { display: inline-block; padding: 4px 12px; border-radius: 8px; background: rgba(10,7,5,.78); }
.spruenge { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; } .spruenge a { padding: 3px 10px; border-radius: 8px; border: 1px solid var(--linie); background: rgba(0,0,0,.3); font: 600 13px var(--klein); color: var(--gold-hell); }
.spruenge a:hover { border-color: var(--gold); text-decoration: none; }
.wt tr[id] td { scroll-margin-top: 110px; }
/* Handy (Safari): nichts darf breiter als der Bildschirm werden – Suche über die ganze Breite, Tabellenspalten schmaler, Chance darf umbrechen */
html, body { max-width: 100%; overflow-x: clip; }
.wsuche, .wsuche input { min-width: 0; } .wkopf .innen > * { min-width: 0; }
@media (max-width: 560px) {
  .wsuche { flex: 1 1 100%; max-width: none; margin-left: 0; order: 3; } .wname { font-size: 20px; }
  .wt th.z, .wt td.z { width: auto; } .wt th[style*="width:70px"], .wt th[style*="width:64px"] { width: 46px !important; } .wt th[style*="width:110px"], .wt th[style*="width:120px"], .wt th[style*="width:90px"] { width: 74px !important; }
  .wt .chance { white-space: normal; } .wt .lv { width: 34px; } .wt .ding { gap: 5px; }
  .infobox dd { text-align: left; } .zwei { gap: 14px; } .wtafel { padding: 16px 12px 20px; } .wseite { padding-left: 8px; padding-right: 8px; }
}
.wt td { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 560px) { .wt th[style*="width:30%"] { width: 40% !important; } .wt .ding img { width: 22px; height: 22px; } .wt .zut img { width: 16px; height: 16px; } }
@media (max-width: 560px) { .wt .zut span { white-space: normal; } }

/* Levelguides (Auftrag des Nutzers 02.12.) */
.lgstufe { margin: 14px 0; padding: 14px 16px; border: 1px solid var(--rand, #5d4c35); border-radius: 10px; background: rgba(23,17,10,.55); scroll-margin-top: 80px; }
.lgstufe h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; }
.lgband { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 700 12px Inter, sans-serif; letter-spacing: .03em; color: #2a1a04; background: linear-gradient(#ffe08a, #c99a3c); }
.lgraster { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; align-items: start; }
.lgraster dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0; } .lgraster dt { color: #a8946a; font-size: 13px; padding-top: 2px; } .lgraster dd { margin: 0; min-width: 0; }
.lgraster small, .lguebersicht small { color: #a8946a; }
.lgxp { display: grid; gap: 8px; min-width: 150px; } .lgxp div { padding: 7px 12px; border-radius: 8px; background: rgba(0,0,0,.3); border: 1px solid rgba(201,154,60,.35); text-align: right; }
.lgxp b { display: block; font: 700 18px Inter, sans-serif; color: #ffd36a; font-variant-numeric: tabular-nums; } .lgxp small { font-size: 11.5px; }
.lgtipps { margin: 10px 0 0; padding-left: 20px; } .lgtipps li { margin: 3px 0; }
@media (max-width: 600px) { .lgraster { grid-template-columns: 1fr; } .lgxp { grid-template-columns: 1fr 1fr; min-width: 0; } .lguebersicht .weg { display: none; } }
.lgraster .ding { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; } .lgraster .ding img { width: 32px; height: 32px; object-fit: contain; flex: none; } .lgraster dd { font-family: Inter, sans-serif; font-size: 15px; }
.lgstufe .lgtipps { font-size: 15px; }

/* Kampfwerte (Wunsch des Nutzers 02.12.) */
table.kw { max-width: 520px; } table.kw th { text-align: left; font-weight: 600; color: #cdb98a; width: 55%; background: none; border-bottom: 1px solid rgba(93,76,53,.35); text-transform: none; letter-spacing: 0; } table.kw td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.kw-plus { color: #9fe07a; } .kw-minus { color: #ff9c86; } tr.kw-schwach th, tr.kw-schwach td { background: rgba(160,90,220,.12); }
.kwstufen { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-width: 560px; margin: 4px 0 10px; }
.kwstufen div { padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,.3); border: 1px solid rgba(201,154,60,.35); text-align: center; }
.kwstufen small { display: block; font: 600 11.5px Inter, sans-serif; color: #a8946a; } .kwstufen b { font: 700 20px Inter, sans-serif; color: #ffd36a; font-variant-numeric: tabular-nums; }
.kwboni, .kwverhalten { margin: 6px 0; font: 14px/1.5 Inter, sans-serif; color: #d8c69a; }

/* Ausrüstung vergleichen */
.afilter { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } .afilter[hidden] { display: none; }
.afilter button { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(201,154,60,.45); background: rgba(0,0,0,.25); color: #d8c69a; font: 600 13px Inter, sans-serif; cursor: pointer; }
.afilter button.an { background: linear-gradient(#ffe08a, #c99a3c); color: #2a1a04; border-color: #ffe08a; }
.atabelle { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.aus th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; } table.aus th.an { color: #ffd36a; } table.aus th[aria-sort=ascending]::after { content: " ▴"; } table.aus th[aria-sort=descending]::after { content: " ▾"; }
table.aus td small { display: block; color: #a8946a; font-size: 11.5px; } table.aus .leise { color: #6d5e44; } table.aus td.z { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.aus .nurhandy, table.aus .kurz { display: none; }
@media (max-width: 760px) { table.aus { table-layout: fixed; width: 100%; } table.aus .weg, table.aus .lang { display: none; } table.aus .nurhandy, table.aus .kurz { display: block; } table.aus th, table.aus td { padding: 6px 3px; font-size: 12.5px; } table.aus th.aname { width: 40%; } table.aus th.z { width: 12% !important; font-size: 11px; white-space: normal; } table.aus .ding { gap: 5px; } table.aus .ding img { width: 24px; height: 24px; } table.aus .ding span { overflow-wrap: anywhere; } }

/* Ortsseiten */
table.orte td small { display: block; color: #a8946a; font-size: 12px; font-weight: 400; } table.orte tr.schnell td { background: rgba(201,154,60,.1); }
.ortliste { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.ortliste li { display: flex; align-items: center; gap: 8px; } .ortliste .ding { display: inline-flex; align-items: center; gap: 8px; } .ortliste .ding img { width: 28px; height: 28px; object-fit: contain; } .ortliste small { color: #a8946a; font-size: 12px; }
