@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-800.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f9ff;
  --bg-elevated: #ffffff;
  --bg-soft: #eaf3ff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-glow: rgba(96, 165, 250, 0.22);
  --line: rgba(130, 170, 220, 0.22);
  --line-strong: rgba(79, 139, 255, 0.34);
  --text: #0b1b33;
  --muted: #54708f;
  --muted-strong: #6f87a1;
  --accent: #2f80ff;
  --accent-soft: rgba(47, 128, 255, 0.12);
  --accent-warm: #7cb8ff;
  --success: #2cb67d;
  --danger: #ef6c7b;
  --shadow: 0 24px 60px rgba(102, 149, 214, 0.18);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --radius-pill: 999px;
  --content: 1200px;
  --gutter: clamp(18px, 2.8vw, 34px);
  --header-height: 84px;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Cormorant Garamond", serif;
  --body: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08101d;
  --bg-elevated: #0f1726;
  --bg-soft: #131f34;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-strong: rgba(255, 255, 255, 0.05);
  --surface-glow: rgba(83, 145, 255, 0.18);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(143, 192, 255, 0.22);
  --text: #f4f8ff;
  --muted: #b4c2d7;
  --muted-strong: #91a2bc;
  --accent: #6aa7ff;
  --accent-soft: rgba(106, 167, 255, 0.16);
  --accent-warm: #9fd1ff;
  --success: #8ddbc0;
  --danger: #ff9aa5;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  background:
    radial-gradient(circle at top center, var(--surface-glow), transparent 34%),
    radial-gradient(circle at 12% 10%, rgba(173, 216, 255, 0.34), transparent 26%),
    linear-gradient(180deg, var(--bg), var(--bg));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

button {
  cursor: pointer;
}

.shell {
  width: min(var(--content), calc(100% - (2 * var(--gutter))));
  margin: 0 auto;
}

.page {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.brand__text {
  display: grid;
  gap: 2px;
}

.brand__text strong {
  font-size: 1.02rem;
}

.brand__text span {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a,
.nav button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  transition: 180ms ease;
}

.nav a:hover,
.nav button:hover,
.nav a.is-active {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.button--primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 72%, var(--accent-warm) 28%));
  border-color: transparent;
  color: white;
  box-shadow: 0 14px 30px rgba(47, 128, 255, 0.24);
}

.button--ghost {
  background: var(--surface);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  font-weight: 700;
}

.hero {
  padding: 72px 0 40px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: end;
}

.hero h1,
.section-head h2,
.app-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 7vw, 5.8rem);
}

.hero p {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero__copy {
  display: grid;
  gap: 22px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg-elevated) 96%, transparent), var(--bg-elevated)),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -30% auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, var(--surface-glow), transparent 70%);
  pointer-events: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.stat {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
}

.stat strong {
  display: block;
  font-size: 1.55rem;
  margin-bottom: 4px;
}

.stat span {
  color: var(--muted);
  font-size: 0.88rem;
}

.section {
  padding: 90px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-head h2 {
  font-size: clamp(2.2rem, 5.4vw, 4.2rem);
  margin-bottom: 16px;
}

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

.featured-shell {
  display: grid;
  gap: 18px;
}

.featured-stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 96%, #eaf4ff);
  min-height: 520px;
}

.featured-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 1.08fr);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.featured-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.featured-media {
  position: relative;
  min-height: 100%;
  overflow: hidden;
}

.featured-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.08));
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-copy {
  display: grid;
  align-content: space-between;
  gap: 26px;
  padding: clamp(24px, 4vw, 46px);
}

.featured-copy h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.featured-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.74;
}

.meta-row,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.badge--accent {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
}

.badge--warm {
  color: var(--accent-warm);
  border-color: color-mix(in srgb, var(--accent-warm) 26%, var(--line));
}

.featured-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.featured-controls {
  display: flex;
  gap: 8px;
}

.featured-controls button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text);
}

.featured-dots {
  display: flex;
  gap: 8px;
}

.featured-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 42%, transparent);
}

.featured-dot.is-active {
  background: var(--accent);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filters button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.filters button.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: var(--accent-soft);
}

.feed-grid,
.mini-grid,
.similar-grid,
.admin-grid {
  display: grid;
  gap: 18px;
}

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

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

.app-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  transition: transform 180ms ease, border-color 180ms ease;
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.app-card__media {
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.app-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.app-card__header h3 {
  margin: 0 0 4px;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}

.app-card__header span {
  color: var(--muted);
  font-size: 0.9rem;
}

.app-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.value-grid,
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.value-card,
.editorial-card,
.form-card,
.detail-card,
.admin-card,
.notice-card {
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.value-card h3,
.editorial-card h3,
.detail-card h3,
.admin-card h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.value-card p,
.editorial-card p,
.detail-card p,
.notice-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.cta-panel {
  padding: clamp(24px, 4vw, 42px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 95%, transparent), transparent 55%),
    color-mix(in srgb, var(--bg-elevated) 92%, #eef6ff);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.cta-panel h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.cta-panel p {
  margin: 0;
  color: var(--muted);
  max-width: 54ch;
}

.page-hero {
  padding: 62px 0 28px;
}

.page-hero__grid,
.app-hero {
  display: grid;
  gap: 22px;
}

.page-hero__grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.86fr);
  align-items: start;
}

.page-hero h1,
.app-hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  margin-bottom: 16px;
}

.page-hero p,
.app-hero p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}

.app-hero__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 96%, #edf5ff);
  min-height: 380px;
}

.app-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}

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

.gallery-grid figure {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.gallery-grid img,
.gallery-grid video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-stack {
  display: grid;
  gap: 16px;
}

.link-stack {
  display: grid;
  gap: 10px;
}

.link-stack a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 96%, #eef5ff);
}

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

.field {
  display: grid;
  gap: 8px;
}

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

.field label {
  font-size: 0.9rem;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text);
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field__hint {
  color: var(--muted-strong);
  font-size: 0.84rem;
}

.checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
}

.flash {
  padding: 16px 18px;
  border-radius: 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.flash--success {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 34%, var(--line));
}

.flash--error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 32%, var(--line));
}

.admin-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: 320px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 104px;
  align-self: start;
}

.admin-list,
.submission-list {
  display: grid;
  gap: 14px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.92rem;
}

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

.admin-actions form {
  margin: 0;
}

.footer {
  padding: 30px 0 44px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.empty-state {
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.mobile-nav-toggle {
  display: none;
}

@media (max-width: 1100px) {
  .hero__grid,
  .featured-slide,
  .page-hero__grid,
  .detail-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .feed-grid,
  .mini-grid,
  .value-grid,
  .editorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-sidebar {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--text);
    align-items: center;
    justify-content: center;
  }

  .site-header.is-open .nav {
    display: grid;
    position: absolute;
    top: calc(100% + 10px);
    left: var(--gutter);
    right: var(--gutter);
    padding: 14px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    box-shadow: var(--shadow);
  }

  .site-header.is-open .nav a,
  .site-header.is-open .nav button {
    justify-content: flex-start;
  }

  .feed-grid,
  .mini-grid,
  .value-grid,
  .editorial-grid,
  .gallery-grid,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .featured-stage {
    min-height: 640px;
  }

  .cta-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 76px;
  }

  .section,
  .hero,
  .page-hero {
    padding: 68px 0 24px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 11vw, 4.2rem);
  }

  .section-head h2,
  .page-hero h1,
  .app-hero h1 {
    font-size: clamp(2rem, 9vw, 3.2rem);
  }

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

  .header-actions .button--ghost {
    display: none;
  }

  .featured-stage {
    min-height: 700px;
  }
}