.vocab-study-redesign {
  --study-blue: #3f7bf7;
  --study-blue-deep: #102a56;
  --study-text: #627b9f;
  --study-line: rgba(84, 137, 205, 0.15);
  min-height: 100vh;
  color: var(--study-blue-deep);
  background:
    radial-gradient(circle at 10% 10%, rgba(110, 184, 255, 0.18), transparent 28%),
    radial-gradient(circle at 92% 24%, rgba(130, 184, 255, 0.16), transparent 30%),
    linear-gradient(180deg, #edf7ff 0%, #f7fbff 54%, #eaf6ff 100%);
}

.vocab-study-redesign .vocab-study-shell {
  width: min(1280px, calc(100% - 40px));
  padding: 18px 0 42px;
}

.vocab-study-topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid var(--study-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(63, 112, 177, 0.09);
  backdrop-filter: blur(14px);
}

.vocab-study-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--study-blue-deep);
  text-decoration: none;
}

.vocab-study-brand__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(63, 123, 247, 0.16);
  border-radius: 50%;
  color: var(--study-blue);
  background: linear-gradient(145deg, #f7fbff, #dfedff);
  box-shadow: 0 6px 14px rgba(58, 119, 220, 0.1);
  font-weight: 900;
}

.vocab-study-brand > span:last-child {
  display: grid;
}

.vocab-study-brand strong {
  color: var(--study-blue-deep);
  font-size: 1rem;
  line-height: 1.3;
}

.vocab-study-brand small {
  color: #7288a7;
  font-size: 0.7rem;
}

.vocab-study-topbar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vocab-study-back {
  padding: 11px 18px;
  border-radius: 999px;
  color: #3778e5;
  background: #e8f2ff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease;
}

.vocab-study-back:hover {
  transform: translateY(-1px);
  background: #deecff;
}

.vocab-study-redesign .word-session-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid #dfeaf7;
  border-radius: 999px;
  color: #35537d;
  background: #fbfdff;
  box-shadow: none;
}

.vocab-study-redesign .word-session-meta::before {
  display: none;
}

.vocab-study-redesign .word-jump {
  gap: 5px;
}

.vocab-study-redesign .word-jump input {
  width: 34px;
  padding: 0;
  border: 0;
  color: var(--study-blue-deep);
  background: transparent;
  font-weight: 800;
  text-align: right;
}

.vocab-study-redesign .word-session-meta strong {
  color: var(--study-blue-deep);
  font-size: 0.8rem;
}

.vocab-study-redesign .word-layout {
  display: grid;
  grid-template-columns: minmax(330px, 0.74fr) minmax(0, 1.26fr);
  gap: 18px;
  align-items: stretch;
  margin: 0;
}

.vocab-study-redesign .word-side,
.vocab-study-redesign .word-card,
.vocab-study-tips {
  border: 1px solid var(--study-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(63, 110, 172, 0.09);
  backdrop-filter: blur(12px);
}

.vocab-study-redesign .word-side {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 660px;
  padding: 28px 28px 150px;
}

.word-side__calendar {
  position: absolute;
  top: 34px;
  right: 30px;
  width: 58px;
  height: 52px;
  border: 5px solid rgba(104, 166, 246, 0.19);
  border-radius: 11px;
  background:
    linear-gradient(rgba(104, 166, 246, 0.19), rgba(104, 166, 246, 0.19)) 0 12px / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 11px, rgba(104, 166, 246, 0.14) 11px 15px),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(104, 166, 246, 0.14) 10px 14px);
}

.word-side__calendar::before,
.word-side__calendar::after {
  content: "";
  position: absolute;
  top: -13px;
  width: 6px;
  height: 17px;
  border-radius: 999px;
  background: rgba(104, 166, 246, 0.24);
}

.word-side__calendar::before {
  left: 10px;
}

.word-side__calendar::after {
  right: 10px;
}

.vocab-study-redesign .word-side .eyebrow {
  margin: 0 0 2px;
  color: #6583ad;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.vocab-study-redesign .word-side h2 {
  margin: 0;
  color: var(--study-blue-deep);
  font-size: 2rem;
  line-height: 1.2;
}

