/* ============================================================================
   StudyDeck — Apple-quality glass UI
   ============================================================================ */

:root {
  --bg: #0a0a14;
  --bg-soft: #11121d;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --surface-3: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f7;
  --text-2: #b9b9c4;
  --text-3: #7c7c8a;
  --warm: #FFB454;
  --pink: #FF6B6B;
  --purple: #C147FF;
  --green: #34C759;
  --red: #FF3B30;
  --gradient: linear-gradient(135deg, #FFB454 0%, #FF6B6B 50%, #C147FF 100%);
  --gradient-text: linear-gradient(135deg, #FFB454 0%, #FF6B6B 50%, #C147FF 100%);
  --shadow-1: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 24px 64px rgba(0, 0, 0, 0.5);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --header-h: 64px;
  --footer-h: 100px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "SF Pro Display", "SF Pro Text", BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: inherit;
}

button { cursor: pointer; border: none; background: none; padding: 0; }
input, textarea {
  background: transparent;
  border: none;
  outline: none;
  resize: none;
}
:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
  border-radius: 6px;
}

a { color: inherit; text-decoration: none; }

/* -------- background orbs -------- */
.bg-orbs {
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.42;
  animation: orb-drift 24s ease-in-out infinite alternate;
}
.orb-1 {
  width: 560px; height: 560px;
  top: -180px; left: -180px;
  background: radial-gradient(circle, var(--warm), transparent 70%);
}
.orb-2 {
  width: 620px; height: 620px;
  top: 30%; right: -220px;
  background: radial-gradient(circle, var(--pink), transparent 70%);
  animation-delay: -8s;
}
.orb-3 {
  width: 540px; height: 540px;
  bottom: -200px; left: 30%;
  background: radial-gradient(circle, var(--purple), transparent 70%);
  animation-delay: -16s;
}
@keyframes orb-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(40px, -30px, 0) scale(1.08); }
}

/* -------- header -------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-left));
  background: rgba(10, 10, 20, 0.6);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -0.02em;
}
.logo-mark { width: 30px; height: 30px; border-radius: 8px; }
.logo-text {
  font-size: 19px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
.header-nav {
  display: flex; align-items: center; gap: 10px;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}
.pill:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.pill-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
}
.pill-tip { background: var(--gradient); color: white; border-color: transparent; }
.pill-tip:hover { color: white; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,107,107,0.35); }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.is-muted { color: var(--text-3); }
.icon-btn.is-muted::after {
  content: ""; position: absolute;
  width: 28px; height: 2px; background: var(--red);
  transform: rotate(-45deg);
  border-radius: 2px;
}
.icon-btn { position: relative; }

@media (max-width: 600px) {
  .pill-os { display: none; }
}

/* -------- main / page transitions -------- */
main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px max(20px, env(safe-area-inset-left)) 32px max(20px, env(safe-area-inset-left));
}

.page {
  animation: page-in 0.4s var(--ease-out) both;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -------- footer -------- */
.app-footer {
  text-align: center;
  padding: 32px 20px 40px;
  color: var(--text-3);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  background: rgba(10,10,20,0.4);
}
.footer-line { margin-bottom: 10px; letter-spacing: -0.01em; }
.footer-links {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
}
.footer-links a {
  color: var(--text-2);
  transition: color 0.16s;
}
.footer-links a:hover { color: var(--pink); }

/* -------- buttons -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  transition: background 0.16s, border-color 0.16s, transform 0.16s, color 0.16s;
  user-select: none;
}
.btn:hover { background: var(--surface-3); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--gradient);
  border-color: transparent;
  color: white;
  box-shadow: 0 8px 24px rgba(255, 107, 107, 0.28);
}
.btn-primary:hover { box-shadow: 0 12px 32px rgba(193, 71, 255, 0.34); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-danger { color: var(--red); border-color: rgba(255, 59, 48, 0.3); }
.btn-danger:hover { background: rgba(255, 59, 48, 0.12); border-color: rgba(255, 59, 48, 0.5); }
.btn-large {
  padding: 16px 28px;
  font-size: 16px;
  border-radius: 14px;
}
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* -------- cards -------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-1);
}

/* -------- HOME -------- */
.hero {
  text-align: center;
  padding: 24px 0 48px;
  position: relative;
}
.hero h1 {
  font-size: clamp(40px, 6.5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 12px 0 12px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.tagline {
  color: var(--text-2);
  font-size: clamp(15px, 2vw, 18px);
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}
.hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

.section-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 32px 0 16px;
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-meta { color: var(--text-3); font-size: 13px; }

.set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.set-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 22px 20px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.18s var(--ease-out), border-color 0.18s, background 0.18s;
  overflow: hidden;
  cursor: pointer;
  min-height: 168px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.set-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--card-color, var(--gradient));
}
.set-card::after {
  content: "";
  position: absolute;
  top: -50%; right: -30%;
  width: 240px; height: 240px;
  background: var(--card-color, var(--gradient));
  opacity: 0.06;
  filter: blur(40px);
  border-radius: 50%;
  pointer-events: none;
  transition: opacity 0.18s;
}
.set-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.set-card:hover::after { opacity: 0.14; }
.set-card-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  /* prevent overflow */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.set-card-desc {
  color: var(--text-2);
  font-size: 13px;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.set-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-3);
  font-size: 12px;
  margin-top: auto;
}
.set-card-count {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}
.menu-btn {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2);
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  transition: background 0.16s, color 0.16s;
  z-index: 2;
}
.menu-btn:hover { background: rgba(0,0,0,0.4); color: var(--text); }
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-2);
}
.empty-state h3 { font-size: 20px; margin: 12px 0 4px; color: var(--text); }
.empty-state p { margin: 0 0 24px; }

