/* ============================================================================
   森田美優 / Miyu Morita — landing styles
   Mobile-first, responsive, light/dark aware. Works fully without JS; web
   components layer on top. Design intent: at-a-glance a polished personal
   landing (SNS grid), revealing a deep registration ledger + activity feed on
   scroll.
   ========================================================================== */

:root {
  --bg: #fbfaf8;
  --bg-elev: #ffffff;
  --bg-sunken: #f2efe9;
  --fg: #1d1b18;
  --fg-muted: #6b665d;
  --fg-faint: #938d82;
  --line: #e6e1d8;
  --accent: #c05a2e;
  --accent-soft: #f3e3da;
  --ok: #2f7d57;
  --warn: #b3791b;
  --bad: #b23a3a;
  --pending: #4a6da7;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(29, 27, 24, 0.05), 0 6px 24px rgba(29, 27, 24, 0.05);
  --maxw: 980px;
  --font: ui-sans-serif, system-ui, -apple-system, "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140f;
    --bg-elev: #201d16;
    --bg-sunken: #100e0a;
    --fg: #f1ede4;
    --fg-muted: #b3ab9c;
    --fg-faint: #837c6e;
    --line: #332f25;
    --accent: #e8855a;
    --accent-soft: #3a2a20;
    --ok: #6fc796;
    --warn: #e0b15a;
    --bad: #e57f7f;
    --pending: #8fa9d8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 30px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.section-heading {
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  letter-spacing: 0.01em;
  margin: 0 0 1rem;
}
.subsection-heading {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin: 0 0 0.85rem;
}

.empty {
  color: var(--fg-faint);
  font-style: italic;
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  background: radial-gradient(120% 120% at 80% -10%, var(--accent-soft), transparent 55%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 6rem) 20px clamp(2.2rem, 6vw, 4rem);
}
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--fg-faint);
  margin: 0 0 0.6rem;
}
.hero__name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 0.9rem;
  margin: 0;
  font-size: clamp(2.3rem, 8vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.hero__romaji {
  font-size: 0.42em;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}
.hero__tagline {
  margin: 1.1rem 0 0.2rem;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  max-width: 46ch;
}
.hero__sub {
  margin: 0;
  color: var(--fg-muted);
  max-width: 56ch;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 1.6rem;
}
.hero__chip {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  color: var(--fg-muted);
  box-shadow: var(--shadow);
}
.hero__chip strong {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.hero__cta {
  font-weight: 600;
}

/* ---- shared section spacing ---------------------------------------------- */
.sns,
.stats,
.depth {
  padding: clamp(2rem, 5vw, 3.4rem) 0;
}
.sns,
.stats {
  border-bottom: 1px solid var(--line);
}

/* ---- SNS grid (layer A) -------------------------------------------------- */
.sns__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.sns-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.sns-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--accent);
}
.sns-card__logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-sunken);
}
.sns-card__logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.sns-card__fallback {
  font-weight: 700;
  color: var(--accent);
}
.sns-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sns-card__service {
  font-weight: 600;
}
.sns-card__handle {
  font-size: 0.85rem;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sns-card__category {
  margin-left: auto;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-faint);
}

/* ---- stats bar ----------------------------------------------------------- */
.stats__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  margin: 0;
}
.stats__cell {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}
.stats__cell dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}
.stats__cell dd {
  margin: 0.15rem 0 0;
  font-size: 1.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stats__cell--active dd {
  color: var(--ok);
}
.stats__cell--total {
  background: var(--accent-soft);
  border-color: transparent;
}

/* ---- depth section (layer B) --------------------------------------------- */
.depth__lede {
  color: var(--fg-muted);
  margin: -0.4rem 0 1.6rem;
  max-width: 60ch;
}
.depth__grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .depth__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* ---- activity feed ------------------------------------------------------- */
.feed__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.feed__item {
  display: flex;
  gap: 0.65rem;
  padding: 0.6rem 0.2rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.feed__item.empty {
  border: 0;
  color: var(--fg-faint);
  font-style: italic;
}
.feed__logo {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  overflow: hidden;
  background: var(--bg-sunken);
  margin-top: 0.15rem;
}
.feed__logo img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.feed__logo-fallback {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
}
.feed__when {
  color: var(--fg-faint);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}
.feed__service {
  font-weight: 600;
}
.feed__summary {
  color: var(--fg-muted);
}

/* ---- account ledger ------------------------------------------------------ */
.ledger__controls {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.ledger__search {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: inherit;
  font: inherit;
}
.ledger__search:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.ledger__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--fg-muted);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.4;
}
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.ledger__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ledger__row {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
}
.ledger__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ledger__logo {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-sunken);
}
.ledger__logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.ledger__logo-fallback {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent);
}
.ledger__service {
  font-weight: 600;
}
.ledger__detail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--fg-muted);
}
.ledger__category {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
  color: var(--fg-faint);
}
.ledger__since,
.ledger__last {
  font-variant-numeric: tabular-nums;
}
.ledger__tags {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.tag {
  font-size: 0.7rem;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  color: var(--fg-muted);
}
.ledger__none {
  color: var(--fg-faint);
  font-style: italic;
}

/* status-pill custom element (light-DOM classes) */
status-pill {
  margin-left: auto;
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--fg-muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
status-pill[data-status="active"] {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 40%, var(--line));
}
status-pill[data-status="abandoned"],
status-pill[data-status="blocked"] {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 35%, var(--line));
}
status-pill[data-status="captcha-blocked"],
status-pill[data-status="human-needed"] {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 35%, var(--line));
}
status-pill[data-status="registering"],
status-pill[data-status="email-verify-pending"],
status-pill[data-status="phone-verify-pending"],
status-pill[data-status="discovered"] {
  color: var(--pending);
  border-color: color-mix(in srgb, var(--pending) 35%, var(--line));
}

/* ---- footer -------------------------------------------------------------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.4rem 20px 3rem;
  border-top: 1px solid var(--line);
  color: var(--fg-muted);
  font-size: 0.85rem;
}
.site-footer p {
  margin: 0.2rem 0;
}
.site-footer__note {
  color: var(--fg-faint);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .sns-card {
    transition: none;
  }
}
