:root {
  --bg: #17110b;
  --panel: rgba(250, 242, 230, 0.78);
  --panel-strong: rgba(250, 242, 230, 0.88);
  --panel-soft: rgba(242, 229, 209, 0.84);
  --line: rgba(112, 74, 41, 0.16);
  --text: #241c15;
  --muted: #7a6755;
  --ok: #176b3a;
  --warn: #9a5b00;
  --stop: #9a1b1b;
  --accent: #7a4525;
  --accent-soft: #f0dcc0;
  --glass-shadow: 0 20px 46px rgba(20, 12, 7, 0.20);
  --body-font: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --title-font: "Georgia", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body-font);
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background-image: url("/static/img/pianopi_start_hintergrund_fluegel_20260604.png");
  background-size: cover;
  background-position: 72% 68%;
  background-repeat: no-repeat;
  filter: saturate(1.04) brightness(1.08) contrast(1.00) blur(0px);
  transform: scale(1.02);
}

body::after {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 244, 218, 0.05), transparent 36%),
    linear-gradient(180deg, rgba(22, 13, 6, 0.00) 0%, rgba(22, 13, 6, 0.02) 42%, rgba(22, 13, 6, 0.08) 100%);
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 18px 30px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  color: #fff9ed;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.topbar-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

h1,
h2 {
  margin: 0;
  font-family: var(--title-font);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: 1.28rem;
}

.muted {
  color: rgba(255, 249, 237, 0.82);
  font-size: 0.92rem;
}

.section-kicker {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.hero-card,
.sound-card,
.piano-control-card,
.mini-status {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hero-card {
  padding: 34px;
  margin-bottom: 20px;
  background: var(--panel-strong);
}

.hero-copy {
  margin-bottom: 18px;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

button,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(39, 25, 14, 0.08);
}

button:hover {
  background: #f1e3d0;
}

button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.hero-button {
  min-height: 196px;
  padding: 24px 20px;
  font-size: 1.18rem;
  font-weight: 800;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 26px;
}

.primary-action {
  border-color: rgba(255, 220, 160, 0.42);
  background: linear-gradient(180deg, rgba(122, 69, 37, 0.98) 0%, rgba(67, 40, 24, 0.98) 100%);
  color: #fff;
}

.primary-action:hover {
  background: linear-gradient(180deg, rgba(137, 82, 45, 0.98) 0%, rgba(78, 47, 27, 0.98) 100%);
}

.school-action {
  border-color: rgba(92, 132, 83, 0.36);
  background: linear-gradient(180deg, rgba(241, 248, 233, 0.98) 0%, rgba(205, 226, 186, 0.94) 100%);
}

.school-action:hover {
  background: linear-gradient(180deg, rgba(247, 251, 240, 0.99) 0%, rgba(215, 233, 201, 0.96) 100%);
}

.musicbox-action {
  border-color: rgba(185, 124, 56, 0.34);
  background: linear-gradient(180deg, rgba(255, 241, 220, 0.98) 0%, rgba(222, 187, 132, 0.95) 100%);
}

.musicbox-action:hover {
  background: linear-gradient(180deg, rgba(255, 247, 233, 0.99) 0%, rgba(232, 201, 150, 0.96) 100%);
}

.demo-action {
  border-color: rgba(180, 113, 45, 0.34);
  background: linear-gradient(180deg, rgba(255, 239, 211, 0.98) 0%, rgba(224, 175, 101, 0.9) 100%);
}

.demo-action:hover {
  background: linear-gradient(180deg, rgba(255, 244, 224, 0.99) 0%, rgba(233, 187, 116, 0.96) 100%);
}

.demo-strip {
  margin-top: 18px;
  padding: 6px 10px 8px;
  border-radius: 22px;
  border: 1px solid rgba(174, 118, 65, 0.22);
  background: linear-gradient(180deg, rgba(255, 246, 232, 0.94) 0%, rgba(239, 214, 175, 0.84) 100%);
  box-shadow: 0 16px 30px rgba(61, 36, 17, 0.14);
  display: grid;
  gap: 4px;
}

.demo-strip-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.demo-strip-copy h2 {
  margin: 0;
  font-size: 0.92rem;
}

.demo-strip-copy .help {
  margin: 0;
}

.demo-strip-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr) auto;
  gap: 4px;
  align-items: end;
}

.demo-strip-field {
  display: grid;
  gap: 4px;
}