/* -------- popover menu -------- */
.popover {
  position: fixed;
  min-width: 180px;
  background: rgba(20, 20, 30, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 6px;
  z-index: 200;
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: pop-in 0.16s var(--ease-out);
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.popover-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  text-align: left;
  transition: background 0.12s;
  position: relative;
}
.popover-item:hover { background: var(--surface-2); }
.popover-item.is-danger { color: var(--red); }
.popover-item.has-submenu::after {
  content: "›";
  margin-left: auto;
  color: var(--text-3);
}
.popover-item .submenu {
  position: absolute;
  left: 100%; top: -6px;
  display: none;
}
.popover-item.has-submenu:hover .submenu { display: block; }
.popover-divider {
  height: 1px; background: var(--border);
  margin: 4px 0;
}

/* -------- modal -------- */
.modal-host {
  position: fixed; inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  padding: 20px;
}
.modal-host.is-open { display: flex; animation: fade-in 0.2s var(--ease-out); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  background: rgba(20, 20, 30, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: modal-in 0.24s var(--ease-spring);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
}
.modal textarea, .modal input[type=text] {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 0.16s, background 0.16s;
}
.modal textarea:focus, .modal input[type=text]:focus {
  outline: none;
  border-color: var(--pink);
  background: var(--surface-2);
}
.modal textarea { min-height: 200px; font-family: ui-monospace, SF Mono, Menlo, monospace; font-size: 13px; }

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 600;
}
.field-help {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* -------- toast -------- */
.toast-host {
  position: fixed;
  top: 80px; right: 20px;
  z-index: 300;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: rgba(20,20,30,0.95);
  border: 1px solid var(--border-strong);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-1);
  animation: toast-in 0.3s var(--ease-spring), toast-out 0.3s var(--ease-out) 2.2s forwards;
  max-width: 320px;
}
.toast.toast-success { border-color: rgba(52, 199, 89, 0.4); }
.toast.toast-error { border-color: rgba(255, 59, 48, 0.4); }
@keyframes toast-in { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(100%); } }

/* -------- SET EDITOR -------- */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 900px) {
  .editor-layout { grid-template-columns: 1fr; }
}
.editor-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-2); font-size: 14px;
  margin-bottom: 12px;
  transition: color 0.16s;
}
.editor-back:hover { color: var(--text); }
.editor-head {
  margin-bottom: 24px;
  position: relative;
}
.editor-title {
  width: 100%;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.16s;
  outline: none;
}
.editor-title:hover, .editor-title:focus { border-bottom-color: var(--border-strong); }
.editor-desc {
  width: 100%;
  font-size: 15px;
  color: var(--text-2);
  margin-top: 8px;
  border: none;
  padding: 4px 0;
  outline: none;
}
.save-pill {
  position: absolute;
  top: 6px; right: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(52, 199, 89, 0.16);
  color: var(--green);
  border: 1px solid rgba(52, 199, 89, 0.32);
  opacity: 0;
  transition: opacity 0.2s;
}
.save-pill.is-visible { opacity: 1; }
.save-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
}

.card-list { display: flex; flex-direction: column; gap: 10px; }
.card-row {
  display: grid;
  grid-template-columns: 24px 1fr 1fr 30px;
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.16s, background 0.16s;
}
.card-row:hover { border-color: var(--border-strong); }
.card-row.is-dragging { opacity: 0.5; }
.card-row.drag-over { border-color: var(--pink); border-style: dashed; }
.drag-handle {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); cursor: grab;
  user-select: none;
}
.drag-handle:active { cursor: grabbing; }
.card-row textarea {
  background: transparent;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  padding: 6px 0;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.16s;
}
.card-row textarea:focus { border-bottom-color: var(--pink); }
.card-row .delete-btn {
  align-self: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: background 0.14s, color 0.14s;
}
.card-row .delete-btn:hover { background: rgba(255,59,48,0.12); color: var(--red); }

