/* PrioMeister-Seite: dunkles Raid-Thema mit Gold, Itemfarben wie im Spiel */
:root {
  --bg: #0e0c0a;
  --panel: #19150f;
  --panel-2: #211b13;
  --line: #3a2e1d;
  --line-strong: #5a4628;
  --text: #ebe3d3;
  --muted: #a3967f;
  --gold: #e6b84a;
  --gold-2: #b98a25;
  --ok: #5fbf5f;
  --error: #e0605a;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -200px, #2a2013 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; color: var(--gold); font-weight: normal; line-height: 1.25; }
h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 0 0 14px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top { border-bottom: 1px solid var(--line); background: rgba(14, 12, 10, 0.85); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); }
.top-inner { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.brand { font-family: Georgia, serif; font-size: 22px; color: var(--gold); display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 14px; height: 14px; background: linear-gradient(135deg, var(--gold), var(--gold-2)); transform: rotate(45deg); border-radius: 2px; box-shadow: 0 0 10px rgba(230, 184, 74, 0.5); }
nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
nav a, nav button.link { color: var(--text); font-size: 14px; }

main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }

.card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.card.narrow-wide { max-width: 760px; margin-left: auto; margin-right: auto; }
.hero { max-width: 640px; margin: 40px auto; text-align: center; }
.hero p { color: var(--muted); }
.count { font-size: 14px; color: var(--muted); font-family: system-ui, sans-serif; margin-left: 6px; }

