:root {
  --bg: #0d1525;
  --bg-alt: #182235;
  --panel: rgba(255, 255, 255, 0.035);
  --border: rgba(185, 198, 216, 0.18);
  --text: #f2f4f8;
  --muted: #aeb9c8;
  --accent: #c7a86a;
  --accent-2: #b9c6d8;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  --bg-grad-1: radial-gradient(120% 100% at 10% 20%, rgba(199, 168, 106, 0.08), transparent 45%);
  --bg-grad-2: radial-gradient(120% 90% at 90% 0%, rgba(185, 198, 216, 0.1), transparent 40%);
  font-family: 'Noto Sans JP', 'Manrope', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-grad-1), var(--bg-grad-2), var(--bg);
  color: var(--text);
}

body[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-alt: #ffffff;
  --panel: rgba(15, 23, 42, 0.04);
  --border: rgba(27, 36, 48, 0.15);
  --text: #1a2330;
  --muted: #556074;
  --accent: #b27a2a;
  --accent-2: #2c3a4f;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.15);
  --bg-grad-1: radial-gradient(120% 100% at 10% 20%, rgba(178, 122, 42, 0.12), transparent 50%);
  --bg-grad-2: radial-gradient(120% 90% at 90% 0%, rgba(69, 94, 135, 0.08), transparent 45%);
}

[hidden] {
  display: none !important;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}

.app-header-content {
  max-width: 640px;
  margin: 0;
  flex: 1 1 auto;
}

.app-title {
  font-family: 'Manrope', 'Noto Sans JP', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.app-title a {
  color: inherit;
  text-decoration: none;
}

.app-title a:hover {
  color: var(--text);
}

.app-tagline {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
}

.global-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
  align-self: flex-start;
}

.global-link,
.theme-toggle {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.global-link:hover,
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border);
}

.global-link[aria-current="page"] {
  color: var(--accent);
  border-color: rgba(199, 168, 106, 0.4);
  background: rgba(199, 168, 106, 0.12);
}

.app-footer {
  margin-top: 10px;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.words-sheet-toggle,
.words-sheet-backdrop {
  display: none;
}

.shell {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.right-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.right-panel > section {
  width: 100%;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(6px);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.content-shell {
  display: flex;
  justify-content: center;
}

.content-card {
  width: 100%;
  max-width: 920px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  backdrop-filter: blur(6px);
}

.content-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.content-title {
  margin: 0;
  font-size: 1.6rem;
  color: var(--text);
}

.content-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.content-section p {
  margin: 0;
}

.content-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.1rem;
}

.content-section ul {
  margin: 0;
  padding-left: 18px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 4px;
}

.title {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.title.small {
  font-size: 22px;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.mylist-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  font-size: inherit;
}

.mylist-status:hover {
  border-color: var(--accent);
  color: var(--text);
}

.mylist-status.active {
  border-color: var(--accent);
  background: rgba(124, 243, 194, 0.15);
  color: var(--accent);
}


.word-list {
  display: grid;
  gap: 10px;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 4px;
  align-content: start;
}

.quick-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 4px;
}


.jump-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.jump-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
}

.jump-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.jump-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(124, 243, 194, 0.2);
}

.jump-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.jump-position {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  min-width: 55px;
  text-align: right;
}

.jump-bubble {
  position: absolute;
  top: -28px;
  left: 0;
  transform: translate(-50%, 0);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(199, 168, 106, 0.45);
  background: rgba(13, 21, 37, 0.9);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 5;
}

.jump-bubble.visible {
  opacity: 1;
}

.words-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.translation-toggle,
.autoplay-toggle {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.translation-toggle:hover,
.autoplay-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
}

.translation-toggle.active,
.autoplay-toggle.active {
  border-color: var(--accent);
  background: rgba(124, 243, 194, 0.15);
  color: var(--accent);
}

.search-box {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.search-box:focus-within {
  border-color: var(--accent);
  background: rgba(124, 243, 194, 0.05);
}

.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--muted);
  flex-shrink: 0;
}

.search-icon {
  display: block;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  min-width: 0;
}

.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.search-clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.words-toolbar-spacer {
  flex: 1;
}

.words-toolbar-count {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  margin-left: auto;
}

.words-toolbar-count {
  display: none;
}

.word-row {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: border 0.15s ease, transform 0.15s ease, background 0.15s ease;
  font-size: 16px;
}

.word-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  text-align: left;
  flex: 1;
  min-width: 0;
}

.word-translation {
  font-size: 13px;
  color: var(--muted);
}

.word-list.hide-translations .word-translation {
  display: none;
}

.word-list-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.word-list-empty p {
  margin: 0 0 8px;
}

.word-list-empty-hint {
  font-size: 12px;
  opacity: 0.7;
}

