/* Website layout overrides; the word rows use words.html's generated CSS. */
.logo { background-image: url('icons/icon.png'); }
.container { box-sizing: border-box; max-width: 1760px; padding: 26px clamp(16px, 2.5vw, 40px) 130px; }
.title h1 { position: relative; padding-bottom: 4px; font-size: 32px; font-weight: 800; letter-spacing: .03em; background: linear-gradient(110deg, #b9fbff 5%, var(--brand) 52%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; text-shadow: none; }
.title h1::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--accent)); box-shadow: 0 0 12px rgba(0,242,254,.5); }
.header-note { color: var(--muted); font-size: 13px; }
.workspace { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 24px; }
.workspace-main { min-width: 0; }
.deck-panel, .custom-panel { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 20px; padding: 22px; }
.deck-panel { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
.panel-title { font-size: 16px; color: var(--brand); font-weight: 700; margin-bottom: 16px; }
.panel-title span { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 10px; }
.decks { display: grid; gap: 14px; }
.deck-group summary { cursor: pointer; color: var(--fg); font-weight: 650; font-size: 13px; list-style: none; display: flex; align-items: center; gap: 8px; }
.deck-group summary::-webkit-details-marker { display: none; }
.deck-group summary::before { content: '▸'; color: var(--brand); font-size: 15px; transition: transform .2s; }
.deck-group[open] summary::before { transform: rotate(90deg); }
.deck-group summary:focus-visible, .deck:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.deck-branches { display: grid; gap: 5px; margin: 8px 0 0 6px; padding-left: 12px; border-left: 1px solid var(--glass-border); }
.deck { width: 100%; text-align: left; padding: 8px 12px; border: 1px solid transparent; background: transparent; color: var(--fg); border-radius: 10px; }
.deck::before { display: none; }
.deck:hover { transform: none; background: rgba(0,242,254,.1); box-shadow: none; }
.deck strong { display: block; font-size: 14px; }.deck small { display: block; color: var(--muted); font-size: 11px; }
.deck.active { border-color: rgba(0,242,254,.5); color: #fff; background: linear-gradient(135deg, rgba(0,242,254,.22), rgba(240,147,251,.16)); }
.deck.active strong { color: var(--brand); }
.deck-subgroup { min-width: 0; }
.deck-subgroup summary { font-size: 12px; color: var(--muted); }
.deck-subgroup .deck-branches { margin-top: 6px; }
.list-header { flex-wrap: wrap; }
.list-actions { flex-wrap: wrap; }
.list-actions button:disabled { opacity: .5; cursor: not-allowed; }
.search-row { display: flex; gap: 10px; margin: 0 0 20px; }
.search-row select { flex: none; border: 1px solid var(--glass-border); border-radius: 12px; background: #18233c; color: var(--fg); padding: 0 12px; font: inherit; }
.search-row select[hidden] { display: none; }
.search-row input, .custom-panel textarea { box-sizing: border-box; width: 100%; background: rgba(10,14,39,.7); border: 1px solid var(--glass-border); border-radius: 12px; color: var(--fg); padding: 12px 14px; font: inherit; }
.search-row input:focus, .search-row select:focus, .custom-panel textarea:focus { outline: 2px solid var(--brand); }
.row { cursor: pointer; }
.row.selected { border-color: var(--brand); background: linear-gradient(100deg, rgba(0,242,254,.19), rgba(240,147,251,.12)); box-shadow: 0 0 0 1px rgba(0,242,254,.38), 0 8px 26px rgba(0,242,254,.18); }
.row.selected .word-index { background: var(--brand); color: var(--bg-dark); box-shadow: 0 0 12px var(--brand); }
.row.just-selected { animation: selectWord .42s ease-out; }
@keyframes selectWord { 0% { transform: scale(.96); } 65% { transform: scale(1.018); } 100% { transform: scale(1); } }
.row .word-content { gap: 16px; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); }
.row .word, .row .word-text { min-width: 0; }
.row .word-text { display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .pronounce { background: transparent; border: 0; padding: 0; flex: none; color: var(--brand); font-size: 14px; cursor: pointer; }
.row .pronounce::before { display: none; }
.row .pronounce:hover { box-shadow: none; background: none; }
.row .trans { min-width: 0; }
.list.hide-translation .trans { display: none; }
.list.hide-translation .row:hover .trans { display: block; }
.row:focus-visible, .row .word-text:focus-visible, .row .pronounce:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.details-container { cursor: auto; }
.details-section a { color: var(--brand); }
.pagination select { color: var(--brand); background: #18233c; }
.pagination button:disabled { opacity: .35; }
.custom-panel { margin-top: 30px; }
.custom-panel h2 { margin: 0; font-size: 17px; color: var(--brand); }
.custom-panel p, .source-note { color: var(--muted); font-size: 13px; }
.custom-panel textarea { display: block; margin: 12px 0; resize: vertical; }
.source-note a { color: var(--brand); }
.selection-bar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); width: min(1680px, calc(100% - 32px)); z-index: 100; box-sizing: border-box; background: #e8f8f4; color: #132e3a; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-radius: 14px; padding: 12px 16px 12px 22px; box-shadow: 0 12px 40px #0009; }
.selection-bar strong { font-size: 22px; }
.selection-bar small { color: #526a74; margin-left: 12px; }
.selection-bar button { background: #10384b; color: #fff; border: 0; padding: 13px 20px; border-radius: 9px; font-weight: 650; white-space: nowrap; }
.selection-bar button::before { display: none; }
.selection-bar button:hover { background: #19536a; box-shadow: 0 4px 16px #10384b55; }
.selection-bar button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .deck-panel { position: static; max-height: none; }
  .decks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .container { padding-top: 24px; }
  .title h1 { font-size: 27px; }
  .decks { grid-template-columns: 1fr; gap: 10px; }
  .deck-panel { padding: 16px; }
  .deck-branches { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); }
  .row .word-content { gap: 8px; }
  .row .word-index { width: 25px; }
}
@media (max-width: 650px) { .selection-bar small { display: none; }.selection-bar button { padding: 11px; font-size: 12px; } }
@media (max-width: 480px) { .search-row { flex-wrap: wrap; }.search-row select { width: 100%; padding: 10px 12px; } }
@media (prefers-reduced-motion: reduce) { .row.just-selected { animation: none; } }
