/* ============================================================
   Myanmar4D.net — Premium Institutional Design System
   ============================================================ */

:root {
  --bg-primary: #081220;
  --bg-secondary: #111b2d;
  --bg-card: #162036;

  --gold-primary: #f1a617;
  --gold-secondary: #d89a20;
  --gold-light: #f8c65a;

  --text-primary: #ffffff;
  --text-secondary: #b8c1cc;
  --text-muted: #8f9aaa;

  --border-color: #243044;

  --success: #2ecc71;
  --danger: #e94a4a;

  --overlay-dark: rgba(8, 18, 32, 0.58);
  --main-overlay: rgba(8, 18, 32, 0.5);
  --card-surface: rgba(22, 32, 54, 0.37);
  --prize-surface: rgba(17, 27, 45, 0.4);
  --bg-mountain: url("../images/mountain-bg.jpg");

  --flag-blue: #0038a8;
  --flag-red: #da291c;
  --flag-green: #006a4e;

  --sidebar-width: 180px;
  --sidebar-flag-height: calc(var(--sidebar-width) * 654 / 1024);
  --header-height: 96px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.25);
  --transition: 0.25s ease;

  --font-body: "Poppins", "Inter", system-ui, sans-serif;
  --font-heading: "Playfair Display", "Cormorant Garamond", Georgia, serif;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ---- Layout Shell ---- */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.app-body {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
}

.main-column {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(var(--main-overlay), var(--main-overlay)),
    var(--bg-mountain) center / cover no-repeat fixed;
}

.page-content {
  flex: 1;
  padding: 1.25rem 0.65rem 1.75rem;
  max-width: none;
  width: 100%;
  min-width: 0;
  margin: 0;
}

/* ---- Mobile Menu ---- */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 1rem;
  left: 0.65rem;
  z-index: 200;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold-primary);
  transition: var(--transition);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 140;
}

body.menu-open .sidebar-overlay {
  display: block;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 150;
}

.sidebar-brand {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
  overflow: hidden;
}

.sidebar-flag {
  width: 100%;
  height: var(--sidebar-flag-height);
  object-fit: contain;
  object-position: center top;
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 0.35rem 0 0.5rem;
  overflow-y: auto;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.7rem 0.8rem 0.55rem;
  text-decoration: none;
  border-left: 4px solid transparent;
  border-bottom: 1px solid rgba(36, 48, 68, 0.55);
  transition: background var(--transition), border-color var(--transition);
}

.sidebar-item:last-of-type {
  border-bottom: none;
}

.sidebar-item:hover {
  background: rgba(22, 32, 54, 0.55);
}