.word-row:hover {
  border-color: rgba(124, 243, 194, 0.5);
  transform: translateY(-2px);
}

.word-row.active {
  border-color: var(--accent);
  background: rgba(124, 243, 194, 0.08);
}

.word-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


.star-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.15s ease;
}

.star-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.star-btn.saved {
  border-color: var(--accent);
  background: rgba(199, 168, 106, 0.18);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(199, 168, 106, 0.35);
}

.player-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-alt);
}

#player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 15px;
  padding: 10px 16px;
  text-align: center;
}

.clip-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 4px;
}

.clip-counter-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.clip-nav {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.clip-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.clip-nav-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(124, 243, 194, 0.1);
}

.clip-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.clip-nav-btn.replay-btn {
  border-color: var(--accent);
  background: rgba(124, 243, 194, 0.15);
  color: var(--accent);
}

.clip-nav-btn.replay-btn:hover {
  background: rgba(124, 243, 194, 0.25);
  transform: scale(1.05);
}

.clip-nav-btn.rewind-btn {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.clip-nav-btn.play-toggle.is-playing {
  border-color: var(--accent-2);
  color: var(--accent-2);
  background: rgba(102, 168, 255, 0.12);
}

.clip-counter {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  min-width: 50px;
  text-align: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  margin: 0;
}

.player-overlay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 0;
  color: var(--text);
}

.overlay-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.overlay-word {
  font-weight: 700;
  font-size: 16px;
}

.overlay-sep {
  display: none;
}

.overlay-translation {
  color: var(--text);
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.overlay-translation.visible {
  opacity: 1;
}

.overlay-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.examples-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 12px 0;
  border-top: 1px solid var(--border);
}

.examples-title {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.examples-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.example-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.15s ease;
}

.example-item:hover {
  border-color: var(--accent);
  color: var(--text);
}

.example-en {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
}

.example-ja {
  display: none;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.example-item.is-open .example-ja {
  display: block;
}

.ghost-btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ghost-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ghost-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.ghost-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body[data-theme="light"] .jump-slider {
  background: rgba(26, 35, 48, 0.2);
}

body[data-theme="light"] .jump-slider::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(178, 122, 42, 0.2);
}

body[data-theme="light"] .jump-slider::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(178, 122, 42, 0.2);
}

body[data-theme="light"] .clip-nav-btn {
  background: #ffffff;
  border-color: rgba(26, 35, 48, 0.2);
  color: var(--text);
}

body[data-theme="light"] .clip-nav-btn:hover:not(:disabled) {
  background: rgba(178, 122, 42, 0.12);
}

body[data-theme="light"] .clip-nav-btn.replay-btn {
  background: rgba(178, 122, 42, 0.18);
}

body[data-theme="light"] .clip-nav-btn.play-toggle.is-playing {
  background: rgba(44, 58, 79, 0.12);
}

body[data-theme="light"] .clip-counter {
  border-color: rgba(26, 35, 48, 0.18);
  background: rgba(26, 35, 48, 0.04);
}

body[data-theme="light"] .ghost-btn {
  border-color: rgba(26, 35, 48, 0.2);
  background: rgba(26, 35, 48, 0.04);
  color: var(--text);
}

body[data-theme="light"] .ghost-btn:hover {
  background: rgba(178, 122, 42, 0.12);
}

body[data-theme="light"] .example-item {
  background: rgba(26, 35, 48, 0.03);
  border-color: rgba(26, 35, 48, 0.2);
}

body[data-theme="light"] .example-item:hover {
  background: rgba(178, 122, 42, 0.1);
}

body[data-theme="light"] .words-panel {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(26, 35, 48, 0.2);
  box-shadow: 0 16px 34px rgba(26, 35, 48, 0.16);
  backdrop-filter: blur(10px) saturate(140%);
}

body[data-theme="light"] .word-row {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(26, 35, 48, 0.18);
  box-shadow: 0 6px 14px rgba(26, 35, 48, 0.08);
}

body[data-theme="light"] .word-row:hover {
  border-color: rgba(178, 122, 42, 0.5);
}

body[data-theme="light"] .word-row.active {
  background: rgba(178, 122, 42, 0.16);
  border-color: rgba(178, 122, 42, 0.6);
}


.clip-meta {
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.clip-meta strong {
  color: var(--text);
}

.clip-meta a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(102, 168, 255, 0.35);
}

.clip-meta a:hover {
  border-bottom-color: var(--accent-2);
}

.report-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.report-toggle {
  padding: 6px 12px;
}

.report-menu {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.report-label {
  font-size: 12px;
  color: var(--muted);
}

.report-select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 13px;
}

.report-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.report-status {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--muted);
}

.affiliate-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  text-align: right;
}

