:root {
  --ink: #17211b;
  --muted: #607069;
  --line: #d8e2dd;
  --panel: #ffffff;
  --soft: #f2f7f4;
  --brand: #1768a8;
  --brand-dark: #0b4d83;
  --navy: #0b3f6f;
  --sky: #e8f3fb;
  --accent: #1f8a70;
  --gold: #f0b55b;
  --warning: #a15c00;
  --success: #137547;
  --danger: #a43434;
  --shadow: 0 16px 42px rgba(7, 52, 95, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #eef3f7;
  font-family: "Segoe UI", Tahoma, Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-synthesis: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 25px;
  line-height: 1.1;
}

.home-title-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
}

h2 {
  max-width: 800px;
  margin-bottom: 16px;
  color: #fff;
  font-size: 36px;
  line-height: 1.12;
}

h3 {
  margin-bottom: 6px;
  font-size: 25px;
}

h4 {
  font-size: 18px;
}

.container {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
}

.top-strip {
  background: #07345f;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
}

.top-strip-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
}

.top-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.top-links a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.top-links a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid #cfdce8;
  box-shadow: 0 8px 24px rgba(7, 52, 95, 0.1);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
}

.brand-block {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--gold);
  color: #102018;
  font-size: 30px;
  font-weight: 800;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.08);
}

.logo-mark {
  padding: 4px;
  overflow: hidden;
  background: #fff;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 4px;
  color: inherit;
  opacity: 0.76;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.eyebrow.dark {
  color: var(--accent);
  opacity: 1;
}

.auth-card {
  min-width: 260px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.user-label {
  width: 100%;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.lottery-badge {
  width: 100%;
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.main-nav {
  border-top: 1px solid #d9e5ee;
  background: linear-gradient(90deg, #07345f, var(--navy), #125c93);
}

.nav-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 52px;
  padding-top: 8px;
  padding-bottom: 8px;
  overflow: visible;
}

#publicMenu {
  display: contents;
}

.nav-item {
  flex: 0 1 auto;
  min-height: 38px;
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  white-space: nowrap;
}

.nav-item.active,
.nav-item:hover {
  background: #f2b84c;
  color: #10263c;
}

.hero-section {
  position: relative;
  min-height: 260px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #082f55;
}

.hero-section::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.13) 35%, transparent 58%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 18px);
  content: "";
  opacity: 0.42;
  transform: translateX(-12%);
  animation: lightSweep 9s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-section img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(6, 43, 78, 0.93) 0%, rgba(8, 61, 107, 0.74) 43%, rgba(8, 61, 107, 0.2) 100%),
    linear-gradient(0deg, rgba(5, 28, 52, 0.36), rgba(5, 28, 52, 0));
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 44px 0 42px;
  color: white;
}

.hero-content p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.quick-info {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
  margin-bottom: 22px;
}

.quick-info div {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.quick-info strong {
  min-width: 64px;
  color: var(--brand);
  font-size: 34px;
  line-height: 1;
}

.quick-info span {
  color: var(--muted);
  font-weight: 700;
}

.notice,
.view {
  border: 1px solid rgba(207, 220, 232, 0.95);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.notice {
  margin-bottom: 22px;
  padding: 14px 16px;
  color: #3b473f;
}

.sync-warning {
  margin: 12px 0;
  border-color: #f0b55b;
  color: #4b2a00;
  background: #fff8e8;
  font-weight: 800;
}

.portal-dashboard {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr 0.8fr;
  gap: 14px;
  margin-bottom: 22px;
}

.portal-feature,
.weather-card,
.portal-links {
  overflow: hidden;
  border: 1px solid rgba(207, 220, 232, 0.95);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.portal-feature {
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 300px;
}

.portal-feature img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-feature div {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 26px;
}

.portal-feature span,
.weather-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-feature h3,
.weather-card h3,
.portal-links h3 {
  margin: 0;
  color: var(--navy);
}

.portal-feature p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
}

.portal-feature .primary-btn {
  width: max-content;
}

.weather-card {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 300px;
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(7, 52, 95, 0.96), rgba(23, 104, 168, 0.92)),
    radial-gradient(circle at 80% 15%, rgba(242, 184, 76, 0.42), transparent 34%);
}

.weather-card::after {
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  content: "";
}

.weather-card span,
.weather-card h3,
.weather-card p,
.weather-card small,
.weather-card strong {
  position: relative;
  z-index: 1;
}

.weather-card span,
.weather-card p,
.weather-card small {
  color: rgba(255, 255, 255, 0.86);
}

.weather-card h3 {
  color: #fff;
}

.weather-card strong {
  font-size: 54px;
  line-height: 1;
}

.weather-card p {
  margin: 0;
  line-height: 1.5;
}

.portal-links {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 300px;
  padding: 22px;
}

.portal-links button {
  min-height: 44px;
  border: 1px solid #d8e5ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f3f8fc);
  color: #163a5c;
  font-weight: 800;
  text-align: left;
}

.portal-links button:hover {
  transform: translateX(5px);
  border-color: rgba(23, 104, 168, 0.4);
  box-shadow: 0 10px 20px rgba(7, 52, 95, 0.1);
}

.portal-services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.portal-services button {
  position: relative;
  overflow: hidden;
  min-height: 94px;
  padding: 18px;
  border: 1px solid #cfdce8;
  border-top: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 20px rgba(7, 52, 95, 0.08);
  animation: cardIn 620ms ease both;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.portal-services button:nth-child(2) {
  animation-delay: 70ms;
}

.portal-services button:nth-child(3) {
  animation-delay: 140ms;
}

.portal-services button:nth-child(4) {
  animation-delay: 210ms;
}

.portal-services button::after {
  position: absolute;
  right: -30px;
  bottom: -54px;
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, rgba(23, 104, 168, 0.11), rgba(242, 184, 76, 0.18));
  content: "";
  transform: rotate(18deg);
}

.portal-services button:hover {
  transform: translateY(-6px) scale(1.025);
  border-color: rgba(23, 104, 168, 0.38);
  box-shadow: 0 16px 28px rgba(7, 52, 95, 0.13);
}

.portal-services strong,
.portal-services span {
  position: relative;
  z-index: 1;
  display: block;
}

.portal-services strong {
  margin-bottom: 7px;
  color: var(--navy);
  font-size: 17px;
}

.portal-services span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.content-grid-wrap {
  padding-top: 18px;
  padding-bottom: 40px;
}

.view {
  display: none;
  min-height: calc(100vh - 190px);
  padding: 22px;
}

.view.active {
  display: block;
}

.view.active:hover {
  box-shadow: 0 18px 42px rgba(7, 52, 95, 0.13);
}

.section-head {
  position: relative;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(207, 220, 232, 0.86);
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.65fr);
  align-items: start;
  gap: 18px;
}