.sidebar-item.active {
  border-left-color: var(--gold-primary);
  background: linear-gradient(
    90deg,
    rgba(245, 180, 46, 0.24) 0%,
    rgba(245, 180, 46, 0.08) 52%,
    transparent 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(245, 180, 46, 0.28),
    inset 0 -1px 0 rgba(245, 180, 46, 0.14);
}

.sidebar-item.active strong {
  color: var(--gold-primary);
}

.sidebar-item.active small {
  color: rgba(255, 255, 255, 0.88);
}

.sidebar-icon {
  width: 22px;
  height: 22px;
  color: var(--gold-primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.sidebar-icon--donate svg {
  width: 22px;
  height: 22px;
}

.sidebar-icon--results svg {
  width: 22px;
  height: 22px;
}

.sidebar-text {
  min-width: 0;
  flex: 1;
}

.sidebar-item strong {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.sidebar-item small {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.62rem;
  line-height: 1.35;
  margin-top: 0.1rem;
}

.sidebar-ext {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  opacity: 0.85;
  vertical-align: 0.05em;
}

.sidebar-footer {
  padding: 0.85rem 0.75rem 1rem;
  border-top: 1px solid rgba(36, 48, 68, 0.65);
}

.mountain-graphic {
  width: 100%;
  height: 54px;
  margin-bottom: 0.55rem;
  display: block;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.06));
}

.sidebar-hope {
  text-align: center;
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.sidebar-hope-line {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

.sidebar-hope-main {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--gold-primary);
  margin-top: 0.15rem;
}

.sidebar-hope-sub {
  display: block;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 0.1rem;
}

.language-select {
  font-size: 0.68rem;
  color: var(--text-primary);
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(36, 48, 68, 0.85);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.lang-globe {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}

/* ---- Header (main column only) ---- */
.site-header {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(36, 48, 68, 0.7);
  background:
    linear-gradient(var(--main-overlay), var(--main-overlay)),
    var(--bg-mountain) center 18% / cover no-repeat fixed;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.43rem 0.65rem;
  min-height: var(--header-height);
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.header-brand-text {
  min-width: 0;
}

.site-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.45rem, 4.6vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.site-title .brand-4d {
  color: var(--gold-primary);
  font-size: 1.12em;
  text-shadow: 0 2px 14px rgba(245, 180, 46, 0.35);
}

.site-subtitle {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(0.92rem, 3.2vw, 1.8rem);
  color: var(--gold-primary);
  letter-spacing: 0.05em;
  font-weight: 1000;
  margin-top: 0.05rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.header-meta {
  display: flex;
  gap: 1.25rem;
  flex-shrink: 1;
  min-width: 0;
}

.header-meta-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(8, 18, 32, 0.28);
  border: 1px solid rgba(36, 48, 68, 0.55);
}

.meta-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.2;
  min-width: 0;
}

.meta-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.meta-icon svg {
  width: 32px;
  height: 32px;
  display: block;
}

.meta-line-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.meta-line-value {
  display: block;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--gold-primary);
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 10px rgba(245, 180, 46, 0.35);
}

/* ---- Cards & Buttons ---- */
.card {
  background: var(--card-surface);
  border: 1px solid rgba(36, 48, 68, 0.75);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform 0.2s ease;
}

.btn-primary {
  background: var(--gold-primary);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--gold-secondary);
}

.btn-outline {
  background: transparent;
  color: var(--gold-primary);
  border: 1px solid var(--gold-primary);
}

.btn-outline:hover {
  background: rgba(245, 180, 46, 0.1);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.72rem;
}

.page-heading {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.panel-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold-primary);
  margin-bottom: 1rem;
}

.flash-message {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.flash-success {
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.35);
  color: var(--success);
}

.flash-error {
  background: rgba(233, 74, 74, 0.12);
  border: 1px solid rgba(233, 74, 74, 0.35);
  color: var(--danger);
}

/* ---- Admin ---- */
.page-admin {
  max-width: 1100px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.admin-wrap {
  max-width: 480px;
  margin: 0 auto;
}

.admin-wrap--wide {
  max-width: 1100px;
}

.admin-card {
  padding: 2rem;
}

.admin-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-date-picker {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 2px rgba(245, 180, 46, 0.12);
}

.admin-date-picker .form-group {
  flex: 1;
  margin-bottom: 0;
}

.admin-notice {
  color: var(--gold-primary);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.admin-results-form {
  padding: 1.5rem;
}

.admin-section {
  margin-bottom: 1.5rem;
}

.admin-section:last-of-type {
  margin-bottom: 1rem;
}

.admin-grid {
  display: grid;
  gap: 0.85rem;
}

.admin-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.admin-grid--5 {
  grid-template-columns: repeat(5, 1fr);
}

.admin-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.admin-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ---- Results Page ---- */
.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
  gap: 0.85rem;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.draw-panel {
  padding: 1.15rem 0.75rem 1.35rem;
}

.draw-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.draw-header-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
  min-width: 0;
  max-width: 100%;
}

.draw-header-line {
  height: 1px;
  flex: 1 1 1.5rem;
  min-width: 12px;
  max-width: 80px;
  width: auto;
}

.draw-header-line--left {
  background: linear-gradient(90deg, transparent, var(--gold-primary));
}

.draw-header-line--right {
  background: linear-gradient(90deg, var(--gold-primary), transparent);
}

.draw-header-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-primary);
  flex-shrink: 0;
}

