/* ─── The Vault Wall — shared feedback widget ────────────────────────────────
   Used on the exam results screen (as a "bonus question") and on the dashboard
   (to manage an existing entry). Styled only with global.css tokens so it drops
   into either page unchanged.
   ─────────────────────────────────────────────────────────────────────────── */

.vw { display: none; background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 28px 26px; position: relative; overflow: hidden; }
.vw.vw--on { display: block; }
.vw::before { content: ''; position: absolute; top: -120px; right: -80px;
              width: 320px; height: 320px; pointer-events: none;
              background: radial-gradient(circle, rgba(232,115,74,.07), transparent 70%); }
.vw > * { position: relative; }

.vw__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.vw__badge { font-family: var(--font-mono); font-size: 11px; color: var(--accent);
             background: var(--accent-glow); padding: 4px 10px; border-radius: 6px;
             letter-spacing: .05em; font-weight: 600; }
.vw__note { font-family: var(--font-mono); font-size: 11px; color: var(--text3);
            text-transform: uppercase; letter-spacing: .06em; }

.vw__q { font-size: 1rem; line-height: 1.7; color: var(--text); margin: 4px 0 22px; }
.vw__q em { color: var(--accent); font-style: normal; }

/* ── Stars ── */
.vw__stars { display: flex; gap: 6px; margin-bottom: 8px; }
.vw__star { background: none; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
            width: 52px; height: 46px; display: flex; align-items: center; justify-content: center;
            cursor: pointer; padding: 0; transition: all .18s cubic-bezier(.4,0,.2,1); }
.vw__star svg { width: 21px; height: 21px; fill: none; stroke: var(--muted);
                stroke-width: 1.6; stroke-linejoin: round; transition: all .18s; }
.vw__star:hover { border-color: var(--gold); transform: translateY(-2px); }
.vw__star:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.vw__star.is-lit { border-color: var(--gold); background: rgba(245,197,66,.1); }
.vw__star.is-lit svg { fill: var(--gold); stroke: var(--gold); }
.vw__starlabel { font-family: var(--font-mono); font-size: 12px; color: var(--text2);
                 letter-spacing: .04em; min-height: 17px; margin-bottom: 4px; }
.vw__starlabel.is-set { color: var(--gold); }

/* ── Step 2 ── */
.vw__step { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border); }
.vw__sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
           color: var(--text3); text-transform: uppercase; margin-bottom: 12px; }

.vw__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.vw__chip { padding: 9px 14px; background: var(--bg3); border: 1px solid var(--border);
            border-radius: 99px; font-size: .82rem; color: var(--text2); cursor: pointer;
            transition: all .18s; user-select: none; }
.vw__chip:hover { border-color: var(--accent); color: var(--text); }
.vw__chip.is-on { border-color: var(--accent); background: var(--accent-glow);
                  color: var(--accent); font-weight: 600; }
.vw__chip.is-on::before { content: '✓ '; }

.vw__input { width: 100%; background: var(--bg3); border: 1px solid var(--border);
             color: var(--text); border-radius: var(--radius-sm); padding: 12px 14px;
             font-size: .9rem; font-family: inherit; resize: vertical; }
.vw__input:focus { outline: none; border-color: var(--accent);
                   box-shadow: 0 0 0 3px var(--accent-glow); }
.vw__input::placeholder { color: var(--text3); }
select.vw__input { cursor: pointer; }
.vw__counter { font-family: var(--font-mono); font-size: 11px; color: var(--text3);
               text-align: right; margin-top: 5px; }
.vw__hint { font-size: .74rem; color: var(--text3); margin-top: 5px; line-height: 1.45; }
.vw__counter.is-over { color: var(--danger); }

.vw__row { display: flex; gap: 10px; margin-top: 16px; }
.vw__row > * { flex: 1; min-width: 0; }
.vw__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
             color: var(--text3); text-transform: uppercase; display: block; margin-bottom: 6px; }

.vw__check { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; cursor: pointer; }
.vw__check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent);
                   flex-shrink: 0; cursor: pointer; }
.vw__checktext { font-size: .82rem; color: var(--text2); line-height: 1.55; }
.vw__checktext b { color: var(--text); font-weight: 600; }
.vw__checktext small { color: var(--text3); font-size: .78rem; }

.vw__actions { display: flex; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.vw__submit { background: var(--accent); border: none; color: #fff; border-radius: 9px;
              padding: 12px 26px; font-family: var(--font-mono); font-size: 12px;
              font-weight: 600; letter-spacing: .05em; cursor: pointer; transition: all .2s;
              box-shadow: 0 2px 10px rgba(232,115,74,.25); }
.vw__submit:hover:not(:disabled) { background: var(--accent-h); box-shadow: 0 4px 18px rgba(232,115,74,.35); }
.vw__submit:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.vw__error { font-size: .82rem; color: var(--danger); margin-top: 12px; }

/* ── Done: an approval stamp thwacked onto the card ── */
.vw__done { text-align: center; padding: 14px 0 6px; }
.vw__stamp { display: inline-block; border: 2.5px solid var(--success); color: var(--success);
             border-radius: var(--radius-sm); padding: 12px 22px; font-family: var(--font-mono);
             font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
             transform: rotate(-4deg); opacity: .92;
             animation: vw-stamp .45s cubic-bezier(.2,1.6,.4,1) both; }
.vw__stamp small { display: block; font-size: 9px; letter-spacing: .1em;
                   font-weight: 500; margin-top: 4px; opacity: .8; }
@keyframes vw-stamp {
  0%   { transform: rotate(-4deg) scale(2.4); opacity: 0; }
  60%  { transform: rotate(-4deg) scale(.94); opacity: 1; }
  100% { transform: rotate(-4deg) scale(1);   opacity: .92; }
}
@media (prefers-reduced-motion: reduce) {
  .vw__stamp { animation: none; }
  .vw__star:hover { transform: none; }
}
.vw__donenote { font-size: .85rem; color: var(--text3); line-height: 1.6; margin-top: 18px; }

.vw__hidden { display: none !important; }

@media (max-width: 560px) {
  .vw { padding: 22px 18px; }
  .vw__row { flex-direction: column; gap: 14px; }
  .vw__star { width: 46px; height: 42px; }
}
