/* META AI · Bagrut · Words corner (preview) */
.wd-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-bottom: 18px; }
.wd-goal { background: linear-gradient(135deg, #1B2A4A, #2C4A7E); color: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: 22px 24px; display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.wd-goal-ring { width: 118px; height: 118px; }
.wd-goal .kicker { color: #FFC23D; }
.wd-goal h1 { font-size: 30px; font-weight: 800; margin: 2px 0 4px; color: #fff; }
.wd-goal p { margin: 0; color: #C9D8F0; font-size: 16px; }
.wd-week { display: flex; gap: 8px; margin-top: 14px; }
.wd-dot { display: grid; justify-items: center; gap: 3px; }
.wd-dot i { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 700; color: #fff; }
.wd-dot.some i { background: rgba(255,194,61,.45); }
.wd-dot.full i { background: #35A96E; }
.wd-dot.today i { outline: 2px solid #FFC23D; outline-offset: 2px; }
.wd-dot small { font-size: 12px; color: #9fb4d6; font-weight: 600; }
.wd-streak { display: grid; justify-items: center; background: rgba(255,255,255,.08); border-radius: 20px; padding: 12px 16px; min-width: 92px; }
.wd-flame { font-size: 34px; line-height: 1; }
.wd-streak b { font-size: 34px; font-weight: 800; line-height: 1.1; }
.wd-streak small { font-size: 13px; color: #C9D8F0; text-align: center; }
.wd-mine-card { background: var(--paper); border-radius: 28px; box-shadow: var(--shadow); padding: 20px 22px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); align-content: center; }
.wd-mine-card .btn { grid-column: 2; justify-self: start; }
.wd-mine-ic { width: 58px; height: 58px; border-radius: 18px; background: #FFF3D1; display: grid; place-items: center; font-size: 30px; }
.wd-mine-card h2 { font-size: 24px; font-weight: 800; margin: 0; }
.wd-mine-card p { margin: 4px 0 0; color: var(--ink-2); font-size: 16px; line-height: 1.4; }
.wd-h2 { font-size: 26px; font-weight: 800; margin: 26px 0 0; }
.wd-sub { margin-bottom: 14px; }
.wd-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.wd-subj { background: var(--paper); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-s); text-decoration: none; color: var(--ink); transition: transform .15s; display: flex; flex-direction: column; }
.wd-subj:hover { transform: translateY(-3px); }
.wd-subj-pic { position: relative; aspect-ratio: 4 / 3; background: var(--sand); }
.wd-subj-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-subj.soon .wd-subj-pic img { filter: saturate(.55) brightness(.92); }
.wd-soon-tag { position: absolute; top: 10px; left: 10px; background: rgba(27,42,74,.78); color: #fff; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.wd-subj-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 14px; }
.wd-subj-body h3 { font-size: 17px; font-weight: 700; margin: 0; line-height: 1.25; }
.wd-subj-body p { font-size: 14px; color: var(--ink-2); margin: 3px 0 0; }
.wd-subj:not(.soon) { outline: 3px solid var(--coral); outline-offset: -3px; }
.wd-nopic { display: grid; place-items: center; background: linear-gradient(135deg, #E9E1F5, #CFEAF4); width: 100%; height: 100%; }
.wd-nopic span { font-size: 64px; }
.wd-badge { display: inline-flex; gap: 8px; }
.wd-badge span { background: #F3EEFA; color: var(--plum); font-weight: 800; font-size: 16px; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.wd-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; z-index: 99; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; }

/* subject page */
.wd-head-ring { display: grid; justify-items: center; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.wd-subj-head { display: grid; grid-template-columns: 180px 1fr auto; gap: 20px; align-items: center; background: var(--sand); border-radius: 28px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 20px; }
.wd-subj-head img { width: 180px; aspect-ratio: 4/3; object-fit: cover; border-radius: 18px; display: block; }
.wd-subj-head h1 { font-size: 34px; font-weight: 800; margin: 2px 0; }
.wd-path { display: grid; gap: 14px; position: relative; }
.wd-set { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; background: var(--paper); border-radius: 24px; padding: 16px 18px; box-shadow: var(--shadow-s); }
.wd-set.next { outline: 3px solid var(--coral); }
.wd-set.locked { opacity: .62; cursor: pointer; }
.wd-set-num { width: 56px; height: 56px; border-radius: 50%; background: var(--sky); display: grid; place-items: center; font-size: 24px; font-weight: 800; color: var(--ink); }
.wd-set.next .wd-set-num { background: var(--coral); color: #fff; }
.wd-set.starred .wd-set-num { background: var(--saffron); color: #fff; font-size: 30px; }
.wd-set-num .ic { width: 24px; height: 24px; }
.wd-set-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.wd-set-emo { font-size: 30px; }
.wd-set-head h3 { font-size: 20px; font-weight: 800; margin: 0; }
.wd-set-head p { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }
.wd-best { background: var(--leaf-soft); color: #1d7a4b; font-weight: 800; border-radius: 999px; padding: 6px 12px; font-size: 15px; }
.wd-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.wd-step { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 16px; background: #EEF6FA; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; }
.wd-step .ic { width: 20px; height: 20px; }
.wd-step.done { background: var(--leaf-soft); color: #1d7a4b; }
.wd-set.next .wd-step:not(.done):first-of-type, .wd-set.next .wd-step.done + .wd-step:not(.done) { background: var(--coral); color: #fff; }
.wd-set.next .wd-step.done + .wd-step:not(.done) ~ .wd-step { background: #EEF6FA; color: var(--ink); }
.wd-lock-note { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }

/* learn */
.wd-learn-head, .wd-game-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.wd-learn-head h1, .wd-game-head h1 { font-size: 32px; font-weight: 800; margin: 2px 0 0; }
.wd-dots { display: flex; gap: 6px; }
.wd-dots i { width: 14px; height: 14px; border-radius: 50%; background: #D3E3EC; }
.wd-dots i.seen { background: var(--teal); }
.wd-dots i.now { background: var(--coral); transform: scale(1.25); }
.wd-flip-wrap { perspective: 1400px; max-width: 620px; margin: 0 auto; }
.wd-flip { position: relative; width: 100%; aspect-ratio: 5 / 4.4; border: 0; padding: 0; background: none; cursor: pointer; transform-style: preserve-3d; transition: transform .5s; font: inherit; color: inherit; display: block; }
.wd-flip.flipped { transform: rotateY(180deg); }
.wd-face { position: absolute; inset: 0; background: var(--paper); border-radius: 28px; box-shadow: var(--shadow); backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; display: flex; flex-direction: column; }
.wd-face small { color: var(--ink-2); font-size: 14px; padding-bottom: 12px; }
.wd-face.front { align-items: stretch; }
.wd-flip-pic { width: 100%; flex: 1; min-height: 0; object-fit: cover; display: block; }
.wd-face.front .wd-flip-word { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 12px 4px; font-size: 40px; font-weight: 800; font-family: var(--f-read); }
.wd-face.front small { text-align: center; }
.wd-face.back { transform: rotateY(180deg); justify-content: center; align-items: center; gap: 14px; padding: 24px; background: linear-gradient(160deg, #FFF8EC, #FFFFFF); text-align: center; }
.wd-back-word { font-size: 34px; font-weight: 800; font-family: var(--f-read); }
.wd-back-ar { font-size: 44px; font-weight: 700; color: var(--plum); line-height: 1.3; }
.wd-back-ex { font-family: var(--f-read); font-size: 22px; line-height: 1.5; margin: 0; max-width: 480px; }
.wd-ex-src { display: inline-block; font-size: 13px; font-weight: 700; color: var(--ink-2, #4a5568); background: rgba(255, 196, 0, .18); padding: 3px 10px; border-radius: 999px; margin-top: -4px; }
.wd-back-ex b { background: var(--mark); padding: 0 4px; border-radius: 6px; }
.wd-learn-nav, .wd-game-nav { display: flex; justify-content: center; gap: 14px; margin-top: 18px; }
.wd-learn-nav .btn { min-width: 150px; }
.round.wd-say { cursor: pointer; }
.wd-end { text-align: center; padding: 34px 24px; max-width: 640px; margin: 0 auto; position: relative; overflow: hidden; }
.wd-end h1 { font-size: 30px; font-weight: 800; margin: 8px 0 0; }
.wd-end-emo { font-size: 56px; }
.wd-end-btns { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* games */
.wd-game { max-width: 760px; margin: 0 auto; }
.wd-game-meta { display: flex; gap: 10px; align-items: center; }
.wd-today, .wd-count { background: var(--paper); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 15px; box-shadow: var(--shadow-s); white-space: nowrap; }
.wd-bar { height: 10px; background: #D3E3EC; border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.wd-bar i { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 999px; transition: width .3s; }
.wd-game-card { padding: 22px; }
.wd-q { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.wd-q-pic { width: 190px; aspect-ratio: 4/3; object-fit: cover; border-radius: 18px; flex: none; display: block; }
span.wd-q-pic { display: grid; }
.wd-q-pic.wd-nopic span { font-size: 54px; }
.wd-q-prompt { flex: 1; min-width: 0; }
.wd-q-kind { border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit; text-align: left; display: inline-flex; gap: 6px; align-items: center; font-size: 15px; font-weight: 700; color: var(--teal-d); text-transform: uppercase; letter-spacing: .04em; }
.wd-q-big { font-size: 40px; font-weight: 800; font-family: var(--f-read); margin-top: 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wd-q-big.ar { font-family: var(--f-ar); color: var(--plum); font-size: 42px; display: block; }
.wd-q-gap { font-family: var(--f-read); font-size: 26px; line-height: 1.5; margin-top: 8px; }
.wd-gap { display: inline-block; min-width: 110px; border-bottom: 3px solid var(--coral); color: transparent; }
.wd-listen { margin-top: 10px; border: 0; background: var(--teal); color: #fff; border-radius: 24px; padding: 18px 28px; font-size: 40px; display: inline-flex; align-items: center; gap: 14px; cursor: pointer; box-shadow: inset 0 -4px 0 rgba(0,0,0,.14), var(--shadow-s); }
.wd-listen span { font-size: 18px; font-weight: 700; }
.wd-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wd-opt { border: 2px solid var(--line); background: var(--paper); border-radius: 18px; min-height: 66px; padding: 12px 16px; font-size: 22px; font-weight: 700; font-family: var(--f-read); color: var(--ink); cursor: pointer; transition: transform .1s, background .15s; }
.wd-opts.is-ar .wd-opt { font-size: 24px; }
.wd-opts.is-ar .wd-opt .ar { font-family: var(--f-ar); }
.wd-opt:hover:not(:disabled) { border-color: var(--teal); background: #F2FAFC; }
.wd-opt:active:not(:disabled) { transform: scale(.98); }
.wd-opt.right, .wd-opt.show-right { background: var(--leaf-soft); border-color: var(--leaf); color: #1d7a4b; }
.wd-opt.wrong { background: var(--red-soft); border-color: var(--red); color: var(--red); animation: wd-shake .35s; }
.wd-opt:disabled { cursor: default; }
.wd-opt:disabled:not(.right):not(.wrong):not(.show-right) { opacity: .55; }
@keyframes wd-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.wd-fb { min-height: 28px; margin: 14px 4px 0; display: flex; gap: 10px; align-items: center; font-size: 18px; font-weight: 600; }
.wd-fb .ic { width: 24px; height: 24px; flex: none; }
.wd-fb.ok { color: #1d7a4b; } .wd-fb.no { color: var(--red); } .wd-fb.try { color: #9a6a00; }
.wd-fb .ar { font-family: var(--f-ar); font-size: 20px; }
.wd-check-note { max-width: 760px; margin: 0 auto 14px; display: flex; gap: 10px; align-items: center; background: #FFF3D1; border-radius: 16px; padding: 12px 16px; font-size: 16px; }
.wd-check-note .ic { width: 22px; height: 22px; color: var(--coral-d); flex: none; }
.wd-score { width: 130px; height: 130px; margin: 0 auto; border-radius: 50%; background: var(--sky); display: flex; align-items: baseline; justify-content: center; padding-top: 34px; box-sizing: border-box; }
.wd-score b { font-size: 54px; font-weight: 800; line-height: 1; }
.wd-score span { font-size: 22px; font-weight: 700; color: var(--ink-2); }
.wd-score.pass { background: var(--saffron); }
.wd-miss { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.wd-miss .kicker { width: 100%; }
.wd-chip { display: inline-flex; gap: 8px; align-items: center; background: var(--red-soft); border-radius: 999px; padding: 6px 14px; font-size: 17px; }
.wd-chip .ar { color: var(--plum); font-size: 18px; }
.wd-end a.btn, .wd-mine-card, .wd-subj { text-decoration: none; }
.wd-confetti { position: absolute; inset: 0; pointer-events: none; }
.wd-confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 3px; animation: wd-fall 2.2s ease-in forwards; }
@keyframes wd-fall { to { transform: translateY(520px) rotate(540deg); opacity: 0; } }

/* my words */
.wd-mine-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.wd-mine-head h1 { font-size: 32px; font-weight: 800; margin: 2px 0 0; }
.wd-mine-head .sub { max-width: 560px; }
.wd-mine-list { display: grid; gap: 10px; }
.wd-mine-row { display: grid; grid-template-columns: 64px 1fr auto auto auto auto; gap: 14px; align-items: center; background: var(--paper); border-radius: 18px; padding: 10px 14px; box-shadow: var(--shadow-s); }
.wd-mine-row.due { outline: 2px solid var(--coral); }
.wd-mine-pic { width: 64px; height: 48px; object-fit: cover; border-radius: 10px; display: block; }
span.wd-mine-pic { display: grid; } .wd-mine-pic.wd-nopic span { font-size: 26px; }
.wd-mine-w { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.wd-mine-w b { font-size: 21px; font-family: var(--f-read); }
.wd-mine-w .ar { font-size: 20px; color: var(--plum); }
.wd-src { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.wd-src.check { background: var(--red-soft); color: var(--red); }
.wd-src.exam { background: #E6F3F8; color: var(--teal-d); }
.wd-pips { display: flex; gap: 4px; }
.wd-pips i { width: 12px; height: 12px; border-radius: 50%; background: #D3E3EC; }
.wd-pips i.on { background: var(--leaf); }
.wd-when { font-size: 14px; color: var(--ink-2); font-weight: 600; white-space: nowrap; min-width: 98px; text-align: right; }
.wd-mine-row.due .wd-when { color: var(--coral-d); }
.wd-empty { text-align: center; color: var(--ink-2); }

@media (max-width: 820px) {
  .wd-top { grid-template-columns: 1fr; }
  .wd-goal { grid-template-columns: auto 1fr; gap: 14px; padding: 18px; }
  .wd-goal-ring { width: 92px; height: 92px; }
  .wd-goal h1 { font-size: 23px; }
  .wd-streak { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; gap: 10px; align-items: center; padding: 8px 14px; }
  .wd-flame, .wd-streak b { font-size: 26px; }
  .wd-week { gap: 5px; } .wd-dot i { width: 28px; height: 28px; }
  .wd-goal-txt .wd-week { grid-column: 1 / -1; }
  .wd-subjects { grid-template-columns: 1fr 1fr; gap: 12px; }
  .wd-subj-body { padding: 10px; } .wd-subj-body h3 { font-size: 15px; } .wd-subj-body .ring { width: 38px; height: 38px; }
  .wd-subj-head { grid-template-columns: 1fr auto; }
  .wd-subj-head img { grid-column: 1 / -1; width: 100%; aspect-ratio: 16/7; }
  .wd-subj-head h1 { font-size: 26px; }
  .wd-set { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .wd-set-num { width: 44px; height: 44px; font-size: 20px; position: absolute; }
  .wd-set { position: relative; }
  .wd-set-head { grid-template-columns: auto 1fr auto; padding-left: 52px; min-height: 44px; }
  .wd-set-emo { display: none; }
  .wd-set-head h3 { font-size: 17px; }
  .wd-step { font-size: 15px; min-height: 46px; gap: 5px; }
  .wd-learn-head h1, .wd-game-head h1 { font-size: 26px; }
  .wd-flip { aspect-ratio: 4 / 4.6; }
  .wd-face.front .wd-flip-word { font-size: 32px; }
  .wd-back-ar { font-size: 36px; } .wd-back-ex { font-size: 19px; }
  .wd-learn-nav .btn { min-width: 0; flex: 1; }
  .wd-q { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 14px; }
  .wd-q-pic { width: 100%; aspect-ratio: auto; height: 130px; }
  .wd-q-big { font-size: 32px; } .wd-q-big.ar { font-size: 34px; } .wd-q-gap { font-size: 21px; }
  .wd-game-card { padding: 16px; }
  .wd-opts { grid-template-columns: 1fr; gap: 10px; }
  .wd-opt { min-height: 58px; font-size: 20px; }
  .wd-game-nav .btn { width: 100%; }
  .wd-mine-row { grid-template-columns: 54px 1fr auto; gap: 8px 10px; }
  .wd-mine-pic { width: 54px; height: 42px; }
  .wd-src, .wd-pips, .wd-when { grid-row: 2; }
  .wd-src { grid-column: 1 / 3; justify-self: start; } .wd-pips { grid-column: 3; }
  .wd-when { grid-column: 1 / -1; grid-row: 3; text-align: left; }
  .wd-mine-row .wd-say { grid-row: 1; grid-column: 3; }
  .wd-mine-head .btn { width: 100%; }
  .wd-badge span { font-size: 14px; padding: 6px 10px; }
}