.vocab-study-redesign .word-side > p:not(.eyebrow) {
  max-width: 320px;
  margin: 0 0 10px;
  color: #5d7699;
  font-size: 0.82rem;
  line-height: 1.7;
}

.word-progress__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  color: #557096;
  font-size: 0.76rem;
}

.word-progress__heading strong {
  color: var(--study-blue-deep);
  font-size: 0.8rem;
}

.vocab-study-redesign .word-progress {
  height: 13px;
  border: 0;
  border-radius: 999px;
  background: #e5effb;
}

.vocab-study-redesign .word-progress span {
  background: linear-gradient(90deg, #4a83f2, #77adff);
}

.vocab-study-redesign .word-stats {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.vocab-study-redesign .word-stats > div {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 68px;
  padding: 10px 13px;
  border: 1px solid #e3edf8;
  border-radius: 15px;
  background: rgba(250, 253, 255, 0.86);
}

.word-stat-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: #3f7bf7;
  background: #ebf4ff;
  font-size: 1.1rem;
  font-weight: 900;
}

.word-stat-icon--known { color: #16b98a; background: #e7faf3; }
.word-stat-icon--favorite { color: #f3a71b; background: #fff5df; }
.word-stat-icon--time { color: #805cf2; background: #f2edff; }

.vocab-study-redesign .word-stats > div > span:nth-child(2) {
  display: grid;
}

.vocab-study-redesign .word-stats span strong {
  color: #18335f;
  font-size: 0.82rem;
}

.vocab-study-redesign .word-stats small {
  color: #8799b4;
  font-size: 0.64rem;
}

.vocab-study-redesign .word-stats b {
  color: #153261;
  font-size: 1.25rem;
  font-style: normal;
}

.vocab-study-redesign .word-stats b em {
  margin-left: 4px;
  color: #7187a7;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 500;
}

.word-side__scenery {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 4px;
  min-height: 136px;
  align-content: center;
  padding: 22px 28px;
  background:
    linear-gradient(90deg, rgba(244, 251, 255, 0.96), rgba(244, 251, 255, 0.44)),
    url("../../../assets/jlpt-vocab-hero-v2.webp") 58% center / cover no-repeat;
}

.word-side__scenery strong {
  color: #315b96;
  font-size: 0.94rem;
  line-height: 1.45;
}

.word-side__scenery span {
  color: #7290b8;
  font-size: 0.62rem;
}

.vocab-study-redesign .word-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 660px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.94);
}

.vocab-study-redesign .word-card__head {
  position: relative;
  z-index: 2;
}

.vocab-study-redesign .word-card__tag {
  padding: 8px 15px;
  border: 0;
  color: #2467cb;
  background: #e5f1ff;
  font-size: 0.78rem;
}

.vocab-study-redesign .word-card__tag--edit {
  border: 1px solid #ffd8a3;
  color: #a96613;
  background: #fff9ed;
}

.vocab-study-redesign .word-favorite-star {
  width: 38px;
  height: 38px;
  border-color: #dbe7f6;
  color: #5f83b5;
  background: white;
}

.word-empty-illustration {
  position: relative;
  display: none;
  width: min(330px, 100%);
  height: auto;
  margin: 8px auto -4px;
}

.word-empty-illustration img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

.word-card.is-empty .word-empty-illustration {
  display: block;
}

.word-empty-illustration__box {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 9px;
  width: 112px;
  height: 67px;
  border-radius: 6px 6px 22px 22px;
  background: linear-gradient(145deg, #d9eaff, #9dc2f8);
  box-shadow: 0 16px 26px rgba(66, 119, 194, 0.16);
  transform: translateX(-50%);
}

.word-empty-illustration__box::before,
.word-empty-illustration__box::after {
  content: "";
  position: absolute;
  top: -24px;
  width: 65px;
  height: 45px;
  background: #c7ddfc;
}

.word-empty-illustration__box::before {
  left: -33px;
  clip-path: polygon(0 34%, 77% 0, 100% 66%, 34% 100%);
}

.word-empty-illustration__box::after {
  right: -33px;
  clip-path: polygon(23% 0, 100% 34%, 66% 100%, 0 66%);
}

.word-empty-illustration__paper {
  position: absolute;
  z-index: 3;
  top: 15px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 80px;
  border-radius: 7px;
  color: #6f9ce0;
  background: linear-gradient(160deg, #ffffff, #e7f1ff);
  box-shadow: 0 8px 18px rgba(57, 105, 173, 0.12);
  font-size: 0.8rem;
  font-weight: 800;
  transform: translateX(-50%) rotate(6deg);
}

.word-empty-illustration__paper::after {
  content: "";
  width: 34px;
  height: 20px;
  border-top: 3px solid #b5cff3;
  border-bottom: 3px solid #b5cff3;
}

.word-empty-illustration__cloud {
  position: absolute;
  z-index: 1;
  width: 74px;
  height: 24px;
  border-radius: 999px;
  background: #edf5ff;
}

.word-empty-illustration__cloud::before,
.word-empty-illustration__cloud::after {
  content: "";
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
}

.word-empty-illustration__cloud::before { left: 12px; width: 34px; height: 34px; }
.word-empty-illustration__cloud::after { right: 9px; width: 43px; height: 43px; }
.word-empty-illustration__cloud--left { left: 10px; bottom: 42px; }
.word-empty-illustration__cloud--right { right: 0; bottom: 34px; transform: scale(0.76); }

.word-empty-illustration__flower {
  position: absolute;
  z-index: 4;
  color: #ff9dad;
  font-size: 1.5rem;
}

.word-empty-illustration__flower--one { left: 45px; top: 50px; }
.word-empty-illustration__flower--two { right: 42px; bottom: 15px; font-size: 1.2rem; }

.vocab-study-redesign .word-card__main {
  min-height: 220px;
  align-content: center;
}

.vocab-study-redesign .word-card.is-empty .word-card__main {
  min-height: 100px;
}

.vocab-study-redesign .word-card__main h1 {
  margin: 0 0 8px;
  color: var(--study-blue-deep);
  font-size: clamp(2.9rem, 6.6vw, 5.5rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.vocab-study-redesign .word-card.is-empty .word-card__main h1 {
  font-size: clamp(1.8rem, 4vw, 2.55rem);
}

.vocab-study-redesign .word-card__kana {
  color: #3d78df;
}

.vocab-study-redesign .word-card__hint {
  margin: 0;
  color: #7288a7;
  font-size: 0.85rem;
}

.vocab-study-redesign .word-card__answer,
.vocab-study-redesign .word-example {
  border-color: #dce9f7;
  background: #f6faff;
}

.vocab-study-redesign .word-card__actions {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  gap: 12px;
  margin-top: auto;
}

.vocab-study-redesign .word-card__actions .word-action,
.vocab-study-redesign .word-card__review-actions .word-action,
.vocab-study-redesign .word-card__ai-actions .word-action {
  min-height: 52px;
  border-radius: 15px;
  font-size: 0.86rem;
  font-weight: 700;
}

.vocab-study-redesign .word-card__actions .secondary-link {
  border: 1px solid #d9e7f6;
  color: #6980a1;
  background: #fbfdff;
}

.vocab-study-redesign #revealWordButton {
  border: 0;
  color: #286fdc;
  background: linear-gradient(135deg, #e4f1ff, #cfe4ff);
  box-shadow: none;
}

.vocab-study-redesign .word-card__review-actions,
.vocab-study-redesign .word-card__ai-actions {
  display: flex;
  margin: 0;
}

.vocab-study-redesign #knownWordButton {
  width: 100%;
  border: 0;
  color: white;
  background: linear-gradient(135deg, #5a91f7, #3e78eb);
  box-shadow: 0 10px 20px rgba(58, 119, 232, 0.2);
}

.vocab-study-redesign #wordAiToggleButton {
  width: 100%;
  border: 1px solid #cfe1f5;
  color: #3e7be9;
  background: linear-gradient(135deg, #f5faff, #e9f4ff);
}

.vocab-study-redesign .word-card button:disabled {
  opacity: 0.5;
  box-shadow: none;
}

.vocab-study-redesign .mixed-ai-panel {
  border-color: #d5e5f7;
  background: #f5faff;
}

.vocab-study-tips {
  margin-top: 22px;
  padding: 20px;
}

.vocab-study-tips__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.vocab-study-tips__heading > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #f2a516;
  background: #fff4d7;
}

.vocab-study-tips__heading h2 {
  margin: 0;
  color: var(--study-blue-deep);
  font-size: 1rem;
}

.vocab-study-tips__heading p {
  margin: 0;
  color: #8194af;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
}

.vocab-study-tips__heading a {
  margin-left: auto;
  color: #3f7bf7;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
}

.vocab-study-tips__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.vocab-study-tips__grid article {
  display: flex;
  gap: 13px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid #e3edf8;
  border-radius: 15px;
  background: #fbfdff;
}

.vocab-study-tips__grid article > span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-weight: 900;
}

.vocab-study-tips__grid .is-blue { color: #3f7bf7; background: #eaf4ff; }
.vocab-study-tips__grid .is-mint { color: #15b989; background: #e7faf3; }
.vocab-study-tips__grid .is-coral { color: #ff6878; background: #fff0f2; }

.vocab-study-tips__grid strong {
  color: #17325e;
  font-size: 0.78rem;
}

.vocab-study-tips__grid p {
  margin: 4px 0 0;
  color: #7187a6;
  font-size: 0.68rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .vocab-study-redesign .word-layout {
    grid-template-columns: 1fr;
  }

  .vocab-study-redesign .word-side {
    min-height: 0;
    padding-bottom: 28px;
  }

  .word-side__scenery {
    display: none;
  }

  .vocab-study-redesign .word-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vocab-study-tips__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .vocab-study-redesign .vocab-study-shell {
    width: min(100% - 20px, 560px);
    padding: 10px 0 28px;
  }

  .vocab-study-topbar {
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 11px;
  }

  .vocab-study-brand__icon { width: 34px; height: 34px; }
  .vocab-study-brand strong { font-size: 0.8rem; }
  .vocab-study-brand small { font-size: 0.58rem; }
  .vocab-study-topbar__actions { gap: 7px; }
  .vocab-study-back { padding: 9px 10px; font-size: 0.66rem; }

  .vocab-study-redesign .word-session-meta {
    gap: 6px;
    min-height: 35px;
    padding: 0 10px;
    font-size: 0.7rem;
  }

  .vocab-study-redesign .word-jump input { width: 26px; }
  .vocab-study-redesign .word-side { padding: 21px; }
  .word-side__calendar { top: 28px; right: 24px; width: 46px; height: 42px; border-width: 4px; }
  .vocab-study-redesign .word-side h2 { font-size: 1.6rem; }
  .vocab-study-redesign .word-stats { gap: 7px; }

  .vocab-study-redesign .word-stats > div {
    grid-template-columns: 36px 1fr auto;
    min-height: 58px;
    padding: 8px;
  }

  .word-stat-icon { width: 36px; height: 36px; border-radius: 11px; }
  .vocab-study-redesign .word-stats small { display: none; }
  .vocab-study-redesign .word-stats b { font-size: 1rem; }

  .vocab-study-redesign .word-card {
    min-height: 580px;
    padding: 18px;
  }

  .word-empty-illustration { transform: scale(0.86); margin-top: 0; margin-bottom: -18px; }
  .vocab-study-redesign .word-card__main { min-height: 180px; }
  .vocab-study-redesign .word-card.is-empty .word-card__main { min-height: 100px; }
  .vocab-study-redesign .word-card__main h1 { font-size: clamp(2.4rem, 15vw, 4.5rem); }
  .vocab-study-redesign .word-card.is-empty .word-card__main h1 { font-size: 1.55rem; }

  .vocab-study-redesign .word-card__actions {
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 7px;
  }

  .vocab-study-redesign .word-card__actions .word-action,
  .vocab-study-redesign .word-card__review-actions .word-action,
  .vocab-study-redesign .word-card__ai-actions .word-action {
    min-width: 0;
    min-height: 46px;
    padding: 9px 6px;
    font-size: 0.72rem;
  }

  .vocab-study-tips { padding: 16px; }
  .vocab-study-tips__heading a { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vocab-study-redesign *,
  .vocab-study-redesign *::before,
  .vocab-study-redesign *::after {
    transition-duration: 0.01ms !important;
  }
}
