:root {
  --ink: #17142f;
  --muted: #6b6686;
  --violet: #5f4bd8;
  --deep-violet: #342481;
  --lavender: #eeeaff;
  --soft-lavender: #dcd5ff;
  --mint: #dff7ef;
  --sky: #dfeeff;
  --peach: #ffe8da;
  --rose: #ffe5ef;
  --sunny: #fff2bf;
  --paper: #fbfaff;
  --white: #ffffff;
  --line: rgba(95, 75, 216, 0.16);
  --shadow: 0 24px 70px rgba(52, 36, 129, 0.14);
  --soft-shadow: 0 14px 34px rgba(52, 36, 129, 0.09);
  font-family: Inter, "Noto Sans", "Noto Sans KR", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(140deg, rgba(223, 238, 255, 0.92), rgba(251, 250, 255, 0.7) 38%, rgba(255, 232, 218, 0.52)),
    linear-gradient(180deg, #f8fbff 0%, #fbfaff 50%, #f4f0ff 100%);
}

button,
input,
select {
  font: inherit;
}

button,
select,
.upload-button {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

button:hover,
.upload-button:hover {
  transform: translateY(-1px);
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.app-shell {
  width: min(1440px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 32px;
}

.topbar,
.brand,
.topbar-actions,
.chapter-row,
.transport-row,
.section-title {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 16px;
  padding: 12px 4px 18px;
}

.account-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, auto) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--soft-shadow);
}

.account-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-copy strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.account-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.account-form,
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.google-auth-slot {
  display: flex;
  min-height: 40px;
  align-items: center;
}

.google-auth-slot > div {
  line-height: 0;
}

.google-fallback {
  min-height: 40px;
  padding: 0 14px;
}

.account-form input {
  width: min(190px, 100%);
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.account-form .secondary-button,
.account-actions .secondary-button,
.account-actions .ghost-button {
  min-height: 40px;
  padding: 0 14px;
}

.account-panel.signed-in {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 12px;
}

.account-panel.signed-in .account-copy {
  gap: 1px;
}

.account-panel.signed-in .account-copy strong {
  font-size: 15px;
}

.account-panel.signed-in .account-copy span {
  font-size: 12px;
}

.account-icon-button {
  width: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.brand {
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 12px 26px rgba(23, 20, 47, 0.16);
  font-size: 13px;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small,
.muted,
.tiny,
.empty-state span,
.message-area {
  color: var(--muted);
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.status-pill,
.ghost-button,
.text-button {
  min-height: 36px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.ghost-button,
.text-button {
  border: 1px solid var(--line);
  color: var(--deep-violet);
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
}

.ghost-button {
  padding: 0 14px;
}

.text-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 94px);
}

.library-panel,
.reader-panel {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.library-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.upload-zone,
.panel-section,
.player-card,
.progress-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
}

.upload-zone {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.compact-upload {
  padding: 14px;
}

.library-add-button {
  width: calc(100% - 28px);
  margin: 4px auto 0;
  min-height: 48px;
}

.cloud-box {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(223, 238, 255, 0.5);
}

.cloud-box label {
  color: var(--deep-violet);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.cloud-actions input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.paste-box {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(238, 234, 255, 0.42);
}

.paste-box label {
  color: var(--deep-violet);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.paste-box textarea,
.paste-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.paste-box textarea {
  min-height: 128px;
  resize: vertical;
  padding: 12px;
  line-height: 1.5;
}

.paste-box input {
  min-height: 42px;
  padding: 0 12px;
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--violet);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 30px;
  line-height: 1.05;
}

h2 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.15;
}

.muted {
  margin-bottom: 0;
  line-height: 1.55;
}

.tiny {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.upload-button,
.primary-button,
.secondary-button,
.icon-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
}

.upload-button,
.primary-button {
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 12px 24px rgba(23, 20, 47, 0.18);
}

.upload-button {
  width: 100%;
  padding: 0 18px;
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.panel-section {
  min-height: 220px;
  padding: 16px;
}

.section-title {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title h2 {
  margin: 0;
}

.book-list {
  display: grid;
  gap: 10px;
}

.book-card {
  position: relative;
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 78px;
  padding: 14px 44px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  text-align: left;
  background: var(--paper);
  cursor: pointer;
}

.book-card.active {
  border-color: rgba(95, 75, 216, 0.42);
  background: var(--lavender);
  box-shadow: 0 14px 30px rgba(95, 75, 216, 0.12);
}

.book-card strong,
.book-card span {
  overflow-wrap: anywhere;
}

.book-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.35;
}

.book-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.delete-book-button {
  position: absolute;
  top: 16px;
  right: 14px;
  display: grid;
  width: 28px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(95, 75, 216, 0.22);
  border-radius: 999px;
  color: var(--deep-violet);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  z-index: 2;
}

.delete-book-button:hover {
  color: #8f2654;
  border-color: rgba(143, 38, 84, 0.28);
  background: var(--rose);
}

.empty-state {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(238, 234, 255, 0.42);
}

.reader-panel {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(260px, 1fr) auto;
  gap: 14px;
  min-width: 0;
  padding: 18px;
}

.mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 10px;
}

.mode-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.mode-button {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: var(--deep-violet);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
}

.mode-button.active {
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 10px 22px rgba(23, 20, 47, 0.15);
}

.drive-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(126, 191, 233, 0.28);
  border-radius: 999px;
  color: var(--deep-violet);
  background: linear-gradient(135deg, var(--mint), rgba(223, 238, 255, 0.88));
  cursor: pointer;
  font-weight: 900;
}

.drive-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sync-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--deep-violet);
  background: var(--mint);
  font-size: 13px;
  font-weight: 900;
}

.reader-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 16px;
  align-items: start;
}

.reader-header h2 {
  margin-bottom: 0;
  font-size: 30px;
  overflow-wrap: anywhere;
}

.reader-subtitle {
  display: none;
}

.progress-card {
  display: grid;
  min-height: 92px;
  place-items: center;
  padding: 12px;
  text-align: center;
}

.progress-card span {
  font-size: 28px;
  font-weight: 900;
}

.progress-card small {
  color: var(--muted);
  font-weight: 800;
}

.player-card {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.audio-controls {
  display: grid;
  gap: 18px;
}

.text-mode-tools {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--mint);
  color: var(--deep-violet);
  font-size: 13px;
  font-weight: 850;
}

.font-tools {
  display: flex;
  gap: 8px;
}

.font-tools .secondary-button {
  min-height: 34px;
  padding: 0 12px;
}

.reader-panel[data-mode="text"] .audio-controls {
  display: none;
}

.reader-panel[data-mode="text"] .text-mode-tools {
  display: flex;
}

.chapter-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
}