.home-slider,
.week-weather {
  overflow: hidden;
  border: 1px solid rgba(207, 220, 232, 0.95);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.home-slider {
  position: relative;
}

.slide-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  background: var(--navy);
}

.slide-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: slideImageIn 520ms ease both;
}

.slide-frame::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 38, 70, 0.94), rgba(5, 38, 70, 0.58) 46%, rgba(5, 38, 70, 0.12));
  content: "";
}

.slide-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 9px;
  width: min(500px, 70%);
  min-height: 100%;
  padding: 26px 34px;
  color: #fff;
  animation: heroCopyIn 520ms ease both;
}

.slide-copy span {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
}

.slide-copy h2 {
  margin: 0;
  font-size: clamp(24px, 2.35vw, 34px);
}

.slide-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
}

.slide-copy .light-btn {
  width: max-content;
}

.slide-dots {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.slide-dots button {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: #c8d8e6;
}

.slide-dots button.active {
  background: var(--brand);
}

.week-weather {
  padding: 14px;
}

.compact-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.weather-week {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.weather-day {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  align-items: center;
  min-height: 50px;
  padding: 8px 9px;
  border: 1px solid #d8e5ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f5f9fd);
}

.weather-day strong {
  color: var(--navy);
  font-size: 13px;
}

.weather-day span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-day em {
  color: var(--brand-dark);
  font-style: normal;
  font-weight: 900;
  font-size: 13px;
}

.home-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.home-tiles button {
  min-height: 56px;
  padding: 10px 13px;
  border: 1px solid #d8e5ef;
  border-top: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 20px rgba(7, 52, 95, 0.08);
}

.home-tiles button:hover {
  transform: translateY(-5px) scale(1.018);
  box-shadow: var(--glow);
}

.home-tiles strong,
.home-tiles span {
  display: block;
}

.home-tiles strong {
  margin-bottom: 3px;
  color: var(--navy);
  font-size: 14px;
}

.home-tiles span {
  color: var(--muted);
  font-size: 12px;
}

.home-news-section {
  margin-top: 16px;
}

.lottery-section {
  margin-top: 16px;
}

.lottery-widget {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid #d8e5ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f5f9fd);
  box-shadow: 0 10px 24px rgba(7, 52, 95, 0.08);
}

.lottery-widget-large {
  grid-template-columns: 320px 1fr;
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

.lottery-widget-large .lottery-wheel-wrap {
  width: 300px;
  height: 300px;
}

.lottery-wheel-wrap {
  position: relative;
  width: 230px;
  height: 230px;
  margin: 0 auto;
}

.lottery-pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  z-index: 2;
  width: 0;
  height: 0;
  border-right: 12px solid transparent;
  border-left: 12px solid transparent;
  border-top: 24px solid var(--danger);
  transform: translateX(-50%);
}

.lottery-canvas {
  width: 100%;
  height: 100%;
  border: 8px solid #fff;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(7, 52, 95, 0.16), 0 14px 28px rgba(7, 52, 95, 0.18);
  background: #fff;
}

.lottery-center {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(7, 52, 95, 0.18);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.lottery-panel {
  display: grid;
  gap: 10px;
}

.lottery-select-label {
  max-width: 360px;
}

.lottery-panel strong,
.lottery-panel span {
  display: block;
}

.lottery-panel strong {
  color: var(--navy);
  font-size: 20px;
}

.lottery-panel span,
.lottery-winner small {
  color: var(--muted);
  font-size: 13px;
}

.lottery-panel .primary-btn {
  width: max-content;
}

.lottery-clear-winner {
  width: max-content;
}

.lottery-winner {
  padding: 10px 12px;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #fff;
  line-height: 1.45;
}

.lottery-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.lottery-list span {
  padding: 8px 10px;
  border: 1px solid #d8e5ef;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.lottery-user-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 22px;
  border: 1px solid #cfe1ef;
  border-left: 6px solid var(--gold);
  border-radius: 8px;
  background: linear-gradient(135deg, #fffdf7, #eef7ff);
  box-shadow: 0 16px 34px rgba(7, 52, 95, 0.12);
}

.lottery-user-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  color: #08345c;
  background: radial-gradient(circle at 30% 25%, #fff6dc, var(--gold));
  font-weight: 900;
  box-shadow: inset 0 0 0 4px #fff, 0 10px 24px rgba(240, 181, 91, 0.28);
}

.lottery-user-card strong {
  display: block;
  color: var(--navy);
  font-size: 22px;
}

.lottery-user-card p {
  margin: 6px 0 12px;
  color: #324b60;
  line-height: 1.55;
}

.lottery-user-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lottery-user-codes span {
  padding: 8px 12px;
  border: 1px solid #cfe1ef;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 800;
}

.home-news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-news-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  grid-template-rows: auto auto 1fr;
  gap: 3px 10px;
  min-height: 96px;
  padding: 10px;
  border: 1px solid #d8e5ef;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 18px rgba(7, 52, 95, 0.07);
}

.home-news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(7, 52, 95, 0.13);
}

.home-news-card > .preview-slide {
  grid-row: 1 / 4;
  width: 120px;
  aspect-ratio: 3 / 2;
  border-radius: 6px;
}

.preview-slide {
  position: relative;
  display: block;
  overflow: hidden;
  background: #eaf2f7;
}

.preview-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 500ms ease, transform 700ms ease;
}

.preview-slide img.active {
  opacity: 1;
  transform: scale(1);
}

.preview-slide-count {
  position: absolute;
  z-index: 2;
  right: 5px;
  bottom: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(5, 43, 78, 0.78);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.home-news-card span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-news-card strong {
  color: var(--navy);
  font-size: 14px;
  line-height: 1.25;
}

.home-news-card p {
  margin: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.38;
}

.content-album {
  position: relative;
  overflow: hidden;
  width: min(680px, 100%);
  aspect-ratio: 3 / 2;
  margin: 0 auto 18px;
  border: 1px solid #d8e5ef;
  border-radius: 8px;
  background: #eef5fa;
}

.content-album img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 420ms ease, transform 520ms ease;
}

.content-album img.active {
  opacity: 1;
  transform: scale(1);
}

.content-text {
  max-width: 860px;
  margin: 0 auto;
  color: #1f2c2a;
  font-size: 16px;
  line-height: 1.7;
}

.album-arrow,
.lightbox-arrow,
.lightbox-close {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(5, 43, 78, 0.82);
  color: #fff;
  cursor: pointer;
}

.album-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 38px;
  height: 38px;
  font-size: 27px;
  transform: translateY(-50%);
}

