/* Слова: карточки, колоды, словарь. Только токены из app.css. */
.v-words .wd-panel[hidden] { display: none; }
.v-words.is-session .wd-head, .v-words.is-session .wd-stats, .v-words.is-session .wd-tabs { display: none; }
.v-words .wd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.v-words .wd-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.v-words .wd-stat b { font: 700 var(--t-xl)/1 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; align-self: flex-start; }
.v-words .wd-stat span { font-size: var(--t-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.v-words .wd-stat.is-new b { text-decoration: underline 3px color-mix(in srgb, var(--blue) 55%, transparent); text-underline-offset: 6px; }
.v-words .wd-stat.is-learn b { background: linear-gradient(transparent 58%, var(--marker-soft) 58% 92%, transparent 92%); }
.v-words .wd-stat.is-due b { color: var(--blue); }
.v-words .wd-stat.is-done b { color: var(--good); }
@media (max-width: 640px) { .v-words .wd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .v-words .wd-head .btn-lg { width: 100%; } }

/* start screen */
.v-words .rv-start { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; padding: 26px; }
.v-words .rv-n { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.v-words .rv-keys { text-align: center; }
.v-words .rv-start .rv-keys { text-align: left; }
@media (hover: none) { .v-words .rv-keys, .v-words .rv-main .kbd, .v-words .rv-grade .kbd { display: none; } }

/* session */
.v-words .rv-session { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.v-words .rv-top { display: flex; align-items: center; gap: 10px; }
.v-words .rv-top .progress { flex: 1; }
.v-words .rv-stage { display: grid; }
.v-words .rv-card { display: grid; perspective: 1600px; }
.v-words .rv-card.is-in { animation: rv-in .26s ease-out both; }
@keyframes rv-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.v-words .rv-inner { display: grid; transform-style: preserve-3d; transition: transform .4s cubic-bezier(.25, .8, .25, 1); }
.v-words .rv-card.is-flipped .rv-inner { transform: rotateY(180deg); }
.v-words .rv-face {
  grid-area: 1 / 1; position: relative; display: flex; flex-direction: column; gap: 10px; min-height: clamp(340px, 54vh, 500px); padding: clamp(14px, 4vw, 30px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  backface-visibility: hidden; -webkit-backface-visibility: hidden; min-width: 0;
}
.v-words .rv-face::before { content: ""; position: absolute; top: 0; left: 28px; right: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--line-2); }
.v-words .rv-back { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) { .v-words .rv-inner { transition: none; } }
.v-words .rv-toprow { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.v-words .rv-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 6px 0; min-width: 0; }
.v-words .rv-word { font-size: clamp(2.6rem, 10vw, 4.4rem); line-height: 1.1; overflow-wrap: anywhere; padding: 0 .1em; }
.v-words .rv-word.is-new { text-decoration: underline 3px color-mix(in srgb, var(--blue) 55%, transparent); text-underline-offset: 10px; }
.v-words .rv-word.is-learn { background: linear-gradient(transparent 60%, var(--marker-soft) 60% 92%, transparent 92%); }
.v-words .rv-word-sm { font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.1; }
.v-words .rv-ipa, .v-words .rv-bw { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: clamp(1.05rem, 3vw, 1.35rem); }
.v-words .rv-face .btn-icon:not(.btn-sm) { width: 40px; }
.v-words .rv-ru { font-size: clamp(1.5rem, 5.5vw, 2.1rem); font-weight: 600; line-height: 1.2; text-wrap: balance; }
.v-words .rv-senses { margin: 0; padding-left: 1.3em; text-align: left; font-size: var(--t-lg); line-height: 1.4; }
.v-words .rv-senses li:first-child { font-weight: 650; font-size: var(--t-xl); }
.v-words .rv-exw { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 36ch; }
.v-words .rv-ex { font-size: clamp(1.1rem, 3vw, 1.3rem); line-height: 1.5; color: var(--ink-2); }
.v-words .rv-blank { display: inline-block; min-width: 3.4em; margin: 0 .15em; border-bottom: 2px solid var(--ink-3); }
.v-words .rv-tap { text-align: center; }
.v-words .rv-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.v-words .rv-mask { letter-spacing: .3em; color: var(--ink-3); min-height: 1.4em; font-size: var(--t-lg); }
.v-words .rv-input { max-width: 420px; text-align: center; font-size: var(--t-xl); min-height: 52px; }
.v-words .rv-verdict { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: center; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--sunk); }
.v-words .rv-verdict.is-good { background: var(--good-soft); color: var(--good); }
.v-words .rv-verdict.is-warn { background: var(--warn-soft); color: var(--warn); }
.v-words .rv-verdict.is-bad { background: var(--bad-soft); color: var(--bad); }
.v-words .rv-regrade { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.v-words .rv-play { width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.v-words .rv-play:hover { border-color: var(--blue); }
.v-words .rv-opts { display: grid; gap: 8px; width: 100%; max-width: 460px; }
.v-words .rv-opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); text-align: left; font-size: var(--t-md); }
.v-words .rv-opt:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-soft); }
.v-words .rv-opt.is-right { background: var(--good-soft); border-color: var(--good); }
.v-words .rv-opt.is-wrong { background: var(--bad-soft); border-color: var(--bad); animation: rv-shake .3s; }
@keyframes rv-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.v-words .rv-slots, .v-words .rv-tiles { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 52px; }
.v-words .rv-slot { min-width: 38px; height: 50px; padding: 0 8px; border: 0; border-bottom: 3px solid var(--line-2); border-radius: 6px 6px 0 0; background: var(--sunk); font: 1.5rem var(--f-read); color: var(--ink); }
.v-words .rv-slot.is-fixed { background: none; border-color: transparent; display: inline-grid; place-items: center; }
.v-words .rv-slot:disabled { color: var(--blue); }
.v-words .rv-tile { min-width: 46px; height: 52px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); font-size: 1.5rem; color: var(--ink); }
.v-words .rv-tile:disabled { opacity: .25; box-shadow: none; }

