/* digidactics · Workshop-App */
@font-face { font-family: Lexend; src: url(/fonts/Lexend-Light.ttf); font-weight: 300; font-display: swap; }
@font-face { font-family: Lexend; src: url(/fonts/Lexend-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Lexend; src: url(/fonts/Lexend-SemiBold.ttf); font-weight: 600; font-display: swap; }
@font-face { font-family: Lexend; src: url(/fonts/Lexend-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: Mono; src: url(/fonts/SplineSansMono-Medium.ttf); font-weight: 500; font-display: swap; }

:root {
  --kobalt: #2340D9; --kobalt-d: #1A31A8; --kobalt-h: #E4E8FB;
  --orange: #FF5A1F; --orange-d: #B8400F; --orange-h: #FFE4D8;
  --paper: #F2EFE8; --ink: #111111; --grey: #6B675F; --line: #D9D6CF; --white: #fff;
  --r: 14px; --shadow: 0 1px 2px rgba(17,17,17,.06), 0 4px 16px rgba(17,17,17,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Lexend, system-ui, sans-serif; color: var(--ink); background: var(--white); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
.mono { font-family: Mono, ui-monospace, monospace; }
.label { font-family: Mono, ui-monospace, monospace; font-size: 13px; color: var(--orange-d); }
.muted { color: var(--grey); }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 820px) { .grid3, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid2, .grid3, .grid4 { grid-template-columns: minmax(0, 1fr); } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 0; background: var(--kobalt); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--kobalt-d); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.orange { background: var(--orange); color: var(--ink); }
.btn.orange:hover { background: #F04D12; }
.btn.ghost { background: transparent; color: var(--kobalt); border: 1.5px solid var(--kobalt); }
.btn.ghost:hover { background: var(--kobalt-h); }
.btn.light { background: var(--white); color: var(--ink); border: 1.5px solid var(--line); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.danger { background: #B42318; color: #fff; }
.iconbtn { width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.iconbtn:hover { background: var(--paper); }

/* Cards & Felder */
.card { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.card.kob { background: var(--kobalt-h); border-color: transparent; }
.card.ora { background: var(--orange-h); border-color: transparent; }
.card.pap { background: var(--paper); border-color: transparent; }
.card h3 { font-size: 18px; margin-bottom: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span.lbl { font-weight: 600; font-size: 15px; }
.field .help { font-size: 13px; color: var(--grey); }
.input, textarea.input, select.input { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 16px; line-height: 1.45; }
textarea.input { resize: vertical; min-height: 84px; }
.input:focus { outline: 3px solid rgba(35,64,217,.25); border-color: var(--kobalt); }
.presence { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.presence span { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--orange); color: var(--ink); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 14px; cursor: pointer; min-height: 36px; }
.chip.on { background: var(--kobalt); border-color: var(--kobalt); color: #fff; }
.chip.oon { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #C7C3BA; }
.dot.on { background: #1DB954; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--kobalt-h); color: var(--kobalt-d); font-weight: 600; }
.badge.ora { background: var(--orange-h); color: var(--orange-d); }

/* Tipps */
details.tip { border-radius: 12px; background: var(--paper); padding: 0; }
details.tip > summary { list-style: none; cursor: pointer; padding: 12px 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; min-height: 44px; }
details.tip > summary::-webkit-details-marker { display: none; }
details.tip > summary::before { content: '?'; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
details.tip[open] > summary { padding-bottom: 6px; }
details.tip .tipbody { padding: 0 16px 14px 52px; font-size: 15px; line-height: 1.55; }
details.tip .tipbody ul { margin: 6px 0; padding-left: 18px; }

/* Startseite */
.start { min-height: 100%; background: var(--kobalt); color: #fff; display: flex; flex-direction: column; padding: 40px clamp(20px, 5vw, 64px); }
.start > img { align-self: flex-start; }
.start h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 700; margin-top: 18px; }
.start .lead { font-size: 20px; color: var(--kobalt-h); max-width: 640px; margin-top: 12px; line-height: 1.5; }
.groupgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; max-width: 980px; }
@media (max-width: 700px) { .groupgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gtile { background: #fff; color: var(--ink); border-radius: 18px; padding: 20px; border: 0; text-align: left; cursor: pointer; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; }
.gtile:hover { outline: 4px solid var(--orange); }
.gtile:disabled { opacity: .6; cursor: not-allowed; outline: none; }
.gtile .num { font-size: 28px; font-weight: 700; }
.teacherlink { margin-top: auto; padding-top: 32px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.modal-bg { position: fixed; inset: 0; background: rgba(17,17,17,.5); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal { background: #fff; color: var(--ink); border-radius: 18px; padding: 24px; width: min(460px, 100%); max-height: 90vh; overflow: auto; }
.modal.wide { width: min(980px, 100%); }
.modal h2 { font-size: 24px; margin-bottom: 8px; }
.err { color: #B42318; font-size: 14px; }

/* Gruppenansicht */
.gshell { min-height: 100%; display: flex; flex-direction: column; background: #fff; }
.gtop { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1.5px solid var(--line); padding: 10px clamp(12px, 3vw, 28px); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.gtop img { height: 28px; }
.gtop .gname { font-weight: 700; font-size: 18px; }
.members { display: flex; gap: 6px; flex-wrap: wrap; }
.members .m { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--paper); }
.members .m.me { background: var(--kobalt-h); font-weight: 600; }
.slidebar { display: flex; align-items: center; gap: 14px; padding: 10px clamp(12px, 3vw, 28px); background: var(--kobalt); color: #fff; }
.slidebar img { height: 54px; border-radius: 6px; border: 2px solid rgba(255,255,255,.5); }
.slidebar .t { font-weight: 600; font-size: 17px; }
.slidebar .n { font-size: 12px; color: var(--kobalt-h); }
.past { background: var(--orange-h); padding: 10px clamp(12px, 3vw, 28px); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.gmain { padding: 22px clamp(12px, 3vw, 28px) 80px; max-width: 1200px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.taskhead { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.taskhead h2 { font-size: clamp(24px, 3vw, 32px); }
.abbadge { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: var(--orange); border: 1.5px solid var(--ink); border-radius: 10px; padding: 6px 12px; font-weight: 700; }
.timerchip { display: inline-flex; align-items: center; gap: 8px; font-family: Mono, monospace; font-size: 20px; padding: 6px 14px; border-radius: 999px; background: var(--ink); color: #fff; }
.timerchip.warn { background: var(--orange); color: var(--ink); }
.timerchip.over { background: #B42318; }
.aibox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aicount { font-size: 13px; color: var(--grey); }
.svgbox { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.svgbox img { width: 100%; height: 100%; object-fit: contain; display: block; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 80; max-width: 90vw; box-shadow: var(--shadow); }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(380px, 92vw); background: #fff; box-shadow: -8px 0 30px rgba(0,0,0,.15); z-index: 60; padding: 20px; overflow: auto; }
.drawer .item { width: 100%; text-align: left; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; cursor: pointer; margin-bottom: 8px; }
.drawer .item:hover { background: var(--paper); }

/* Zettelwand */
.notecol { display: flex; flex-direction: column; gap: 10px; border-radius: var(--r); padding: 14px; min-height: 200px; }
.note { background: #fff; border-radius: 10px; padding: 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.note textarea { border: 0; resize: none; min-height: 46px; padding: 0; font-size: 15px; background: transparent; }
.note textarea:focus { outline: none; }
.note .foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--grey); gap: 6px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--orange); display: inline-block; }
.dotbtn { border: 1.5px solid var(--orange); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 13px; cursor: pointer; min-height: 32px; }
.dotbtn.on { background: var(--orange); }

/* Crazy 8 */
.c8 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .c8 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.c8 .cell { border: 1.5px dashed var(--kobalt); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.c8 .cell.fav { border: 3px solid var(--orange); background: var(--orange-h); }
.c8 .num { font-weight: 700; color: var(--kobalt); }
.c8 .icon { width: 72px; height: 72px; }

/* Designkarten */
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.dcard { border: 2px solid var(--line); border-radius: 14px; padding: 10px; display: flex; gap: 10px; background: #fff; cursor: pointer; text-align: left; position: relative; }
.dcard.yes { border-color: #1DB954; box-shadow: 0 0 0 3px rgba(29,185,84,.2); }
.dcard.no { border-color: #B42318; opacity: .65; }
.dcard .state { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.dcard.yes .state { background: #1DB954; color: #fff; }
.dcard.no .state { background: #B42318; color: #fff; }
.phone { width: 74px; height: 138px; flex: none; border: 2.5px solid var(--ink); border-radius: 13px; overflow: hidden; display: flex; flex-direction: column; }
.phone .ttl { font-size: 8px; font-weight: 700; padding: 3px 5px 2px; white-space: nowrap; overflow: hidden; }
.phone .body { flex: 1; padding: 0 4px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.phone .nav { height: 14px; display: flex; justify-content: space-around; align-items: center; }
.phone .nav i { width: 5px; height: 5px; border-radius: 50%; display: block; }
.dcard .meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dcard .meta b { font-size: 15px; }
.dcard .meta small { font-size: 12px; color: var(--grey); line-height: 1.35; }
.swatches { display: flex; gap: 4px; margin-top: auto; }
.swatches i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #9A9A9A; display: block; }
.uploads { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.upl { border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: #fff; }
.upl img { width: 100%; height: 140px; object-fit: cover; display: block; }
.upl .foot { padding: 6px 8px; display: flex; gap: 6px; align-items: center; justify-content: space-between; font-size: 12px; }
.colorpick { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.colorpick input[type=color] { width: 64px; height: 64px; border: 2px solid var(--line); border-radius: 50%; padding: 0; background: none; cursor: pointer; }
.colorpick input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.colorpick input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }

/* Anforderungen */
.reqcol { border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.reqitem { background: #fff; border-radius: 10px; padding: 8px 10px; display: flex; gap: 6px; align-items: center; box-shadow: var(--shadow); }
.reqitem input { border: 0; flex: 1; min-width: 0; font-size: 15px; padding: 4px; background: transparent; }

/* Prototyp */
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .phones { grid-template-columns: minmax(0, 1fr); } }
.bigphone { width: 100%; max-width: 230px; aspect-ratio: 360/720; border: 4px solid var(--ink); border-radius: 30px; overflow: hidden; margin: 0 auto; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--grey); text-align: center; font-size: 14px; padding: 0; }
.bigphone img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Stars */
.stars { display: flex; gap: 8px; }
.stars button { width: 56px; height: 56px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-size: 30px; cursor: pointer; color: #C7C3BA; line-height: 1; }
.stars button.on { color: var(--orange); border-color: var(--orange); background: var(--orange-h); }

/* Lehrkraft */
.tshell { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); gap: 0; background: var(--paper); }
@media (max-width: 1100px) { .tshell { grid-template-columns: minmax(0, 1fr); } }
.tleft { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.tright { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; background: #fff; border-left: 1.5px solid var(--line); }
.tslide { width: 100%; border-radius: 12px; display: block; box-shadow: var(--shadow); }
.notes { white-space: pre-wrap; font-size: 15px; line-height: 1.55; background: #fff; border-radius: 12px; padding: 14px 16px; max-height: 280px; overflow: auto; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.thumbs button { flex: none; border: 2px solid transparent; border-radius: 8px; padding: 0; background: none; cursor: pointer; position: relative; }
.thumbs button.cur { border-color: var(--orange); }
.thumbs img { height: 54px; display: block; border-radius: 6px; }
.thumbs span { position: absolute; left: 4px; bottom: 3px; font-size: 10px; background: rgba(17,17,17,.7); color: #fff; padding: 0 4px; border-radius: 4px; }
.gcard { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.gcard.empty { opacity: .5; }

/* Beamer */
.beamer { position: fixed; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: none; }
.stage { position: relative; width: min(100vw, calc(100vh * 16 / 9)); aspect-ratio: 16 / 9; container-type: inline-size; }
.stage > img { width: 100%; height: 100%; display: block; }
.ov { position: absolute; }
.btimer { position: absolute; right: 2.5cqw; bottom: 3cqw; font-family: Mono, monospace; font-size: 3.2cqw; padding: .6cqw 1.8cqw; border-radius: 99cqw; background: var(--ink); color: #fff; border: .25cqw solid #fff; }
.btimer.warn { background: var(--orange); color: var(--ink); }
.btimer.over { background: #B42318; }

/* Export / Druck */
.export { max-width: 900px; margin: 0 auto; padding: 32px 24px; }
.export section.gsec { page-break-before: always; break-before: page; }
.export h1 { font-size: 34px; }
.export h2 { font-size: 26px; margin-top: 8px; }
.export h3 { font-size: 17px; margin: 18px 0 6px; color: var(--kobalt-d); }
.export p, .export li { font-size: 14px; line-height: 1.5; }
.export .box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 6px 0; font-size: 14px; white-space: pre-wrap; }
.export table { border-collapse: collapse; width: 100%; font-size: 14px; }
.export td, .export th { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
@media print {
  .noprint { display: none !important; }
  body { background: #fff; }
  .export { padding: 0; }
  @page { size: A4; margin: 16mm; }
}