.album-arrow.prev {
  left: 12px;
}

.album-arrow.next {
  right: 12px;
}

.album-count,
.lightbox-count {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(5, 43, 78, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.content-collection {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.content-summary-card {
  overflow: hidden;
  padding: 0 0 13px;
  border: 1px solid #d8e5ef;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.content-summary-card img,
.content-image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #eaf2f7;
}

.content-summary-card > .content-summary-slide {
  width: 100%;
  aspect-ratio: 3 / 2;
  margin: 0;
}

.content-summary-card > .content-summary-slide img {
  width: 100%;
  height: 100%;
}

.content-summary-card > span:not(.content-image-placeholder),
.content-summary-card strong,
.content-summary-card p {
  display: block;
  margin: 8px 12px 0;
}

.content-summary-card > span:not(.content-image-placeholder) {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.content-summary-card > .preview-slide {
  margin: 0;
  color: inherit;
}

.album-thumbnails {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  width: min(680px, 100%);
  margin: -8px auto 20px;
}

.album-thumbnails button {
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #eaf2f7;
  cursor: pointer;
}

.album-thumbnails button.active {
  border-color: var(--accent);
}

.album-thumbnails img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.content-summary-card strong {
  color: var(--navy);
  font-size: 16px;
}

.content-summary-card p {
  color: #61716c;
  font-size: 13px;
  line-height: 1.45;
}

.content-image-preview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.content-image-thumb {
  position: relative;
}

.content-image-thumb img {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 6px;
  object-fit: cover;
}

.content-image-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #a82626;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.document-manager {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.image-lightbox {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px 76px;
  background: rgba(0, 14, 28, 0.92);
}

.image-lightbox img {
  max-width: min(1200px, 94vw);
  max-height: 88vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  font-size: 28px;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  font-size: 34px;
  transform: translateY(-50%);
}

.lightbox-arrow.prev {
  left: 18px;
}

.lightbox-arrow.next {
  right: 18px;
}

.section-head::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 86px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  content: "";
}

.section-head {
  margin-bottom: 22px;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.section-head.split {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-section-title {
  margin-top: 6px;
  padding: 12px 14px;
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: linear-gradient(90deg, #e8f3fb, #f7fbfe);
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 800;
}

.form-grid.compact {
  align-content: start;
}

label {
  display: grid;
  gap: 7px;
  color: #263a4e;
  font-weight: 700;
  transition: transform 180ms ease;
}

label:hover {
  transform: scale(1.01);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfdce8;
  border-radius: 8px;
  padding: 12px 13px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(23, 104, 168, 0.16);
  border-color: var(--brand);
}

.full {
  grid-column: 1 / -1;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbdbe8;
  border-radius: 6px;
  background: #f4f9fc;
  font-weight: 600;
}

.inline-check input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.session-open-manager {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-left: 5px solid #16835d;
  border-radius: 6px;
  background: #edf9f3;
  color: #163d31;
}

.session-open-manager strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.session-open-manager p {
  margin: 0;
}

.session-open-button {
  min-width: 112px;
}

.survey-embed {
  overflow: hidden;
  height: min(760px, 72vh);
  min-height: 520px;
  border: 1px solid #cfe1ef;
  border-radius: 8px;
  background: #061f3b;
  box-shadow: 0 18px 38px rgba(7, 52, 95, 0.12);
}

.survey-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.survey-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  margin-top: 14px;
  text-decoration: none;
}

.analytics-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-select {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  font-weight: 700;
  color: var(--ink);
}

.analytics-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f3f8fb);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.metric-card strong {
  display: block;
  color: var(--primary);
  font-size: 30px;
  line-height: 1;
  margin-bottom: 8px;
}

.metric-card span,
.metric-card small {
  display: block;
}

.metric-card span {
  font-weight: 800;
}

.metric-card small {
  color: var(--muted);
  margin-top: 4px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.analytics-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.analytics-panel h4 {
  margin: 0 0 14px;
  color: var(--primary-dark);
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.bar-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-label strong {
  color: var(--primary);
}

.bar-track {
  height: 9px;
  border-radius: 999px;
  background: #e5eef5;
  overflow: hidden;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.email-insight {
  display: grid;
  gap: 12px;
}

.email-metric {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #f7fbfe;
}

.email-metric strong {
  display: block;
  color: var(--primary);
  font-size: 26px;
}

.email-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-list span {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  padding: 6px 10px;
  font-size: 13px;
}

.empty-row {
  color: var(--muted);
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f8fbfd;
}

@media (max-width: 1100px) {
  .analytics-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .analytics-actions {
    justify-content: stretch;
  }

  .analytics-actions > * {
    width: 100%;
  }
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.field-note {
  display: block;
  margin-top: 7px;
  color: #9b4d00;
  font-weight: 700;
  line-height: 1.45;
}

.primary-btn,
.secondary-btn,
.light-btn,
.mini-btn {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 15px;
  font-weight: 800;
}

.primary-btn {
  color: white;
  background: var(--brand);
}

.primary-btn:hover {
  background: var(--brand-dark);
}

.secondary-btn {
  color: var(--ink);
  background: #e7eee9;
}

.light-btn {
  color: #12221b;
  background: var(--gold);
}

.mini-btn {
  min-height: 34px;
  padding: 7px 10px;
  color: white;
  background: var(--brand);
}

.auth-help {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 420px;
  margin-left: auto;
}

.auth-help small {
  flex-basis: 100%;
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}

.mini-btn.reject {
  background: var(--danger);
}

.mini-btn.save {
  background: #18875c;
}

.secondary-btn.danger {
  color: #fff;
  background: linear-gradient(135deg, #b74343, var(--danger));
}

.mini-btn.disabled,
.mini-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  background: #8a9690;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.winner-celebration {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 27, 50, 0.72);
  backdrop-filter: blur(6px);
}

.winner-card {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 10px;
  background: linear-gradient(145deg, #ffffff, #fff6df);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
  animation: winnerPop 520ms ease both;
}

.winner-card small {
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.winner-card h2 {
  margin: 10px 0;
  color: var(--navy);
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.08;
}

.winner-card p {
  margin-bottom: 20px;
  color: #345064;
  font-size: 20px;
  font-weight: 800;
}

.winner-fireworks {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.winner-fireworks span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 -42px #fff,
    32px -28px #1f8a70,
    42px 0 #f7cf5f,
    28px 32px #ffffff,
    0 42px #1768a8,
    -30px 28px #f0b55b,
    -42px 0 #ffffff,
    -28px -30px #1f8a70;
  animation: fireworksBurst 1100ms ease-out infinite;
}

.winner-fireworks span:nth-child(1) { top: 18%; left: 20%; }
.winner-fireworks span:nth-child(2) { top: 28%; left: 78%; animation-delay: 180ms; }
.winner-fireworks span:nth-child(3) { top: 70%; left: 24%; animation-delay: 320ms; }
.winner-fireworks span:nth-child(4) { top: 66%; left: 74%; animation-delay: 460ms; }
.winner-fireworks span:nth-child(5) { top: 12%; left: 52%; animation-delay: 620ms; }
.winner-fireworks span:nth-child(6) { top: 82%; left: 52%; animation-delay: 760ms; }

.row-actions .mini-btn {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 12px;
}

button[data-role-user] {
  display: none;
}

.hidden {
  display: none !important;
}

.payment-layout {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 18px;
}

.bank-panel {
  padding: 18px;
  border-radius: 8px;
  background: var(--sky);
  border-left: 5px solid var(--navy);
}

.payment-guide {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #cfe0ed;
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: #f7fbff;
}

.my-registrations {
  margin-bottom: 18px;
}

.my-registration-list {
  display: grid;
  gap: 10px;
}

.my-registration-list h4 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 22px;
}

.my-registration-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(207, 220, 232, 0.95);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(8, 40, 70, 0.08);
}

.my-registration-card div {
  display: grid;
  gap: 5px;
}

.my-registration-card span,
.my-registration-card small {
  color: var(--muted);
  font-weight: 700;
}

.my-registration-card .status {
  justify-self: end;
}

.muted-card {
  background: #f5f8fa;
}

.payment-guide-head strong {
  display: block;
  color: var(--navy);
  font-size: 18px;
}

.payment-guide-head span,
.copy-row small,
.payment-steps {
  color: var(--muted);
}

.payment-highlight {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1.3fr);
  gap: 10px;
}

.payment-highlight > div {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 2px solid #f3bd45;
  background: #fff7df;
}

.payment-highlight small {
  color: #694b08;
  font-weight: 800;
}

.payment-highlight b {
  color: var(--navy);
  font-size: 22px;
  overflow-wrap: anywhere;
}

.lottery-gift-note {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 8px;
  border: 2px solid #1f8a56;
  background: linear-gradient(135deg, #e9fff3 0%, #fff8df 100%);
  box-shadow: 0 14px 30px rgba(31, 138, 86, 0.14);
}

.gift-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #1f8a56;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.lottery-gift-note strong {
  display: block;
  color: #0f5132;
  font-size: 19px;
}

.lottery-gift-note p {
  margin: 3px 0 0;
  color: #40534a;
  font-weight: 700;
  line-height: 1.45;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #d7e5ef;
  border-radius: 8px;
  background: #fff;
}

.copy-row span {
  display: grid;
  gap: 2px;
}

.copy-row b {
  color: var(--ink);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.transfer-purpose-row {
  background: #edf8f1;
  border-color: #b9dbc7;
}

.copy-btn {
  min-height: 36px;
  padding: 7px 12px;
}

.payment-steps {
  margin: 4px 0 0 18px;
  padding: 0;
  line-height: 1.55;
}

dl,
dd {
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 13px;
}

dd {
  margin-bottom: 13px;
  font-weight: 800;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stats-row div {
  padding: 16px;
  border-radius: 8px;
  background: var(--soft);
}

.stats-row strong {
  display: block;
  font-size: 28px;
}

.stats-row span {
  color: var(--muted);
  font-size: 13px;
}

.download-menu {
  position: relative;
}

.download-menu summary {
  display: inline-flex;
  align-items: center;
  list-style: none;
}

.download-menu summary::-webkit-details-marker {
  display: none;
}

.download-options {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  min-width: 280px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.download-options button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

td small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.status.pending {
  color: var(--warning);
  background: #fff1d6;
}

.status.confirmed {
  color: var(--success);
  background: #dff3e9;
}

.status.rejected {
  color: var(--danger);
  background: #f8dfdf;
}

.empty-state {
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.settings-subhead {
  margin-top: 8px;
  padding: 16px;
  border-left: 4px solid var(--accent);
  background: var(--soft);
}

.settings-subhead h4,
.settings-subhead p {
  margin: 0;
}

.settings-subhead p {
  margin-top: 6px;
  color: var(--muted);
}

.reminder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.content-body {
  max-width: 900px;
  padding: 20px;
  border-radius: 8px;
  background: var(--soft);
  color: #26342d;
  font-size: 16px;
  line-height: 1.7;
}

.content-photo {
  width: 100%;
  max-height: 380px;
  margin-bottom: 18px;
  border-radius: 8px;
  object-fit: cover;
}

.download-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.session-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.session-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 24px rgba(23, 33, 27, 0.08);
}

.session-card img,
.poster-placeholder {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.poster-placeholder {
  display: grid;
  place-items: center;
  padding: 18px;
  background: linear-gradient(135deg, var(--brand), var(--navy));
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

.session-card-body {
  display: grid;
  gap: 2px;
  padding: 7px 10px 8px;
}

.session-card-body span {
  color: var(--muted);
  font-size: 11px;
}

.session-card-body em {
  color: var(--brand-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.session-card-body strong {
  font-size: 13px;
}

.session-detail {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: var(--soft);
  line-height: 1.7;
}

.schedule-list {
  display: grid;
  gap: 10px;
}

.schedule-poster {
  width: min(520px, 100%);
  max-height: 680px;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  box-shadow: var(--shadow);
}

.schedule-row {
  display: grid;
  grid-template-columns: 110px 1.1fr 80px 1.7fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.schedule-row span {
  color: var(--muted);
}

.schedule-row strong small {
  display: block;
  margin-top: 4px;
  color: var(--brand-dark);
  font-size: 12px;
  line-height: 1.35;
}

.survey-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 8px;
  background: var(--sky);
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-check input {
  width: 18px;
  height: 18px;
}

.content-list-head {
  margin-top: 24px;
}

.content-list {
  display: grid;
  gap: 10px;
}

.content-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.content-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.feedback-item {
  align-items: flex-start;
}

.feedback-item p {
  margin: 10px 0 0;
  color: var(--ink);
  line-height: 1.55;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (min-width: 1180px) {
  .hero-section {
    min-height: 240px;
  }

  .hero-content {
    padding-top: 46px;
    padding-bottom: 44px;
  }

  h2 {
    max-width: 860px;
    font-size: clamp(30px, 2.4vw, 40px);
  }

  #registerView .form-grid,
  #contentAdminView .form-grid,
  #sessionAdminView .form-grid,
  .settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #registerView,
  #adminView,
  #contentAdminView,
  #sessionAdminView,
  #settingsView {
    padding: 34px 38px;
  }

  #sessionsView {
    padding: 18px 22px;
  }

  #sessionsView .section-head {
    margin-bottom: 12px;
    padding-bottom: 10px;
  }
}

@media (max-width: 900px) {
  .top-strip-inner,
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-links {
    justify-content: flex-start;
  }

  .auth-card {
    width: 100%;
    justify-content: flex-start;
  }

  .user-label {
    text-align: left;
  }

  .hero-section {
    min-height: 280px;
  }

  h2 {
    font-size: 34px;
  }

  .quick-info,
  .home-layout,
  .home-tiles,
  .home-news-grid,
  .lottery-widget,
  .portal-dashboard,
  .portal-services,
  .payment-layout {
    grid-template-columns: 1fr;
  }

  .payment-highlight {
    grid-template-columns: 1fr;
  }

  .lottery-gift-note {
    grid-template-columns: 1fr;
  }

  .lottery-widget-large .lottery-wheel-wrap,
  .lottery-wheel-wrap {
    width: min(260px, 78vw);
    height: min(260px, 78vw);
  }

  .gift-icon {
    width: 100%;
    height: 40px;
  }

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

  .session-card img,
  .poster-placeholder {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .portal-feature {
    grid-template-columns: 1fr;
  }

  .portal-feature img {
    max-height: 260px;
  }

  .slide-copy {
    width: 100%;
    padding: 26px;
  }

  .home-news-card {
    grid-template-columns: 108px 1fr;
  }

  .home-news-card > .preview-slide {
    width: 108px;
  }

  .content-collection {
    grid-template-columns: 1fr;
  }

  .content-image-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .album-thumbnails {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .image-lightbox {
    padding: 60px 12px;
  }

  .weather-day {
    grid-template-columns: 1fr;
  }

  .lottery-widget-large .lottery-wheel-wrap {
    width: 230px;
    height: 230px;
  }

  .schedule-row {
    grid-template-columns: 1fr;
  }

  .quick-info {
    margin-top: 18px;
  }

  .section-head.split {
    flex-direction: column;
    align-items: flex-start;
  }

  .download-menu,
  .download-options {
    position: static;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    position: static;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .nav-item {
    width: 100%;
    min-height: 42px;
    white-space: normal;
    text-align: center;
  }

  .hero-content {
    padding: 58px 0 48px;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 28px;
  }

  .view {
    padding: 18px;
  }

  .form-grid,
  .settings-grid,
  .stats-row {
    grid-template-columns: 1fr;
  }

  .content-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .lottery-user-card {
    grid-template-columns: 1fr;
    padding: 18px;
    text-align: center;
  }

  .lottery-user-icon {
    margin: 0 auto;
  }

  .lottery-user-codes {
    justify-content: center;
  }

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

  .survey-embed {
    min-height: 560px;
    height: 68vh;
  }

  .winner-card {
    padding: 26px 18px;
  }
}

@media (max-width: 420px) {
  .session-grid {
    grid-template-columns: 1fr;
  }

  .session-card img,
  .poster-placeholder {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* Visual polish and motion layer */
:root {
  --glow: 0 18px 46px rgba(23, 104, 168, 0.24);
  --gold-glow: 0 14px 32px rgba(242, 184, 76, 0.28);
}

body {
  background:
    linear-gradient(180deg, rgba(218, 236, 249, 0.98) 0, rgba(238, 243, 247, 0.96) 360px),
    linear-gradient(135deg, rgba(23, 104, 168, 0.12), transparent 48%),
    #eef3f7;
}

button,
input,
select,
textarea,
.quick-info div,
.session-card,
.content-item,
.schedule-row,
.stats-row div {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.site-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.brand-mark {
  box-shadow: 0 10px 26px rgba(7, 52, 95, 0.14);
  animation: markFloat 5s ease-in-out infinite;
}

.nav-item {
  position: relative;
}

.nav-item::after {
  position: absolute;
  right: 14px;
  bottom: 4px;
  left: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-item.active::after,
.nav-item:hover::after {
  opacity: 0.65;
  transform: scaleX(1);
}

.hero-section {
  min-height: 260px;
}

.hero-section img {
  transform: scale(1.04);
  animation: heroDrift 24s ease-in-out infinite alternate;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(5, 38, 70, 0.94) 0%, rgba(9, 75, 128, 0.76) 44%, rgba(9, 75, 128, 0.18) 100%),
    linear-gradient(0deg, rgba(4, 27, 50, 0.38), rgba(4, 27, 50, 0));
}

.hero-section::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 46px;
  background: linear-gradient(180deg, transparent, rgba(246, 250, 248, 0.96));
  content: "";
}

.hero-content {
  animation: heroCopyIn 780ms ease both;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 10px 22px rgba(23, 104, 168, 0.24);
}

.secondary-btn {
  background: linear-gradient(180deg, #ffffff, #edf4f9);
  box-shadow: inset 0 0 0 1px rgba(7, 52, 95, 0.08);
}

.light-btn {
  background: linear-gradient(135deg, var(--gold), #ffd98a);
  box-shadow: 0 10px 22px rgba(240, 181, 91, 0.25);
}

.primary-btn:hover,
.secondary-btn:hover,
.light-btn:hover,
.mini-btn:hover {
  transform: translateY(-2px);
}

.primary-btn:hover {
  box-shadow: var(--glow);
}

.quick-info div {
  position: relative;
  overflow: hidden;
  animation: cardIn 700ms ease both;
}

.quick-info div:nth-child(2) {
  animation-delay: 90ms;
}

.quick-info div:nth-child(3) {
  animation-delay: 180ms;
}

.quick-info div::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(242, 184, 76, 0.2) 48%, transparent 100%);
  content: "";
  transform: translateX(-120%);
  transition: transform 650ms ease;
}

.quick-info div:hover {
  transform: translateY(-7px) scale(1.025);
  box-shadow: var(--glow);
}

.quick-info div:hover::before {
  transform: translateX(120%);
}

.notice,
.view {
  background: rgba(255, 255, 255, 0.94);
}

.view.active {
  animation: viewIn 360ms ease both;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(23, 104, 168, 0.45);
  box-shadow: 0 10px 22px rgba(23, 104, 168, 0.12);
}

.content-body {
  background: linear-gradient(180deg, #ffffff, #f1f7fb);
}

tbody tr {
  transition: background 160ms ease;
}

tbody tr:hover {
  background: #f5f9fd;
}

.stats-row div:hover,
.content-item:hover,
.schedule-row:hover {
  transform: translateY(-4px) scale(1.012);
  box-shadow: 0 12px 26px rgba(7, 52, 95, 0.11);
}

.schedule-row:hover {
  border-color: rgba(23, 104, 168, 0.34);
}

.session-card {
  position: relative;
  transform: translateY(0);
}

.session-card:hover {
  transform: translateY(-9px) scale(1.018);
  box-shadow: var(--glow);
}

.session-card img,
.poster-placeholder {
  transition: transform 420ms ease;
}

.session-card:hover img,
.session-card:hover .poster-placeholder {
  transform: scale(1.04);
}

.poster-placeholder {
  position: relative;
  overflow: hidden;
}

.poster-placeholder::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  content: "";
  transform: translateX(-110%);
  animation: posterSheen 4.4s ease-in-out infinite;
}

.session-detail {
  animation: viewIn 300ms ease both;
}

@keyframes heroDrift {
  from {
    transform: scale(1.04) translate3d(-10px, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(18px, -10px, 0);
  }
}

@keyframes heroCopyIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideImageIn {
  from {
    opacity: 0.82;
    transform: scale(1.035);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes markFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes lightSweep {
  from {
    transform: translateX(-16%);
    opacity: 0.28;
  }
  to {
    transform: translateX(10%);
    opacity: 0.52;
  }
}

@keyframes posterSheen {
  0%,
  55% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(110%);
  }
}

@keyframes winnerPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fireworksBurst {
  0% {
    opacity: 0;
    transform: scale(0.25) rotate(0deg);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.55) rotate(42deg);
  }
}

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

/* Facebook/Messenger webview анхааруулга */
.embedded-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff3cd;
  color: #664d03;
  border-bottom: 2px solid #ffda6a;
  padding: 12px 18px;
  font-size: 14px;
}

.embedded-warning-icon {
  font-size: 22px;
  line-height: 1;
}

.embedded-warning-text {
  display: grid;
  gap: 3px;
  flex: 1 1 280px;
}

.embedded-warning-text strong {
  font-size: 15px;
}

.embedded-warning #embeddedWarningOpen {
  white-space: nowrap;
}

/* Google нэвтрэх товч (4 өнгийн лого + текст) */
.google-signin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  font-weight: 600;
}

.google-signin-btn:hover {
  background: #f7f8f8;
}

.google-signin-btn .google-logo {
  flex: 0 0 auto;
}

/* Админ — ээлжийн accordion */
.session-group-cell {
  padding: 0 !important;
  background: #0b3d6b;
}

.session-group-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
}

.session-group-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.session-group-toggle .group-caret {
  font-size: 12px;
  width: 14px;
  flex: 0 0 auto;
}

.session-summary-cell {
  background: #eef4fb;
  color: #0b3d6b;
  font-size: 13px;
  padding: 8px 16px;
  line-height: 1.7;
}

/* Спорт бүртгэлийн анхааруулга */
.sport-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff3cd;
  color: #664d03;
  border: 1px solid #ffda6a;
  border-left: 5px solid #e0a106;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.sport-warning-icon {
  font-size: 22px;
  line-height: 1;
}

.sport-warning strong {
  display: block;
}

.sport-warning span {
  font-size: 13px;
}

/* Захиалгын хуудас */
.order-form {
  background: #f7fbff;
  border: 1px solid rgba(207, 220, 232, 0.95);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.orders-list {
  display: grid;
  gap: 16px;
}

.order-day {
  border: 1px solid rgba(207, 220, 232, 0.95);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.order-day-head {
  background: #0b3d6b;
  color: #fff;
  font-weight: 700;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-day-head span {
  font-weight: 500;
  font-size: 13px;
  opacity: 0.9;
}

.order-cat-head {
  background: #eef4fb;
  color: #0b3d6b;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 14px;
  border-top: 1px solid #dfeaf5;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid #eef2f6;
  border-left: 4px solid transparent;
}

.order-item.order-pending { border-left-color: #d8362c; }
.order-item.order-partial { border-left-color: #e0a106; }
.order-item.order-done { border-left-color: #1f9d57; }

.order-item-main {
  display: grid;
  gap: 2px;
}

.order-item-main strong { color: #16324d; }
.order-item-main span { font-size: 13px; color: #51606e; }
.order-item-main small { font-size: 12px; color: #7a8893; }

.order-item-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.order-status {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.order-status.order-pending { background: #fdecea; color: #b3261e; }
.order-status.order-partial { background: #fff4e5; color: #8a4b00; }
.order-status.order-done { background: #e7f7ec; color: #14632e; }

.order-check {
  display: flex;
  align-items: center;
}

.order-check input[type="checkbox"] {
  width: 26px;
  height: 26px;
  cursor: pointer;
  accent-color: #1f9d57;
}

.order-received {
  display: flex;
  align-items: center;
  gap: 6px;
}

.order-received-input {
  width: 80px;
  padding: 5px 8px;
  border: 1px solid #cfdce8;
  border-radius: 7px;
}

/* Миний бүртгэл — нуух/харуулах */
.my-registration-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.my-registration-items {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

/* Майлын хавсралт менежер + гараар майл илгээх */
.email-attachment-form {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(207, 220, 232, 0.95);
  border-radius: 10px;
  background: #f7fbff;
}

.email-attachment-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.email-attach-pick-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--brand-dark, #0b3d6b);
}

.email-attach-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.email-attach-pick .empty-state {
  color: #6b7c8c;
  font-size: 13px;
}

/* Төлбөрийн буцаалтын анхааруулга + заавал чеклэх */
.refund-warning {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #f1c27d;
  border-left: 5px solid #e0a106;
  border-radius: 10px;
  background: #fff8e8;
  color: #5a4300;
  display: grid;
  gap: 8px;
}

.refund-warning-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b3261e;
  font-size: 15px;
}

.refund-warning p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
}

.refund-warning .refund-note {
  font-style: italic;
  color: #7a5c00;
}

.refund-warning .refund-contact {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #b3261e;
}

.refund-warning .refund-contact a {
  color: #b3261e;
  text-decoration: underline;
}

.refund-check {
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px dashed #e0a106;
  border-radius: 8px;
  background: #fffdf6;
  font-weight: 600;
  color: #4a3a00;
}

/* Бүртгэл амжилттай — санамж зургийн модал */
body.modal-open {
  overflow: hidden;
}

.reminder-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.reminder-modal.hidden {
  display: none !important;
}

.reminder-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 18, 33, 0.78);
  backdrop-filter: blur(2px);
}

.reminder-modal-content {
  position: relative;
  max-width: min(880px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  animation: reminderPop 0.25s ease;
}

@keyframes reminderPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.reminder-modal-body .reminder-success {
  background: #e7f7ec;
  color: #14632e;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid #c6ebd2;
}

.reminder-modal-body .reminder-syncnote {
  background: #fff4e5;
  color: #8a4b00;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-bottom: 1px solid #ffd9a8;
}

.reminder-poster-img {
  display: block;
  width: 100%;
  height: auto;
}

.reminder-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: not-allowed;
  z-index: 3;
}

.reminder-modal-close[disabled] {
  cursor: not-allowed;
  opacity: 0.92;
}

.reminder-modal-close.ready {
  background: #d8362c;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(216, 54, 44, 0.5);
}

.reminder-close-x {
  position: relative;
  z-index: 2;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.reminder-countdown {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.reminder-modal-close.ready .reminder-countdown {
  display: none;
}

.reminder-countdown-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 3;
}

.reminder-countdown-fill {
  fill: none;
  stroke: #ffd23f;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100.53;
  stroke-dashoffset: 100.53;
}

@keyframes reminderCount {
  from { stroke-dashoffset: 100.53; }
  to { stroke-dashoffset: 0; }
}

/* Зураг олдоогүй үеийн текстэн нөөц */
.reminder-fallback {
  padding: 20px 22px;
  display: grid;
  gap: 12px;
}

.reminder-fallback h3 {
  margin: 0;
  color: #b3261e;
  font-size: 24px;
}

.reminder-fallback h4 {
  margin: 0 0 6px;
  color: #0b3d6b;
}

.reminder-fallback-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.reminder-fallback ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 14px;
}

.reminder-fallback-warn {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fdecec;
  color: #b3261e;
  font-weight: 600;
}

@media (max-width: 560px) {
  .reminder-fallback-grid {
    grid-template-columns: 1fr;
  }
}
