@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #10142b;
  --muted: #596279;
  --subtle: #6c758c;
  --line: #e4e8f0;
  --surface: #fff;
  --surface-soft: #f6f7fb;
  --surface-blue: #eef1ff;
  --blue: #203df0;
  --blue-dark: #142bd1;
  --lime: #dfff47;
  --font: 'Geist', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 23px;
  --shadow: 0 12px 30px rgb(17 31 86 / 9%);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.58;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }

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

button { color: inherit; cursor: pointer; }

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

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

svg { display: block; flex-shrink: 0; }
svg:has(> use) { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

:where(input, textarea, select)::placeholder { color: #8490a7; }

::selection { background: var(--lime); color: var(--ink); }

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 215px minmax(0, 700px) 285px;
  align-items: start;
  gap: clamp(24px, 2.5vw, 38px);
  max-width: 1340px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 clamp(22px, 3vw, 40px);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  padding: 32px 20px 24px 0;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  margin: 0 0 41px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}

.brand-mark {
  display: grid;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  background: var(--blue);
  color: var(--lime);
}

.brand-mark svg { width: 24px; height: 24px; }

.brand-wordmark {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.14;
  white-space: nowrap;
}

.brand-wordmark small,
.brand-wordmark > :nth-child(2) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .09em;
  line-height: 1.1;
}

.brand-wordmark strong span { color: var(--blue); }

.side-nav { display: grid; gap: 6px; }

.nav-item {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  transition: color 160ms, background-color 160ms;
}

.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { background: var(--surface-soft); color: var(--blue); }
.nav-item[aria-current='page'] { background: var(--surface-blue); color: var(--blue); font-weight: 800; }

.btn,
.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  transition: color 160ms, background-color 160ms, border-color 160ms, box-shadow 160ms;
}

:where(.btn, .primary-button, .secondary-button) svg { width: 17px; height: 17px; }

.btn-primary,
.primary-button {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover,
.primary-button:hover { background: var(--blue-dark); }

.secondary-button { border-color: var(--line); background: #fff; }
.secondary-button:is(:hover, [aria-pressed='true']) { border-color: #b9c4f6; background: var(--surface-blue); color: var(--blue); }
:where(button, .btn):disabled { cursor: default; opacity: .58; }

.sidebar-compose {
  width: 100%;
  min-height: 47px;
  margin-top: 24px;
  box-shadow: 0 5px 12px rgb(32 61 240 / 16%);
}

.sidebar-footer {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.sidebar-footer > svg { width: 16px; height: 16px; margin-left: auto; color: var(--subtle); }
.sidebar-footer .avatar { width: 35px; height: 35px; flex-basis: 35px; }
.account-text { display: grid; min-width: 0; gap: 2px; font-size: 13px; line-height: 1.25; }
.account-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text small { color: var(--subtle); font-size: 11px; }

.main-column { min-width: 0; padding: 27px 0 50px; }

.top-bar {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 21px;
}

.top-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.2;
}

.mobile-brand { display: none; }
#view-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.search-box {
  display: flex;
  width: clamp(165px, 23vw, 260px);
  min-width: 0;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--subtle);
}

.search-box:focus-within { border-color: var(--blue); background: #fff; }
.search-box svg { width: 17px; height: 17px; }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 14px; outline: 0; }
.search-box input:focus-visible { outline: 0; }
.search-box button { display: grid; width: 24px; height: 27px; padding: 0; place-items: center; border: 0; background: none; color: var(--subtle); }
.search-box button:hover { color: var(--blue); }

.hero {
  position: relative;
  display: flex;
  min-height: 270px;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-lg);
  background: var(--blue);
  color: #fff;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: 59%;
  min-width: 0;
  padding: 28px 0 29px clamp(26px, 3vw, 40px);
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}

.hero-kicker svg { width: 15px; height: 15px; }

.hero-title {
  max-width: 12em;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.28;
  line-break: strict;
}

.hero-title em { color: var(--lime); font-style: normal; }

.hero-description {
  max-width: 19em;
  margin-top: 12px;
  color: #e6eaff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
}

.hero-cta {
  min-height: 42px;
  margin-top: 19px;
  border-radius: 9px;
  background: var(--lime);
  color: var(--ink);
}