.page-jump {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.page-jump-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-jump-top > span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.page-jump-top label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.page-jump-top input {
  width: 74px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--white);
  text-align: center;
  font-size: 15px;
  font-weight: 850;
}

.page-jump input[type="range"] {
  width: 100%;
  accent-color: var(--violet);
}

.settings-grid select {
  min-width: 0;
  width: 100%;
  min-height: 58px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--white);
  text-overflow: ellipsis;
  font-size: 17px;
}

.icon-button {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--deep-violet);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), var(--lavender));
  box-shadow: 0 10px 22px rgba(52, 36, 129, 0.08);
  cursor: pointer;
  font-size: 26px;
  font-weight: 900;
}

.transport-row {
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 2px 0 8px;
}

.primary-button,
.secondary-button {
  padding: 0 18px;
}

.transport-button {
  display: inline-grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--violet);
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(238, 234, 255, 0.82));
  box-shadow: 0 12px 26px rgba(52, 36, 129, 0.1);
  cursor: pointer;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.transport-button.play {
  color: var(--white);
  background: linear-gradient(145deg, var(--violet), var(--deep-violet));
  box-shadow: 0 16px 30px rgba(95, 75, 216, 0.22);
}

.transport-button.pause {
  font-size: 25px;
}

.transport-button.stop {
  font-size: 22px;
}

.transport-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--deep-violet);
  background: rgba(255, 255, 255, 0.86);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.3fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr);
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.settings-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.settings-grid output {
  color: var(--deep-violet);
}

.settings-grid input[type="range"] {
  width: 100%;
  accent-color: var(--violet);
}

.reading-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(220, 213, 255, 0.55);
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), #7ebfe9, #78d8b8);
}

.text-surface {
  min-height: 0;
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
  scroll-behavior: smooth;
}

.text-surface p {
  max-width: 820px;
  margin: 0 auto 16px;
  font-size: calc(19px * var(--reader-font-scale, 1));
  line-height: 1.78;
}

.text-surface .placeholder {
  color: var(--muted);
}

.pdf-page-preview {
  max-width: 980px;
  margin: 0 auto 22px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.pdf-page-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--white);
}

.pdf-page-preview figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pdf-reader-stack {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.pdf-page-reader {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(251, 250, 255, 0.95), rgba(241, 241, 247, 0.9));
  box-shadow: 0 14px 34px rgba(23, 20, 47, 0.1);
}

.pdf-page-reader img,
.pdf-page-reader canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(23, 20, 47, 0.1);
}

.pdf-canvas-wrap {
  position: relative;
  display: table;
  max-width: 100%;
  margin: 0 auto;
}

.pdf-highlight-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.pdf-speech-highlight {
  position: absolute;
  border-radius: 6px;
  background: rgba(255, 242, 191, 0.58);
  box-shadow: 0 0 0 3px rgba(255, 242, 191, 0.34);
  transition: left 180ms ease, top 180ms ease, width 180ms ease, height 180ms ease;
}

.pdf-page-reader figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.pdf-extracted-text {
  width: min(100%, 940px);
  margin: 0 auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
}