.draw-title {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 4.8vw, 2.5rem);
  color: var(--gold-primary);
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  min-width: 0;
}

.draw-date {
  font-size: 0.82rem;
  color: var(--text-primary);
  margin-top: 0.35rem;
}

.top-three-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
  margin-top: 0.5rem;
}

.prize-card--major {
  position: relative;
  margin-top: 1.1rem;
  border: 1px solid rgba(245, 180, 46, 0.75);
  border-radius: var(--radius);
  background: var(--prize-surface);
  overflow: visible;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.prize-card--major:hover {
  border-color: var(--gold-primary);
}

.prize-card-tab,
.prize-section-tab {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  min-width: 72%;
  max-width: 94%;
}

.prize-card-label,
.prize-section-label {
  display: block;
  text-align: center;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.7em;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  padding: 0.45rem 0.9rem;
  color: var(--bg-primary);
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary), var(--gold-secondary));
  border: 1px solid rgba(255, 224, 138, 0.55);
  border-radius: 6px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
}

.prize-card-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5.5rem;
  padding: 2rem 0.65rem 1.25rem;
}

.prize-card-number {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.prize-section {
  margin-bottom: 1.75rem;
}

.prize-section:last-child {
  margin-bottom: 0;
}

.prize-section-frame {
  position: relative;
  margin-top: 2.25rem;
  padding-top: 2.75rem;
  border: 1px solid rgba(245, 180, 46, 0.75);
  border-radius: var(--radius);
  background: var(--prize-surface);
  overflow: visible;
  transition: border-color var(--transition);
}

.prize-section-frame:hover {
  border-color: var(--gold-primary);
}

.prize-grid {
  display: grid;
  border: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.prize-grid--5 {
  grid-template-columns: repeat(5, 1fr);
}

.prize-grid-cell {
  padding: 0.85rem 0.25rem;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  border-right: 1px solid rgba(36, 48, 68, 0.75);
  border-bottom: 1px solid rgba(36, 48, 68, 0.75);
  background: var(--prize-surface);
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.prize-grid-cell:nth-child(5n) {
  border-right: none;
}

.prize-grid .prize-grid-cell:nth-last-child(-n+5) {
  border-bottom: none;
}

.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

.draw-pending-note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 0 0.25rem;
  overflow-wrap: anywhere;
}

.draw-countdown {
  text-align: center;
  padding: 1.25rem 1rem 0.5rem;
  margin-bottom: 0.25rem;
}

.draw-countdown-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.draw-countdown-time {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent-gold, #d4a853);
  letter-spacing: 0.06em;
}

.draw-countdown-sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.prize-card--pending .prize-card-body {
  opacity: 0.85;
}

.prize-card-pending {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.prize-grid-cell--pending {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: rgba(36, 48, 68, 0.55);
}

.admin-readonly-num {
  padding: 0.65rem 0.75rem;
  background: var(--prize-surface, rgba(20, 28, 40, 0.6));
  border: 1px solid rgba(36, 48, 68, 0.75);
  border-radius: var(--radius-sm, 4px);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.admin-readonly-draw {
  margin-bottom: 1rem;
}

.admin-notice--status {
  border-left: 3px solid var(--accent-gold, #d4a853);
}

.admin-notice--warn {
  border-left: 3px solid #e8a838;
  color: #e8c878;
}

/* Results sidebar */
.sidebar-panel {
  padding: 1.15rem;
  margin-bottom: 1rem;
}

.recent-list {
  list-style: none;
  margin-bottom: 0.85rem;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(241, 166, 23, 0.4) transparent;
}

.recent-list::-webkit-scrollbar {
  width: 5px;
}

.recent-list::-webkit-scrollbar-track {
  background: transparent;
}

.recent-list::-webkit-scrollbar-thumb {
  background: rgba(241, 166, 23, 0.35);
  border-radius: 999px;
}

.recent-list::-webkit-scrollbar-thumb:hover {
  background: rgba(241, 166, 23, 0.65);
}

.recent-list::-webkit-scrollbar-button {
  display: none;
}

.recent-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(36, 48, 68, 0.8);
  text-decoration: none;
  font-size: 0.78rem;
  transition: color var(--transition);
}

.recent-link:hover {
  color: var(--gold-primary);
}

.recent-date {
  color: var(--text-muted);
  flex: 1;
  font-size: 0.72rem;
}

.recent-number {
  color: var(--gold-primary);
  font-weight: 700;
  font-size: 0.85rem;
}

.recent-arrow {
  color: var(--gold-primary);
  font-size: 0.9rem;
}

/* Calendar */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.calendar-month {
  text-align: center;
  flex: 1;
  margin-bottom: 0;
  color: var(--text-primary);
  font-size: 0.78rem;
}

.calendar-arrow {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--gold-primary);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  transition: background var(--transition);
}

.calendar-arrow:hover {
  background: rgba(245, 180, 46, 0.1);
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.calendar-day {
  text-align: center;
  padding: 0.35rem;
  font-size: 0.75rem;
  border-radius: 50%;
  color: var(--text-muted);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-day.has-result {
  color: var(--text-primary);
  cursor: pointer;
  background: transparent;
  border: none;
}

.calendar-day.has-result:hover {
  color: var(--gold-primary);
}

.calendar-day.is-today:not(.selected) {
  color: var(--gold-primary);
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(245, 180, 46, 0.85);
}

.draw-notice-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.draw-notice-modal[hidden] {
  display: none;
}

body.draw-notice-open {
  overflow: hidden;
}

.draw-notice-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 32, 0.72);
  backdrop-filter: blur(4px);
}

.draw-notice-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 26rem);
  padding: 1.6rem 1.5rem 1.35rem;
  background: linear-gradient(180deg, rgba(28, 40, 64, 0.96), rgba(12, 20, 36, 0.96));
  border: 1px solid rgba(241, 166, 23, 0.45);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(255, 224, 138, 0.12),
    0 18px 48px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.draw-notice-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--gold-primary);
}