.hero-cta:hover { background: #edff99; }
.hero-cta:focus-visible { outline-color: #fff; }

.hero-image {
  position: absolute;
  z-index: 1;
  inset: 0 0 0 53%;
  overflow: hidden;
  border-radius: 36% 0 0 28% / 100% 0 0 100%;
  background: #9fb2f4;
}

.hero-image img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 48%; }

.hero-graphic {
  position: absolute;
  z-index: 1;
  right: 40%;
  bottom: 6%;
  color: var(--lime);
  font-size: 43px;
  line-height: 1;
  transform: rotate(14deg);
  pointer-events: none;
}

.hero::before {
  position: absolute;
  right: 30%;
  bottom: -48%;
  width: 44%;
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 19%);
  border-radius: 50%;
  box-shadow: 0 0 0 17px rgb(255 255 255 / 6%), 0 0 0 36px rgb(255 255 255 / 4%);
  content: '';
  pointer-events: none;
}

.feed-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 27px 0 12px; }
.feed-heading h2 { font-size: 22px; font-weight: 800; letter-spacing: -.04em; line-height: 1.3; }
.feed-heading p { margin-top: 2px; color: var(--muted); font-size: 14px; }
.feed-compose { min-height: 36px; padding: 0 10px; border-color: #dbe2ff; background: var(--surface-blue); color: var(--blue); }
.feed-compose:hover { background: #dfe6ff; }
.feed-compose svg { width: 15px; height: 15px; }

.feed-tabs {
  display: flex;
  gap: 7px;
  margin-bottom: 15px;
  padding: 3px 0 6px;
  overflow: auto;
  scrollbar-width: thin;
}

.feed-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 160ms, background-color 160ms, border-color 160ms;
}

.feed-tab:hover { border-color: #c5cefa; color: var(--blue); }
.feed-tab:focus-visible { outline-offset: -2px; }
.feed-tab:is(.is-active, .active, [aria-current='true'], [aria-pressed='true'], [aria-selected='true']) {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.feed-tab[aria-pressed='true']:focus-visible { outline-color: #fff; }

#post-list { display: grid; gap: 13px; }

.post-card {
  min-width: 0;
  padding: 18px 20px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 160ms;
  scroll-margin-top: 20px;
}

.post-card:hover { border-color: #d4daea; }
.post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }

.avatar {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: #e6ebfd;
  color: #2842c3;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.avatar[data-tone='lavender'] { background: #eee7ff; color: #6544ab; }
.avatar[data-tone='peach'] { background: #ffe8d8; color: #8d4725; }
.avatar[data-tone='mint'] { background: #ddf5e4; color: #276c49; }
.avatar[data-tone='blue'] { background: #e3ebff; color: #2449b7; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.post-byline { min-width: 0; }
.post-author { font-size: 14px; font-weight: 800; line-height: 1.3; }
.post-meta { display: block; margin-top: 3px; color: var(--subtle); font-size: 11px; line-height: 1.35; }

.post-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--surface-blue);
  color: #273fc4;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
}

.post-category[data-category='progress'] { background: #e9f7e8; color: #285d37; }
.post-category[data-category='ask'] { background: #fff1dd; color: #7b4a17; }
.post-category[data-category='succession'] { background: #f2ebff; color: #614399; }
.post-title { font-size: 18px; font-weight: 800; letter-spacing: -.026em; line-height: 1.5; overflow-wrap: anywhere; }
.post-body { margin-top: 6px; color: #454d65; font-size: 16px; line-height: 1.72; overflow-wrap: anywhere; white-space: pre-line; }

.tag-row { display: flex; flex-wrap: wrap; gap: 5px 11px; margin-top: 10px; }
.tag { padding: 0; border: 0; background: transparent; color: #3149cc; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.tag:hover { text-decoration: underline; }

.post-image {
  width: 100%;
  max-height: 300px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 11px;
  background: var(--surface-soft);
  object-fit: cover;
}

.post-image img { width: 100%; max-height: 300px; object-fit: cover; }

.post-footer {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 15px;
  margin-top: 12px;
  padding-top: 6px;
  border-top: 1px solid #edf0f5;
}

.post-action {
  display: inline-flex;
  min-width: 32px;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 5px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 650;
}

.post-action svg { width: 16px; height: 16px; }
.post-action:is(:hover, [aria-pressed='true'], .is-active, .is-on) { background: var(--surface-blue); color: var(--blue); }

.post-join {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-blue);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.post-join svg { width: 14px; height: 14px; }
.post-join:hover { background: #e0e6ff; }
.post-join[aria-pressed='true'] { background: #ecf6ee; color: #23633e; }

.right-rail { display: grid; min-width: 0; gap: 20px; padding: 31px 0 25px; }
.rail-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.rail-heading h2 { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.rail-heading svg { width: 17px; height: 17px; }

.event-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

.event-visual {
  position: relative;
  display: flex;
  min-height: 112px;
  align-items: center;
  padding: 13px 18px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle at 82% 135%, #bee979 0 30%, transparent 30.4%), radial-gradient(circle at 96% 3%, #edff9e 0 30%, transparent 30.4%), var(--lime);
  color: var(--ink);
  font-weight: 800;
}

.event-visual > span { z-index: 1; font-size: 30px; font-weight: 800; letter-spacing: -.1em; line-height: .84; }
.event-dot { color: var(--blue); }
.event-visual > svg { position: absolute; right: -3px; bottom: -14px; width: 115px; max-width: 55%; color: var(--blue); transform: rotate(-10deg); }
.event-visual:has(img) { padding: 0; }
.event-visual img { width: 100%; height: 114px; object-fit: cover; }
.event-content { padding: 15px 15px 16px; }
.event-kicker { display: inline-block; margin-bottom: 5px; color: #3549c0; font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.event-content h3 { font-size: 16px; font-weight: 800; line-height: 1.48; }

.event-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.event-meta + .event-meta { margin-top: 4px; }
.event-meta svg { width: 14px; height: 14px; color: #5160a6; }

.event-button {
  display: inline-flex;
  width: 100%;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 13px;
  padding: 0 9px;
  border: 1px solid #dbe2ff;
  border-radius: 8px;
  background: var(--surface-blue);
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  transition: background-color 160ms;
}

.event-button:hover { background: #e1e7ff; }
.event-button svg { width: 14px; height: 14px; }

.topics-card { overflow: hidden; padding: 4px 13px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }

.topic-item {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.topic-item + .topic-item { border-top: 1px solid #edf0f5; }
.topic-item:hover .topic-text { color: var(--blue); }
.topic-item > svg { width: 14px; height: 14px; color: var(--subtle); }

.topic-index {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-blue);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.topic-text { flex: 1; color: var(--ink); font-size: 14px; font-weight: 750; overflow-wrap: anywhere; }
.topic-count { flex: 0 0 auto; color: var(--subtle); font-size: 10px; font-variant-numeric: tabular-nums; }

.right-footer { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 0 2px; color: var(--subtle); font-size: 10px; }
.right-footer button { padding: 0; border: 0; background: none; text-align: left; }
.right-footer :is(a, button):hover { color: var(--blue); }

.mobile-nav, .mobile-event { display: none; }

.inner-view { display: grid; gap: 19px; }
.view-heading { padding: 9px 0 7px; }
.view-heading h1, .view-heading h2, .section-heading { font-size: 25px; font-weight: 800; letter-spacing: -.045em; line-height: 1.3; }
.view-heading p { max-width: 42em; margin-top: 8px; color: var(--muted); font-size: 16px; line-height: 1.65; }

.challenge-card,
.activity-card,
.profile-card,
.empty-state {
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow-wrap: anywhere;
}

:where(.challenge-card, .activity-card, .profile-card) :is(h2, h3) { font-size: 16px; font-weight: 800; line-height: 1.5; }
:where(.challenge-card, .activity-card, .profile-card) p { margin-top: 5px; color: var(--muted); font-size: 16px; line-height: 1.65; }
:where(.challenge-card, .activity-card, .profile-card) + .section-heading { margin-top: 13px; }

.challenge-card { display: flex; flex-direction: column; align-items: flex-start; }

.challenge-icon {
  display: grid;
  width: 39px;
  height: 39px;
  margin-bottom: 11px;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-blue);
  color: var(--blue);
}

.challenge-icon svg { width: 21px; height: 21px; }
.challenge-icon[data-tone='lavender'] { background: #eee7ff; color: #6544ab; }
.challenge-icon[data-tone='peach'] { background: #ffe8d8; color: #8d4725; }
.challenge-icon[data-tone='mint'] { background: #ddf5e4; color: #276c49; }
.challenge-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 7px 0 9px; color: var(--subtle); font-size: 11px; font-weight: 700; }
.challenge-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.challenge-meta svg { width: 14px; height: 14px; }
.challenge-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 12px; }
.challenge-actions :is(.primary-button, .secondary-button) { min-height: 37px; }
.deck-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.deck-position { color: var(--subtle); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.challenge-deck .challenge-card { touch-action: pan-y pinch-zoom; min-height: 280px; padding: clamp(18px, 3.5vw, 31px); border: 1px solid #dde4fc; background: radial-gradient(circle at right top, #e8edff, transparent 64%), #fff; }
.challenge-deck .challenge-card :is(h2, h3) { font-size: clamp(20px, 3vw, 28px); letter-spacing: -.045em; }
.challenge-deck .challenge-actions { padding-top: 16px; }
.activity-card { display: flex; align-items: center; gap: 12px; }
.activity-card .challenge-icon { flex: 0 0 39px; margin: 0; }
.activity-card .post-meta { margin: 0; font-size: 11px; }
.activity-card .secondary-button { min-height: 35px; margin-top: 6px; }
.activity-card + .activity-card { margin-top: 9px; }
.profile-card + .profile-card { margin-top: 12px; }
.profile-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.profile-card :is(.primary-button, .secondary-button) { margin-top: 12px; }
.profile-card dl { display: flex; flex: 0 0 100%; flex-wrap: wrap; gap: 18px; margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.profile-card dl div { display: flex; align-items: center; gap: 5px; }
.profile-card dt { color: var(--muted); font-size: 12px; }
.profile-card dd { margin: 0; color: var(--ink); font-weight: 800; }
.section-heading { margin: 16px 0 9px; }
.section-heading h2 { font-size: 17px; }
.profile-post-list { display: grid; gap: 10px; }
.search-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.search-summary button { min-height: 34px; }

.empty-state {
  display: grid;
  min-height: 120px;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border-style: dashed;
  background: #fafbfe;
  color: var(--muted);
  text-align: center;
}

.empty-state :is(h2, h3, strong) { color: var(--ink); font-size: 15px; }
.empty-state svg { width: 22px; height: 22px; color: var(--blue); }

body:has(#app-dialog[open]) { overflow: hidden; }

#app-dialog {
  width: min(100% - 36px, 535px);
  max-height: min(85vh, 690px);
  max-height: min(85dvh, 690px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 25px 120px rgb(21 29 64 / 28%);
  overscroll-behavior: contain;
}

#app-dialog::backdrop { background: rgb(14 20 49 / 53%); backdrop-filter: blur(2px); }
#dialog-body { padding: 21px 24px 24px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.dialog-header :is(h1, h2, h3) { font-size: 22px; font-weight: 800; line-height: 1.35; letter-spacing: -.035em; }

.dialog-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 23px;
  line-height: 1;
}

.dialog-close:hover { background: var(--surface-blue); color: var(--blue); }
.dialog-close svg { width: 19px; height: 19px; }
.dialog-content { display: grid; gap: 12px; color: var(--muted); line-height: 1.75; overflow-wrap: anywhere; }
.dialog-content :is(h2, h3, strong) { color: var(--ink); }
.dialog-content :is(ul, ol) { padding-left: 19px; }
.dialog-content .event-dialog-meta { display: flex; align-items: center; gap: 7px; color: var(--blue); font-weight: 700; }
.event-dialog-meta svg { width: 16px; height: 16px; }
.dialog-note { padding: 9px 11px; border-radius: 8px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.comment-list { display: grid; max-height: 220px; gap: 8px; overflow: auto; }
.comment-item { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; }
.comment-item p { font-size: 13px; white-space: pre-line; }
.dialog-form { display: grid; gap: 13px; }
.form-field { display: grid; gap: 5px; color: var(--ink); font-size: 14px; font-weight: 700; }
.form-field small { color: var(--subtle); font-size: 11px; font-weight: 500; }

.form-field :is(input, textarea, select):not([type='checkbox']) {
  display: block;
  width: 100%;
  min-height: 41px;
  padding: 9px 11px;
  border: 1px solid #dce1ed;
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}

.form-field textarea { min-height: 90px; resize: vertical; }
.form-field :is(input, textarea, select):focus-visible { border-color: var(--blue); outline-offset: 0; }
.form-field:has(input[type='checkbox']) { display: flex; align-items: flex-start; }
.form-field input[type='checkbox'] { accent-color: var(--blue); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }

#toast {
  position: fixed;
  z-index: 10;
  inset: auto;
  right: clamp(15px, 3vw, 36px);
  margin: 0;
  border: 0;
  bottom: 23px;
  max-width: min(360px, 100% - 30px);
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 650;
}

#toast:empty { display: none; }

/* ── 共有機能：ログイン・参加希望・状態表示 ── */
.nav-badge {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  margin-left: auto;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #d92d3a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.feed-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 11px 13px;
  border: 1px solid #dce4ff;
  border-radius: 12px;
  background: #f7f8ff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.feed-status svg { width: 17px; height: 17px; color: var(--blue); }
.feed-status span { flex: 1; min-width: 12em; }
.feed-status.is-error { border-color: #f3c7c9; background: #fff6f6; color: #8f2d31; }
.feed-status .secondary-button { min-height: 34px; }

.feed-divider { margin-top: 10px; padding-top: 16px; border-top: 1px dashed #d4daea; }
.feed-divider h2 { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.feed-divider p { margin-top: 1px; color: var(--subtle); font-size: 12px; }
.post-card[data-sample] { background: #fcfcfe; }

.join-new { padding: 1px 6px; border-radius: 999px; background: #d92d3a; color: #fff; font-size: 10px; }
.post-join[data-status='accepted'] { background: #e7f6ec; color: #1f6a3d; }
.post-join[data-status='declined'] { background: var(--surface-soft); color: var(--muted); }

.status-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff1dd;
  color: #7b4a17;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.status-chip[data-status='accepted'] { background: #e7f6ec; color: #1f6a3d; }
.status-chip[data-status='declined'] { background: var(--surface-soft); color: var(--muted); }

.request-card {
  display: grid;
  min-width: 0;
  gap: 9px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow-wrap: anywhere;
}

.request-card > header { display: flex; align-items: center; gap: 10px; }
.request-card > header > div { display: grid; min-width: 0; }
.request-card > header strong { color: var(--ink); font-size: 14px; font-weight: 800; line-height: 1.4; }
.request-card .post-meta { margin-top: 1px; }
.request-card .challenge-icon { flex: 0 0 39px; margin: 0; }
.request-post { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.request-post svg { width: 14px; height: 14px; color: var(--blue); }
.request-message { padding: 10px 12px; border-radius: 10px; background: var(--surface-soft); color: var(--ink); font-size: 15px; line-height: 1.65; white-space: pre-line; }
.request-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.request-actions :is(.primary-button, .secondary-button) { min-height: 36px; }
.request-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.request-summary .status-chip { margin-left: 0; }

.danger-button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid #f1c4c6;
  border-radius: 10px;
  background: #fff;
  color: #b42318;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  transition: background-color 160ms, border-color 160ms;
}

.danger-button:hover { border-color: #e79a9e; background: #fff1f1; }
.push-left { margin-right: auto; }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button.is-danger { color: #b42318; }
.dialog-actions .link-button { align-self: center; margin-right: auto; }
.account-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }

.auth-switch { display: flex; gap: 6px; }
.auth-switch .feed-tab { flex: 1; min-height: 38px; }

.form-check { gap: 9px; font-size: 13px; font-weight: 500; line-height: 1.6; }
.form-check input { width: 18px; height: 18px; flex: 0 0 18px; margin: 2px 0 0; }
.form-check small { display: block; margin-top: 2px; }
.form-error { padding: 9px 11px; border-radius: 8px; background: #fff1f1; color: #b42318; font-size: 13px; font-weight: 700; }

.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.comment-head .post-meta { margin: 0; }
.comment-head .link-button { margin-left: auto; font-size: 12px; }
.section-note { margin: -4px 0 9px; color: var(--muted); font-size: 13px; }
.legacy-card { align-items: flex-start; }
.legacy-card p:not(.post-meta) { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 187px minmax(0, 1fr) 244px; gap: 22px; }
  .sidebar { padding-right: 15px; }
  .hero-copy { padding-left: 27px; }
}

@media (max-width: 1000px) {
  .app-shell { max-width: 890px; grid-template-columns: 176px minmax(0, 1fr); gap: 27px; }
  .right-rail { display: none; }
  .mobile-event { display: flex; align-items: center; gap: 9px; margin-top: 11px; padding: 8px 9px; border: 1px solid #dce4ff; border-radius: 10px; background: #f7f8ff; }
  .mobile-event > svg { width: 23px; height: 23px; margin: 0 2px; color: var(--blue); }
  .mobile-event > div { display: grid; flex: 1; gap: 1px; min-width: 0; }
  .mobile-event-title { font-size: 14px; font-weight: 800; }
  .mobile-event small { color: var(--muted); font-size: 10px; }
  .mobile-event > .btn { flex-shrink: 0; min-height: 35px; padding: 0 9px; color: var(--blue); border-color: #dce4ff; background: #fff; font-size: 13px; }
  .mobile-event > .btn:hover { background: var(--surface-blue); }
}

@media (max-width: 720px) {
  .app-shell { display: block; max-width: 600px; padding: 0 16px calc(69px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .main-column { padding-top: 17px; }
  .top-bar { min-height: 39px; gap: 12px; margin-bottom: 15px; }
  .top-title { font-size: 21px; }
  .mobile-brand { display: inline-grid; width: 25px; height: 26px; flex: 0 0 25px; place-content: center; border-radius: 7px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 800; line-height: 1; }
  .mobile-brand span { display: none; }
  .search-box { width: min(52vw, 236px); min-height: 38px; }
  .search-box input { font-size: 16px; }
  .search-box input::placeholder { font-size: 13px; }
  .hero { min-height: 239px; border-radius: 18px; }
  .hero-copy { width: 62%; padding-left: 22px; }
  .hero-title { font-size: clamp(24px, 5.2vw, 33px); }
  .hero-description { max-width: 18em; }
  .feed-heading { margin-top: 23px; }
  .feed-heading h2 { font-size: 19px; }
  .post-card { padding: 14px 15px 9px; }
  .mobile-nav {
    position: fixed;
    z-index: 8;
    inset: auto 0 0;
    display: flex;
    justify-content: space-around;
    gap: 1px;
    padding: 5px 7px calc(4px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 -5px 25px rgb(29 45 105 / 6%);
  }
  .mobile-nav :is(button, a) {
    display: flex;
    min-width: 0;
    min-height: 48px;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--subtle);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
  }
  .mobile-nav :is(button, a) svg { width: 20px; height: 20px; }
  .mobile-nav :is(button, a)[aria-current='page'] { background: var(--surface-blue); color: var(--blue); font-weight: 800; }
  .mobile-nav :is(button, a):hover { color: var(--blue); }
  .mobile-nav .mobile-compose { color: var(--blue); }
  .mobile-nav button { position: relative; }
  .mobile-nav .nav-badge { position: absolute; top: 2px; left: calc(50% + 5px); min-width: 17px; height: 17px; margin: 0; padding: 0 4px; font-size: 10px; }
  .mobile-nav .mobile-compose svg { width: 25px; height: 25px; padding: 4px; border-radius: 7px; background: var(--blue); color: #fff; }
  #toast { bottom: calc(66px + env(safe-area-inset-bottom)); }
}

@media (max-width: 470px) {
  .hero { display: block; }
  .hero-copy { width: 100%; padding: 22px 18px 20px; }
  .hero-kicker { margin-bottom: 8px; }
  .hero-title { max-width: none; font-size: 26px; }
  .hero-description { max-width: 100%; margin-top: 9px; }
  .hero-cta { min-height: 39px; margin-top: 13px; }
  .hero-image { position: relative; inset: auto; width: 100%; height: 116px; border-radius: 0; }
  .hero-image img { object-position: center 48%; }
  .hero-graphic { right: 7%; bottom: 116px; font-size: 38px; }
  .hero::before { right: -12%; bottom: 16%; width: 72%; }
  .feed-heading { flex-wrap: wrap; gap: 4px; }
  .feed-tabs { margin-bottom: 10px; }
  .post-footer { gap: 8px; }
  .post-title { font-size: 16px; }
  #dialog-body { padding: 18px; }
  .form-field :is(input, textarea, select):not([type='checkbox']) { font-size: 16px; }
}

@media (max-width: 360px) {
  .top-title { gap: 6px; font-size: 17px; }
  .search-box { width: 44vw; gap: 6px; padding: 0 7px; }
}

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