/*
Theme Name: VQMM Child
Theme URI: https://vqmm.vn
Description: Child theme của GeneratePress cho VQMM.VN – Vòng Quay May Mắn. Giao diện đỏ–vàng lễ hội, vanilla JS, không jQuery, không Bootstrap. Phần tương tác (vòng quay) do plugin vqmm-tools cung cấp qua shortcode.
Author: VQMM.VN
Template: generatepress
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vqmm-child
*/


:root {
  /* Brand */
  --red:        #E03131;
  --red-deep:   #9D1A1A;
  --red-ink:    #5C0F12;
  --gold:       #F4B740;
  --gold-deep:  #E0950E;
  --gold-soft:  #FCD968;
  --teal:       #1C9A86;
  --coral:      #F1683C;

  /* Surfaces */
  --cream:      #FFF7EC;
  --cream-2:    #FFEFD8;
  --paper:      #FFFFFF;
  --ink:        #3A1A14;
  --ink-soft:   #7A5A4E;
  --line:       #F0D9BE;

  /* Effects */
  --shadow-sm:  0 2px 8px rgba(124, 45, 18, 0.08);
  --shadow-md:  0 10px 30px rgba(124, 45, 18, 0.14);
  --shadow-lg:  0 24px 60px rgba(124, 45, 18, 0.22);
  --ring:       0 0 0 4px rgba(244, 183, 64, 0.35);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Be Vietnam Pro', system-ui, sans-serif;

  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(244, 183, 64, 0.18), transparent 26%),
    radial-gradient(circle at 88% 4%, rgba(224, 49, 49, 0.12), transparent 24%),
    radial-gradient(circle at 50% 120%, rgba(244, 183, 64, 0.16), transparent 40%);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  color: var(--red-ink);
  margin: 0;
  letter-spacing: -0.01em;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

p { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================== Buttons ===================== */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: var(--r-pill);
  padding: 12px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn-gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: var(--red-ink);
  box-shadow: 0 6px 0 var(--gold-deep), var(--shadow-sm);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 7px 0 var(--gold-deep), var(--shadow-md); }
.btn-gold:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gold-deep); }

.btn-ghost {
  background: var(--paper);
  color: var(--red-ink);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { background: var(--cream-2); }

.btn-red {
  background: linear-gradient(180deg, #F0494A, var(--red));
  color: #fff;
  box-shadow: 0 6px 0 var(--red-deep), var(--shadow-sm);
}
.btn-red:hover { transform: translateY(-1px); }
.btn-red:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--red-deep); }

/* ===================== Header ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 247, 236, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1.5px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 38px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  padding: 9px 14px;
  border-radius: var(--r-pill);
  transition: background .18s, color .18s;
}
.nav a:hover { background: var(--cream-2); color: var(--red); text-decoration: none; }
.nav a.active { background: var(--red); color: #fff; }

.header-spacer { flex: 1; }

.menu-toggle {
  display: none;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  width: 44px; height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--red-ink);
}

/* ===================== Hero / Stage ===================== */
.stage {
  padding: 38px 0 56px;
  position: relative;
  overflow: hidden;
}
.stage-head { text-align: center; margin-bottom: 30px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  color: var(--red); background: var(--paper);
  padding: 7px 16px; border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm); border: 1.5px solid var(--line);
  margin-bottom: 16px;
}
.stage-head h1 { font-size: clamp(30px, 5vw, 50px); }
.stage-head h1 .hl { color: var(--red); }
.stage-head p { color: var(--ink-soft); font-size: 17px; max-width: 620px; margin: 12px auto 0; }

.play {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: start;
}