.draw-notice-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-primary);
}

.draw-notice-body {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.draw-notice-dialog .btn {
  min-width: 6.5rem;
}

.calendar-day.selected {
  background: linear-gradient(145deg, #fcd04d, var(--gold-primary), #e0a020);
  color: #081220;
  font-weight: 800;
  font-size: 0.82rem;
  border: 2px solid #ffe08a;
  box-shadow:
    0 0 0 3px rgba(245, 180, 46, 0.35),
    0 0 22px rgba(245, 180, 46, 0.75);
  z-index: 2;
}

.calendar-day:disabled:not(.selected) {
  opacity: 0.3;
  cursor: default;
}

.calendar-day:not(:disabled):not(.selected) {
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
}

.calendar-note {
  margin-top: 0.75rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
}

/* ---- About Page ---- */
.page-about {
  max-width: none;
  padding: 0;
}

.about-layout {
  margin: -1.25rem -0.65rem 0;
}

.about-hero {
  display: grid;
  width: 100%;
}

.about-visual {
  grid-area: 1 / 1;
  align-self: start;
  width: 100%;
  aspect-ratio: 1024 / 576;
  background: url("../images/about-us.png") center / cover no-repeat;
}

.about-text-panel {
  grid-area: 1 / 1;
  align-self: start;
  width: 55%;
  max-width: 700px;
  min-width: 0;
  padding: 2rem 1.5rem 2rem 1.25rem;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(255, 255, 255, 0.92) 74%,
    rgba(255, 255, 255, 0.45) 90%,
    transparent 100%
  );
}

.about-heading {
  font-family: var(--font-heading);
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #0c1a2e;
  margin-bottom: 0.15rem;
  line-height: 1.15;
}

.about-heading::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  background: var(--gold-primary);
  margin-top: 0.65rem;
  margin-bottom: 1rem;
  border-radius: 2px;
}