.affiliate-note a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.affiliate-note a:hover {
  color: var(--accent-2);
  border-bottom-color: var(--accent-2);
}

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

  .panel-header {
    align-items: flex-start;
  }

  .word-list {
    max-height: 40vh;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 8px 14px calc(80px + env(safe-area-inset-bottom));
    gap: 6px;
  }

  .shell {
    padding: 6px;
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .panel {
    padding: 12px;
    border-radius: 12px;
  }

  .player-panel .panel-header {
    display: none;
  }

  .player-frame {
    margin: 0;
    width: 100%;
    border-radius: 10px;
  }

  .player-panel {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .player-panel .clip-toolbar,
  .player-panel .player-overlay,
  .player-panel .examples-panel,
  .player-panel .clip-meta,
  .player-panel .report-panel,
  .player-panel .shortcuts-panel {
    padding-left: 12px;
    padding-right: 12px;
  }

  .clip-toolbar {
    gap: 8px;
  }

  .clip-counter-row {
    gap: 6px;
  }

  .clip-nav {
    gap: 8px;
  }

  .clip-nav-btn {
    width: 32px;
    height: 32px;
  }

  .clip-counter {
    min-width: 46px;
    padding: 4px 8px;
    font-size: 12px;
  }

  .shortcuts-panel {
    display: none;
  }

  .app-header {
    padding: 8px 0;
    margin-bottom: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .app-title {
    font-size: 1.5rem;
    margin: 0 0 2px 0;
  }

  .app-tagline {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .global-nav {
    margin-top: 0;
    justify-content: flex-start;
    gap: 8px;
  }

  .global-link {
    font-size: 11px;
    letter-spacing: 0.06em;
    padding: 4px 6px;
  }

  .mylist-status {
    padding: 8px 10px;
    font-size: 12px;
    gap: 6px;
  }

  .words-toolbar {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .search-box {
    flex: 0 0 auto;
    gap: 0;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    min-width: 0;
  }

  .search-box .search-input,
  .search-box .search-clear {
    display: none;
  }

  .search-box .search-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
  }

  .search-box.expanded {
    flex: 1 1 100%;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
  }

  .search-box.expanded .search-input {
    display: block;
    font-size: 16px;
    min-width: 0;
  }

  .search-box.expanded .search-clear {
    display: flex;
  }

  .translation-toggle {
    order: 2;
  }

  .autoplay-toggle {
    order: 3;
  }

  .words-toolbar-count {
    display: none;
  }

  .words-panel .eyebrow {
    display: none;
  }

  .mylist-status {
    order: 4;
    margin-left: auto;
  }

  .quick-nav {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
  }

  .jump-slider-wrap {
    flex: 1;
  }

  .jump-position {
    min-width: 46px;
  }

  body.words-sheet-open {
    overflow: hidden;
  }

  .words-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    height: min(78vh, 620px);
    max-height: min(78vh, 620px);
    z-index: 40;
    transform: translateY(calc(100% + 24px));
    transition: transform 0.2s ease;
    overflow: hidden;
    box-shadow: var(--shadow);
    padding-bottom: 60px;
  }

  body.words-sheet-open .words-panel {
    transform: translateY(0);
  }

  .word-list {
    max-height: none;
    flex: 1;
    min-height: 0;
  }

  .words-sheet-toggle {
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(320px, calc(100% - 32px));
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 45;
    transition: all 0.15s ease;
  }

  .words-sheet-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  body.words-sheet-open .words-sheet-toggle {
    background: var(--bg-alt);
    border-color: var(--accent);
    color: var(--accent);
  }

  .words-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 11, 20, 0.55);
    z-index: 30;
    display: block;
  }

  .right-panel {
    margin-bottom: 60px;
  }

  .player-overlay {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .overlay-left {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .overlay-sep {
    display: none;
  }

  .overlay-word {
    font-size: 18px;
  }

  .overlay-translation {
    font-size: 14px;
    line-height: 1.5;
  }

  .overlay-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .overlay-actions #prev-btn {
    margin-right: auto;
  }
}

/* Shortcuts Panel */
.shortcuts-panel {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.shortcuts-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.shortcuts-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.shortcuts-toggle[aria-expanded="true"] {
  background: rgba(124, 243, 194, 0.08);
  border-color: rgba(124, 243, 194, 0.2);
  color: var(--text);
}

.shortcuts-toggle span {
  flex: 1;
  text-align: left;
}

.shortcuts-chevron {
  transition: transform 0.2s ease;
}

.shortcuts-toggle[aria-expanded="true"] .shortcuts-chevron {
  transform: rotate(180deg);
}

.shortcuts-list {
  margin-top: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.shortcut-item kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.shortcut-item span {
  flex: 1;
}

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