.add-card-btn {
  margin-top: 16px;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px dashed var(--border-strong);
  color: var(--text-2);
  font-weight: 600;
  background: transparent;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.add-card-btn:hover { background: var(--surface); color: var(--text); border-color: var(--pink); }

.editor-rail {
  position: sticky; top: calc(var(--header-h) + 20px);
  display: flex; flex-direction: column; gap: 10px;
}
.rail-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  font-weight: 700;
  margin: 0 0 4px;
}
.play-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
  font-size: 15px;
  font-weight: 600;
}
.play-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.play-btn .play-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
}
.play-btn .play-meta { font-size: 12px; color: var(--text-3); font-weight: 500; margin-top: 2px; }
.play-btn .play-text { display: flex; flex-direction: column; }
.play-btn[data-mode=flashcards] .play-icon { background: linear-gradient(135deg, #FFB454, #FF8B5C); }
.play-btn[data-mode=match] .play-icon { background: linear-gradient(135deg, #FF6B6B, #FF4FA3); }
.play-btn[data-mode=blocks] .play-icon { background: linear-gradient(135deg, #C147FF, #8338EC); }
.play-btn[data-mode=test] .play-icon { background: linear-gradient(135deg, #34C759, #30B0C7); }

/* -------- FLASHCARDS -------- */
.fc-page {
  display: flex; flex-direction: column; align-items: center;
  min-height: 70vh;
}
.fc-bar {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.fc-progress-dots {
  display: flex; gap: 4px; flex: 1;
  margin: 0 16px;
  flex-wrap: wrap;
  max-height: 8px;
  overflow: hidden;
}
.fc-dot {
  flex: 1;
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  min-width: 8px;
  transition: background 0.2s;
}
.fc-dot.is-done { background: var(--green); }
.fc-dot.is-current { background: var(--pink); }
.fc-counts {
  display: flex; gap: 14px;
  font-size: 13px; color: var(--text-2);
  font-weight: 600;
}
.fc-count-good { color: var(--green); }
.fc-count-again { color: var(--warm); }

.fc-stage {
  perspective: 1600px;
  width: min(720px, 100%);
  aspect-ratio: 16 / 10;
  margin: 12px 0;
  position: relative;
}
.fc-card {
  position: absolute; inset: 0;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-spring);
  user-select: none;
}
.fc-card.is-flipped { transform: rotateY(180deg); }
.fc-face {
  position: absolute; inset: 0;
  border-radius: var(--radius-xl);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 36px;
  text-align: center;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-2);
}
.fc-face-front {
  background: linear-gradient(140deg, rgba(255,180,84,0.14), rgba(193,71,255,0.10));
}
.fc-face-back { transform: rotateY(180deg); }
.fc-face-label {
  position: absolute; top: 16px; left: 18px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 700;
}
.fc-face-text {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 100%;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.fc-flip-hint {
  position: absolute; bottom: 16px; right: 18px;
  font-size: 11.5px; color: var(--text-3); font-weight: 600;
}

.fc-controls {
  display: flex; align-items: center; gap: 14px;
  margin-top: 28px;
}
.fc-nav-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  transition: transform 0.16s, background 0.16s;
}
.fc-nav-btn:hover { background: var(--surface-3); transform: translateY(-2px); }
.fc-nav-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.fc-judge {
  display: flex; gap: 10px;
}
.fc-judge button {
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid;
  transition: transform 0.16s, background 0.16s;
}
.fc-judge .again {
  background: rgba(255, 180, 84, 0.12);
  border-color: rgba(255, 180, 84, 0.4);
  color: var(--warm);
}
.fc-judge .knew {
  background: rgba(52, 199, 89, 0.14);
  border-color: rgba(52, 199, 89, 0.4);
  color: var(--green);
}
.fc-judge button:hover { transform: translateY(-2px); }

.fc-keyhint {
  margin-top: 22px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  letter-spacing: 0.02em;
}
.fc-keyhint kbd {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  margin: 0 2px;
  font-family: ui-monospace, SF Mono, Menlo, monospace;
  font-size: 11px;
}

/* shuffle toggle */
.toggle-row { display: flex; align-items: center; gap: 8px; }
.toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 600;
  transition: background 0.14s;
}
.toggle:hover { background: var(--surface-2); }
.toggle.is-on { background: rgba(255, 107, 107, 0.16); color: var(--pink); border-color: rgba(255, 107, 107, 0.4); }

/* -------- MATCH -------- */
.match-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.match-timer {
  font-family: ui-monospace, SF Mono, Menlo, monospace;
  font-size: 22px;
  font-weight: 700;
  background: var(--surface-2);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  letter-spacing: -0.01em;
}
.match-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 700px) {
  .match-board { grid-template-columns: repeat(2, 1fr); }
}
.match-tile {
  aspect-ratio: 5 / 3;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-size: clamp(13px, 1.6vw, 16px);
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: all 0.18s var(--ease-out);
  word-break: break-word;
  user-select: none;
}
.match-tile:hover { background: var(--surface-3); border-color: var(--pink); transform: translateY(-2px); }
.match-tile.is-selected {
  background: rgba(255, 107, 107, 0.18);
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255,107,107,0.14);
}
.match-tile.is-correct {
  animation: tile-match 0.5s var(--ease-spring) forwards;
}
@keyframes tile-match {
  0%   { background: rgba(52, 199, 89, 0.32); border-color: var(--green); transform: scale(1.02); box-shadow: 0 0 32px rgba(52,199,89,0.5); }
  100% { opacity: 0; transform: scale(0.6); }
}
.match-tile.is-wrong {
  animation: tile-shake 0.4s ease-in-out;
  border-color: var(--red);
  background: rgba(255, 59, 48, 0.16);
}
@keyframes tile-shake {
  0%, 100% { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-3px); }
  80%  { transform: translateX(3px); }
}
.match-tile.is-disabled { pointer-events: none; opacity: 0.35; }
.match-tile.is-gone { visibility: hidden; pointer-events: none; }

/* -------- BLOCKS -------- */
.blocks-page {
  display: flex; flex-direction: column; align-items: center;
}
.blocks-bar {
  width: 100%;
  max-width: 700px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.blocks-lives {
  display: flex; gap: 8px;
}
.blocks-life {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--red);
  filter: drop-shadow(0 0 6px rgba(255,59,48,0.4));
  transition: opacity 0.3s, transform 0.3s;
}
.blocks-life.is-lost { opacity: 0.18; transform: scale(0.8); filter: none; }
.blocks-score {
  font-family: ui-monospace, SF Mono, Menlo, monospace;
  font-size: 22px;
  font-weight: 700;
  background: var(--surface-2);
  padding: 6px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.blocks-field {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 70vh;
  min-height: 420px;
  background: rgba(0,0,0,0.32);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: inset 0 0 80px rgba(193, 71, 255, 0.06);
}
.blocks-field::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0.5;
  z-index: 1;
}
.block {
  position: absolute;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--block-color, var(--gradient));
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  white-space: pre-wrap;
  width: 200px;
  max-width: 80%;
  word-break: break-word;
  box-shadow: 0 8px 22px rgba(0,0,0,0.36);
  border: 1px solid rgba(255,255,255,0.16);
  pointer-events: none;
  line-height: 1.25;
  letter-spacing: -0.005em;
  transform-origin: center center;
}
.block.is-popped {
  animation: block-pop 0.32s var(--ease-out) forwards;
}
@keyframes block-pop {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}
.block.is-missed { animation: block-flash 0.4s ease-out forwards; }
@keyframes block-flash {
  0%, 100% { background: var(--block-color, var(--gradient)); }
  50%      { background: var(--red); }
}
.particle {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--p-color, var(--pink));
  pointer-events: none;
  will-change: transform, opacity;
}

.blocks-input-row {
  margin-top: 16px;
  width: 100%;
  max-width: 600px;
  display: flex;
  gap: 10px;
}
.blocks-input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0;
}
.blocks-input:focus { border-color: var(--pink); background: var(--surface-3); }
.blocks-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  letter-spacing: 0.02em;
}