.demo-strip-actions button {
  min-width: 96px;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.demo-strip-mix {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.demo-strip-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  white-space: nowrap;
  padding-top: 6px;
}

.demo-strip-actions button {
  min-width: 94px;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.demo-mini-control {
  display: grid;
  gap: 3px;
  padding: 6px 8px 7px;
  border-radius: 12px;
  border: 1px solid rgba(148, 97, 53, 0.14);
  background: rgba(255, 252, 246, 0.52);
  flex: 0 0 116px;
  width: 116px;
  max-width: 116px;
}

.demo-mini-control label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  color: rgba(61, 43, 27, 0.82);
  font-size: 0.60rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.demo-mini-control label strong {
  color: var(--ink);
  font-size: 0.66rem;
  text-transform: none;
  letter-spacing: 0;
}

.demo-mini-control .mini-range {
  width: 100%;
  min-height: 12px;
  accent-color: var(--accent);
}

.demo-card {
  display: grid;
  gap: 12px;
  cursor: default;
}

.demo-select-label {
  margin-top: 2px;
  color: rgba(61, 43, 27, 0.7);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.demo-select {
  min-height: 38px;
  background: rgba(255, 252, 246, 0.86);
  font-size: 0.88rem;
}

.demo-summary {
  padding: 2px 2px 0;
  color: rgba(61, 43, 27, 0.78);
  font-size: 0.84rem;
  font-weight: 700;
}

.demo-progress {
  display: grid;
  gap: 6px;
  padding: 8px 10px 10px;
  border-radius: 16px;
  border: 1px solid rgba(148, 97, 53, 0.14);
  background: rgba(255, 252, 246, 0.62);
}

.demo-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.demo-progress-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: rgba(61, 43, 27, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.demo-progress-label strong {
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
}

.demo-progress-jump {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-progress-jump button {
  min-width: 72px;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.demo-progress-slider {
  width: 100%;
  accent-color: var(--accent);
}

.demo-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.demo-controls button {
  min-height: 42px;
  padding: 8px 10px;
  font-size: 0.92rem;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 1180px) {
  .hero-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-strip-mix {
    flex-wrap: wrap;
  }

  .demo-mini-control {
    flex: 1 1 160px;
    width: auto;
    max-width: none;
  }

  .demo-strip-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .demo-progress-label,
  .demo-progress-head {
    width: 100%;
  }

  .demo-progress-jump {
    width: 100%;
  }

  .demo-progress-jump button {
    flex: 1 1 0;
  }
}

.sound-card {
  padding: 18px 20px;
  margin-bottom: 18px;
}

.piano-control-card {
  padding: 18px 20px;
  margin-bottom: 18px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.sound-card h2 {
  font-size: 1.18rem;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: fit-content;
  font-weight: 800;
}

.lamp {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(34, 29, 24, 0.06);
  flex: 0 0 auto;
}

.lamp-ok {
  background: #19a35b;
}

.lamp-warn {
  background: #e0a11b;
}

.lamp-stop {
  background: #c93232;
}

.ok {
  color: var(--ok);
}

.warn {
  color: var(--warn);
}

.stop {
  color: var(--stop);
}

.form-grid {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.sound-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.sound-summary div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(99, 75, 48, 0.16);
  border-radius: 14px;
  background: rgba(255, 250, 243, 0.62);
}

.sound-summary span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sound-summary strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.96rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.select-control {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(99, 75, 48, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 1rem;
}

.select-control:disabled {
  color: var(--muted);
  background: #f0ebe3;
}

.hint {
  margin-top: 10px;
  color: var(--warn);
  font-size: 0.9rem;
}

.sound-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.soundfont-picker {
  margin-top: 10px;
}

.soundfont-picker .field-label {
  margin-top: 0;
}

.piano-note {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.piano-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.gain-inline {
  padding: 4px 0 0;
}

.reverb-inline {
  padding: 4px 0 0;
}

.gain-inline label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.gain-inline strong {
  color: var(--text);
  font-size: 0.82rem;
}

.reverb-inline label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.reverb-inline strong {
  color: var(--text);
  font-size: 0.82rem;
}

.gain-slider {
  width: 100%;
  margin: 0;
  height: 18px;
  accent-color: var(--accent);
}

.big-action {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(255, 250, 243, 0.9);
}

.stop-action {
  border-color: #e0b4b4;
  background: #fff2f2;
}

.stop-action:hover {
  background: #f6dddd;
}

.secondary-action {
  background: rgba(246, 234, 216, 0.86);
}

.secondary-action:hover {
  background: rgba(239, 221, 196, 0.95);
}

.mini-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
}

.mini-status-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.advanced-link {
  min-height: 42px;
  padding: 9px 14px;
  justify-self: end;
  font-size: 0.92rem;
  font-weight: 800;
}

.log,
.debug-panel,
.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .shell {
    padding: 12px;
  }

  .topbar,
  .hero-actions,
  .sound-actions,
  .piano-actions,
  .sound-summary,
  .mini-status {
    display: block;
  }

  .topbar > * {
    margin-bottom: 8px;
  }

  .hero-button,
  .big-action,
  .gain-inline,
  .advanced-link {
    width: 100%;
    margin-bottom: 10px;
  }

  .hero-button {
    min-height: 126px;
  }

  .demo-card {
    gap: 9px;
  }

  .demo-strip-head,
  .demo-strip-grid {
    display: block;
  }

  .demo-strip-field {
    margin-bottom: 10px;
  }

  .demo-strip-mix {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-mini-control {
    margin-bottom: 0;
  }

  .demo-strip-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-strip-actions button {
    width: 100%;
    min-width: 0;
  }

  .demo-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-actions {
    display: block;
  }

  .section-head,
  .form-grid {
    display: block;
  }

  .status-line {
    margin-top: 10px;
  }

  .field-label {
    display: block;
    margin-top: 12px;
    margin-bottom: 5px;
  }

  .mini-status-item {
    margin-bottom: 8px;
  }
}

.hero-button span,
.hero-button small {
  display: block;
}

.hero-button small {
  margin-top: 8px;
  font-size: 0.94rem;
  font-weight: 700;
  opacity: 0.78;
}

@media (max-width: 900px) {
  .play-notes-head,
  .play-sound-head,
  .play-status-cluster {
    display: block;
  }

  .play-notes-actions {
    margin-top: 10px;
  }

  .play-sound-statusbar {
    align-items: flex-start;
  }

  .play-sound-status-button {
    width: 100%;
    margin-left: 0;
    order: 99;
  }

  .play-recent-list {
    flex-direction: column;
  }

  .play-recent-item {
    width: 100%;
  }

  .play-sound-row {
    grid-template-columns: 1fr;
  }

  .play-sound-inline {
    display: grid;
    grid-template-columns: 1fr;
  }

  .play-sound-select,
  .compact-action,
  .stop-compact {
    width: 100%;
  }

  .play-pdf-stage {
    min-height: 420px;
  }

  .play-reader-startpage-row {
    grid-template-columns: 1fr;
  }

  .play-reader-startpage-step,
  .play-reader-startpage-apply {
    width: 100%;
  }

  .play-focus-toolbar {
    flex-wrap: nowrap;
  }

  .play-focus-nav {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
  }

  .play-page-indicator {
    flex: 1 1 auto;
  }
}

.play-notes-card,
.play-sound-card,
.play-future-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.play-notes-card {
  padding: 20px;
  margin-bottom: 18px;
  display: grid;
  gap: 14px;
}

.play-notes-head,
.play-sound-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.play-notes-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.play-sound-statusbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 8px 12px;
  border: 1px solid rgba(99, 75, 48, 0.16);
  border-radius: 16px;
  background: rgba(255, 250, 243, 0.72);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.play-sound-status-label {
  color: var(--text);
  font-weight: 900;
}

.play-sound-status-state {
  color: var(--text);
}

.play-sound-status-value {
  color: var(--muted);
}

.play-sound-status-sep {
  color: rgba(122, 103, 85, 0.6);
}

.play-sound-status-button {
  margin-left: auto;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.play-recent-area {
  display: grid;
  gap: 8px;
}

.play-recent-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.play-selection-note {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.play-selection-note.error {
  color: var(--stop);
}

.play-recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.play-recent-item {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 14px;
  border: 1px solid rgba(99, 75, 48, 0.16);
  background: rgba(255, 250, 243, 0.72);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
}

.play-recent-item:hover {
  background: rgba(246, 234, 216, 0.95);
}

.play-recent-item.empty {
  opacity: 0.72;
  cursor: default;
}

.play-reader-card {
  display: none;
  padding: 8px 10px 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(99, 75, 48, 0.16);
  border-radius: 22px;
  background: rgba(255, 250, 243, 0.82);
  box-shadow: 0 12px 26px rgba(39, 25, 14, 0.08);
}

.play-reader-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  list-style: none;
  cursor: pointer;
}

.play-reader-card > summary::-webkit-details-marker {
  display: none;
}

.play-reader-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.play-reader-summary {
  flex: 0 0 auto;
  align-self: flex-start;
  min-width: 82px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(99, 75, 48, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 30px;
  text-align: center;
}

.play-reader-summary-copy {
  min-width: 0;
}

.play-reader-body {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.play-reader-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.play-reader-toolbar .play-reader-startpage-label {
  margin-right: 2px;
}

.play-reader-startline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 5px 6px;
  border: 1px solid rgba(99, 75, 48, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.play-reader-startpage-label,
.play-reader-startpage-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.play-reader-startpage-step {
  min-width: 34px;
  min-height: 34px;
  padding: 0 8px;
  font-size: 1rem;
  font-weight: 900;
}

.play-reader-startpage-input-wrap {
  display: block;
  min-width: 0;
}

.play-reader-startpage-input {
  width: 100%;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid rgba(99, 75, 48, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
}

.play-reader-startpage-apply {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 900;
  margin-left: auto;
}

.play-reader-choice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(99, 75, 48, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 900;
}

.play-reader-choice input {
  margin: 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.play-reader-choice span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.play-reader-choice strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 900;
}

.play-reader-choice small {
  display: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.play-reader-choice-double {
  background: rgba(246, 237, 224, 0.78);
}

.play-reader-choice-double[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.75;
}

.play-reader-choice-double small {
  font-style: italic;
}

.play-reader-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.play-reader-cta {
  min-width: 148px;
}

.play-reader-help {
  margin: 0;
}

.play-reader-card:not(.play-reader-ready) .play-reader-body {
  opacity: 0.7;
}

.play-reader-card:not(.play-reader-ready) .play-reader-choices,
.play-reader-card:not(.play-reader-ready) .play-reader-cta {
  pointer-events: none;
  opacity: 0.55;
}

.play-prepare-mode .play-reader-card {
  display: block;
}

.play-prepare-mode .play-notes-head,
.play-prepare-mode .play-recent-area {
  display: none;
}

.play-prepare-mode .play-sound-card,
.play-prepare-mode .play-future-card,
.play-prepare-mode .play-footer-status {
  display: none;
}

.play-prepare-mode .play-notes-card {
  gap: 14px;
}

.play-prepare-mode .play-pdf-stage {
  min-height: clamp(560px, 70vh, 880px);
}

.play-prepare-mode .play-pdf-hint,
.play-prepare-mode .play-pdf-touch {
  display: none;
}

.play-pdf-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  min-height: clamp(560px, 72vh, 900px);
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(99, 75, 48, 0.16);
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.92) 0%, rgba(246, 233, 211, 0.84) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.play-pdf-area,
.play-pdf-placeholder,
.play-pdf-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.play-pdf-area {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
}

.play-pdf-spread {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.play-pdf-spread .play-pdf-canvas {
  position: relative;
  inset: auto;
  flex: 1 1 0;
  min-width: 0;
  height: auto;
  width: auto;
  max-width: 100%;
}

.play-read-mode .play-pdf-area {
  overflow: auto;
  align-items: flex-start;
  justify-content: center;
  padding: 8px 8px 18px;
}

.play-pdf-canvas {
  position: relative;
  inset: auto;
  display: block;
  margin: auto;
  object-fit: contain;
  background: transparent;
}

.play-pdf-stage:fullscreen .play-pdf-area {
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-pdf-stage:fullscreen .play-pdf-spread {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: max-content;
  max-width: 100%;
}

@media (max-width: 900px) {
  .play-pdf-stage:fullscreen .play-pdf-spread {
    gap: 1px;
  }
}

.play-read-mode .play-pdf-canvas {
  margin: 0 auto 18px;
}

.play-pdf-spread .play-pdf-canvas {
  margin: 0;
}

.play-pdf-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 1.04rem;
  font-weight: 700;
}

.play-sound-card {
  padding: 16px 18px;
  margin-bottom: 18px;
  display: grid;
  gap: 12px;
}

.play-status-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.play-status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(99, 75, 48, 0.14);
  background: rgba(255, 250, 243, 0.72);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.play-status-item strong {
  color: var(--text);
  font-size: 0.84rem;
}

.play-sound-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr));
  gap: 10px;
  align-items: end;
}

.play-sound-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.play-sound-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.play-sound-select {
  flex: 1 1 280px;
  min-height: 42px;
}

.play-sound-current {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.play-mini-control {
  display: grid;
  gap: 3px;
  padding: 6px 8px 7px;
  border-radius: 12px;
  border: 1px solid rgba(148, 97, 53, 0.14);
  background: rgba(255, 252, 246, 0.56);
  min-width: 0;
}

.play-mini-control label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  color: rgba(61, 43, 27, 0.82);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.play-mini-control label strong {
  color: var(--text);
  font-size: 0.68rem;
  text-transform: none;
  letter-spacing: 0;
}

.play-mini-control .mini-range {
  width: 100%;
  min-height: 12px;
  accent-color: var(--accent);
}

.compact-action {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 900;
}

.stop-compact {
  border-color: #e0b4b4;
  background: #fff2f2;
}

.stop-compact:hover {
  background: #f6dddd;
}

.play-future-card {
  padding: 12px 16px;
  margin-bottom: 18px;
  display: block;
}

.play-future-card summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  cursor: pointer;
}

.play-future-card summary::-webkit-details-marker {
  display: none;
}

.play-future-title {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
}

.play-future-card .help {
  margin: 8px 0 0;
}

.play-focus-toolbar {
  display: none;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(99, 75, 48, 0.16);
  background: rgba(255, 250, 243, 0.86);
  box-shadow: 0 10px 24px rgba(39, 25, 14, 0.10);
}

.play-focus-mode #exitFocusMode,
.play-focus-mode #togglePdfFitBtn {
  display: none;
}

.play-focus-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.play-page-indicator {
  min-width: 96px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(99, 75, 48, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 34px;
  text-align: center;
}

.fullscreen-action {
  min-width: 110px;
}

.play-pdf-touch {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 3;
  touch-action: manipulation;
}

.play-pdf-touch-left {
  left: 0;
}

.play-pdf-touch-right {
  right: 0;
}

.play-pdf-hint {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(99, 75, 48, 0.16);
  background: rgba(255, 250, 243, 0.86);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  z-index: 4;
  pointer-events: none;
  max-width: calc(100% - 24px);
  text-align: center;
}

.play-focus-mode .shell {
  max-width: none;
  padding: 10px;
}

.play-focus-mode .topbar {
  display: none;
}

.play-focus-mode .play-notes-card {
  margin: 0;
  min-height: calc(100vh - 20px);
  padding: 10px;
  gap: 10px;
}

.play-focus-mode .play-notes-head,
.play-focus-mode .play-notes-actions,
.play-focus-mode .play-recent-area,
.play-focus-mode .play-reader-card,
.play-focus-mode .play-sound-card,
.play-focus-mode .play-sound-statusbar,
.play-focus-mode .play-future-card,
.play-focus-mode .play-footer-status {
  display: none;
}

.play-focus-mode .play-pdf-stage {
  min-height: calc(100vh - 88px);
  border-radius: 18px;
}

.play-focus-mode .play-focus-toolbar {
  display: flex;
  position: static;
  order: 2;
  margin-top: 10px;
  margin-bottom: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.play-focus-mode #toggleFullscreenBtn {
  margin-left: auto;
}

.play-focus-mode .play-pdf-touch {
  display: block;
}

.play-focus-mode .play-pdf-hint {
  display: block;
}

.play-read-mode .play-pdf-touch {
  display: none;
}

.play-read-mode .play-pdf-hint {
  display: none;
}

.play-focus-mode .play-pdf-placeholder {
  font-size: 1.08rem;
}

.play-focus-mode .play-pdf-area {
  order: 1;
  flex: 1 1 auto;
  min-height: 0;
}

.play-pdf-stage:fullscreen {
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  border-radius: 0;
}

.play-pdf-stage:fullscreen .play-focus-toolbar {
  margin-bottom: 10px;
}

.play-pdf-stage:fullscreen #exitFocusMode,
.play-pdf-stage:fullscreen #togglePdfFitBtn {
  display: inline-flex;
}

.play-pdf-stage:fullscreen .play-pdf-area {
  min-height: 0;
}

.play-pdf-stage:fullscreen .play-pdf-canvas {
  margin: auto;
}

.play-pdf-stage:fullscreen .play-pdf-spread .play-pdf-canvas {
  margin: 0;
  width: auto;
  height: auto;
  max-width: none;
  flex: none;
}

.play-focus-mode .play-pdf-frame {
  background: #fff;
}

.play-focus-mode .play-notes-card {
  grid-template-rows: auto 1fr;
}

.play-footer-status {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(0, auto));
}

.play-read-mode.play-focus-mode .play-pdf-area {
  overflow: auto;
  align-items: flex-start;
  justify-content: center;
}

.play-read-mode.play-focus-mode .play-pdf-touch,
.play-read-mode.play-focus-mode .play-pdf-hint {
  display: none;
}

.play-read-mode.play-focus-mode .play-pdf-canvas {
  margin: 0 auto 18px;
}
