:root { font-family: "Segoe UI", system-ui, sans-serif; color: #e8effb; background: #091e42; color-scheme: dark; --muted: #9db1cd; --line: #294361; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(ellipse at 15% 0, #163c6a 0, transparent 55%), #091e42; }
[hidden] { display: none !important; }
.app { max-width: 1330px; margin: auto; padding: 0 28px; }
header { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 14px; align-items: center; color: #e8effb; text-decoration: none; font-size: 13px; font-weight: 750; letter-spacing: 1.4px; }
.brand small { display: block; font-size: 11px; font-weight: 400; letter-spacing: .3px; color: var(--muted); margin-top: 5px; }
.brand-icon { background: #1b65ca; border: 1px solid #5b9efb; border-radius: 9px; font-size: 26px; padding: 4px 10px 7px; }
.header-tools { display: flex; gap: 20px; align-items: center; font-size: 12px; color: var(--muted); }
button, input { font: inherit; border-radius: 6px; min-height: 43px; }
button { cursor: pointer; border: 1px solid transparent; background: #9ae6b4; color: #073927; font-size: 13px; font-weight: 750; padding: 10px 18px; transition: background .15s, transform .15s; }
button:hover { background: #b6f5cb; }
button:active { transform: translateY(1px); }
button:disabled { cursor: wait; opacity: .5; }
button.quiet { color: #c9d8ee; background: transparent; border-color: #385571; }
button.quiet:hover, button.secondary:hover { background: #254a75; }
button.secondary { background: #173c66; color: #e8effb; border-color: #406489; }
input { width: 100%; padding: 10px 12px; border: 1px solid #476585; color: #f2f7ff; background: #091e42; font-size: 16px; }
input::placeholder { color: #879fbe; }
:focus-visible { outline: 3px solid #8fc1ff; outline-offset: 3px; }
label { font-size: 12px; font-weight: 650; color: #bfd0e6; display: block; margin-bottom: 8px; }
.eyebrow { color: #9ae6b4; font-size: 11px; font-weight: 750; letter-spacing: 1.8px; margin: 0 0 16px; }
.welcome { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 75px; padding: 52px 25px; }
.welcome-main { position: relative; }
h1 { font-size: clamp(48px, 5.3vw, 76px); line-height: .96; letter-spacing: -3px; margin: 21px 0 23px; font-weight: 900; }
.intro { color: #bdcfe6; line-height: 1.7; font-size: 17px; }
.ticket-preview { width: 220px; background: #fff; color: #172b4d; border-left: 5px solid #63ba3c; padding: 13px; border-radius: 5px; box-shadow: 0 12px 30px #0004; transform: rotate(6deg); position: absolute; right: 0; top: 98px; font-size: 10px; }
.ticket-preview strong { display: block; font-size: 13px; margin: 10px 0 15px; }
.ticket-preview b { background: #ebecf0; border-radius: 20px; padding: 4px; float: right; }
.preview-type { color: #5e6c84; }
.alpaca-preview { position: absolute; right: 17px; top: 224px; font-size: 65px; transform: rotate(-8deg); }
#join-form { max-width: 360px; margin-top: 30px; }
#create { width: 100%; margin-top: 12px; }
.join-row { display: flex; gap: 12px; align-items: flex-end; margin-top: 22px; }
.join-row > div { flex: 1; min-width: 0; }
#code { letter-spacing: 3px; text-transform: uppercase; }
.join-row button { white-space: nowrap; }
.fine { color: var(--muted); font-size: 12px; line-height: 1.75; }
.instructions { display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0 16px; font-size: 11px; color: var(--muted); }
.instructions b { display: block; color: #e0ebfa; margin-bottom: 5px; }
.leaderboard { background: #102b4d; border: 1px solid #34516e; border-radius: 12px; padding: 30px; align-self: stretch; }
h2 { font-size: 25px; letter-spacing: -.5px; margin: 0 0 10px; }
h3 { font-size: 13px; color: #e0ebfa; margin: 24px 0 12px; }
.muted { color: var(--muted); font-size: 12px; }
#highscores { padding: 0; list-style: none; margin: 28px 0 0; }
#highscores li { padding: 15px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 24px 1fr auto; gap: 9px; align-items: start; font-size: 13px; }
#highscores li.empty { display: block; padding: 35px 0; line-height: 1.9; }
#highscores small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
#highscores b { color: #9ae6b4; font-size: 17px; }
#highscores .place { color: #708eaf; font-size: 12px; }
#message { background: #4a2d2a; border: 1px solid #bb7864; color: #ffded0; padding: 12px; border-radius: 6px; font-size: 13px; }
.room-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 18px 0; }
.room-identity, .room-actions { display: flex; gap: 12px; align-items: center; }
.room-identity .eyebrow { margin: 0; }
#room-code { font-size: 21px; letter-spacing: 3px; }
#arena { display: grid; grid-template-columns: minmax(0, 960px) minmax(190px, 1fr); gap: 22px; }
.stage { min-width: 0; text-align: center; }
canvas { display: block; margin: 0 auto; border-radius: 8px; box-shadow: 0 12px 40px #0005; touch-action: none; cursor: crosshair; }
.game-help { font-size: 10px; color: var(--muted); margin: 8px 0; }
.room-sidebar { min-width: 0; }
.room-sidebar h2 { font-size: 19px; line-height: 1.4; }
.room-sidebar .eyebrow { font-size: 9px; margin-bottom: 10px; }
.scorecard { background: #16395c; border: 1px solid #34516e; border-radius: 8px; padding: 16px; margin-top: 18px; }
.scorecard > span { display: block; font-size: 9px; letter-spacing: 1.2px; color: var(--muted); }
.scorecard > strong { display: block; font-size: 46px; color: #9ae6b4; line-height: 1.4; }
.scorecard small { color: var(--muted); font-size: 10px; line-height: 1.6; display: block; }
#players, #ranking { list-style: none; padding: 0; margin: 0; }
#players li, #ranking li { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
#players li strong, #ranking li strong { margin-left: auto; white-space: nowrap; }
.player-dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid #ffffff80; flex-shrink: 0; }
#players .offline { opacity: .5; }
#share-link { font-size: 11px; margin-top: 12px; }
#local-pause { color: #ffe6a3; font-size: 12px; line-height: 1.6; }
footer { margin-top: 28px; padding: 20px 0; display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); color: #7590af; letter-spacing: 1px; font-size: 9px; }
@media (max-width: 1100px) { .ticket-preview, .alpaca-preview { display: none; } .welcome { gap: 35px; padding: 35px 0; } }
@media (max-width: 700px) { .app { padding: 0 12px; } header { min-height: 74px; gap: 8px; } .header-tools { gap: 8px; font-size: 10px; } .brand { font-size: 10px; gap: 8px; letter-spacing: .7px; } .brand-icon { font-size: 19px; padding: 4px 6px; } #connection { max-width: 110px; } .welcome { grid-template-columns: 1fr; gap: 20px; padding: 30px 6px; } h1 { font-size: 58px; } .leaderboard { padding: 24px; } #join-form { max-width: none; } .room-toolbar { flex-wrap: wrap; gap: 10px; padding: 12px 0; } .room-identity, .room-actions { gap: 8px; } button { padding: 9px 12px; } #arena { grid-template-columns: 1fr; gap: 12px; } .room-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; } .room-sidebar > .eyebrow { grid-column: 1/-1; margin: 0; } .room-sidebar h2 { font-size: 16px; } .scorecard { grid-column: 2; grid-row: 2/5; margin: 0; padding: 12px; } .room-sidebar h3 { margin: 4px 0; } .room-sidebar > .fine, #results, #local-pause, #share-link { grid-column: 1/-1; } #players { grid-column: 1; } footer span { display: none; } }
@media (max-height: 550px) and (min-width: 701px) { body.in-room header { min-height: 40px; } body.in-room .brand small { display: none; } .room-toolbar { padding: 7px 0; } #arena { grid-template-columns: minmax(0, 1fr) 205px; } .room-sidebar { font-size: 10px; } .room-sidebar > .fine { display: none; } .scorecard { padding: 8px; margin-top: 8px; } .scorecard > strong { font-size: 28px; } .room-sidebar h3 { margin: 12px 0 5px; } .room-sidebar h2 { font-size: 14px; } .room-sidebar .eyebrow { display: none; } #players li { padding: 5px 0; } footer { display: none; } }

@media (max-width: 700px) { .header-tools button { white-space: nowrap; padding: 8px; min-height: 38px; } .header-tools { gap: 6px; } .brand { letter-spacing: .3px; } }

/* PWA-Hinweise */
.offline-banner { background: #3d3415; border: 1px solid #b9962f; color: #ffe6a3; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin: 12px 0 0; }
.install-hint { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.install-hint button.quiet { min-height: 36px; padding: 6px 12px; font-size: 12px; }
.install-hint b { color: #e0ebfa; }
button.close-x { min-height: 36px; min-width: 36px; padding: 0 8px; font-size: 20px; line-height: 1; background: transparent; color: inherit; border-color: transparent; }
button.close-x:hover { background: #ffffff1a; }

/* Ideen-Board: Einstieg */
.ideen-teaser { display: flex; align-items: center; gap: 14px; margin: 18px 0 6px; padding: 12px 14px; border: 1px dashed #406489; border-radius: 8px; font-size: 12px; color: var(--muted); line-height: 1.5; max-width: 520px; }
.ideen-button { white-space: nowrap; background: #fdd835; color: #3d3100; flex-shrink: 0; }
.ideen-button:hover { background: #ffe76a; }
.ideen-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px; background: #00000026; font-size: 11px; }
.ideen-badge.fresh { background: #DE350B; color: #fff; }
.ideen-side { width: 100%; margin-top: 4px; }

/* Ideen-Board: Dialog im Jira-Look (hell, wie die Tickets im Spiel) */
dialog { border: 0; padding: 0; color: #172B4D; background: #fff; border-radius: 10px; box-shadow: 0 20px 60px #000a; color-scheme: light; }
dialog::backdrop { background: #091e42cc; }
dialog button.quiet { color: #42526E; border-color: #DFE1E6; }
dialog button.quiet:hover { background: #EBECF0; }
dialog .muted { color: #5E6C84; }
.board-dialog { width: min(1180px, calc(100vw - 32px)); max-width: none; height: min(820px, calc(100dvh - 32px)); max-height: none; }
.board-dialog[open] { display: flex; flex-direction: column; }
.board-head { display: flex; justify-content: space-between; gap: 16px; padding: 20px 22px 8px; align-items: flex-start; }
.board-head h2 { margin: 4px 0 6px; font-size: 24px; color: #172B4D; }
.board-head .muted { margin: 0; }
.board-actions { display: flex; gap: 8px; align-items: center; }
.board-actions #idee-neu { background: #0052CC; color: #fff; white-space: nowrap; }
.board-actions #idee-neu:hover { background: #0065ff; }
.crumbs { margin: 0; font-size: 12px; color: #5E6C84; }
.crumbs b { color: #172B4D; font-weight: 600; }
.board-tabs { display: none; gap: 6px; padding: 4px 16px 8px; overflow-x: auto; }
.board-tabs .tab { min-height: 34px; padding: 4px 12px; background: #F4F5F7; color: #42526E; border: 1px solid #DFE1E6; font-size: 12px; white-space: nowrap; border-radius: 16px; }
#board-status { margin: 0 22px; }
.board-columns { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 10px 22px 22px; overflow: auto; }
.board-column { background: #F4F5F7; border-radius: 8px; display: flex; flex-direction: column; min-height: 0; }
.column-head { margin: 0; padding: 12px 12px 8px; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: #5E6C84; display: flex; align-items: center; gap: 8px; }
.column-count { background: #DFE1E6; color: #42526E; border-radius: 10px; padding: 1px 8px; font-size: 11px; letter-spacing: 0; }
.col-geplant .column-count { background: #DEEBFF; color: #0747A6; }
.col-umgesetzt .column-count { background: #E3FCEF; color: #006644; }
.col-abgelehnt .column-count { background: #FFEBE6; color: #BF2600; }
.column-list { list-style: none; margin: 0; padding: 0 8px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.column-empty { color: #7A869A; font-size: 12px; padding: 14px 6px; text-align: center; border: 1px dashed #C1C7D0; border-radius: 6px; }
.idee-card { background: #fff; border-radius: 6px; padding: 10px 12px; box-shadow: 0 1px 2px #091e4240, 0 0 1px #091e424f; border-left: 4px solid #FFAB00; overflow-wrap: anywhere; }
.idee-card.typ-bug { border-left-color: #E5493A; }
.idee-card.typ-wunsch { border-left-color: #6554C0; }
.col-umgesetzt .idee-card { border-left-color: #36B37E; }
.col-abgelehnt .idee-card { opacity: .75; }
.card-head { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #5E6C84; }
.card-key { font-weight: 700; color: #42526E; }
.card-typ { margin-left: auto; text-transform: uppercase; font-size: 10px; letter-spacing: .5px; }
.card-title { margin: 6px 0 4px; font-size: 14px; line-height: 1.35; font-weight: 600; color: #172B4D; }
.card-desc { font-size: 12px; color: #42526E; margin: 4px 0; }
.card-desc summary { cursor: pointer; color: #0052CC; font-size: 11px; padding: 4px 0; }
.card-desc p { white-space: pre-wrap; margin: 4px 0 0; line-height: 1.5; }
.card-note { margin: 8px 0 2px; padding: 7px 9px; background: #DEEBFF; border-radius: 4px; font-size: 12px; line-height: 1.45; color: #172B4D; white-space: pre-wrap; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 11px; color: #5E6C84; }
.card-who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.avatar { width: 22px; height: 22px; border-radius: 50%; background: #0052CC; color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; flex-shrink: 0; }
.vote { min-height: 36px; padding: 4px 10px; background: #F4F5F7; color: #42526E; border: 1px solid #DFE1E6; font-size: 12px; font-weight: 600; }
.vote:hover { background: #EBECF0; }
.vote.voted { background: #DEEBFF; border-color: #4C9AFF; color: #0747A6; }

/* Einreichen-Dialog */
.create-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.create-dialog form { padding: 18px 22px 20px; }
.create-head { display: flex; justify-content: space-between; align-items: center; }
.create-head h2 { margin: 0; font-size: 20px; color: #172B4D; }
.create-dialog .crumbs { margin: 4px 0 14px; }
.create-dialog label { color: #5E6C84; margin: 12px 0 6px; }
.create-dialog label em { color: #DE350B; font-style: normal; }
.create-dialog .optional { font-weight: 400; color: #7A869A; }
.create-dialog input:not([type=radio]), .create-dialog textarea { width: 100%; background: #FAFBFC; color: #172B4D; border: 2px solid #DFE1E6; border-radius: 4px; padding: 9px 10px; font: inherit; font-size: 16px; }
.create-dialog input:focus, .create-dialog textarea:focus { background: #fff; border-color: #4C9AFF; outline: none; }
.create-dialog textarea { resize: vertical; min-height: 110px; }
.counter { margin: 4px 0 0; text-align: right; font-size: 11px; color: #7A869A; }
.typ-wahl { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.typ-wahl legend { font-size: 12px; font-weight: 650; color: #5E6C84; margin-bottom: 6px; padding: 0; }
.typ-wahl label { margin: 0; }
.typ-wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.typ-wahl span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 2px solid #DFE1E6; border-radius: 20px; color: #42526E; font-size: 14px; cursor: pointer; }
.typ-wahl input:checked + span { border-color: #0052CC; background: #DEEBFF; color: #0747A6; }
.typ-wahl input:focus-visible + span { outline: 3px solid #8fc1ff; outline-offset: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: #FFEBE6; color: #BF2600; border-radius: 4px; padding: 8px 10px; font-size: 13px; }
.create-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.create-actions button[type=submit] { background: #0052CC; color: #fff; }
.create-actions button[type=submit]:hover { background: #0065ff; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: #172B4D; color: #fff; border: 1px solid #9ae6b4; padding: 12px 18px; border-radius: 8px; font-size: 14px; z-index: 10; box-shadow: 0 10px 30px #0008; max-width: calc(100vw - 24px); }

@media (max-width: 800px) {
  .board-dialog { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .board-head { padding: 14px 14px 6px; padding-top: max(14px, env(safe-area-inset-top)); }
  .board-head h2 { font-size: 20px; }
  .board-head .muted, .board-head .crumbs { display: none; }
  .board-tabs { display: flex; }
  .board-columns { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 14px 14px; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .board-column { flex: 0 0 86%; scroll-snap-align: start; }
  .ideen-teaser { flex-direction: column; align-items: stretch; text-align: center; }
  .create-dialog { width: 100vw; max-width: none; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .create-dialog form { padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .create-actions button { flex: 1; }
}
@media (max-width: 700px) { .ideen-side { grid-column: 1/-1; } }
@media (max-height: 550px) and (min-width: 701px) { body.in-room .ideen-side { display: none; } }
