:root {
  color-scheme: dark;
  --paper: #101411;
  --paper-cool: #101411;
  --panel: #171c18;
  --ink: #e9eee9;
  --muted: #a6afa7;
  --line: rgba(194, 214, 199, 0.18);
  --line-strong: rgba(194, 214, 199, 0.38);
  --mint: #233b31;
  --blue: #222f39;
  --rose: #392827;
  --button: #386f5b;
  --button-ink: #ffffff;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Sans", "Meiryo", system-ui, sans-serif;
  line-height: 1.7;
  background: var(--paper);
}

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

button,
input,
textarea {
  font: inherit;
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px max(16px, calc((100vw - 1040px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(16, 20, 17, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  font-weight: 800;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topbar nav a,
.soft-button,
.ghost-button,
.answer-share,
.send-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 8px 12px;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.topbar nav a:hover,
.topbar nav a:focus-visible,
.soft-button:hover,
.soft-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible,
.answer-share:hover,
.answer-share:focus-visible,
.send-button:hover,
.send-button:focus-visible {
  border-color: var(--line-strong);
  outline: none;
  transform: none;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.notice {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.notice p {
  margin-bottom: 0;
}

.notice.is-success {
  border-color: rgba(47, 111, 100, 0.42);
}

.notice.is-error {
  border-color: rgba(163, 77, 77, 0.42);
}

.ask-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1fr);
  gap: 26px;
  align-items: start;
  min-height: calc(100vh - 154px);
}

.intro {
  padding-top: 18px;
}

.kicker {
  margin-bottom: 10px;
  color: #477e75;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 16px;
  font-size: 2.8rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 1.05rem;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.soft-button {
  border-color: rgba(47, 111, 100, 0.24);
  background: var(--button);
  color: var(--button-ink);
  font-weight: 800;
}

.ghost-button,
.answer-share {
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

.bird {
  width: min(220px, 70%);
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.ask-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 800;
}

.field textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #0e120f;
  color: var(--ink);
  line-height: 1.75;
  font-weight: 500;
}

.field textarea:focus {
  outline: 2px solid rgba(47, 111, 100, 0.18);
  border-color: var(--button);
}

.field small {
  justify-self: end;
  color: var(--muted);
  font-weight: 500;
}

.topic-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  border: 0;
  padding: 0;
}

.topic-options legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-weight: 800;
}

.topic-options label {
  min-width: 0;
}

.topic-options input {
  position: absolute;
  opacity: 0;
}

.topic-options span {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121713;
  color: var(--muted);
  cursor: pointer;
}

.topic-options input:checked + span {
  border-color: rgba(47, 111, 100, 0.46);
  background: var(--mint);
  color: var(--ink);
  font-weight: 800;
}

.topic-options input:focus-visible + span {
  outline: 2px solid rgba(47, 111, 100, 0.22);
}

.send-button {
  width: 100%;
  border-color: rgba(47, 111, 100, 0.46);
  background: var(--button);
  color: var(--button-ink);
  font-weight: 800;
  cursor: pointer;
}

.form-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.answers-section {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 14px;
}

.section-head h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
  line-height: 1.3;
}

.answer-list {
  display: grid;
  gap: 14px;
}

.answer-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(48, 72, 67, 0.08);
}

.answer-card h3 {
  margin-bottom: 12px;
  font-size: 1.1rem;
  line-height: 1.5;
}

.answer-card p {
  color: var(--muted);
}

.answer-id {
  margin-bottom: 6px;
  color: #477e75;
  font-size: 0.85rem;
  font-weight: 800;
}

.answer-share {
  margin-top: 8px;
  font-size: 0.94rem;
}

.empty {
  margin-bottom: 0;
  color: var(--muted);
}

.footer {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

@media (max-width: 800px) {
  .topbar {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar nav {
    justify-content: flex-start;
  }

  .ask-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .topbar nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .topbar nav a { flex: 0 0 auto; }

  h1 {
    font-size: 2.45rem;
  }

  .bird {
    width: 150px;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 22px, 1040px);
  }

  .ask-form {
    margin-inline: -11px;
    padding: 16px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .topic-options {
    grid-template-columns: 1fr;
  }
}

/* Question box: one form, not a landing-page card composition. */
.topbar { position: relative; padding-top: 14px; padding-bottom: 14px; backdrop-filter: none; background: var(--paper); }
.topbar nav { gap: 18px; }
.topbar nav a { min-height: auto; padding: 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; }
.topbar nav a:hover { border-bottom-color: var(--line-strong); }
.shell { padding-top: 36px; }
.ask-layout { grid-template-columns: minmax(240px, 0.65fr) minmax(360px, 1fr); gap: 52px; }
.ask-form { padding: 0; border: 0; border-radius: 0; background: transparent; }
.soft-button,
.ghost-button,
.answer-share,
.send-button { border-radius: 0; }
.soft-button,
.ghost-button { background: transparent; color: var(--ink); }
.bird { border: 0; border-radius: 0; }
.field textarea { border-radius: 0; background: transparent; }
.topic-options span { border-radius: 0; background: transparent; }
.send-button { width: auto; min-width: 140px; }
.answer-list { gap: 0; border-top: 1px solid var(--line); }
.answer-card { padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }

@media (max-width: 800px) {
  .shell { padding-top: 24px; }
  .ask-layout { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 520px) {
  .ask-form { margin-inline: 0; padding: 0; }
  .topic-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .send-button { width: 100%; }
}
