/* binhchon.forfuture.vn — bình chọn thí sinh Thời trang tái chế 2026 (21/11/2026). Tông xanh lá – vàng kim theo poster Liên hoan. */
:root {
  --g900: #0a2a18;
  --g800: #0f3d24;
  --g700: #165232;
  --green: #1e6b3a;
  --green-ok: #1d8a52;
  --gold: #e2b347;
  --gold-2: #f6d77c;
  --gold-deep: #9a6c12;
  --gold-soft: #fbf3dc;
  --ink: #1b2a21;
  --text: #46564b;
  --muted: #6a786e;
  --line: #dce5d8;
  --line-soft: #e7ede3;
  --danger: #c0392b;
  --bg: #f3f6ef;
  --card: #fff;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
}
body.lock { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------------- nút ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .08s, box-shadow .15s, filter .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, #f8df8f 0%, var(--gold) 55%, #c8952c 100%); color: #13321e; box-shadow: 0 8px 18px rgba(170, 120, 20, .28); }
.btn-primary:hover { filter: brightness(1.04); box-shadow: 0 10px 22px rgba(170, 120, 20, .36); }
.btn-primary:disabled { background: #cfd6cf; color: #6a756d; box-shadow: none; cursor: not-allowed; filter: none; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--g800); }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(226, 179, 71, .55); outline-offset: 2px; }

/* ---------------- đầu trang: poster + khối bình chọn ---------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 0 0 30px;
  background: radial-gradient(900px 420px at 50% 0%, #1d5a34 0%, transparent 70%), linear-gradient(180deg, var(--g800) 0%, var(--g900) 100%);
  color: #eef3ea;
  text-align: center;
}
.poster { margin: 0 -16px; }
.poster img { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 747; background: var(--g800); }
@media (min-width: 720px) {
  .hero { padding-top: 22px; }
  .poster { max-width: 960px; margin: 0 auto; border-radius: 18px; overflow: hidden; border: 1px solid rgba(246, 215, 126, .28); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
}
.hero-body { padding-top: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px;
  padding: 6px 13px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(246, 215, 126, .4);
  color: var(--gold-2); font-size: 13px; font-weight: 700;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .18); }
.hero.is-closed .pill .dot, .hero.is-soon .pill .dot { background: #9aa79d; box-shadow: none; }
.title { margin: 0; font-family: "Playfair Display", Georgia, "Times New Roman", serif; font-size: clamp(30px, 7.4vw, 50px); line-height: 1.15; font-weight: 700; color: #fff; }
.title .accent { display: block; font-style: italic; background: linear-gradient(90deg, #fbe7a6, var(--gold) 50%, #f6d77c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { margin: 12px 0 4px; font-size: 16px; color: #e6eee2; }
.sub b { color: var(--gold-2); }
.theme { margin: 0 auto; max-width: 560px; font-size: 14px; color: #b7c8b9; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 560px; margin: 22px auto 20px; }
.stat {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 12px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(246, 215, 126, .22);
}
.stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #a9bcac; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--gold-2); font-variant-numeric: tabular-nums; line-height: 1.25; }
.stat-value.countdown { font-size: 22px; }
.stat-note { font-size: 12.5px; color: #a9bcac; }

/* ---------------- đơn vị chủ trì / thực hiện ---------------- */
.orgs {
  position: relative; z-index: 1; display: grid; grid-template-columns: 2fr 3fr; gap: 14px;
  margin-top: 18px;
}
.org-group { padding: 14px 14px 16px; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(15, 61, 36, .06); }
.org-title { margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-deep); text-align: center; }
.org-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 18px; }
.org { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 96px; text-align: center; }
.org.is-pair { width: 128px; }
.org.is-wide { width: 104px; }
.org-logos { display: flex; gap: 6px; align-items: center; justify-content: center; height: 56px; }
.org-logos img { height: 56px; width: auto; object-fit: contain; }
.org.is-wide .org-logos img { height: 44px; }
.org-name { font-size: 12px; line-height: 1.35; font-weight: 600; color: var(--text); }
@media (max-width: 720px) {
  .orgs { grid-template-columns: 1fr; gap: 10px; }
  .org-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; }
  .org, .org.is-pair, .org.is-wide { width: auto; }
  .org-logos, .org-logos img { height: 48px; }
  .org.is-wide .org-logos img { height: 38px; }
}