.pdf-extracted-text h3 {
  margin-bottom: 14px;
  color: var(--deep-violet);
  font-size: 13px;
  text-transform: uppercase;
}

.pdf-extracted-text p {
  max-width: none;
}

.pdf-loading {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: var(--paper);
  text-align: center;
  font-weight: 850;
}

.pdf-loading.error {
  color: #8f2654;
  background: var(--rose);
}

.reader-panel[data-mode="text"] .text-surface {
  background: rgba(247, 247, 251, 0.92);
}

.current-sentence {
  border-radius: 8px;
  background: var(--sunny);
  box-shadow: 0 0 0 3px var(--sunny);
}

.message-area {
  min-height: 22px;
  font-size: 13px;
  line-height: 1.45;
}

.message-area.error {
  color: #8f2654;
}

.driving-mode {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(95, 75, 216, 0.24), transparent 34%),
    linear-gradient(180deg, #17142f 0%, #221a4f 58%, #141226 100%);
}

.driving-exit {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
}

.driving-play {
  display: grid;
  width: min(68vw, 280px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(145deg, #5f4bd8, #7ebfe9);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34), 0 0 0 18px rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: clamp(82px, 24vw, 132px);
  font-weight: 900;
  line-height: 1;
}

.driving-play:disabled {
  opacity: 0.45;
}

body.driving-active {
  overflow: hidden;
}

@media (max-width: 1040px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .account-panel {
    grid-template-columns: 1fr;
  }

  .account-form,
  .account-actions {
    justify-content: flex-start;
  }

  .library-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
    align-items: start;
  }

}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 18px, 1440px);
    padding-top: 8px;
  }

  .topbar,
  .reader-header,
  .library-panel,
  .account-form,
  .account-actions {
    grid-template-columns: 1fr;
  }

  .account-form,
  .account-actions {
    display: grid;
  }

  .account-form input,
  .account-form button,
  .google-auth-slot,
  .account-actions button {
    width: 100%;
  }

  .google-auth-slot,
  .google-auth-slot > div,
  .google-auth-slot iframe {
    max-width: 100%;
  }

  .topbar {
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .reader-panel,
  .library-panel {
    border-radius: 18px;
    padding: 12px;
  }

  .reader-panel {
    gap: 10px;
    order: -1;
  }

  .account-panel.signed-in {
    grid-template-columns: minmax(0, 1fr) 44px;
    margin-bottom: 12px;
  }

  .account-panel.signed-in .account-actions {
    display: flex;
    justify-content: flex-end;
  }

  .account-panel.signed-in .account-actions button {
    width: 38px;
  }

  .reader-header h2 {
    font-size: 22px;
  }

  h1 {
    font-size: 26px;
  }

  .progress-card {
    min-height: 64px;
  }

  .progress-card span {
    font-size: 24px;
  }

  .transport-row > button {
    flex: 0 0 62px;
  }

  .paste-actions {
    grid-template-columns: 1fr;
  }

  .cloud-actions {
    grid-template-columns: 1fr;
  }

  .mode-bar,
  .text-mode-tools {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 4px;
  }

  .mode-switch {
    width: 100%;
  }

  .drive-button {
    width: 100%;
  }

  .mode-button {
    flex: 1;
  }

  .chapter-row {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 8px;
  }

  .icon-button {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 22px;
  }

  .page-jump {
    padding: 8px 10px;
    border-radius: 14px;
  }

  .page-jump-top {
    gap: 8px;
  }

  .page-jump-top > span {
    font-size: 13px;
  }

  .page-jump-top label span {
    display: none;
  }

  .page-jump-top input {
    width: 58px;
    min-height: 32px;
    font-size: 14px;
  }

  .transport-row {
    justify-content: center;
    gap: 12px;
    padding: 0 0 8px;
  }

  .transport-button {
    width: 58px;
    height: 58px;
    font-size: 25px;
    box-shadow: 0 12px 24px rgba(52, 36, 129, 0.1);
  }

  .transport-button.pause {
    font-size: 23px;
  }

  .transport-button.stop {
    font-size: 20px;
  }

  .player-card {
    gap: 12px;
    padding: 12px;
  }

  .audio-controls {
    gap: 10px;
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    padding-top: 12px;
  }

  .settings-grid label:nth-child(2) {
    grid-column: 1 / -1;
  }

  .settings-grid label {
    gap: 5px;
    font-size: 11px;
  }

  .settings-grid select {
    font-size: 14px;
    min-height: 42px;
    border-radius: 12px;
    padding: 0 12px;
  }

  .settings-grid input[type="range"] {
    height: 28px;
  }

  .text-surface {
    max-height: 62vh;
    padding: 12px;
    border-radius: 16px;
  }

  .pdf-page-reader {
    padding: 4px;
    border-radius: 12px;
    border-color: rgba(95, 75, 216, 0.12);
  }

  .text-surface p {
    font-size: 17px;
  }
}
