:root {
  color-scheme: light dark;
  --bg: #fdfcf9;
  --surface: #ffffff;
  --surface-muted: #f5f1ea;
  --ink: #1a1a1a;
  --ink-soft: #4a4135;
  --ink-muted: #6b5d48;
  --border: #ded8ce;
  --border-strong: #bcae9c;
  --accent: #8b6f4e;
  --accent-hover: #5f452c;
  --dark: #171613;
  --dark-soft: #24211d;
  --on-dark: #fdfcf9;
  --on-dark-muted: #c7c0b5;
  --live: #166534;
  --live-bg: #e9f6ec;
  --upcoming: #72520d;
  --upcoming-bg: #fff4d6;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  --font-serif: "Tinos", "Times New Roman", "Hiragino Mincho ProN", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --width: 1120px;
}

:root[data-theme="dark"] {
  --bg: #171613;
  --surface: #211f1c;
  --surface-muted: #292620;
  --ink: #f5f2ec;
  --ink-soft: #d9d3c9;
  --ink-muted: #aaa196;
  --border: #3e3932;
  --border-strong: #655b50;
  --accent: #d4a574;
  --accent-hover: #efc291;
  --live: #a7e3b4;
  --live-bg: #1f3a28;
  --upcoming: #f1cf7d;
  --upcoming-bg: #403516;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #4ade80;
  outline-offset: 3px;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  background: var(--on-dark);
  color: var(--dark);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.content-width,
.header-inner,
.footer-inner {
  width: min(calc(100% - 80px), var(--width));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid #39342e;
  background: var(--dark);
  color: var(--on-dark);
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  color: var(--on-dark);
  text-decoration: none;
}

.brand:hover {
  color: var(--on-dark);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
}

.brand-copy span {
  margin-top: 4px;
  color: var(--on-dark-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.header-actions,
.site-nav,
.theme-control {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 28px;
}

.site-nav {
  gap: 24px;
}

.site-nav a {
  padding-block: 8px;
  color: var(--on-dark-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--on-dark);
}

.theme-control {
  padding: 2px;
  border: 1px solid #4b443d;
  border-radius: 6px;
  background: #0f0e0c;
}

.theme-control button {
  min-width: 38px;
  min-height: 34px;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--on-dark-muted);
  cursor: pointer;
  font-size: 12px;
}

.theme-control button[aria-pressed="true"] {
  background: #39342e;
  color: var(--on-dark);
}

.intro {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 500;
  line-height: 1.25;
}

.lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.85;
}

.catalog {
  padding: 72px 0 88px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 28px;
}

.section-heading h2,
.about-layout h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
}

.section-heading > p {
  max-width: 380px;
  margin: 0 0 3px;
  color: var(--ink-muted);
  font-size: 14px;
  text-align: right;
}

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

.app-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.app-visual {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: #e8edf0;
}

.app-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease-out;
}

.app-icon-field {
  display: grid;
  place-items: center;
  background: #eef4fa;
}

.app-icon-field img {
  width: 112px;
  height: 112px;
  border-radius: 20px;
}

.app-content {
  display: flex;
  min-height: 258px;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px 28px 28px;
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 700;
}

.status-upcoming {
  background: var(--upcoming-bg);
  color: var(--upcoming);
}

.app-content h3 {
  margin: 19px 0 10px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.45;
}

.app-content > p {
  margin: 0;
  color: var(--ink-soft);
}

.app-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: auto;
  padding-top: 24px;
  color: var(--accent-hover);
  font-weight: 700;
}

.app-link-disabled {
  color: var(--ink-muted);
}

.about-band {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.5fr);
  gap: 64px;
}

.about-copy {
  max-width: 690px;
  color: var(--ink-soft);
}

.about-copy p {
  margin: 0;
}

.about-copy p + p {
  margin-top: 20px;
}

.about-copy a {
  color: var(--accent-hover);
}

.site-footer {
  padding: 30px 0;
  background: var(--dark);
  color: var(--on-dark-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  font-size: 13px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner nav {
  display: flex;
  gap: 22px;
}

.footer-inner a {
  color: var(--on-dark-muted);
}

@media (hover: hover) {
  .app-card-published:hover {
    border-color: var(--border-strong);
  }

  .app-card-published:hover .app-visual img {
    transform: scale(1.015);
  }
}

@media (max-width: 1023px) {
  .content-width,
  .header-inner,
  .footer-inner {
    width: calc(100% - 64px);
  }

  .header-inner {
    align-items: flex-start;
    padding: 14px 0;
  }

  .header-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 10px;
  }

  .intro {
    padding: 58px 0 54px;
  }

  h1 {
    font-size: 42px;
  }

  .catalog {
    padding: 58px 0 72px;
  }

  .app-grid {
    gap: 18px;
  }

  .app-content {
    padding: 24px;
  }
}

@media (max-width: 719px) {
  .content-width,
  .header-inner,
  .footer-inner {
    width: calc(100% - 36px);
  }

  .header-inner,
  .header-actions,
  .section-heading,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .header-inner {
    gap: 14px;
  }

  .header-actions {
    gap: 12px;
  }

  .site-nav {
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #39342e;
  }

  .site-nav a {
    min-height: 42px;
    padding: 10px 0 6px;
  }

  .theme-control {
    align-self: flex-start;
  }

  .intro {
    padding: 44px 0 42px;
  }

  h1 {
    font-size: 36px;
  }

  .lead {
    margin-top: 18px;
    font-size: 16px;
  }

  .catalog {
    padding: 48px 0 58px;
  }

  .section-heading {
    gap: 12px;
  }

  .section-heading h2,
  .about-layout h2 {
    font-size: 25px;
  }

  .section-heading > p {
    max-width: none;
    text-align: left;
  }

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

  .app-grid {
    gap: 18px;
  }

  .app-content {
    min-height: 240px;
    padding: 22px 20px 24px;
  }

  .app-content h3 {
    font-size: 22px;
  }

  .about-band {
    padding: 48px 0;
  }

  .about-layout {
    gap: 22px;
  }

  .footer-inner {
    gap: 14px;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171613;
    --surface: #211f1c;
    --surface-muted: #292620;
    --ink: #f5f2ec;
    --ink-soft: #d9d3c9;
    --ink-muted: #aaa196;
    --border: #3e3932;
    --border-strong: #655b50;
    --accent: #d4a574;
    --accent-hover: #efc291;
    --live: #a7e3b4;
    --live-bg: #1f3a28;
    --upcoming: #f1cf7d;
    --upcoming-bg: #403516;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