/* ---- Wheel column ---- */
.wheel-card {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--line);
  position: relative;
}
.wheel-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wheel-canvas {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 14px 28px rgba(124, 45, 18, 0.22));
}
/* Pointer */
.wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: 52px; height: 64px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.25));
}
/* Center spin button overlaid */
.spin-hub {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 24%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: radial-gradient(circle at 38% 34%, #FFF3D6, var(--gold) 60%, var(--gold-deep));
  box-shadow: 0 6px 16px rgba(124,45,18,.32), inset 0 2px 4px rgba(255,255,255,.6);
  color: var(--red-ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(13px, 2.6vw, 18px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease;
  z-index: 6;
}
.spin-hub:hover { transform: translate(-50%, -50%) scale(1.05); }
.spin-hub:disabled { cursor: default; opacity: .9; }
.spin-hub span { line-height: 1; }

.wheel-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.count-pill {
  font-family: var(--font-display); font-weight: 600;
  background: var(--cream-2); color: var(--red-ink);
  padding: 9px 16px; border-radius: var(--r-pill); font-size: 14px;
}
.count-pill b { color: var(--red); }

/* ---- Side panel ---- */
.panel {
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 560px;
}
.tabs { display: flex; padding: 8px; gap: 6px; border-bottom: 1.5px solid var(--line); background: var(--cream); }
.tab {
  flex: 1;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  border: none; background: transparent; color: var(--ink-soft);
  padding: 10px 8px; border-radius: var(--r-sm); cursor: pointer;
  transition: background .18s, color .18s;
}
.tab:hover { background: var(--cream-2); }
.tab.active { background: var(--red); color: #fff; }

.tab-body { padding: 18px; overflow-y: auto; flex: 1; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.add-row { display: flex; gap: 8px; margin-bottom: 14px; }
.add-row input {
  flex: 1;
  font-family: var(--font-body); font-size: 15px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 14px; outline: none; color: var(--ink);
  background: var(--cream);
  transition: border .18s, box-shadow .18s;
}
.add-row input:focus { border-color: var(--gold); box-shadow: var(--ring); background: #fff; }
.add-btn {
  flex-shrink: 0; width: 46px; border-radius: var(--r-sm);
  background: var(--red); color: #fff; border: none; cursor: pointer;
  font-size: 22px; font-weight: 700; line-height: 1;
  transition: background .18s, transform .12s;
}
.add-btn:hover { background: var(--red-deep); }
.add-btn:active { transform: scale(.94); }

.item-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; align-items: center; gap: 10px;
  background: var(--cream); border: 1.5px solid var(--line);
  border-radius: var(--r-sm); padding: 10px 12px;
  animation: pop .25s ease;
}
.item .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.item .label { flex: 1; font-size: 15px; font-weight: 500; word-break: break-word; }
.item .del {
  border: none; background: transparent; color: var(--ink-soft);
  cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 6px;
  border-radius: 8px; transition: background .15s, color .15s;
}
.item .del:hover { background: #FCE3E3; color: var(--red); }

@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }

.panel-actions { display: flex; gap: 8px; margin-top: 14px; }
.panel-actions .btn { flex: 1; justify-content: center; font-size: 13.5px; padding: 10px; }
.link-btn {
  background: none; border: none; color: var(--red); cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 13.5px;
  padding: 0; text-decoration: underline; text-underline-offset: 2px;
}

/* Templates grid */
.tmpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tmpl-card {
  text-align: left;
  border: 1.5px solid var(--line); background: var(--cream);
  border-radius: var(--r-md); padding: 14px; cursor: pointer;
  transition: transform .14s, box-shadow .2s, border-color .2s;
  font-family: var(--font-body);
}
.tmpl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--gold); }
.tmpl-card .ic { font-size: 26px; }
.tmpl-card .nm { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; color: var(--red-ink); margin-top: 6px; }
.tmpl-card .ct { font-size: 12.5px; color: var(--ink-soft); }

/* History */
.hist-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hist {
  display: flex; align-items: center; gap: 12px;
  background: var(--cream); border-radius: var(--r-sm);
  padding: 10px 12px; border: 1.5px solid var(--line);
}
.hist .n {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  background: var(--gold-soft); color: var(--red-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
}
.hist .h-label { flex: 1; font-weight: 600; }
.hist .h-time { font-size: 12px; color: var(--ink-soft); }
.empty {
  text-align: center; color: var(--ink-soft); padding: 40px 16px; font-size: 14.5px;
}
.empty .big { font-size: 40px; display: block; margin-bottom: 8px; opacity: .7; }

/* ===================== Result Modal ===================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(58, 26, 20, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--paper);
  border-radius: var(--r-lg);
  width: 100%; max-width: 420px;
  padding: 36px 32px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--gold);
  position: relative;
  transform: scale(.85) translateY(10px);
  transition: transform .32s cubic-bezier(.2,1.3,.4,1);
}
.modal-overlay.show .modal { transform: none; }
.modal .crown { font-size: 46px; line-height: 1; }
.modal .lead { color: var(--ink-soft); font-family: var(--font-display); font-weight: 600; margin: 14px 0 6px; font-size: 15px; }
.modal .winner {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(26px, 6vw, 40px); color: var(--red);
  word-break: break-word; line-height: 1.15;
}
.modal .round { color: var(--ink-soft); font-size: 13.5px; margin-top: 8px; }
.modal-actions { display: flex; gap: 10px; margin-top: 26px; }
.modal-actions .btn { flex: 1; justify-content: center; }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  border: none; background: var(--cream-2); color: var(--ink-soft);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  font-size: 18px; line-height: 1;
}
.modal-close:hover { background: var(--red); color: #fff; }

#confetti-canvas { position: fixed; inset: 0; z-index: 99; pointer-events: none; }

/* ===================== Content / SEO ===================== */
.section { padding: 56px 0; }
.section.alt { background: linear-gradient(180deg, transparent, rgba(244,183,64,.07)); }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 38px; }
.sec-head .eyebrow { margin-bottom: 14px; }
.sec-head h2 { font-size: clamp(26px, 4vw, 38px); }
.sec-head p { color: var(--ink-soft); font-size: 16.5px; margin-top: 12px; }

.use-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.use-card {
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-md); padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .16s, box-shadow .2s;
}
.use-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.use-card .ic {
  width: 54px; height: 54px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 16px;
}
.use-card h3 { font-size: 19px; margin-bottom: 8px; }
.use-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step {
  background: var(--paper); border-radius: var(--r-md);
  padding: 28px 24px; border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm); position: relative;
}
.step .num {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: var(--red-ink); font-family: var(--font-display); font-weight: 800;
  font-size: 22px; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

/* Tools strip */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-link {
  display: flex; align-items: center; gap: 14px;
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-md); padding: 18px 20px;
  box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .2s, border-color .2s;
}
.tool-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold); text-decoration: none; }
.tool-link .ic { font-size: 30px; flex-shrink: 0; }
.tool-link .t { font-family: var(--font-display); font-weight: 700; color: var(--red-ink); font-size: 16px; }
.tool-link .d { font-size: 13px; color: var(--ink-soft); }
.tool-link .arr { margin-left: auto; color: var(--gold-deep); font-size: 20px; }