/* bar: show answer / grades / next */
.v-words .rv-bar { display: grid; gap: 10px; }
.v-words .rv-bar.is-grades { grid-template-columns: repeat(4, 1fr); }
.v-words .rv-main { width: 100%; }
.v-words .rv-main .kbd { background: transparent; color: inherit; border-color: currentColor; opacity: .7; }
.v-words .rv-grade { --gc: var(--blue); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 66px; padding: 6px 4px; border: 1px solid var(--line-2); border-top: 3px solid var(--gc); border-radius: 12px; background: var(--surface); }
.v-words .rv-grade[data-g="1"] { --gc: var(--bad); }
.v-words .rv-grade[data-g="2"] { --gc: var(--warn); }
.v-words .rv-grade[data-g="3"] { --gc: var(--good); }
.v-words .rv-grade:hover { background: color-mix(in srgb, var(--gc) 10%, var(--surface)); }
.v-words .rv-grade b { font-size: var(--t-sm); }
.v-words .rv-grade small { font: 500 var(--t-xs) var(--f-mono); color: var(--ink-2); }
.v-words .rv-grade .kbd { position: absolute; top: 3px; right: 4px; }
@media (max-width: 959px) {
  .v-words.is-session .rv-session { padding-bottom: 92px; }
  .v-words .rv-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + 4px + env(safe-area-inset-bottom, 0px)); z-index: 19; padding: 8px 12px; background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }
  .v-words .rv-bar.is-grades { gap: 6px; }
}

/* summary */
.v-words .rv-sum { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 28px 20px; text-align: center; }
.v-words .rv-sumgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; }
.v-words .rv-sumgrid > div { display: flex; flex-direction: column; gap: 4px; }
.v-words .rv-sv { font: 700 var(--t-lg) var(--f-display); }
.v-words .rv-dist { display: flex; width: 100%; height: 10px; border-radius: 999px; overflow: hidden; background: var(--sunk); }
.v-words .rv-d1 { background: var(--bad); } .v-words .rv-d2 { background: var(--warn); } .v-words .rv-d3 { background: var(--good); } .v-words .rv-d4 { background: var(--blue); }

/* decks */
.v-words .dk-card { display: flex; flex-direction: column; gap: 10px; }
.v-words .dk-h { flex-wrap: nowrap; }
.v-words .dk-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--marker-soft); color: var(--marker-ink); flex: none; }
.v-words .dk-w { font-size: 1.15rem; }
.v-words .dk-card .row:last-child { margin-top: auto; }

/* dictionary */
.v-words .dc-row { align-items: flex-start; }
.v-words .dc-w { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 1.15rem; }
.v-words .dc-row .list-side { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .v-words .dc-row { flex-direction: column; align-items: stretch; gap: 4px; } .v-words .dc-row .list-side { justify-content: flex-start; } }

/* add / import */
.v-words .ad-row { align-items: center; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px 12px; }
.v-words .ad-w { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
@media (max-width: 640px) { .v-words .ad-row { grid-template-columns: auto minmax(0, 1fr); } .v-words .ad-row .input { grid-column: 1 / -1; } }
.v-words .io-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 14px; text-align: center; border: 2px dashed var(--line-2); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; color: var(--ink-2); }
.v-words .io-drop:hover { border-color: var(--blue); color: var(--ink); }
