/* Dictionary cards and personal review, sharing the site's existing typography. */
.dictionary-grid .sign-card {
  padding: 0;
  min-width: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  transform: none;
}
.sign-flip {
  display: block;
  width: 100%;
  height: 244px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--cream);
  text-align: center;
  perspective: 1000px;
  -webkit-tap-highlight-color: transparent;
}
.sign-card-inner {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .72s cubic-bezier(.22,.8,.25,1);
}
.is-flipped .sign-card-inner { transform: rotateY(180deg); }
.card-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #f8edc440;
  border-radius: 20px;
  padding: 13px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  overflow: hidden;
  background: linear-gradient(145deg,#173759,#0b102c 85%);
}
.card-front {
  background: radial-gradient(ellipse at 50% 45%,#40659377,transparent 65%),linear-gradient(145deg,#163653,#10152f);
}
.card-front::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid #f8edc41a;
  border-radius: 14px;
  pointer-events: none;
}
.sign-flip:hover .card-face { border-color: var(--gold); }
.sign-card .card-front small { padding: 0; letter-spacing: 1px; font-size: 10px; }
.card-orbit {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 16px 0 7px;
  border: 1px solid #f2d66d50;
  border-radius: 50%;
  color: var(--gold);
  font-size: 34px;
  box-shadow: 0 0 0 9px #f2d66d07,inset 0 0 25px #e2b45310;
}
.sign-card .card-front b { font-family: 'Ky Viet Display',serif; font-size: 20px; padding: 5px 0; overflow-wrap: anywhere; }
.sign-card .flip-hint { display: block; margin-top: 12px; font-size: 10px; color: #bdcbe0; }
.card-back { transform: rotateY(180deg); justify-content: flex-start; }
.sign-card .card-back img { height: 164px; flex: 1; min-height: 0; }
.sign-card .card-back b { font-size: 13px; padding-top: 9px; }
.sign-card .card-back .flip-hint { margin-top: 6px; }
.card-details {
  display: block;
  width: 100%;
  height: 35px;
  margin-top: 5px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--gold);
  font: 12px 'DM Sans',sans-serif;
}
.card-details[hidden] { display: block; visibility: hidden; }
.sign-card .seen-mark { pointer-events: none; top: 9px; right: 9px; font-size: 12px; }
.sign-flip:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.practice-section { max-width: 1200px; padding: 70px 6% 35px; margin: auto; scroll-margin-top: 130px; }
.practice-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  padding: 38px;
  border: 1px solid #f2d66d55;
  border-radius: 28px;
  background: radial-gradient(ellipse at 0 0,#3b578c77,transparent 75%),linear-gradient(130deg,#102b48f5,#0c1029fa);
}
.practice-emblem { display: block; color: var(--gold); font-size: 43px; line-height: 1; margin-bottom: 19px; }
.practice-intro h3 { font: 600 25px/1.5 'Ky Viet Display',serif; color: var(--cream); }
.practice-intro p { color: #c0cce0; font-size: 14px; line-height: 1.9; margin-top: 14px; }
.practice-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.practice-actions .modal-btn { padding: 14px 21px; }
#mistakeBadge { display: inline-block; margin-left: 5px; min-width: 20px; padding: 2px 5px; border-radius: 7px; background: #f2d66d20; color: var(--gold); }
.practice-intro .practice-status { font-size: 11px; line-height: 1.8; margin-top: 20px; }
.practice-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; height: fit-content; }
.practice-stats>div { padding: 21px 12px; text-align: center; background: #070d2588; border: 1px solid #f8edc429; border-radius: 18px; }
.practice-stats>div:last-child { grid-column: 1/-1; }
.practice-stats strong { display: block; font: 600 30px/1.4 'Ky Viet Display',serif; color: var(--gold); }
.practice-stats span { display: block; font-size: 11px; color: #c4d0e4; margin-top: 5px; }
.practice-explainer { color: #b9c8df; font-size: 12px; line-height: 1.9; margin-top: 18px; }
.practice-explainer summary { cursor: pointer; color: var(--cream); }
.practice-explainer p { margin-top: 10px; }
.mistake-list { display: grid; gap: 9px; margin-top: 20px; }
.mistake-list button { display: flex; justify-content: space-between; align-items: center; gap: 18px; text-align: left; width: 100%; border: 1px solid #f8edc433; border-radius: 14px; padding: 15px; background: #0a1732; color: var(--cream); font-size: 14px; }
.mistake-list button:hover { border-color: var(--gold); }
.mistake-list small { display: block; margin-top: 5px; color: #bdcbe0; font-size: 11px; }
.mistake-list button>span:last-child { color: var(--gold); font-size: 12px; flex-shrink: 0; }
.practice-empty { text-align: center; padding: 25px 0 5px; }
.practice-empty>span { font-size: 60px; color: var(--gold); }
.practice-empty p { margin-top: 16px; }
html[data-theme=light] .dictionary-grid .sign-card { background: transparent; border: 0; box-shadow: none; }
html[data-theme=light] .card-face { background: linear-gradient(145deg,#f4fcff,#bbdef0); border-color: #347c9c66; box-shadow: 0 8px 24px #216b9012; }
html[data-theme=light] .card-front { background: radial-gradient(ellipse at 50% 45%,#fff4c699,transparent 65%),linear-gradient(145deg,#e6f7ff,#bcdeed); }
html[data-theme=light] .card-front::before { border-color: #4c839b33; }
html[data-theme=light] .card-orbit { border-color: #9d6a2466; box-shadow: 0 0 0 9px #ad77210a; }
html[data-theme=light] .sign-card .flip-hint { color: #40677d; }
html[data-theme=light] .practice-panel { background: linear-gradient(135deg,#effbffef,#badcedf5); border-color: #387d9d55; }
html[data-theme=light] .practice-intro p,html[data-theme=light] .practice-explainer,html[data-theme=light] .practice-stats span,html[data-theme=light] .mistake-list small { color: #40677d; }
html[data-theme=light] .practice-stats>div,html[data-theme=light] .mistake-list button,html[data-theme=light] .progress-summary>div { background: #ffffff77; border-color: #36759033; }
html[data-theme=light] .progress-summary span { color: #40677d; }
html[data-theme=light] .answer-options button.correct { background: #d1eddb; color: #174930; border-color: #37855b; }
html[data-theme=light] .answer-options button.incorrect { background: #f7dce1; color: #77263b; border-color: #b5596d; }
@media(max-width:900px) {
  .practice-panel { gap: 26px; padding: 28px; grid-template-columns: 1fr 1fr; }
}
@media(max-width:650px) {
  .practice-section { padding: 55px 20px 20px; scroll-margin-top: 85px; }
  .practice-panel { grid-template-columns: 1fr; padding: 22px; gap: 25px; border-radius: 22px; }
  .practice-intro h3 { font-size: 22px; }
  .practice-actions { flex-direction: column; }
  .practice-actions button { width: 100%; }
  .sign-flip { height: 225px; }
  .card-face { padding: 10px; }
  .sign-card .card-front b { font-size: 17px; }
  .sign-card .card-front small { letter-spacing: .5px; font-size: 9px; }
  .card-orbit { width: 67px; height: 67px; margin-top: 16px; }
}
@media(prefers-reduced-motion:reduce) { .sign-card-inner { transition: none; } }