/* ===================== FAQ ===================== */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq {
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
  transition: box-shadow .2s;
}
.faq[open] { box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 24px;
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  color: var(--red-ink); display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { color: var(--gold-deep); transition: transform .25s; flex-shrink: 0; font-size: 22px; }
.faq[open] summary .chev { transform: rotate(45deg); }
.faq .ans { padding: 0 24px 22px; color: var(--ink-soft); font-size: 15px; }

/* ===================== Footer ===================== */
.site-footer {
  background: var(--red-ink);
  color: #F8DCC8;
  padding: 54px 0 28px;
  margin-top: 40px;
}
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.foot-brand img { height: 40px; filter: brightness(0) invert(1); opacity: .95; }
.foot-brand p { color: #E7B9A2; font-size: 14px; margin-top: 14px; max-width: 280px; }
.foot-col h4 { color: var(--gold-soft); font-size: 15px; margin-bottom: 14px; font-family: var(--font-display); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.foot-col a { color: #F0C9B4; font-size: 14px; }
.foot-col a:hover { color: #fff; }
.foot-bot {
  border-top: 1px solid rgba(255,255,255,.14);
  margin-top: 36px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 14px;
  color: #D9A892; font-size: 13px; flex-wrap: wrap;
}

/* ===================== Responsive ===================== */
@media (max-width: 940px) {
  .play { grid-template-columns: 1fr; }
  .panel { max-height: none; }
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .use-grid, .steps, .tools-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .wheel-card { padding: 18px; }
  .stage { padding: 26px 0 40px; }
  .section { padding: 40px 0; }
  .foot-grid { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column; }
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px 16px 18px;
  border-bottom: 1.5px solid var(--line);
  background: var(--cream);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-display); font-weight: 600;
  color: var(--ink); padding: 12px 14px; border-radius: var(--r-sm);
}
.mobile-nav a:hover { background: var(--cream-2); color: var(--red); text-decoration: none; }

/* ===================== Tool page extras ===================== */
.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--ink-soft); margin-bottom: 14px;
  justify-content: center;
}
.breadcrumb a { color: var(--ink-soft); font-weight: 600; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .here { color: var(--red); font-weight: 600; }

/* Number controls */
.num-controls { display: flex; flex-direction: column; gap: 14px; }
.field-row { display: flex; gap: 12px; }
.field { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  color: var(--ink-soft);
}
.field input[type="number"] {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  text-align: center; color: var(--red-ink);
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 12px; outline: none; background: var(--cream); width: 100%;
  transition: border .18s, box-shadow .18s;
  -moz-appearance: textfield;
}
.field input[type="number"]:focus { border-color: var(--gold); box-shadow: var(--ring); background: #fff; }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Toggle switch */
.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: var(--cream); border: 1.5px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px;
}
.switch-row .sw-label { font-weight: 600; font-size: 14.5px; }
.switch-row .sw-label small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-soft); }
.switch { position: relative; width: 50px; height: 28px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px;
  background: #E4CBB0; transition: background .2s;
}
.switch .track::before {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s;
}
.switch input:checked + .track { background: var(--teal); }
.switch input:checked + .track::before { transform: translateX(22px); }

.drawn-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.drawn-chip {
  font-family: var(--font-display); font-weight: 700;
  background: var(--gold-soft); color: var(--red-ink);
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; animation: pop .25s ease;
}

/* Names textarea (chia nhom) */
.names-area {
  width: 100%; min-height: 200px; resize: vertical;
  font-family: var(--font-body); font-size: 15px; line-height: 1.7;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 16px; outline: none; color: var(--ink); background: var(--cream);
  transition: border .18s, box-shadow .18s;
}
.names-area:focus { border-color: var(--gold); box-shadow: var(--ring); background: #fff; }

.stepper { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--line); border-radius: var(--r-pill); overflow: hidden; background: var(--cream); }
.stepper button {
  width: 46px; height: 46px; border: none; background: transparent;
  font-size: 24px; font-weight: 700; color: var(--red); cursor: pointer; line-height: 1;
  transition: background .15s;
}
.stepper button:hover { background: var(--cream-2); }
.stepper .val {
  min-width: 56px; text-align: center; font-family: var(--font-display);
  font-weight: 800; font-size: 22px; color: var(--red-ink);
}

/* Group result cards */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.group-card {
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm);
  animation: rise .45s cubic-bezier(.2,1,.4,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.group-card .g-head {
  padding: 14px 18px; color: #fff; font-family: var(--font-display); font-weight: 700;
  font-size: 17px; display: flex; align-items: center; justify-content: space-between;
}
.group-card .g-head .g-count { font-size: 13px; font-weight: 600; opacity: .85; background: rgba(255,255,255,.22); padding: 3px 10px; border-radius: 999px; }
.group-card ul { list-style: none; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.group-card li {
  background: var(--cream); border-radius: var(--r-sm); padding: 10px 14px;
  font-weight: 500; font-size: 15px; border: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.group-card li .av {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 12px; color: #fff;
}

.tool-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.empty-pad { padding: 60px 20px; }

@media (max-width: 940px) {
  .group-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .group-grid { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; }
}

/* ===================== Child theme: content templates ===================== */
/* Reset GeneratePress chrome we don't use (header/footer overridden) */
.generate-back-to-top { display: none; }

main { display: block; }

.page-stage { padding: 38px 0 10px; }
.page-stage .stage-head { margin-bottom: 6px; }
.page-stage h1 { font-size: clamp(28px, 4.5vw, 44px); }

.content-area { padding: 28px 0 64px; }
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  max-width: 820px;
  margin: 0 auto;
}

/* Article / single post */
.entry {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 34px 36px;
}
.entry .entry-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 13.5px; color: var(--ink-soft); margin-bottom: 18px;
  font-family: var(--font-display); font-weight: 600;
}
.entry .entry-thumb { margin: 0 0 22px; border-radius: var(--r-md); overflow: hidden; }
.entry .entry-thumb img { display: block; width: 100%; height: auto; }
.entry-content { font-size: 16px; color: var(--ink); }
.entry-content > * { margin: 0 0 1.1em; }
.entry-content h2 { font-size: 26px; margin: 1.4em 0 .5em; }
.entry-content h3 { font-size: 21px; margin: 1.3em 0 .5em; }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; }
.entry-content img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.entry-content blockquote {
  margin: 1.2em 0; padding: 14px 22px; border-left: 4px solid var(--gold);
  background: var(--cream-2); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--red-ink);
}
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content code {
  background: var(--cream-2); padding: 2px 7px; border-radius: 8px;
  font-size: .92em; color: var(--red-ink);
}
.entry-content pre {
  background: var(--red-ink); color: #FFE9D6; padding: 18px;
  border-radius: var(--r-md); overflow: auto;
}
.entry-content pre code { background: none; color: inherit; padding: 0; }