.blocks-overlay {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  flex-direction: column;
  background: rgba(0,0,0,0.6);
  z-index: 5;
  border-radius: var(--radius-lg);
  text-align: center;
  padding: 24px;
}
.blocks-overlay.is-visible { display: flex; }
.blocks-overlay h3 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.02em; }

/* -------- TEST -------- */
.test-page {
  max-width: 720px;
  margin: 0 auto;
}
.test-progress {
  display: flex; gap: 4px; margin-bottom: 20px;
  flex-wrap: wrap;
}
.test-pdot {
  flex: 1;
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  min-width: 6px;
  transition: background 0.2s;
}
.test-pdot.is-correct { background: var(--green); }
.test-pdot.is-wrong { background: var(--red); }
.test-pdot.is-current { background: var(--pink); }

.test-card {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-height: 360px;
  display: flex; flex-direction: column;
}
.test-q-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 700;
  margin-bottom: 14px;
}
.test-prompt {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 24px;
}
.test-options {
  display: grid; gap: 10px;
}
.test-opt {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  display: flex; align-items: center; gap: 12px;
  transition: background 0.14s, border-color 0.14s, transform 0.14s;
}
.test-opt:hover:not([disabled]) { background: var(--surface-3); border-color: var(--border-strong); transform: translateY(-1px); }
.test-opt[disabled] { cursor: default; }
.test-opt-key {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--surface-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--text-2);
  flex-shrink: 0;
}
.test-opt.is-correct {
  background: rgba(52, 199, 89, 0.18);
  border-color: rgba(52, 199, 89, 0.5);
}
.test-opt.is-correct .test-opt-key { background: var(--green); color: white; }
.test-opt.is-wrong {
  background: rgba(255, 59, 48, 0.18);
  border-color: rgba(255, 59, 48, 0.5);
}
.test-opt.is-wrong .test-opt-key { background: var(--red); color: white; }

.test-tf {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.test-tf .test-opt { justify-content: center; padding: 18px; font-size: 17px; font-weight: 700; }

.test-write {
  display: flex; flex-direction: column; gap: 14px;
}
.test-write-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 16px;
}
.test-write-input:focus { border-color: var(--pink); }
.test-write-input.is-correct { border-color: var(--green); background: rgba(52,199,89,0.10); }
.test-write-input.is-wrong { border-color: var(--red); background: rgba(255,59,48,0.10); }

.test-feedback {
  margin-top: auto;
  padding-top: 22px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.test-feedback-msg { font-size: 14px; color: var(--text-2); flex: 1; }
.test-feedback-msg.is-correct { color: var(--green); font-weight: 600; }
.test-feedback-msg.is-wrong { color: var(--red); font-weight: 600; }

/* -------- RESULTS -------- */
.results-page {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 20px 60px;
}
.results-big {
  font-size: clamp(72px, 14vw, 132px);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin: 16px 0;
}
.results-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 700;
}
.results-sub {
  color: var(--text-2);
  font-size: 16px;
  margin: 0 0 24px;
}
.results-best {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 180, 84, 0.16);
  color: var(--warm);
  border: 1px solid rgba(255, 180, 84, 0.4);
  font-size: 13px; font-weight: 700;
  margin-bottom: 20px;
}
.results-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 28px;
}
.missed-list {
  margin: 32px 0 0;
  text-align: left;
}
.missed-row {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
}
.missed-q { font-size: 13px; color: var(--text-2); }
.missed-correct { color: var(--green); font-weight: 600; margin-top: 4px; }
.missed-yours { color: var(--red); margin-top: 2px; }
.score-list {
  margin: 24px 0 0;
  display: flex; flex-direction: column; gap: 6px;
}
.score-list h4 {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 700;
  margin: 0 0 8px;
}
.score-row {
  display: flex; justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: 10px;
  font-size: 13px;
}
.score-row .rank { color: var(--text-3); font-weight: 700; min-width: 24px; }
.score-row .val { font-family: ui-monospace, SF Mono, Menlo, monospace; }