/* ---------------- đã bình chọn ---------------- */
.voted-banner { margin-top: 16px; }
.voted-banner .box {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: #e8f6ee; border: 1px solid #bfe3cc; color: #145232; font-size: 14px;
}
.voted-banner svg { flex: none; width: 20px; height: 20px; margin-top: 1px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- các bước ---------------- */
.steps ol { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; background: #fff; border: 1px solid var(--line-soft); border-radius: 12px; font-size: 13.5px; color: var(--text); }
.steps .n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-deep); font-weight: 800; font-size: 13px; border: 1px solid #f0dca4; }
.steps b { color: var(--ink); }
@media (max-width: 680px) { .steps ol { grid-template-columns: 1fr; } }

/* ---------------- danh sách ---------------- */
.list { padding-top: 26px; scroll-margin-top: 8px; }
.list-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.list-head h2, .rules h2 { margin: 0; font-size: 22px; color: var(--g800); font-weight: 800; }
.search { position: relative; flex: 1 1 260px; max-width: 360px; }
.search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { width: 100%; height: 44px; padding: 0 12px 0 38px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 15px; }
.list-count { margin: 8px 0 12px; font-size: 13px; color: var(--muted); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card {
  display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 14px;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(15, 61, 36, .05); transition: box-shadow .15s, border-color .15s;
}
.card:hover { box-shadow: 0 10px 26px rgba(15, 61, 36, .10); border-color: var(--line); }
.card.is-mine { border-color: #9fd3b4; background: #f4fbf6; }
.card.is-focus { animation: focus 1.6s ease 2; border-color: var(--gold); }
@keyframes focus { 50% { box-shadow: 0 0 0 6px rgba(226, 179, 71, .25); } }
.card-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.sbd {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 14px; color: #fff; line-height: 1;
  background: linear-gradient(140deg, var(--c1, #1e6b3a), var(--c2, #0f3d24));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.sbd small { font-size: 10px; font-weight: 600; opacity: .85; letter-spacing: .06em; }
.sbd b { font-size: 21px; font-weight: 800; margin-top: 3px; font-variant-numeric: tabular-nums; }
.card-name { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; }
.card-tag { display: inline-block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.card .btn { margin-top: auto; min-height: 42px; }
.card-text { min-width: 0; }
.card-tag.is-mine-tag { display: block; color: #17784a; font-weight: 600; }
/* Điện thoại: mỗi thí sinh 1 dòng (SBD · tên · nút) cho danh sách 82 người đỡ dài. */
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; gap: 8px; }
  .card { flex-direction: row; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; }
  .card-top { flex: 1; gap: 10px; }
  .sbd { width: 48px; height: 48px; border-radius: 12px; }
  .sbd b { font-size: 18px; }
  .card-name { font-size: 15px; }
  .card .btn { flex: none; margin: 0; min-height: 40px; padding: 0 14px; font-size: 14px; }
}
.empty { padding: 28px 0; text-align: center; color: var(--muted); }

/* ---------------- thể lệ ---------------- */
.rules { padding-top: 34px; padding-bottom: 8px; }
.rules ol { margin: 12px 0 0; padding: 16px 18px 16px 36px; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); color: var(--text); }
.rules li { margin: 6px 0; }
.rules b { color: var(--ink); }
.foot { margin-top: 28px; padding: 20px 0 32px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); text-align: center; }
.foot p { margin: 0 auto; max-width: 640px; }

/* ---------------- hộp bình chọn ---------------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal-back { position: absolute; inset: 0; background: rgba(6, 26, 14, .6); backdrop-filter: blur(2px); }
.modal-card {
  position: relative; width: 100%; max-width: 520px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border-radius: 20px 20px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(6, 26, 14, .3); animation: up .22s ease;
}
@media (min-width: 640px) {
  .modal { align-items: center; padding: 20px; }
  .modal-card { border-radius: 20px; padding: 26px 26px 22px; }
}
@keyframes up { from { transform: translateY(24px); opacity: .4; } }
.modal-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f0f4ee; cursor: pointer; display: grid; place-items: center; }
.modal-x svg { width: 18px; height: 18px; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; fill: none; }
.m-title { margin: 0 44px 14px 0; font-size: 20px; font-weight: 800; color: var(--g800); }
.pick { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--gold-soft); border: 1px solid #f0dca4; margin-bottom: 14px; }
.pick-sbd { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 12px; background: linear-gradient(140deg, var(--green), var(--g800)); color: var(--gold-2); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.pick-main { display: flex; flex-direction: column; min-width: 0; }
.pick-label { font-size: 12px; color: var(--gold-deep); font-weight: 600; }
.pick-name { font-size: 16px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }

.field { margin-bottom: 12px; }
.field label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 600; color: var(--ink); }
.req { color: var(--danger); }
.field input, .field select {
  width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 16px;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a786e' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.field.has-err input, .field.has-err select { border-color: var(--danger); background: #fff8f7; }
.hint { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }
.err { margin: 4px 0 0; font-size: 13px; color: var(--danger); font-weight: 500; }
.err:empty { display: none; }
.field-predict { padding: 12px; border-radius: 12px; background: #f0f7f1; border: 1px solid #d3e8d8; }
.predict-row { display: flex; align-items: center; gap: 8px; }
.predict-row input { flex: 1; font-size: 20px; font-weight: 800; color: var(--g800); font-variant-numeric: tabular-nums; }
.unit { font-weight: 700; color: var(--green); }
.agree { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 2px; font-size: 13.5px; color: var(--text); cursor: pointer; }
.agree input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #fdecea; color: #9f2a20; font-size: 14px; font-weight: 500; }
#submit { margin-top: 14px; }

.done { text-align: center; }
.done-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 4px auto 10px; border-radius: 50%; background: #e3f4e9; }
.done-icon svg { width: 34px; height: 34px; fill: none; stroke: var(--green-ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.done .m-title { margin: 0 0 6px; }
.done-text { margin: 0 0 14px; color: var(--text); }
.done-card { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: #f7faf5; border: 1px solid var(--line-soft); text-align: left; margin-bottom: 14px; }
.done-card div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.done-card span { color: var(--muted); flex: none; }
.done-card b { color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.done-share-note { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.done .btn + .btn { margin-top: 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: var(--g800); color: #fff; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }

@media (max-width: 420px) {
  .stats { gap: 8px; }
  .stat { padding: 12px 10px; }
  .stat-value { font-size: 22px; }
  .stat-value.countdown { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