/* Archive / blog cards */
.post-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
  max-width: var(--maxw); margin: 0 auto;
}
.post-card {
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .16s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card .pc-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--cream-2); }
.post-card .pc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .pc-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .pc-meta { font-size: 12.5px; color: var(--ink-soft); font-family: var(--font-display); font-weight: 600; }
.post-card h2 { font-size: 19px; line-height: 1.2; }
.post-card h2 a { color: var(--red-ink); }
.post-card h2 a:hover { color: var(--red); text-decoration: none; }
.post-card .pc-excerpt { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.post-card .pc-more {
  margin-top: auto; align-self: flex-start;
  font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--red);
}

/* Pagination */
.vqmm-pagination { display: flex; justify-content: center; gap: 8px; margin: 40px auto 0; flex-wrap: wrap; }
.vqmm-pagination .page-numbers {
  font-family: var(--font-display); font-weight: 600; font-size: 14.5px;
  background: var(--paper); border: 1.5px solid var(--line); color: var(--red-ink);
  padding: 9px 16px; border-radius: var(--r-pill); box-shadow: var(--shadow-sm);
}
.vqmm-pagination .page-numbers.current { background: var(--red); color: #fff; border-color: var(--red); }
.vqmm-pagination a.page-numbers:hover { background: var(--cream-2); text-decoration: none; }

/* Comments (lightweight) */
.comments-area { margin-top: 30px; }
.comments-area .comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.comments-area .comment-body {
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-md); padding: 16px 20px;
}
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 14px; background: var(--cream); font-family: var(--font-body); font-size: 15px; outline: none;
}
.comment-form textarea:focus, .comment-form input:focus { border-color: var(--gold); box-shadow: var(--ring); background: #fff; }

/* 404 */
.err-stage { text-align: center; padding: 70px 0 60px; }
.err-stage .err-code { font-family: var(--font-display); font-weight: 800; font-size: clamp(80px, 18vw, 160px); color: var(--red); line-height: 1; }
.err-stage h1 { font-size: clamp(24px, 4vw, 36px); margin-top: 6px; }
.err-stage p { color: var(--ink-soft); max-width: 480px; margin: 14px auto 26px; }
.err-tools { margin-top: 40px; }

/* Sidebar widgets reuse card look (if used) */
.widget { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.widget .widget-title { font-family: var(--font-display); color: var(--red-ink); font-size: 17px; margin-bottom: 12px; }

@media (max-width: 760px) {
  .post-grid { grid-template-columns: 1fr; }
  .entry { padding: 24px 20px; }
}

/* ===================== Công cụ mở rộng (đồng xu / xúc xắc / có-không / xác suất / bốc thăm) ===================== */

/* --- Sảnh kết quả chung cho coin/dice/yesno --- */
.flip-stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: 22px 0; text-align: center; min-height: 320px;
}

/* --- Tung đồng xu --- */
.coin-wrap { perspective: 1000px; }
.coin {
  width: 180px; height: 180px; position: relative;
  transform-style: preserve-3d; transform: rotateY(0deg);
}
.coin-face {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  backface-visibility: hidden;
  font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--red-ink);
  border: 6px solid var(--gold-deep);
  box-shadow: var(--shadow-md), inset 0 4px 10px rgba(255,255,255,.5);
}
.coin-face.ngua { background: radial-gradient(circle at 38% 34%, #FFF3D6, var(--gold) 62%, var(--gold-deep)); }
.coin-face.sap  { background: radial-gradient(circle at 38% 34%, #FFE6B0, var(--gold-deep) 62%, #B8740A); transform: rotateY(180deg); color: #6A3B00; }
.coin-face .cf-emoji { font-size: 54px; line-height: 1; }
.coin-result { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 8vw, 56px); line-height: 1; min-height: 1.1em; }
.coin-result.ngua { color: var(--gold-deep); }
.coin-result.sap  { color: var(--red); }
.coin-stats { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.coin-stat { background: var(--cream-2); border-radius: var(--r-pill); padding: 9px 18px; font-family: var(--font-display); font-weight: 600; color: var(--red-ink); }
.coin-stat b { color: var(--red); font-size: 18px; }

/* --- Xúc xắc --- */
.dice-area {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center;
  min-height: 130px;
}
.die {
  font-size: clamp(70px, 16vw, 100px); line-height: 1; color: var(--red);
  filter: drop-shadow(0 8px 14px rgba(124,45,18,.25));
}
.die.rolling { animation: dieShake .18s linear infinite; }
@keyframes dieShake {
  0% { transform: rotate(-8deg) scale(1.04); }
  50% { transform: rotate(8deg) scale(.96); }
  100% { transform: rotate(-8deg) scale(1.04); }
}
.dice-sum-pill {
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  background: var(--gold-soft); color: var(--red-ink);
  padding: 10px 22px; border-radius: var(--r-pill);
}
.dice-sum-pill b { color: var(--red); font-size: 22px; }

/* --- Có hay Không --- */
.yn-result {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(54px, 15vw, 110px); line-height: 1; color: var(--ink-soft);
  min-height: 1.1em; letter-spacing: .01em;
}
.yn-result.yes { color: var(--teal); }
.yn-result.no { color: var(--red); }
.yn-result.maybe { color: var(--gold-deep); }
.yn-hint { color: var(--ink-soft); font-size: 14.5px; }

/* --- Vòng quay xác suất: ô trọng số trong danh sách --- */
.item .wt-pct {
  font-family: var(--font-display); font-weight: 700; font-size: 12.5px;
  color: var(--red); background: var(--cream-2); border-radius: var(--r-pill);
  padding: 2px 9px; flex-shrink: 0;
}
.item .wt {
  width: 58px; flex-shrink: 0; text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--red-ink);
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 6px 4px; background: #fff; outline: none;
  -moz-appearance: textfield;
}
.item .wt::-webkit-outer-spin-button, .item .wt::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.item .wt:focus { border-color: var(--gold); box-shadow: var(--ring); }
.add-row .wt-add {
  width: 70px; flex-shrink: 0; text-align: center;
  font-family: var(--font-body); font-size: 15px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 8px; background: var(--cream); outline: none;
}
.add-row .wt-add:focus { border-color: var(--gold); box-shadow: var(--ring); background: #fff; }
.modal .winner-sub { color: var(--ink-soft); font-size: 14px; margin-top: 8px; font-family: var(--font-display); font-weight: 600; }

/* --- Bốc thăm: thẻ người thắng --- */
.winner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.win-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); border: 1.5px solid var(--gold);
  border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow-sm);
  animation: rise .45s cubic-bezier(.2,1,.4,1) both;
}
.win-card .win-rank { font-family: var(--font-display); font-weight: 800; color: var(--gold-deep); font-size: 15px; flex-shrink: 0; }
.win-card .win-av {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.win-card .win-name { font-weight: 600; font-size: 16px; word-break: break-word; }

@media (max-width: 560px) {
  .coin { width: 150px; height: 150px; }
  .winner-grid { grid-template-columns: 1fr 1fr; }
}

/* ===================== Trang chủ: bài SEO (content-custom) ===================== */
.home-content { margin-top: 10px; }
.home-content .content-custom {
  max-width: 820px;
  margin: 48px auto 0;
  font-size: 16px;
  color: var(--ink);
}
.home-content .content-custom > * { margin: 0 0 1.1em; }
.home-content .content-custom h1 {
  font-size: clamp(26px, 4.2vw, 40px);
  text-align: center;
  margin-bottom: .5em;
}
.home-content .content-custom h2 {
  font-size: clamp(22px, 3.4vw, 30px);
  margin: 1.5em 0 .5em;
}
.home-content .content-custom h3 { font-size: 20px; margin: 1.3em 0 .4em; }
.home-content .content-custom p { color: var(--ink); }
.home-content .content-custom a { text-decoration: underline; text-underline-offset: 2px; }
.home-content .content-custom ul,
.home-content .content-custom ol { padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }
.home-content .content-custom li { line-height: 1.6; }
.home-content .content-custom strong { color: var(--red-ink); }

/* FAQ dạng <details> không class trong bài viết */
.home-content .content-custom details {
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-md); padding: 4px 22px; margin-bottom: 12px;
  transition: box-shadow .2s;
}
.home-content .content-custom details[open] { box-shadow: var(--shadow-sm); }
.home-content .content-custom summary {
  list-style: none; cursor: pointer; padding: 16px 0;
  font-family: var(--font-display); font-weight: 600; font-size: 16.5px;
  color: var(--red-ink); position: relative;
}
.home-content .content-custom summary::-webkit-details-marker { display: none; }
.home-content .content-custom summary::after {
  content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  color: var(--gold-deep); font-size: 24px; font-family: var(--font-display); transition: transform .25s;
}
.home-content .content-custom details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.home-content .content-custom details > p { padding: 0 0 16px; margin: 0; color: var(--ink-soft); font-size: 15px; }

/* Khoảng cách giữa vòng quay và bài viết trên trang chủ */
.home-content > .play,
.home-content [data-vqmm-tool] { margin-bottom: 8px; }

/* ===================== E-E-A-T: hộp tác giả ===================== */
.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  margin: 34px 0 4px; padding: 22px;
  background: var(--cream-2); border: 1.5px solid var(--line);
  border-radius: var(--r-md);
}
.author-box__avatar { border-radius: 50%; flex-shrink: 0; width: 72px; height: 72px; border: 3px solid var(--gold); }
.author-box__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.author-box__name { font-family: var(--font-display); font-size: 18px; color: var(--red-ink); }
.author-box__role { font-size: 12.5px; font-weight: 600; color: #fff; background: var(--red); padding: 2px 10px; border-radius: var(--r-pill); }
.author-box__bio { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 8px; }
.author-box__link { font-family: var(--font-display); font-weight: 600; font-size: 14px; }

/* Ảnh minh hoạ trong bài */
.entry-content figure.vqmm-figure { margin: 1.4em 0; text-align: center; }
.entry-content figure.vqmm-figure img,
.entry-content figure.vqmm-figure svg { max-width: 100%; height: auto; border-radius: var(--r-md); }
.entry-content figure.vqmm-figure figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 8px; font-style: italic; }