/* confetti */
.confetti-host {
  position: fixed; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 250;
}
.confetti {
  position: absolute;
  top: -20px;
  width: 10px; height: 14px;
  border-radius: 2px;
  animation: confetti-fall 3s ease-in forwards;
  will-change: transform, opacity;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* -------- utility -------- */
.hidden { display: none !important; }
.center-row { display: flex; align-items: center; gap: 8px; }
.flex-grow { flex: 1; }
.spacer { flex: 1; }
.txt-center { text-align: center; }
.txt-mute { color: var(--text-2); }
.row-gap { gap: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.scroll-y { overflow-y: auto; }

@media (max-width: 600px) {
  main { padding: 20px 16px; }
  .hero { padding: 12px 0 24px; }
  .set-grid { grid-template-columns: 1fr; }
  .editor-rail { position: static; }
  .card-row { grid-template-columns: 24px 1fr 30px; }
  .card-row textarea + textarea { grid-column: 2 / span 1; }
  .card-row { grid-template-columns: 24px 1fr 30px; grid-template-rows: auto auto; row-gap: 8px; }
  .card-row .term { grid-row: 1; grid-column: 2; }
  .card-row .definition { grid-row: 2; grid-column: 2; }
  .card-row .delete-btn { grid-row: 1 / span 2; grid-column: 3; }
  .fc-stage { aspect-ratio: 4 / 5; max-width: 92vw; }
  .fc-face-text { font-size: clamp(24px, 7vw, 36px); }
  .toast-host { right: 12px; left: 12px; top: 76px; }
  .toast { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===================== Quizlet import button + modal ===================== */
.btn-quizlet {
  background: linear-gradient(135deg, #4257B2 0%, #2C3899 100%) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 6px 20px rgba(66, 87, 178, 0.40);
}
.btn-quizlet:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(66, 87, 178, 0.55);
}

.quizlet-import {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: min(560px, 88vw);
}

.quizlet-help {
  background: rgba(66, 87, 178, 0.10);
  border: 1px solid rgba(66, 87, 178, 0.28);
  border-radius: 12px;
  padding: 14px 16px;
}
.quizlet-help-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #8FA8FF;
  margin-bottom: 6px;
}
.quizlet-help-steps {
  margin: 0;
  padding-left: 22px;
  font-size: 13px;
  color: rgba(255,255,255,0.78);
  line-height: 1.5;
}
.quizlet-help-steps li {
  margin: 2px 0;
}

.quizlet-seps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.quizlet-sep-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.quizlet-select {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
}
.quizlet-select:focus {
  outline: 2px solid rgba(193, 71, 255, 0.55);
  outline-offset: 1px;
}
.quizlet-custom {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.quizlet-custom.hidden { display: none; }

.quizlet-preview {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 14px;
  max-height: 220px;
  overflow: auto;
}
.quizlet-preview .field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.quizlet-preview-count {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: rgba(193, 71, 255, 0.18);
  color: #E8B6FF;
  border: 1px solid rgba(193, 71, 255, 0.30);
}
.quizlet-preview-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.quizlet-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  line-height: 1.35;
}
.quizlet-preview-row:last-child { border-bottom: 0; }
.quizlet-preview-term {
  font-weight: 700;
  color: #fff;
  flex: 0 0 35%;
}
.quizlet-preview-arrow {
  color: rgba(255,255,255,0.35);
  flex: 0 0 auto;
}
.quizlet-preview-def {
  color: rgba(255,255,255,0.70);
  flex: 1 1 auto;
}
.quizlet-preview-empty {
  color: rgba(255,255,255,0.55);
  font-style: italic;
  font-size: 13px;
}
.quizlet-preview-more {
  color: rgba(255,255,255,0.45);
  font-size: 12px;
  font-style: italic;
  margin-top: 4px;
}

@media (max-width: 600px) {
  .quizlet-seps { grid-template-columns: 1fr; }
}

/* ===================== Quizlet snippet block ===================== */
.quizlet-help-hint {
  font-size: 12.5px;
  color: rgba(255,255,255,0.62);
  line-height: 1.5;
  margin: 4px 0 12px;
}
.quizlet-snippet-wrap {
  position: relative;
  margin-top: 12px;
  background: #0c0e1a;
  border: 1px solid rgba(193, 71, 255, 0.28);
  border-radius: 10px;
  padding: 12px 56px 12px 14px;
  overflow: hidden;
}
.quizlet-snippet {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  line-height: 1.45;
  color: #c5e1ff;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
  user-select: all;
}
.quizlet-snippet::-webkit-scrollbar { height: 6px; }
.quizlet-snippet::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 3px;
}
.btn-quizlet-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  background: linear-gradient(135deg, #C147FF 0%, #FF6B6B 100%);
  color: white;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(193, 71, 255, 0.35);
}
.btn-quizlet-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(193, 71, 255, 0.50);
}

/* ============================================================================
   BLOCK BLAST — 8x8 polyomino + flashcard quiz
   ============================================================================ */

/* play rail icon override for the new mode */
.play-btn[data-mode=blockblast] .play-icon {
  background: linear-gradient(135deg, #FFB454 0%, #FF6B6B 60%, #C147FF 100%);
}

.bb-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  --bb-cell-size: clamp(34px, 6.4vw, 52px);
  --bb-tray-cell-size: clamp(20px, 3.6vw, 28px);
}

.bb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 720px;
  padding: 6px 0 8px;
}
.bb-bar .bb-title {
  flex: 1;
  text-align: center;
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bb-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1;
}
.bb-score-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-3);
  font-weight: 700;
  text-transform: uppercase;
}
.bb-score {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #FFB454 0%, #FF6B6B 60%, #C147FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bb-frame {
  position: relative;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.bb-grid {
  display: grid;
  grid-template-columns: repeat(8, var(--bb-cell-size));
  grid-template-rows: repeat(8, var(--bb-cell-size));
  gap: 4px;
  outline: none;
}
.bb-grid:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.45);
  border-radius: 8px;
}