.flashes { margin-bottom: 16px; }
.flash { border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; border: 1px solid; }
.flash p { margin: 0 0 8px; }
.flash.ok { border-color: #2f5a2f; background: rgba(95, 191, 95, 0.1); }
.flash.error { border-color: #6a2b28; background: rgba(224, 96, 90, 0.12); }

label { display: block; font-size: 14px; color: var(--muted); }
input, select, textarea {
  width: 100%; margin-top: 4px; padding: 9px 11px; font: inherit; color: var(--text);
  background: #110e0a; border: 1px solid var(--line-strong); border-radius: 7px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
select option { background: #15110c; color: var(--text); }
select optgroup { color: var(--gold); font-style: normal; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 0; }
legend { color: var(--muted); font-size: 14px; padding: 0 6px; }
label.check { display: inline-flex; align-items: center; gap: 6px; margin: 4px 14px 4px 0; color: var(--text); }
label.check input { width: auto; margin: 0; }

button, .button {
  display: inline-block; font: inherit; font-size: 14px; cursor: pointer; padding: 9px 16px; border-radius: 7px;
  color: var(--text); background: transparent; border: 1px solid var(--line-strong); text-decoration: none;
}
button:hover, .button:hover { border-color: var(--gold); text-decoration: none; }
button.primary { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #1a1206; border-color: var(--gold-2); font-weight: 600; }
button.primary:hover { filter: brightness(1.08); }
button.danger, .link.danger { color: var(--error); border-color: #6a2b28; }
button.link { background: none; border: none; padding: 0; color: var(--gold); }
form.inline { display: inline; }
.buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.stack > * + * { margin-top: 12px; }
.row { display: grid; gap: 12px; margin-bottom: 12px; }
.row.two { grid-template-columns: 1fr 1fr; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { margin: 0; }

.pin-form { display: flex; gap: 10px; max-width: 360px; margin: 20px auto 0; }
.pin-form input { margin: 0; font-size: 20px; letter-spacing: 4px; text-align: center; }

.run-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.meta { color: var(--muted); margin: 0; }
.note { margin: 10px 0 0; }
.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; }
.state.open { color: var(--ok); border-color: #2f5a2f; }
.state.closed { color: var(--muted); border-color: var(--line-strong); }
.deadline { font-size: 13px; color: var(--muted); }
.pin-label { font-size: 14px; color: var(--muted); }
.pin-label strong { color: var(--text); letter-spacing: 2px; font-family: ui-monospace, Menlo, monospace; }

.hint { color: var(--gold); margin: 0 0 12px; }

/* Prios wählen: Beute-Liste mit P1/P2/P3, Auswahl unten angeheftet */
.prio-form .who { max-width: 760px; }
.loot-title { font-family: Georgia, "Times New Roman", serif; color: var(--gold); font-weight: normal; font-size: 18px; margin: 22px 0 4px; }
.help { font-size: 14px; margin: 0 0 12px; }
.loot-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 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-group[hidden], .loot-row[hidden] { display: none; }
.loot-group h4 { font-size: 13px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 0.05em; margin: 18px 0 0; padding: 0 4px 6px; border-bottom: 1px solid var(--line-strong); }
.loot-group h4 .count { font-size: 12px; text-transform: none; letter-spacing: 0; }
.loot-group ul { list-style: none; margin: 0; padding: 0; }
.loot-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; column-gap: 12px;
  grid-template-areas: "icon name holders pick" "icon kind holders pick";
  padding: 6px 4px; border-bottom: 1px solid var(--line);
}
.loot-row:hover { background: rgba(230, 184, 74, 0.04); }
.loot-row.chosen { background: rgba(230, 184, 74, 0.09); }
.loot-icon { grid-area: icon; display: block; line-height: 0; }
.loot-icon .icon { width: 32px; height: 32px; margin: 0; border-radius: 5px; }
.loot-row > a.item { grid-area: name; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.loot-row .kind { grid-area: kind; font-size: 12px; color: var(--muted); }
.loot-holders { grid-area: holders; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 10px; font-size: 13px; max-width: 320px; }
.loot-holders .badge { margin-right: 3px; }
.pick { grid-area: pick; display: flex; gap: 6px; }
.pbtn { position: relative; margin: 0; color: inherit; 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: 40px; padding: 6px 0; text-align: center; font-weight: 700; font-size: 13px;
  color: var(--muted); border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer; user-select: none;
}
.pbtn span:hover { color: var(--text); border-color: var(--gold); }
.pbtn input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 1px; }
.pbtn.p1 input:checked + span { background: #a335ee; border-color: #a335ee; color: #fff; }
.pbtn.p2 input:checked + span { background: #2a7fe0; border-color: #2a7fe0; color: #fff; }
.pbtn.p3 input:checked + span { background: #3c8a3c; border-color: #3c8a3c; color: #fff; }

.picked {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin: 18px -20px -20px; padding: 12px 20px; background: rgba(28, 23, 16, 0.97);
  border-top: 1px solid var(--line-strong); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.45);
}
.picked-slots { flex: 1 1 560px; 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: #110e0a; border: 1px solid var(--line-strong); border-radius: 7px; }
.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 .p0-hint { flex-basis: 100%; margin: 0; font-size: 14px; }
.icon { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.7); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:hover { background: rgba(230, 184, 74, 0.04); }
td.actions { white-space: nowrap; text-align: right; }
td.actions > * + * { margin-left: 12px; }
.player { font-weight: 600; }
.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-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-right: 4px; vertical-align: 1px; }
.badge.p0 { background: #ff8000; color: #1a0d00; }
.badge.p1 { background: #a335ee; color: #fff; }
.badge.p2 { background: #2a7fe0; color: #fff; }
.badge.p3 { background: #3c8a3c; color: #fff; }
ul.plain { list-style: none; padding: 0; }
details { margin-top: 6px; }
details + details { margin-top: 14px; }
summary { cursor: pointer; color: var(--gold); }
details[open] summary { margin-bottom: 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:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .loot-row { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "icon name pick" "icon kind pick" ". holders holders"; }
  .loot-holders { justify-content: flex-start; max-width: none; margin-top: 2px; }
}

@media (max-width: 640px) {
  .row.two { grid-template-columns: 1fr; }
  .picked { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; margin: 16px -16px -16px; padding: 8px 16px; }
  .picked-slots { grid-template-columns: 1fr; gap: 4px; }
  .slot { padding: 2px 4px 2px 6px; }
  .slot-item { font-size: 13px; }
  .picked button { align-self: stretch; padding: 0 14px; }
  .picked .p0-hint { grid-column: 1 / -1; font-size: 13px; }
  .loot-tools select { flex-basis: 40%; }
  .pbtn span { min-width: 36px; }
  .run-state { align-items: flex-start; }
  h1 { font-size: 22px; }
  .card { padding: 16px; }
  .pin-form { flex-direction: column; }
}