@media (max-width: 560px) {
  .author-box { flex-direction: column; }
}

/* ===================== Footer: NAP + link pháp lý ===================== */
.foot-org {
  font-style: normal; color: #E7B9A2; font-size: 12.5px; line-height: 1.7;
  margin-top: 14px; max-width: 320px;
}
.foot-org strong { color: var(--gold-soft); font-family: var(--font-display); font-weight: 600; }
.foot-org a { color: #F0C9B4; }
.foot-org a:hover { color: #fff; }
.foot-legal {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  border-top: 1px solid rgba(255,255,255,.14);
  margin-top: 36px; padding-top: 22px;
}
.foot-legal a { color: #F0C9B4; font-size: 13.5px; font-family: var(--font-display); font-weight: 600; }
.foot-legal a:hover { color: #fff; }
.site-footer .foot-legal + .foot-bot { border-top: none; margin-top: 14px; padding-top: 0; }

/* ===================== Widget thống kê + đánh giá ("trang sống") ===================== */
.vqmm-stats { max-width: var(--maxw); margin: 0 auto; }
.vqmm-stats-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.vqmm-stat-card {
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow-sm);
}
.vqmm-stat-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.vqmm-stat-eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: 13.5px; color: var(--ink-soft);
}
.vqmm-stat-total { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--red-ink); }
.vqmm-stat-total b { color: var(--red); font-size: 24px; }

/* Cột biểu đồ 7 ngày */
.vqmm-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 130px; }
.vqmm-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.vqmm-bar-val { font-size: 11px; font-weight: 700; color: var(--ink-soft); font-family: var(--font-display); }
.vqmm-bar-fill {
  width: 100%; max-width: 34px; min-height: 6px;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border-radius: 8px 8px 4px 4px; transition: height .5s cubic-bezier(.2,1,.4,1);
}
.vqmm-bar.is-today .vqmm-bar-fill { background: linear-gradient(180deg, #F0494A, var(--red)); }
.vqmm-bar-wd { font-size: 12px; font-weight: 600; color: var(--ink-soft); font-family: var(--font-display); }
.vqmm-bar.is-today .vqmm-bar-wd { color: var(--red); }
.vqmm-stat-note { font-size: 12px; color: var(--ink-soft); margin: 14px 0 0; }
.vqmm-stat-note a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }

/* Đánh giá */
.vqmm-rate { display: flex; flex-direction: column; gap: 10px; }
.vqmm-rate-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  border: 1.5px solid var(--line); background: var(--cream);
  border-radius: var(--r-pill); padding: 12px 20px; cursor: pointer;
  transition: transform .12s, box-shadow .2s, border-color .2s, background .2s;
  color: var(--ink);
}
.vqmm-rate-btn b { font-weight: 700; color: var(--red-ink); }
.vqmm-rate-btn.up:hover { border-color: var(--teal); background: #E6F5F1; }
.vqmm-rate-btn.down:hover { border-color: var(--gold-deep); background: var(--cream-2); }
.vqmm-rate-btn:active { transform: scale(.98); }
.vqmm-stats.voted .vqmm-rate-btn { cursor: default; opacity: .7; }
.vqmm-stats.voted .vqmm-rate-btn.mine { opacity: 1; border-color: var(--teal); background: #E6F5F1; box-shadow: var(--shadow-sm); }
.vqmm-stats.voted .vqmm-rate-btn.down.mine { border-color: var(--gold-deep); background: var(--cream-2); }

@media (max-width: 760px) {
  .vqmm-stats-grid { grid-template-columns: 1fr; }
}

/* ── Bảng so sánh dùng chung cho trang công cụ (thêm 2026-07) ── */
.vqmm-cmp-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 4px 0 8px; }
.vqmm-cmp { width: 100%; border-collapse: collapse; min-width: 480px; background: var(--paper);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); font-size: 15.5px; }
.vqmm-cmp caption { caption-side: bottom; font-size: 13px; color: var(--ink-soft);
  font-style: italic; padding: 10px 4px 0; text-align: left; }
.vqmm-cmp th, .vqmm-cmp td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.vqmm-cmp thead th { background: var(--cream-2); color: var(--red-ink);
  font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.vqmm-cmp tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; background: var(--cream); }
.vqmm-cmp tbody tr:last-child th, .vqmm-cmp tbody tr:last-child td { border-bottom: none; }
.vqmm-cmp .hi { color: var(--red); font-weight: 600; }