.bb-cell {
  width: var(--bb-cell-size);
  height: var(--bb-cell-size);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
}
.bb-cell.is-filled {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16),
              inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}
.bb-cell.is-ghost {
  background: var(--bb-ghost-color, rgba(255, 255, 255, 0.18)) !important;
  opacity: 0.5;
  border-color: rgba(255, 255, 255, 0.28);
}
.bb-cell.is-ghost-bad {
  background: rgba(255, 59, 48, 0.18) !important;
  border-color: rgba(255, 59, 48, 0.45);
  opacity: 0.65;
}
.bb-cell.is-kb-cursor {
  outline: 2px solid var(--pink);
  outline-offset: -1px;
  z-index: 2;
}

.bb-cell-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(0, 0, 0, 0.78);
  padding: 2px 4px;
  text-align: center;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.32);
  pointer-events: none;
}

.bb-fx-layer {
  position: absolute;
  inset: 14px;
  pointer-events: none;
  z-index: 3;
  overflow: visible;
}

.bb-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  will-change: transform, opacity;
  box-shadow: 0 0 8px currentColor;
}

.bb-sr-status {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* -------- Tray -------- */
.bb-tray {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: calc(8 * var(--bb-cell-size) + 7 * 4px + 28px);
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}
.bb-tray-slot {
  min-height: calc(4 * var(--bb-tray-cell-size));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  transition: background 0.16s;
}
.bb-tray-slot.is-empty {
  opacity: 0.35;
}

/* -------- Pieces -------- */
.bb-piece {
  display: grid;
  grid-template-rows: repeat(var(--bb-rows, 1), var(--bb-tray-cell-size));
  grid-template-columns: repeat(var(--bb-cols, 1), var(--bb-tray-cell-size));
  gap: 3px;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: element;
  outline: none;
  transition: transform 0.18s var(--ease-spring);
}
.bb-piece.is-tray:hover { transform: scale(1.04); }
.bb-piece:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 4px;
  border-radius: 6px;
}
.bb-piece.is-dragging-source { opacity: 0.35; }

.bb-piece-cell {
  width: var(--bb-tray-cell-size);
  height: var(--bb-tray-cell-size);
  border-radius: 5px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bb-piece-cell.is-on {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22),
              inset 0 -2px 0 rgba(0, 0, 0, 0.22);
}
.bb-piece-label {
  font-size: 8px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.78);
  padding: 0 2px;
  text-align: center;
  line-height: 1.05;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

/* Drag ghost (rendered free in <body>) */
.bb-drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.92;
  --bb-tray-cell-size: var(--bb-cell-size, 44px);
  grid-template-rows: repeat(var(--bb-rows, 1), var(--bb-cell-size, 44px));
  grid-template-columns: repeat(var(--bb-cols, 1), var(--bb-cell-size, 44px));
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}
.bb-drag-ghost .bb-piece-cell {
  width: var(--bb-cell-size, 44px);
  height: var(--bb-cell-size, 44px);
  border-radius: 8px;
}
.bb-drag-ghost .bb-piece-label {
  font-size: 10px;
}

/* -------- Combo banner -------- */
.bb-combo-host {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 4;
}
.bb-combo {
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFB454 0%, #FF6B6B 60%, #C147FF 100%);
  color: white;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 32px rgba(193, 71, 255, 0.45);
  transform: translateY(-40px);
  opacity: 0;
  transition: transform 220ms var(--ease-spring), opacity 220ms ease;
}
.bb-combo.is-in { transform: translateY(0); opacity: 1; }
.bb-combo.is-out { transform: translateY(-30px); opacity: 0; }

/* -------- Pause / GameOver overlay -------- */
.bb-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 20, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 6;
  border-radius: var(--radius-lg);
}
.bb-overlay.is-visible { display: flex; }
.bb-overlay-card {
  text-align: center;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: min(320px, 80vw);
}
.bb-overlay-card h3 {
  font-size: 28px;
  margin: 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #FFB454 0%, #FF6B6B 60%, #C147FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -------- Quiz overlay -------- */
.bb-quiz {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 20, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 7;
  border-radius: var(--radius-lg);
  padding: 16px;
}
.bb-quiz.is-visible { display: flex; }
.bb-quiz-card {
  width: min(440px, 96%);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-2);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}
