/* Saved words + Flashcards — Claude Code 2026-11-12 (owner: translate on/off, tick words to flashcards, redesign Remove).
   Colours follow the theme (--btn-a / --btn-b / --vt-base) and the calm champagne gold of Home / Settings. */
#v-saved { --sv-gold: #C9AE76; --sv-gold-2: #E4D2A0; --sv-ink: #1C2433; --sv-sub: #5B6475; }

/* head + toolbar */
#v-saved .sv-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
#v-saved .sv-head .h-page { margin-bottom: 0; }
#v-saved .sv-count { font: 600 .74rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--sv-gold-2); opacity: .9; }
#v-saved .sv-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 12px; }
#v-saved .sv-bar.is-empty .sv-fc { opacity: .5; }
#v-saved .sv-bar > button { min-height: 42px; border-radius: 999px; font: 600 .8rem/1 var(--sans); cursor: pointer; }
#v-saved .sv-tr { margin: 0 !important; padding: 0 6px 0 14px !important; gap: 10px; color: #F4EEDF;
  background: color-mix(in srgb, var(--btn-a, #1B3155) 70%, transparent) !important; box-shadow: inset 0 0 0 1.5px var(--sv-gold) !important; }
#v-saved .sv-tr .tr-switch-l { color: #F4EEDF; font: 600 .8rem/1 var(--sans); }
#v-saved .sv-tr .tr-knob { width: 40px; height: 24px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(228, 210, 160, .55); }
#v-saved .sv-tr .tr-knob::after { width: 18px; height: 18px; background: #F4EEDF; }
#v-saved .sv-tr[aria-checked="true"] .tr-knob { background: linear-gradient(180deg, #E4D2A0, #BFA060); border-color: #E4D2A0; }
#v-saved .sv-tr[aria-checked="true"] .tr-knob::after { background: #fff; transform: translateX(16px); }
#v-saved .sv-all { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px 0 9px; border: 0; color: #F4EEDF;
  background: color-mix(in srgb, var(--btn-a, #1B3155) 70%, transparent); box-shadow: inset 0 0 0 1.5px var(--sv-gold); }
#v-saved .sv-fc { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 0 18px; border: 0; color: #2A2112;
  background: linear-gradient(180deg, #EEE2BF, #D2B676 55%, #BFA060); box-shadow: 0 6px 16px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .55); }
#v-saved .sv-fc .ic { width: 18px; height: 18px; }
#v-saved .sv-fc:disabled { cursor: default; }

/* the list card */
#v-saved .sv-card { padding: 4px 14px 10px; }
#v-saved .sv-list { list-style: none; margin: 0; padding: 0; }
#v-saved .sv-list li.sv-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 40px 40px; align-items: center; gap: 4px;
  min-height: 62px; padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--sv-gold) 35%, transparent); transition: background .15s; }
#v-saved .sv-list li.sv-row:first-child { border-top: 0; }
#v-saved .sv-list li.sv-row.is-on { background: linear-gradient(90deg, rgba(201, 174, 118, .16), rgba(201, 174, 118, 0) 75%); }
#v-saved .sv-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#v-saved a.sv-word { font: 700 1.4rem/1.15 var(--serif); color: var(--sv-ink); text-decoration: none; overflow-wrap: anywhere; min-height: 0; }
#v-saved a.sv-word:hover { text-decoration: underline; text-decoration-color: var(--sv-gold); text-underline-offset: 4px; }
#v-saved .sv-gl { font: 500 .92rem/1.35 var(--sans); color: #7A5A1E; display: flex; align-items: baseline; gap: 6px; min-height: 1.2em; }
#v-saved .sv-gl .sv-flag { font-size: .95em; }
#v-saved .sv-gl-load { display: inline-block; width: 7em; height: .7em; border-radius: 4px; background: linear-gradient(90deg, rgba(201,174,118,.18), rgba(201,174,118,.38), rgba(201,174,118,.18)); background-size: 200% 100%; animation: svShim 1.2s linear infinite; }
#v-saved .sv-gl-none { color: var(--sv-sub); opacity: .6; }
@keyframes svShim { to { background-position: -200% 0; } }

/* round tick */
#v-saved .sv-tick-btn { width: 36px; height: 44px; display: grid; place-items: center; border: 0; background: none; padding: 0; cursor: pointer; }
#v-saved .sv-tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--sv-gold); background: #fffdf6; transition: background .15s, box-shadow .15s; }
#v-saved .sv-tick .ic { width: 15px; height: 15px; color: #fff; opacity: 0; transition: opacity .15s; }
#v-saved .sv-tick-btn[aria-checked="true"] .sv-tick, #v-saved .sv-all[aria-pressed="true"] .sv-tick { background: linear-gradient(180deg, #D9C083, #B08F4E); box-shadow: inset 0 0 0 1.5px #A8884A; }
#v-saved .sv-tick-btn[aria-checked="true"] .sv-tick .ic, #v-saved .sv-all[aria-pressed="true"] .sv-tick .ic { opacity: 1; }
#v-saved .sv-all .sv-tick { width: 22px; height: 22px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--sv-gold-2); }

/* quiet icon keys: listen + remove (no "× Remove" pill) */
#v-saved .sv-ico, .fc-layer .sv-ico { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; cursor: pointer; color: #A8884A; transition: background .15s, color .15s; }
#v-saved .sv-ico .ic, .fc-layer .sv-ico .ic { width: 20px; height: 20px; }
#v-saved .sv-ico:hover, .fc-layer .sv-ico:hover { background: rgba(201, 174, 118, .16); }
#v-saved .sv-del { color: #9AA1AD; }
#v-saved .sv-del:hover { color: #B4232F; background: rgba(180, 35, 47, .08); }
#v-saved .sv-ico.is-playing { color: #fff; background: linear-gradient(180deg, #D9C083, #B08F4E); }
#v-saved .sv-ico:focus-visible, #v-saved .sv-tick-btn:focus-visible { outline: 2px solid var(--sv-gold); outline-offset: 2px; }

/* empty + undo + note */
#v-saved .sv-empty span { font: 500 .9rem/1.45 var(--sans); }
#v-saved .sv-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 10px; text-align: center; color: var(--sv-sub); }
#v-saved .sv-empty .ic { width: 34px; height: 34px; color: var(--sv-gold); }
#v-saved .sv-empty b { font: 700 1.2rem/1.2 var(--serif); color: var(--sv-ink); }
#v-saved .sv-undo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 2px; padding: 8px 8px 8px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--btn-a, #1B3155) 88%, #000); color: #F4EEDF; font: 500 .85rem/1.3 var(--sans); }
#v-saved .sv-undo button { border: 0; border-radius: 999px; min-height: 34px; padding: 0 14px; font: 700 .8rem/1 var(--sans); color: #2A2112; background: linear-gradient(180deg, #EEE2BF, #BFA060); cursor: pointer; }
#v-saved .sv-note { margin: 10px 2px 2px; }

/* ---------------- Flashcards ---------------- */
html.fc-open { overflow: hidden; }
.fc-layer { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: max(12px, var(--tg-top, 0px)) 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(6, 10, 20, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.fc-sheet { width: min(100%, 560px); max-height: 100%; overflow: auto; display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 18px; border-radius: 22px; color: #F4EEDF;
  background: linear-gradient(170deg, color-mix(in srgb, var(--btn-a, #1B3155) 92%, #000), color-mix(in srgb, var(--btn-b, #0E1A33) 92%, #000));
  box-shadow: inset 0 0 0 1.5px #C9AE76, 0 24px 60px rgba(0, 0, 0, .45); }
.fc-top { display: flex; align-items: center; gap: 10px; }
.fc-top h2 { margin: 0; font: italic 700 1.55rem/1 'Cormorant Garamond', var(--serif); color: #E8D7A6; }
.fc-modes { display: inline-flex; margin-left: auto; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px rgba(201, 174, 118, .5); }
.fc-modes button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: #E9E2D0; font: 600 .8rem/1 var(--sans); cursor: pointer; }
.fc-modes button[aria-selected="true"] { color: #2A2112; background: linear-gradient(180deg, #EEE2BF, #BFA060); }
.fc-x { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #E8D7A6; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1.5px rgba(201, 174, 118, .7); cursor: pointer; }
.fc-x .ic { width: 18px; height: 18px; }
.fc-prog { display: flex; align-items: center; gap: 10px; font: 600 .75rem/1 var(--sans); color: #CFC5AE; }
.fc-prog-bar { flex: 1; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.fc-prog-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #E4D2A0, #BFA060); transition: width .3s; }

.fc-stage { perspective: 1400px; min-height: min(52vh, 360px); display: grid; }
.fc-card { position: relative; width: 100%; min-height: min(52vh, 360px); border: 0; padding: 0; background: none; cursor: pointer; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.fc-card.is-flipped { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px 22px; border-radius: 18px; text-align: center;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; color: #1C2433;
  background: linear-gradient(180deg, #FFFDF6, #F4EBD6); box-shadow: inset 0 0 0 1.5px #C9AE76, 0 10px 28px rgba(0, 0, 0, .3); }
.fc-back { transform: rotateY(180deg); }
.fc-word { font: 700 clamp(2.1rem, 9vw, 3rem)/1.05 var(--serif); color: #1C2433; overflow-wrap: anywhere; }
.fc-word-sm { font: 700 1.2rem/1.1 var(--serif); color: #8A6A2A; }
.fc-pos { font: 600 .75rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #8A6A2A; }
.fc-ipa { font: 500 1rem/1 var(--sans); color: #5B6475; }
.fc-hint { margin-top: 10px; font: 500 .78rem/1 var(--sans); color: #8B8F98; }
.fc-def { margin: 0; font: 600 1.12rem/1.42 var(--sans); color: #1C2433; }
.fc-ex { margin: 0; font: italic 500 1rem/1.45 'Cormorant Garamond', var(--serif); color: #4A505C; font-size: 1.1rem; }
.fc-tr { margin: 2px 0 0; font: 600 1rem/1.35 var(--sans); color: #7A5A1E; }

.fc-q { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px; border-radius: 18px; color: #1C2433;
  background: linear-gradient(180deg, #FFFDF6, #F4EBD6); box-shadow: inset 0 0 0 1.5px #C9AE76, 0 10px 28px rgba(0, 0, 0, .3); }
.fc-label { font: 700 .72rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #8A6A2A; }
.fc-def-q { font-size: 1.18rem; }
.fc-form { display: flex; gap: 8px; margin-top: 4px; }
.fc-form input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 0; font: 600 1.1rem/1 var(--sans); color: #1C2433; background: #fff; box-shadow: inset 0 0 0 1.5px #C9AE76; }
.fc-form input:focus { outline: none; box-shadow: inset 0 0 0 2px #A8884A, 0 0 0 4px rgba(201, 174, 118, .25); }
.fc-res:empty { display: none; }
.fc-res .fc-ok, .fc-res .fc-no { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; font: 600 .95rem/1.2 var(--sans); }
.fc-res .fc-ok { background: rgba(46, 125, 91, .12); color: #1F6A47; }
.fc-res .fc-ok .ic { width: 18px; height: 18px; }
.fc-res .fc-no { background: rgba(180, 35, 47, .08); color: #8E1F2A; }
.fc-ans { font: 700 1.35rem/1 var(--serif); color: #1C2433; }

.fc-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.fc-btn { flex: 1 1 0; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; border: 0; border-radius: 14px; font: 700 .88rem/1.1 var(--sans); cursor: pointer; }
.fc-btn .ic { width: 18px; height: 18px; }
.fc-gold { color: #2A2112; background: linear-gradient(180deg, #EEE2BF, #D2B676 55%, #BFA060); box-shadow: 0 6px 16px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .55); }
.fc-ghost { color: #F4EEDF; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1.5px rgba(201, 174, 118, .7); }
.fc-again { color: #FFE3E3; background: rgba(180, 35, 47, .22); box-shadow: inset 0 0 0 1.5px rgba(240, 140, 140, .5); }
.fc-btn:disabled { opacity: .5; cursor: default; }
.fc-done { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 26px 18px; border-radius: 18px; text-align: center; color: #1C2433;
  background: linear-gradient(180deg, #FFFDF6, #F4EBD6); box-shadow: inset 0 0 0 1.5px #C9AE76; }
.fc-score { font: 700 3rem/1 var(--serif); color: #8A6A2A; }
.fc-done b { font: 700 1.15rem/1.2 var(--sans); }
.fc-done p { margin: 6px 0 0; font: 500 .92rem/1.6 var(--sans); color: #4A505C; }
.fc-chip { display: inline-block; margin: 2px; padding: 3px 10px; border-radius: 999px; background: rgba(201, 174, 118, .2); color: #5B4A20; font-weight: 600; }
@media (max-width: 420px) { .fc-top h2 { font-size: 1.3rem; } .fc-modes button { padding: 0 11px; } #v-saved .sv-fc { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .fc-card { transition: none; } #v-saved .sv-gl-load { animation: none; } }
@media (max-width: 520px) { #v-saved .sv-fc { flex: 1 1 100%; justify-content: center; margin-left: 0; min-height: 46px; font-size: .88rem; } }
.fc-tr { display: inline-flex; align-items: center; gap: 8px; }
.fc-tr .fc-flag, #v-saved .sv-gl .sv-flag { display: inline-block; font-family: 'LexiFlags', sans-serif; font-size: 1.05em; line-height: 1; }
.fc-btn { white-space: nowrap; }
@media (max-width: 420px) { .fc-btn { font-size: .8rem; padding: 0 10px; gap: 4px; } .fc-nav #fcSay { flex: 0 0 52px; font-size: 0; gap: 0; } .fc-nav #fcSay .ic { width: 20px; height: 20px; } }
.fc-stage { grid-template-columns: minmax(0, 1fr); }
.fc-q, .fc-done, .fc-card { min-width: 0; }
.fc-q .fc-ex { overflow-wrap: anywhere; }
.fc-form .fc-btn { flex: 0 0 auto; padding: 0 20px; }
.fc-score, .fc-prog, .fc-pos { font-variant-numeric: lining-nums; }
#v-saved .sv-undo { background: #1C2433; color: #F4EEDF; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