.about-lead {
  color: var(--gold-secondary);
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 1.35rem;
  line-height: 1.45;
}

.about-body p {
  color: #3a4658;
  margin-bottom: 0.95rem;
  font-size: 0.9rem;
  line-height: 1.72;
}

.about-body p strong {
  color: #1a2638;
  font-weight: 600;
}

.about-thanks {
  color: var(--gold-secondary);
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.about-thanks strong {
  color: var(--gold-secondary);
  font-weight: 700;
}

/* ---- Contact Page ---- */
.page-contact {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f5b42e' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.contact-notice-panel {
  padding: 1.5rem;
}

.contact-notice-body {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

.contact-notice-body p {
  margin-bottom: 1rem;
}

.contact-notice-body p:last-child {
  margin-bottom: 0;
}

.contact-notice-close {
  color: var(--gold-primary);
  font-weight: 500;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.contact-aside {
  padding: 1.5rem;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-info-item {
  display: flex;
  gap: 0.75rem;
}

.contact-info-icon {
  color: var(--gold-primary);
  font-size: 1rem;
}

.contact-info-item strong {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  margin-bottom: 0.2rem;
}

.contact-info-item p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ---- Donate Page ---- */
.page-donate {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f5b42e' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.donate-lead {
  color: var(--gold-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.donate-desc {
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 1.5rem;
}

.donate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.donate-panel {
  padding: 1.35rem;
}

.wallet-box {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  margin-bottom: 0.75rem;
}

.wallet-address {
  flex: 1;
  padding: 0.85rem 0.9rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-all;
  font-family: "Courier New", monospace;
}

.btn-copy {
  flex-shrink: 0;
  padding: 0.75rem 1rem;
}

.copy-success {
  color: var(--success);
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}

.info-box,
.warning-box {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

.info-box {
  background: rgba(245, 180, 46, 0.08);
  border: 1px solid rgba(245, 180, 46, 0.25);
}

.warning-box {
  background: rgba(245, 180, 46, 0.06);
  border: 1px solid rgba(245, 180, 46, 0.3);
}

.info-box-icon,
.warning-icon {
  color: var(--gold-primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.warning-box p {
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.warning-box p:last-child {
  margin-bottom: 0;
}

.donate-qr-panel {
  text-align: center;
}

.qr-container {
  margin: 0 auto 0.85rem;
  max-width: 230px;
  width: 100%;
}

.donate-qr {
  width: 100%;
  max-width: 230px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.qr-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.qr-network {
  color: var(--success);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.donate-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.donate-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.donate-wallet-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.impact-card {
  padding: 1.25rem;
  text-align: center;
}

.impact-icon {
  display: block;
  font-size: 1.5rem;
  color: var(--gold-primary);
  margin-bottom: 0.5rem;
}

.impact-card strong {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  margin-bottom: 0.35rem;
}

.impact-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---- History ---- */
.history-page .page-heading {
  margin-bottom: 1.25rem;
}

.history-day {
  padding: 1rem 1.25rem;
  margin-bottom: 0.65rem;
}

.history-day-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.history-day-header h3 {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.history-first-prize {
  color: var(--gold-primary);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ---- Feature Bar & Footer ---- */
.feature-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.1rem 0.65rem;
  background: rgba(17, 27, 45, 0.62);
  backdrop-filter: blur(2px);
  border-top: 1px solid rgba(36, 48, 68, 0.6);
  max-width: 100%;
  min-width: 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.feature-icon {
  font-size: 1.25rem;
  color: var(--gold-primary);
}

.feature-item strong {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--gold-primary);
}

.feature-item small {
  font-size: 0.62rem;
  color: var(--text-muted);
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.9rem 0.65rem;
  border-top: 1px solid rgba(36, 48, 68, 0.6);
  font-size: 0.68rem;
  color: var(--text-muted);
  background: rgba(8, 18, 32, 0.58);
  backdrop-filter: blur(2px);
  text-align: center;
}

/* ---- Responsive ---- */
@media (max-width: 1199px) {
  .results-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
  }

  .donate-grid {
    grid-template-columns: 1fr 1fr;
  }

  .donate-grid .donate-panel:last-child {
    grid-column: 1 / -1;
  }

  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .mobile-menu-btn {
    display: flex;
  }

  .app-body {
    display: block;
  }

  .sidebar {
    top: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform var(--transition);
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .mobile-menu-btn {
    top: 1rem;
  }

  .main-column {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    background-attachment: scroll;
  }

  .site-header {
    background-attachment: scroll;
  }

  .results-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .results-sidebar {
    order: 0;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-text-panel {
    width: 58%;
    max-width: none;
    padding: 1.35rem 1rem 1.35rem 0.85rem;
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.97) 0%,
      rgba(255, 255, 255, 0.9) 70%,
      rgba(255, 255, 255, 0.35) 88%,
      transparent 100%
    );
  }

  .about-heading {
    font-size: 1.85rem;
  }

  .about-body p {
    font-size: 0.82rem;
    line-height: 1.65;
    margin-bottom: 0.75rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    min-height: auto;
    padding: 0.65rem 0.75rem 0.75rem 3.4rem;
  }

  .site-header {
    min-height: auto;
  }

  .header-brand-text {
    width: 100%;
  }

  .header-meta {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    flex-shrink: 1;
    min-width: 0;
  }

  .header-meta-item {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.45rem 0.55rem;
  }

  .meta-line-label {
    font-size: 0.72rem;
    white-space: normal;
  }

  .meta-line-value {
    font-size: 0.88rem;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .prize-grid--5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .prize-grid-cell:nth-child(5n) {
    border-right: 1px solid var(--border-color);
  }

  .prize-grid-cell:nth-child(3n) {
    border-right: none;
  }
}

@media (max-width: 767px) {
  .page-content {
    padding: 0.85rem 0.7rem 1.25rem;
  }

  .site-title {
    font-size: clamp(1.35rem, 7.2vw, 2.1rem);
    letter-spacing: 0.03em;
  }

  .site-subtitle {
    font-size: clamp(0.82rem, 4.4vw, 1.15rem);
  }

  .header-meta {
    flex-direction: column;
  }

  .header-meta-item {
    width: 100%;
  }

  .top-three-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.75rem;
  }

  .prize-section-frame {
    margin-top: 2.5rem;
    padding-top: 3rem;
  }

  .prize-card-number {
    font-size: 2.5rem;
  }

  .prize-card-label,
  .prize-section-label {
    font-size: 1.45em;
    padding: 0.4rem 0.75rem;
  }

  .prize-grid--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prize-grid-cell:nth-child(3n) {
    border-right: 1px solid var(--border-color);
  }

  .prize-grid-cell:nth-child(2n) {
    border-right: none;
  }

  .donate-grid {
    grid-template-columns: 1fr;
  }

  .about-text-panel {
    width: 52%;
    padding: 1rem 0.5rem 1rem 0.55rem;
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.97) 0%,
      rgba(255, 255, 255, 0.88) 68%,
      rgba(255, 255, 255, 0.25) 85%,
      transparent 100%
    );
  }

  .about-visual {
    aspect-ratio: 9 / 16;
    background-image: url("../images/about-us-mobile.png");
    background-position: center top;
  }

  .about-heading {
    font-size: 1.5rem;
  }

  .about-heading::after {
    margin-top: 0.45rem;
    margin-bottom: 0.75rem;
  }

  .about-lead {
    font-size: 0.88rem;
    margin-bottom: 1rem;
  }

  .about-body p {
    font-size: 0.76rem;
    line-height: 1.58;
    margin-bottom: 0.65rem;
  }

  .impact-grid {
    grid-template-columns: 1fr;
  }

  .feature-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1rem;
  }

  .site-footer {
    padding: 1rem;
  }

  .wallet-box {
    flex-direction: column;
  }

  .admin-grid--5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-grid--3 {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    flex-direction: column;
  }
}

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