.bb-quiz-card.flash-green {
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.55), var(--shadow-2);
  border-color: rgba(52, 199, 89, 0.55);
}
.bb-quiz-card.flash-red {
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.55), var(--shadow-2);
  border-color: rgba(255, 59, 48, 0.55);
}
.bb-quiz-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-3);
}
.bb-quiz-def {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.35;
}
.bb-quiz-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bb-quiz-choice {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
  min-height: 46px;
  font-size: 14px;
  line-height: 1.25;
}
.bb-quiz-choice:hover { background: var(--surface-2); border-color: var(--border-strong); transform: translateY(-1px); }
.bb-quiz-choice.is-correct {
  background: rgba(52, 199, 89, 0.22);
  border-color: rgba(52, 199, 89, 0.55);
  color: #c8f7d4;
}
.bb-quiz-choice.is-wrong {
  background: rgba(255, 59, 48, 0.22);
  border-color: rgba(255, 59, 48, 0.55);
  color: #ffcfcb;
}
.bb-quiz-choice.is-correct-reveal {
  background: rgba(52, 199, 89, 0.18);
  border-color: rgba(52, 199, 89, 0.45);
}
.bb-quiz-tip {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  letter-spacing: 0.02em;
}

.bb-hint {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  letter-spacing: 0.02em;
  max-width: 560px;
  margin-top: 4px;
}

/* High contrast mode */
@media (prefers-contrast: more) {
  .bb-cell { border-color: rgba(255, 255, 255, 0.28); }
  .bb-cell.is-filled {
    box-shadow: inset 0 0 0 2px #000, inset 0 0 0 3px rgba(255,255,255,0.65);
  }
  .bb-cell-label, .bb-piece-label { color: #000; text-shadow: 0 0 2px #fff; }
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .bb-page { --bb-cell-size: clamp(32px, 10.5vw, 44px); --bb-tray-cell-size: clamp(16px, 5.4vw, 22px); }
  .bb-bar .bb-title { font-size: 14px; }
  .bb-quiz-choices { grid-template-columns: 1fr; }
  .bb-piece-label { font-size: 7px; }
  .bb-cell-label { font-size: 8px; }
}


/* ===================== Quizlet easy-import (bookmarklet flow) ===================== */
.quizlet-easy {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: rgba(193, 71, 255, 0.08);
  border: 1px solid rgba(193, 71, 255, 0.22);
  border-radius: 12px;
  margin-bottom: 10px;
}
.quizlet-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB454 0%, #FF6B6B 50%, #C147FF 100%);
  display: grid; place-items: center;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
  font-size: 14px;
}
.quizlet-step-body { flex: 1; }
.quizlet-step-title {
  font-size: 14px; font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.quizlet-step-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  line-height: 1.45;
  margin-bottom: 10px;
}
.btn-bookmarklet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #FFB454 0%, #FF6B6B 50%, #C147FF 100%);
  color: white;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.2px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(193, 71, 255, 0.35);
  cursor: grab;
  user-select: none;
  border: 0;
  font-size: 14px;
}
.btn-bookmarklet:active { cursor: grabbing; }
.btn-bookmarklet:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(193, 71, 255, 0.50);
}
.btn-bookmarklet::before { content: "⭐ "; }

.quizlet-fallback-toggle {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-top: 8px;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.55);
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
}
.quizlet-fallback-toggle:hover { color: rgba(255,255,255,0.82); }
.quizlet-fallback.hidden { display: none; }

/* ===================== Quizlet landing page (post-bookmarklet) ===================== */
.quizlet-landing {
  min-height: calc(100vh - 200px);
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
.quizlet-landing-card {
  max-width: 560px;
  width: 100%;
  padding: 40px 36px 32px;
  background: rgba(28, 28, 30, 0.72);
  backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(193, 71, 255, 0.30);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55), 0 0 0 1px rgba(193,71,255,0.15) inset;
  text-align: center;
}
.quizlet-landing-eyebrow {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  background: rgba(193, 71, 255, 0.18);
  color: #E8B6FF;
  border: 1px solid rgba(193, 71, 255, 0.30);
  margin-bottom: 16px;
}
.quizlet-landing-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.1;
  margin: 0 0 12px;
  background: linear-gradient(135deg, #FFB454 0%, #FF6B6B 50%, #C147FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.quizlet-landing-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.70);
  margin: 0 0 28px;
}
.quizlet-landing-btn {
  font-size: 17px !important;
  padding: 14px 36px !important;
  margin-bottom: 20px;
}
.quizlet-landing-fallback.hidden { display: none; }
.quizlet-landing-fallback {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: left;
}
.quizlet-landing-ta {
  width: 100%;
  min-height: 140px;
  margin-bottom: 12px;
}
.quizlet-landing-back {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
}
.quizlet-landing-back:hover { color: rgba(255,255,255,0.85); }

/* ===================== Quizlet import v2 — visual diagrams ===================== */
.quizlet-import-v2 {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: min(640px, 88vw);
  max-width: 640px;
}
.qz-intro {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255,255,255,0.72);
  padding: 12px 14px;
  background: rgba(193,71,255,0.08);
  border: 1px solid rgba(193,71,255,0.20);
  border-radius: 10px;
}

