/* PrioMeister-Seite im Stil des Spiels: Pergament im Steinrahmen, dunkle Kästen wie Tooltips,
   rote Knöpfe mit goldener Schrift, Itemfarben wie im Spiel. Ohne Grafiken, alles CSS. */
:root {
  --ink: #2b1a0b;            /* Schrift auf Pergament */
  --ink-soft: #5c4124;
  --ink-link: #7a230c;
  --gold: #ffd100;           /* Gelb der Spieloberfläche */
  --text: #f1e8d4;           /* Schrift in dunklen Kästen */
  --muted: #a99e88;
  --box: rgba(5, 7, 16, 0.95);
  --box-2: rgba(17, 19, 36, 0.95);
  --edge: #8e8e9b;           /* Rand wie bei Tooltips */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.17);
  --ok: #4ad94a;
  --error: #ff5a4a;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); font: 15px/1.5 var(--serif);
  background: radial-gradient(1100px 500px at 50% -120px, #2a1c0d 0%, #0b0806 55%, #050403 100%) fixed, #050403;
}
a { color: var(--ink-link); }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: bold; line-height: 1.2; }
code, .mono { font-family: var(--mono); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kopf mit Schriftzug und Knöpfen */
.top { background: linear-gradient(180deg, #19120b, #090705); border-bottom: 2px solid #3c2f1d; box-shadow: 0 2px 0 #000, 0 8px 20px rgba(0, 0, 0, 0.7); }
.top-inner { max-width: 1140px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; line-height: 1; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-name {
  font: bold 32px/1 var(--serif); letter-spacing: 0.02em; color: var(--gold);
  background: linear-gradient(180deg, #fff6c2 0%, #ffd100 40%, #c78a08 64%, #f7c83d 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #3a1c00) drop-shadow(0 0 8px rgba(255, 180, 40, 0.25));
}
.brand-sub { margin-top: 5px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #a68e60; }
nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav-char { font-weight: bold; }

/* Rote Knöpfe wie im Spiel */
button, .button {
  display: inline-block; cursor: pointer; text-align: center; text-decoration: none; white-space: nowrap;
  font: bold 14px/1.2 var(--serif); color: var(--gold); text-shadow: 0 1px 1px #000, 0 0 2px #000;
  padding: 7px 16px; border: 1px solid #2a0500; border-radius: 5px;
  background: linear-gradient(180deg, #c42a17 0%, #981a0c 45%, #6a0f06 100%);
  box-shadow: inset 0 1px 0 rgba(255, 190, 120, 0.45), inset 0 -2px 4px rgba(0, 0, 0, 0.45), 0 0 0 1px #6d5531, 0 2px 4px rgba(0, 0, 0, 0.6);
}
button:hover, .button:hover { color: #fff7c9; text-decoration: none; background: linear-gradient(180deg, #dc3b25 0%, #b02313 45%, #7a1408 100%); }
button:active, .button:active { transform: translateY(1px); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.65), 0 0 0 1px #6d5531; }
button:focus-visible, .button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button.primary { font-size: 15px; padding: 8px 22px; }
button.danger { color: #fff; }
button.link, button.link:hover, button.link:active {
  background: none; border: none; box-shadow: none; padding: 0; transform: none;
  font-weight: normal; color: var(--gold); text-shadow: none;
}
button.link:hover { text-decoration: underline; }
button.link.danger, .link.danger { color: #ff8a7a; }
form.inline { display: inline; }
.buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* Pergament im Steinrahmen */
main.frame {
  max-width: 1100px; margin: 22px auto 26px; padding: 26px 28px 30px; color: var(--ink);
  background-color: #e6d2a4;
  background-image:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(255, 247, 222, 0.7), rgba(255, 247, 222, 0) 70%),
    radial-gradient(ellipse 40% 30% at 12% 88%, rgba(140, 86, 30, 0.28), transparent 70%),
    radial-gradient(ellipse 35% 25% at 88% 8%, rgba(140, 86, 30, 0.22), transparent 70%),
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.27 0 0 0 0 0.1 0 0 0 0.3 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  border-radius: 6px;
  box-shadow:
    inset 0 0 0 2px rgba(122, 78, 28, 0.5), inset 0 0 90px rgba(98, 56, 16, 0.55),
    0 0 0 4px #1c170f, 0 0 0 9px #4c4434, 0 0 0 11px #14100a, 0 16px 44px rgba(0, 0, 0, 0.9);
}
main.frame > h1, .intro h1, .run-head h1 { font-size: 28px; color: var(--ink); text-shadow: 0 1px 0 rgba(255, 244, 214, 0.7); margin: 0 0 6px; }
.muted { color: var(--ink-soft); }
.intro { max-width: 780px; margin: 0 auto 20px; text-align: center; }
.intro p { color: var(--ink-soft); font-size: 16px; margin: 6px 0 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
footer { text-align: center; color: #80704f; font-size: 13px; padding: 4px 16px 36px; }
footer a { color: #b69655; }

/* Dunkle Kästen wie Tooltips */
.card {
  position: relative; color: var(--text); padding: 18px 20px; margin-bottom: 18px;
  background: linear-gradient(180deg, var(--box-2), var(--box));
  border: 2px solid var(--edge); border-radius: 9px;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 3px rgba(255, 255, 255, 0.04), 0 4px 12px rgba(60, 30, 0, 0.5);
}
.cols > .card { margin-bottom: 0; }
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.card h1, .card h2, .card h3, .card h4 { color: var(--gold); text-shadow: 0 1px 1px #000; }
.card h1 { font-size: 24px; margin: 0 0 12px; }
.card h2 { font-size: 20px; margin: 0 0 12px; }
.card h3 { font-size: 16px; margin: 18px 0 8px; }
.card a:not(.item):not(.button) { color: #ffd77a; }
.card .muted { color: var(--muted); }
.count { font-size: 14px; color: var(--muted); font-weight: normal; margin-left: 6px; text-shadow: none; }
.small, p.small { font-size: 13px; margin: 6px 0 0; }

/* Meldungen */
.flashes { margin-bottom: 16px; }
.flash { color: var(--text); background: rgba(8, 10, 20, 0.93); border: 2px solid; border-radius: 7px; padding: 10px 14px; margin-bottom: 8px; box-shadow: 0 3px 8px rgba(60, 30, 0, 0.45); }
.flash p { margin: 0 0 8px; }
.flash.ok { border-color: #3a8a3a; }
.flash.error { border-color: #b3261e; color: #ffd6d0; }
.flash.warn { border-color: #c98a0b; color: #ffe8ad; }

/* Formulare: Eingabefelder wie im Spiel */
label { display: block; font-size: 14px; }
input, select, textarea {
  width: 100%; margin-top: 4px; padding: 8px 10px; font: 15px var(--serif); color: #f3ead5;
  background: linear-gradient(180deg, #040404, #15130f); border: 1px solid #6d6453; border-radius: 4px;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.7);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.7), 0 0 7px rgba(255, 209, 0, 0.55); }
input::placeholder { color: #7d7466; }
textarea { resize: vertical; }
select option { background: #121212; color: #f3ead5; }
select optgroup { color: var(--gold); font-style: normal; }
input[type="checkbox"] { width: auto; margin: 0; accent-color: #c42a17; }
fieldset { border: 1px solid var(--line-strong); border-radius: 7px; padding: 10px 14px; margin: 0; }
legend { color: var(--gold); font-size: 14px; padding: 0 6px; }
label.check { display: inline-flex; align-items: center; gap: 6px; margin: 4px 14px 4px 0; }
.stack > * + * { margin-top: 12px; }
.row { display: grid; gap: 12px; margin-bottom: 12px; }
.row.two { grid-template-columns: 1fr 1fr; }
.row.three { grid-template-columns: 2fr 2fr 1.6fr; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { margin: 0; }
.pin-form { display: flex; gap: 10px; max-width: 340px; }
.pin-form input { margin: 0; font-size: 20px; letter-spacing: 6px; text-align: center; font-family: var(--mono); }
details { margin-top: 10px; }
summary { cursor: pointer; color: var(--gold); }
details[open] > summary { margin-bottom: 10px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
/* Eigene Prio-Runs auf der Startseite */
.my-runs { border-color: #c9a227; box-shadow: inset 0 0 0 1px #000, 0 0 14px rgba(255, 209, 0, 0.25), 0 4px 12px rgba(60, 30, 0, 0.5); }
.run-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.run-row:last-child { border-bottom: none; padding-bottom: 2px; }
.run-row > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
a.run-title { font-size: 20px; font-weight: bold; color: var(--gold); text-decoration: none; }
a.run-title:hover { text-decoration: underline; }
.run-meta { color: var(--muted); }
.run-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.run-tags .tag { margin-left: 0; font-size: 12px; }
.pin-card h2 { font-size: 17px; }
.lead-new { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.run-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.tag.lead { color: var(--gold); border-color: #8a6d1a; }
.entered { margin: 10px 0 0; line-height: 1.8; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.inline-form select { width: auto; flex: 1 1 260px; margin: 0; }
.pin-card .pin-form input { font-size: 17px; letter-spacing: 4px; }
.inst-choice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inst-choice label.check { min-width: 260px; }
.inst-slots { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.inst-slots select { width: auto; margin: 0; padding: 3px 8px; }
.char-line { font-size: 18px; margin: 0 0 6px; }
/* Charakter: Zahnrad hinter dem Namen öffnet Name, Server, Klasse; Abmelden rechts oben im Kasten */
.card .corner { position: absolute; top: 16px; right: 20px; margin: 0; }
details.char-edit { margin-top: 0; }
details.char-edit > summary { list-style: none; cursor: default; color: inherit; display: inline-flex; align-items: baseline; gap: 8px; }
details.char-edit > summary::-webkit-details-marker { display: none; }
.gear { cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; transition: transform 0.2s, color 0.2s; }
.gear:hover, details.char-edit[open] .gear { color: var(--gold); }
details.char-edit[open] .gear { transform: rotate(60deg); }
.char-switch { display: inline-flex; gap: 8px; align-items: center; margin: 4px 0; }
.char-switch select { width: auto; margin: 0; }
.char-form button { margin-top: 2px; }

/* Kopf eines Prio-Runs auf dem Pergament */
.run-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(92, 56, 20, 0.35); }
.meta { color: var(--ink-soft); margin: 0; font-size: 16px; }
.note { margin: 10px 0 0; font-style: italic; }
.rules { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.run-state { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.state { font-size: 13px; padding: 2px 10px; border-radius: 999px; border: 1px solid; background: rgba(8, 8, 8, 0.88); }
.state.open { color: var(--ok); border-color: #2f6a2f; }
.state.closed { color: #bbb; border-color: #666; }
.deadline { font-size: 13px; color: var(--ink-soft); }
.pin-label { font-size: 14px; color: var(--ink-soft); }
.pin-label strong { color: var(--ink); letter-spacing: 2px; font: bold 17px var(--mono); }
.as-line { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 10px; }
.as-line h2 { margin: 0; }
.as { font-size: 16px; }
.as-delete { margin-left: auto; }

/* Tabellen in den Kästen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: bold; color: #cdb57c; text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); }
td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:hover { background: rgba(255, 209, 0, 0.05); }
td.actions { white-space: nowrap; text-align: right; }
td.actions > * + * { margin-left: 12px; }
.player { font-weight: bold; }
.klass { display: block; font-size: 12px; color: var(--muted); }
.holders { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.holder { white-space: nowrap; }
.badge { display: inline-block; font: bold 11px/1.5 var(--serif); padding: 0 6px; border-radius: 4px; margin-right: 4px; vertical-align: 1px; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6); }
.badge.p0 { background: #ff8000; color: #1a0d00; text-shadow: none; }
.badge.p1 { background: #a335ee; }
.badge.p2 { background: #2a7fe0; }
.badge.p3 { background: #3c8a3c; }
.hint { color: var(--gold); margin: 0 0 12px; }

/* Itemqualität, auf dunklem Grund etwas heller als im Spiel */
.q0 { color: #9d9d9d; } .q1 { color: #ffffff; } .q2 { color: #1eff00; }
.q3 { color: #3f9bff; } .q4 { color: #b45cf5; } .q5 { color: #ff8000; }
a.item { text-decoration: none; }
a.item:hover { text-decoration: underline; }
.icon { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.8); }

/* Beute-Liste mit P1/P2/P3 */
.loot-title { margin: 20px 0 4px; font-size: 18px; }
.help { font-size: 14px; margin: 0 0 12px; color: var(--muted); }
.help strong { color: var(--text); }
/* Reiter wie bei sahne-team: Mögliche Beute | Prios anderer <Klasse> */
.view-tabs { display: flex; gap: 4px; margin: 4px 0 0; border-bottom: 2px solid #6d5531; }
.view-tabs .tab {
  border-radius: 6px 6px 0 0; padding: 6px 16px; font-size: 14px; color: #c9b27a; transform: none;
  background: linear-gradient(180deg, #4a1a10, #2a0d07); box-shadow: inset 0 1px 0 rgba(255, 190, 120, 0.25), 0 0 0 1px #4b3a22;
}
.view-tabs .tab.active { color: var(--gold); background: linear-gradient(180deg, #c42a17, #8a170a); }
.view-tabs .tab:disabled { opacity: 0.5; cursor: not-allowed; }
.tab-count { font-weight: normal; font-size: 13px; }
.loot-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 6px; }
.loot-tools input[type="search"] { flex: 2 1 220px; width: auto; margin: 0; }
.loot-tools select { flex: 1 1 170px; width: auto; min-width: 0; margin: 0; }
.loot-tools label.check { margin: 0; white-space: nowrap; }
.loot-tools label.check:has(input:disabled) { color: var(--muted); }
.loot-row[hidden], .loot-inst[hidden] { display: none; }
.inst-title { margin: 22px 0 0; font-size: 18px; }
.inst-title .count { font-size: 13px; }
/* Beute je Instanz als eine Tabelle; die Spaltenköpfe sortieren und bleiben beim Scrollen stehen */
table.loot { margin-top: 8px; }
table.loot th { position: sticky; top: 0; z-index: 2; padding: 0; border-bottom: 0; background: #0c0d1a; box-shadow: inset 0 -1px 0 var(--line-strong); }
table.loot th .sort, table.loot th .sort:hover, table.loot th .sort:active {
  display: block; width: 100%; padding: 7px 8px; text-align: left; transform: none;
  font: bold 12px/1.2 var(--serif); letter-spacing: 0.06em; text-transform: uppercase; color: #cdb57c; text-shadow: none;
  background: none; border: 0; border-radius: 0; box-shadow: none;
}
table.loot th .sort:hover, table.loot th[aria-sort] .sort { color: var(--gold); }
table.loot th .sort:focus-visible { outline-offset: -2px; }
table.loot th[aria-sort="ascending"] .sort::after { content: " ▲"; font-size: 9px; }
table.loot th[aria-sort="descending"] .sort::after { content: " ▼"; font-size: 9px; }
table.loot td { padding: 3px 8px; font-size: 13px; vertical-align: middle; }
/* Gleiche Spaltenbreiten in allen Instanzen, der Name bekommt den Rest */
table.loot .c-slot { width: 17%; }
table.loot .c-boss { width: 19%; }
table.loot .c-prios { width: 21%; }
table.loot .c-pick { width: 1%; padding-right: 4px; }
.loot-row.chosen { background: rgba(255, 209, 0, 0.1); }
.loot-row.class-hit > td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.loot-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.loot-icon { flex: none; display: block; line-height: 0; }
.loot-icon .icon { width: 22px; height: 22px; margin: 0; border-radius: 4px; border-color: #000; box-shadow: 0 0 0 1px #5a5a66; }
.loot-name { min-width: 0; }
/* Link bleibt inline und nur so breit wie der Name: Wowhead setzt den Tooltip an seine rechte obere Ecke */
.loot-name a.item { font-weight: bold; font-size: 14px; overflow-wrap: anywhere; }
.loot-row.rolled .loot-name a.item { opacity: 0.75; }
.c-slot, .c-boss { color: var(--muted); }
.c-slot .tag { margin: 0 4px 0 0; }
.rolled-note { display: block; text-align: right; font-size: 12px; color: #d9964f; white-space: nowrap; }
.loot-holders { display: flex; flex-wrap: wrap; gap: 0 10px; max-width: 260px; font-size: 12px; }
.loot-holders .badge { margin-right: 3px; }
.tag { display: inline-block; margin-left: 8px; padding: 0 6px; font-size: 11px; font-weight: bold; line-height: 17px; border: 1px solid; border-radius: 4px; vertical-align: 1px; white-space: nowrap; }
.tag.recipe { color: #4fd1c5; border-color: #2c7a7b; }
.tag.mount { color: #f6ad55; border-color: #9c5a1a; }
.tag.warn { color: #ffcc66; border-color: #a0700a; }
.tag.rolled { border-style: dashed; opacity: 0.7; }
.tag.done { color: var(--ok); border-color: #2f6a2f; }
.tag.todo { color: #ffb35c; border-color: #8a5a1a; }
.tag.won { color: #7ee07e; border-color: #2f6a2f; }
.pick { display: flex; gap: 4px; justify-content: flex-end; }
.pbtn { position: relative; margin: 0; font-size: inherit; }
.pbtn input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; padding: 0; pointer-events: none; }
.pbtn span {
  display: block; min-width: 34px; padding: 3px 0; text-align: center; cursor: pointer; user-select: none;
  font: bold 12px/1.2 var(--serif); color: var(--gold); text-shadow: 0 1px 1px #000;
  border: 1px solid #2a0500; border-radius: 4px;
  background: linear-gradient(180deg, #b52413 0%, #86150a 50%, #5c0d05 100%);
  box-shadow: inset 0 1px 0 rgba(255, 190, 120, 0.4), inset 0 -2px 3px rgba(0, 0, 0, 0.4), 0 0 0 1px #5b482a;
}
.pbtn span:hover { color: #fff7c9; background: linear-gradient(180deg, #d0331f 0%, #9e1d0d 50%, #6c1007 100%); }
.pbtn input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.pbtn input:checked + span { color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 1px var(--gold), 0 0 9px rgba(255, 209, 0, 0.6); }
.pbtn.p1 input:checked + span { background: linear-gradient(180deg, #c780f7 0%, #9435dc 50%, #5e1598 100%); }
.pbtn.p2 input:checked + span { background: linear-gradient(180deg, #5aa8f5 0%, #2268c4 50%, #134183 100%); }
.pbtn.p3 input:checked + span { background: linear-gradient(180deg, #67cd67 0%, #328f32 50%, #1d5c1d 100%); }
.pbtn input:disabled + span, .pbtn input:disabled + span:hover { opacity: 0.3; filter: grayscale(0.8); cursor: not-allowed; }

/* Auswahl unten angeheftet */
.picked {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin: 18px -20px -18px; padding: 12px 20px; background: rgba(7, 8, 17, 0.97);
  border-top: 2px solid var(--edge); border-radius: 0 0 7px 7px; box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.5);
}
.picked-rows { flex: 1 1 560px; display: grid; gap: 6px; min-width: 0; }
.picked-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.picked-inst { flex: none; min-width: 42px; font-weight: bold; font-size: 13px; color: var(--gold); }
.picked-slots { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.slot { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 5px 6px 5px 8px; background: linear-gradient(180deg, #040404, #13110e); border: 1px solid #6d6453; border-radius: 5px; box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.9); }
.slot.empty { border-style: dashed; }
.slot .badge { margin: 0; flex: none; }
.slot-item { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.slot-clear { margin: 0; flex: none; }
.slot-clear input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.slot-clear span[aria-hidden] { display: block; padding: 0 5px; color: var(--muted); cursor: pointer; font-size: 14px; }
.slot-clear span[aria-hidden]:hover { color: var(--error); }
.slot.empty .slot-clear { visibility: hidden; }
.slot-clear input:focus-visible + span { outline: 2px solid var(--gold); }
.picked .hint { flex-basis: 100%; margin: 0; font-size: 14px; }
.picked .dup-hint, .picked .free-hint { color: #ffb35c; }

@media (max-width: 760px) {
  .cols { grid-template-columns: 1fr; }
  .row.three { grid-template-columns: 1fr 1fr; }
  /* Schmal: je Item zwei Zeilen (Name; Platz · Boss), Prios darunter, Knöpfe rechts; Köpfe als Sortierleiste */
  table.loot, table.loot thead, table.loot tbody { display: block; }
  table.loot thead tr { display: flex; flex-wrap: wrap; box-shadow: inset 0 -1px 0 var(--line-strong); }
  table.loot th { position: static; background: none; box-shadow: none; }
  table.loot th.c-pick { display: none; }
  table.loot tr.loot-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "item item pick" "slot boss pick" "prios prios prios"; padding: 4px 2px; border-bottom: 1px solid var(--line); }
  table.loot tr.loot-row[hidden] { display: none; }
  table.loot td { display: block; padding: 0; border: 0; }
  table.loot .c-slot, table.loot .c-boss, table.loot .c-prios { width: auto; }
  table.loot .c-item { grid-area: item; }
  table.loot .c-slot { grid-area: slot; font-size: 12px; }
  table.loot .c-boss { grid-area: boss; font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  table.loot td.c-boss::before { content: "\00a0· "; }
  table.loot td.c-slot:empty + td.c-boss::before { content: ""; }
  table.loot .c-prios { grid-area: prios; }
  table.loot .c-prios:empty { display: none; }
  table.loot .c-pick { grid-area: pick; align-self: center; width: auto; padding: 0 0 0 8px; }
  table.loot tr.loot-row.class-hit { box-shadow: inset 3px 0 0 var(--gold); }
  table.loot tr.loot-row.class-hit > td:first-child { box-shadow: none; }
  .loot-holders { max-width: none; }
}

@media (max-width: 640px) {
  main.frame { margin: 12px 6px 18px; padding: 16px 12px 18px; box-shadow: inset 0 0 0 2px rgba(122, 78, 28, 0.5), inset 0 0 50px rgba(98, 56, 16, 0.5), 0 0 0 3px #1c170f, 0 0 0 6px #4c4434, 0 0 0 7px #14100a; }
  .brand-name { font-size: 26px; }
  .top-inner { padding: 10px 12px; }
  nav .button, nav button { padding: 6px 11px; font-size: 13px; }
  .row.two, .row.three { grid-template-columns: 1fr; }
  .run-state { align-items: flex-start; }
  main.frame > h1, .intro h1, .run-head h1 { font-size: 23px; }
  .card { padding: 14px; }
  .picked { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; margin: 14px -14px -14px; padding: 8px 14px; }
  .picked-slots { grid-template-columns: 1fr; gap: 4px; }
  .picked-row { align-items: flex-start; }
  .picked-inst { min-width: 32px; padding-top: 4px; }
  .slot { padding: 2px 4px 2px 6px; }
  .slot-item { font-size: 13px; }
  .picked button { align-self: stretch; padding: 0 14px; }
  .picked .hint { grid-column: 1 / -1; font-size: 13px; }
  .loot-tools select { flex-basis: 40%; }
  .pbtn span { min-width: 32px; }
  .pin-form { max-width: none; }
}
