:root { color-scheme: light; --paper: #f8f5ed; --ink: #34364c; --muted: #66667a; --purple: #6250a5; --lavender: #ece5f7; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: var(--paper); color: var(--ink); font-family: ui-rounded, "Avenir Next", "Trebuchet MS", system-ui, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .48; }
button:focus-visible, input:focus-visible { outline: 3px solid #305c55; outline-offset: 5px; }
.library { max-width: 1000px; margin: 0 auto; padding: 48px 36px 24px; }
.welcome { margin: 0 0 36px; }
.hello { display: inline-flex; align-items: center; gap: 11px; color: #456159; font-size: 15px; font-weight: 700; padding: 9px 15px; background: #e4ece1; border-radius: 999px; }
.hello [aria-hidden="true"] { font-size: 20px; color: #72896e; }
h1 { font-size: clamp(36px, 5.5vw, 55px); line-height: 1.12; letter-spacing: -.03em; margin: 20px 0 14px; }
.welcome p { color: var(--muted); font-size: 18px; margin: 0; line-height: 1.6; }
.book { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; padding: 38px; border: 1px solid #e6dfd0; border-radius: 30px; background: #fffdf8; box-shadow: 0 12px 35px #665a4110; }
.book-art { min-height: 340px; position: relative; display: flex; align-items: center; justify-content: center; border-radius: 23px; background: var(--lavender); overflow: hidden; }
.illustrated-book { width: 195px; min-height: 268px; padding: 25px 16px 17px 23px; position: relative; color: #484365; background: #d5c5eb; border: 2px solid #4c476b; border-radius: 6px 14px 14px 6px; box-shadow: 8px 8px 0 #b7a1d4; transform: rotate(-7deg); text-align: center; }
.illustrated-book::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 0; border-left: 2px solid #4c476b; opacity: .45; }
.cover-label span { display: block; font-size: 23px; font-weight: 800; letter-spacing: -.8px; }
.cover-label small { font-size: 14px; font-weight: 600; }
.cover-flower { display: block; width: 118px; height: 118px; margin: 12px auto; }
.cover-author { font-size: 12px; font-weight: 700; }
.spark { position: absolute; color: #8f78b1; line-height: 1; }
.spark-one { left: 22px; top: 36px; font-size: 31px; }
.spark-two { right: 22px; top: 72px; font-size: 35px; }
.spark-three { bottom: 25px; right: 35px; font-size: 23px; }
.book-content { padding: 4px 0 0; }
.eyebrow { color: #6b6283; font-size: 14px; font-weight: 700; }
h2 { margin: 12px 0; font-size: clamp(28px, 3.6vw, 35px); line-height: 1.15; letter-spacing: -.8px; }
.author { margin: 0; color: var(--muted); font-size: 16px; }
.player { margin-top: 28px; }
.listening-status { min-height: 24px; margin: 0 0 17px; color: #53675b; font-size: 14px; font-weight: 600; line-height: 1.5; }
.timeline input { appearance: none; width: 100%; height: 8px; border-radius: 8px; margin: 10px 0; background: linear-gradient(to right, var(--purple) 0%, var(--purple) var(--progress, 0%), #e8e3ef var(--progress, 0%), #e8e3ef 100%); cursor: pointer; }
.timeline input::-webkit-slider-thumb { appearance: none; width: 22px; height: 22px; background: var(--purple); border: 4px solid #fffdf8; border-radius: 50%; box-shadow: 0 0 0 1px #b5a5d0; }
.timeline input::-moz-range-thumb { width: 16px; height: 16px; background: var(--purple); border: 3px solid #fffdf8; border-radius: 50%; }
.timeline input:disabled { cursor: default; }
.times { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; }
.playback-buttons { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 22px; }
.play { border: 0; min-height: 66px; flex: 1; border-radius: 20px; background: var(--purple); color: white; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; font-weight: 700; box-shadow: 0 4px 0 #493981; }
.play:hover:not(:disabled) { background: #554392; }
.play:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #493981; }
.play svg { width: 24px; height: 24px; fill: currentColor; }
.skip { min-width: 55px; min-height: 66px; padding: 5px; background: transparent; border: 0; color: #65587f; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.skip svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.skip span { font-size: 12px; font-weight: 700; }
.skip:hover:not(:disabled) { color: #392663; background: #eee8f7; border-radius: 14px; }
.start-over { display: block; margin: 17px auto 0; min-height: 44px; padding: 8px 12px; border: 0; background: transparent; color: #6f6483; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.start-over:hover:not(:disabled) { color: #392663; }
footer { padding: 25px 10px 10px; color: #5f5d6e; text-align: center; font-size: 13px; line-height: 1.6; }
footer span { color: #7a5f72; margin-left: 7px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
noscript { display: block; padding: 20px; }
@media (max-width: 700px) {
  .library { padding: 30px 20px 20px; max-width: 480px; }
  .welcome { margin-bottom: 25px; }
  h1 { font-size: clamp(32px, 10vw, 39px); }
  .welcome p { font-size: 16px; }
  .book { grid-template-columns: 1fr; gap: 26px; padding: 23px; border-radius: 25px; }
  .book-art { min-height: 174px; }
  .illustrated-book { width: 120px; min-height: 150px; padding: 11px 8px 9px 14px; }
  .cover-label span { font-size: 14px; }
  .cover-label small { font-size: 10px; }
  .cover-flower { width: 60px; height: 60px; margin: 6px auto; }
  .cover-author { font-size: 10px; }
  .book-content { padding: 0; }
  h2 { font-size: 29px; }
  .player { margin-top: 22px; }
  .playback-buttons { gap: 10px; }
}
@media (prefers-reduced-motion: no-preference) { button { transition: background .15s, color .15s, transform .15s; } }

.welcome-top{display:flex;align-items:center;justify-content:space-between;gap:15px}.logout{font:inherit;font-size:12px;border:0;background:none;color:#6250a5;text-decoration:underline;cursor:pointer;padding:9px 0}#book-picker-wrap{margin-bottom:16px}#book-picker-wrap label{display:block;font-size:13px;margin-bottom:6px}#book-picker{width:100%;font:inherit;color:inherit;padding:10px;border:1px solid #d4c8e8;border-radius:10px;background:#fffdf8}.login-layout{max-width:520px;padding:38px 22px 24px;margin:0 auto}.login-layout h1{font-size:38px;line-height:1.16;margin:18px 0 12px}.login-layout .intro{color:#646476;line-height:1.55;margin-bottom:28px}.login-card{background:#fffdf8;border:1px solid #e5ddce;border-radius:24px;padding:28px;box-shadow:0 16px 32px #443c2410}.login-card .login-symbol{width:64px;height:64px;background:#ece5f7;color:#6250a5;border-radius:20px;display:grid;place-items:center;margin-bottom:19px}.login-card label{display:block;font-size:15px;font-weight:700;margin:10px 0}.code-row{display:flex;border:1px solid #bbaad8;border-radius:12px;overflow:hidden;background:white}.code-row input{min-width:0;width:100%;border:0;background:transparent;font:inherit;font-size:16px;padding:14px 12px;color:inherit;outline-offset:-3px}.show-code{border:0;background:transparent;cursor:pointer;color:#6250a5;padding:8px 12px;font:inherit;font-size:12px}.login-card .play{width:100%;margin-top:18px;min-height:55px}.login-status{font-size:13px;line-height:1.5;color:#646476;min-height:24px;margin:14px 0 0}.login-note{font-size:12px;color:#646476;line-height:1.55;text-align:center;margin-top:24px}@media(max-width:600px){.login-layout{padding:26px 18px}.login-layout h1{font-size:32px}.login-card{padding:23px}}

/* Tempo (14.11.2026) */
.tempo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 18px; max-width: 360px; margin-inline: auto; }
.tempo-label { grid-column: 1 / -1; text-align: center; font-size: 14px; color: var(--muted); }
.tempo button { min-height: 44px; min-width: 0; padding: 6px 4px; border-radius: 999px; border: 2px solid #d9cdee; background: white; color: #4b3f72; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.tempo button[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: white; }

/* Schmale Bildschirme (15.11.2026): Das Auswahlfeld hat die Spalte auf die Breite seines längsten Titels gedehnt,
   am iPhone SE ragte dadurch alles rechts aus dem Bild. Spalten dürfen jetzt schmaler werden als ihr Inhalt. */
.book { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.book-content, .book-art { min-width: 0; }
#book-picker { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
h1, h2 { overflow-wrap: break-word; }
@media (max-width: 700px) { .book { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 360px) {
  .library { padding: 22px 12px 16px; }
  .book { padding: 16px; }
  h2 { font-size: 25px; }
  .playback-buttons { gap: 6px; }
  .skip { min-width: 46px; }
}