/* ----- Step shell ----- */
.qz-step {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qz-step-head {
  display: flex; align-items: flex-start; gap: 12px;
}
.qz-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB454 0%, #FF6B6B 50%, #C147FF 100%);
  display: grid; place-items: center;
  font-weight: 900; font-size: 15px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(255,107,107,0.30);
}
.qz-step-headtext { flex: 1; }
.qz-step-title {
  font-size: 15px; font-weight: 700;
  color: #fff;
  letter-spacing: -0.1px;
}
.qz-step-sub {
  margin-top: 3px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.62);
  line-height: 1.45;
}
.qz-step-help {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
}
.qz-step-help kbd {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 1px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  color: rgba(255,255,255,0.85);
}

/* ----- Visual: shared ----- */
.qz-visual {
  background: #0c0e1a;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px;
  position: relative;
}

/* ----- Step 1: bookmark bar mock + drag CTA ----- */
.qz-bookmark-bar {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  font-family: -apple-system, system-ui, sans-serif;
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 12px;
  overflow: hidden;
}
.qz-bm-item {
  padding: 3px 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  white-space: nowrap;
}
.qz-bm-dropzone {
  margin-left: auto;
  padding: 3px 10px;
  border: 1px dashed rgba(193,71,255,0.55);
  border-radius: 4px;
  color: #E8B6FF;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  animation: qz-pulse 1.6s ease-in-out infinite;
}
@keyframes qz-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.04); }
}
.qz-drag-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.qz-bookmarklet {
  /* Inherits .btn-bookmarklet from earlier section */
  position: relative;
  z-index: 2;
}
.qz-drag-arrow {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.3px;
  animation: qz-bounce 1.4s ease-in-out infinite;
}
@keyframes qz-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* ----- Step 2: browser mock ----- */
.qz-browser-frame {
  background: #1a1b24;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  position: relative;
}
.qz-tab-bar {
  display: flex; align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.30);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.qz-traffic {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.qz-r { background: #FF5F56; }
.qz-y { background: #FFBD2E; }
.qz-g { background: #27C93F; }
.qz-url-bar {
  flex: 1;
  background: rgba(255,255,255,0.07);
  padding: 4px 12px;
  border-radius: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.78);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}
.qz-bookmark-bar.qz-mini {
  margin: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  font-size: 10.5px;
  position: relative;
}
.qz-bm-target {
  background: linear-gradient(135deg, #FFB454, #FF6B6B 50%, #C147FF) !important;
  color: white !important;
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(193, 71, 255, 0.35);
  animation: qz-target-pulse 1.6s ease-in-out infinite;
}
@keyframes qz-target-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(193, 71, 255, 0.20); }
  50%      { box-shadow: 0 0 0 6px rgba(193, 71, 255, 0.40); }
}
.qz-cursor {
  position: absolute;
  font-size: 18px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  margin-left: -10px;
  margin-top: 8px;
  animation: qz-cursor-tap 1.6s ease-in-out infinite;
}
@keyframes qz-cursor-tap {
  0%, 70%, 100% { transform: translateY(0) scale(1); }
  80%           { transform: translateY(-3px) scale(0.85); }
}
.qz-quizlet-page {
  padding: 14px 16px;
  background: linear-gradient(180deg, #0c0e1a, #110e1a);
}
.qz-quizlet-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-bottom: 8px;
}
.qz-quizlet-card {
  display: flex; gap: 14px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.75);
}
.qz-q-term { font-weight: 700; flex: 0 0 35%; }
.qz-q-def  { color: rgba(255,255,255,0.55); }
.qz-banner {
  position: absolute;
  top: 12px; right: 12px;
  background: linear-gradient(135deg, #FFB454, #FF6B6B 50%, #C147FF);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(193, 71, 255, 0.35);
  animation: qz-banner-in 1.8s ease-in-out infinite;
}
@keyframes qz-banner-in {
  0%, 80%, 100% { transform: translateY(0); opacity: 1; }
  90%           { transform: translateY(-2px); opacity: 0.85; }
}

/* ----- Step 3: StudyDeck landing mock ----- */
.qz-sd-card {
  background: rgba(28,28,30,0.85);
  border: 1px solid rgba(193,71,255,0.30);
  border-radius: 16px;
  padding: 20px 24px;
  text-align: center;
  position: relative;
}
.qz-sd-eyebrow {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  background: rgba(193, 71, 255, 0.18);
  color: #E8B6FF;
  border: 1px solid rgba(193, 71, 255, 0.30);
  margin-bottom: 10px;
}
.qz-sd-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #FFB454 0%, #FF6B6B 50%, #C147FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}
.qz-sd-btn {
  display: inline-block;
  padding: 9px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFB454 0%, #FF6B6B 50%, #C147FF 100%);
  color: white;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 6px 20px rgba(193, 71, 255, 0.40);
  position: relative;
}
.qz-cursor-bottom {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}

/* ----- Tips disclosure ----- */
.qz-tips {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 4px 14px;
}
.qz-tips-summary {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.62);
  cursor: pointer;
  padding: 10px 0;
  list-style: none;
  user-select: none;
}
.qz-tips-summary::-webkit-details-marker { display: none; }
.qz-tips-summary:hover { color: rgba(255,255,255,0.85); }
.qz-tips-body {
  padding: 4px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
}
.qz-tip code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  padding: 1px 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  color: rgba(255,255,255,0.80);
}
.qz-tip strong { color: rgba(255,255,255,0.85); font-weight: 700; }

/* Hide the older v1 modal pieces if they leak in */
.quizlet-import-v2 .quizlet-easy { display: none; }
