:root {
  --bg: #0a0a0a;
  --ink: #e6e6e6;
  --ink-soft: #8a8a8a;
  --line: #2a2a2a;
  --glow: #f0c27a;
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-sans);
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

::selection {
  background: var(--glow);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #e6e6e64d;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--glow);
  text-decoration-color: var(--glow);
}

a:focus-visible {
  outline: 1px solid var(--glow);
  outline-offset: 3px;
}

.muted {
  color: var(--ink-soft);
}

.postcard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1500px;
}

.scene {
  height: 100vh;
  overflow: hidden;
  position: sticky;
  top: 0;
  background: #0a0a0a;
}

.scene-canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
}

.mail {
  display: flex;
  flex-direction: column;
  font-size: 0.9375rem;
  justify-content: center;
  line-height: 1.6;
  max-width: 560px;
  min-height: 100vh;
  padding: 7vh 56px 7vh 16px;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}

.tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: -1px;
  padding: 8px 12px 10px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  color: var(--glow);
  border-bottom-color: var(--glow);
}

.tab:focus-visible {
  outline: 1px solid var(--glow);
  outline-offset: 3px;
}

.panel[hidden] {
  display: none;
}

.subject {
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 20px;
}

.sender {
  align-items: center;
  display: flex;
  font-size: 0.875rem;
  gap: 12px;
  line-height: 1.4;
  margin-bottom: 24px;
}

.avatar {
  flex-shrink: 0;
  height: 36px;
  width: 36px;
  border-radius: 50%;
  background: #111;
  object-fit: cover;
}

.sender-info {
  flex: 1 1;
  min-width: 0;
}

.sender-info strong {
  font-weight: 600;
}

.sent {
  align-self: flex-start;
  flex-shrink: 0;
  font-size: 0.8125rem;
}

.body p + p {
  margin-top: 14px;
}

.lead {
  margin-bottom: 24px;
  font-size: 0.9375rem;
}

.signature {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.55;
  margin-top: 22px;
}

.body .signature p + p {
  margin-top: 0;
}

.signature-name {
  color: var(--ink);
}

.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.list-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.list-item.empty {
  border-bottom: none;
  padding-left: 0;
}

.list-item a {
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.list-item a:hover .list-title {
  color: var(--glow);
}

.list-title {
  transition: color 0.2s ease;
}

.list-meta {
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
}

.chip {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
  width: 36px;
}

.chip:hover,
.chip:focus-visible {
  border-color: var(--glow);
  color: var(--glow);
  text-decoration: none;
}

/* Medium-style reading pages */
.article-page {
  padding: 0 24px 80px;
}

.article-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 680px;
  padding: 28px 0 8px;
}

.article-brand,
.article-nav {
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.article-brand:hover,
.article-nav:hover {
  color: var(--glow);
  text-decoration: none;
}

.article {
  margin: 0 auto;
  max-width: 680px;
  padding-top: 48px;
}

.article-kicker {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.article-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 28px;
}

.article-byline {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  margin-bottom: 36px;
  padding-bottom: 24px;
}

.article-byline strong {
  font-weight: 600;
}

.article-body {
  font-size: 1.125rem;
  line-height: 1.75;
}

.article-body p + p {
  margin-top: 1.35em;
}

.article-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-top: 24px;
}

.article-footer a {
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.article-footer a:hover {
  color: var(--glow);
}

@media (max-width: 900px) {
  .postcard {
    display: block;
  }

  .scene {
    height: 42vh;
    height: 42svh;
    margin-bottom: -4vh;
    position: relative;
  }

  .mail {
    position: relative;
    max-width: 600px;
    min-height: 0;
    padding: 16px 20px 72px;
  }

  .article {
    padding-top: 28px;
  }
}
