:root {
  --ink: #0b2438;
  --ink-soft: #1a3a52;
  --sea: #0f6e63;
  --sea-bright: #1a9a88;
  --foam: #dff3ee;
  --sand: #f4f7fa;
  --coral: #d94f3d;
  --coral-deep: #b83c2d;
  --line: rgba(11, 36, 56, 0.12);
  --glow: rgba(26, 154, 136, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
  background:
    radial-gradient(ellipse 90% 60% at 10% -10%, rgba(26, 154, 136, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 5%, rgba(11, 36, 56, 0.14), transparent 50%),
    linear-gradient(165deg, #f7fafc 0%, #eef5f8 45%, #e6f2ef 100%);
  background-attachment: fixed;
}

.wrap {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.brand {
  font-family: Outfit, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.brand-lg {
  font-size: clamp(2.75rem, 7vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.top { margin-bottom: 1.5rem; }
.center-text { text-align: center; }

.site-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.site-top .brand a {
  color: inherit;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
}

.site-nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav-link:hover {
  color: var(--sea);
}

.site-nav-cta {
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
}

.page-intro {
  margin: 0 0 1.25rem;
}

.page-intro h1 {
  margin: 0 0 0.4rem;
}

.hero-cta {
  margin: 1.25rem 0 0;
}

.create-dialog {
  width: min(420px, calc(100% - 2rem));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 251, 0.94));
  box-shadow: 0 28px 64px rgba(11, 36, 56, 0.28);
  color: var(--ink);
}

.create-dialog::backdrop {
  background: rgba(11, 36, 56, 0.42);
  backdrop-filter: blur(4px);
  animation: create-backdrop-in 0.2s ease-out;
}

.create-dialog[open] {
  animation: create-dialog-in 0.22s ease-out;
}

@keyframes create-dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes create-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.create-dialog-form {
  padding: 1.25rem 1.35rem 1.4rem;
}

.create-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.create-dialog-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.create-dialog-close {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  background: rgba(11, 36, 56, 0.06);
  color: var(--ink-soft);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.create-dialog-close:hover {
  background: rgba(11, 36, 56, 0.1);
  color: var(--ink);
}

.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 0.5rem 0 1.5rem;
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr 0.95fr; }
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.35;
}

.lead, .muted {
  color: var(--ink-soft);
  line-height: 1.7;
}

.create, .panel, .section {
  display: grid;
  gap: 0.9rem;
}

.create label,
.panel label,
.section label,
form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.72);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font: inherit;
  color: var(--ink);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--sea-bright);
  box-shadow: 0 0 0 4px var(--glow);
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 14px;
  padding: 0.9rem 1.25rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.turnstile-slot {
  display: flex;
  justify-content: center;
  margin: 0.35rem 0 0.15rem;
  min-height: 65px;
}
.turnstile-slot:empty {
  min-height: 0;
  margin: 0;
}
.btn.btn-primary {
  background: linear-gradient(135deg, var(--sea), var(--sea-bright));
  color: #fff;
  -webkit-text-fill-color: #fff;
  box-shadow: 0 10px 28px rgba(15, 110, 99, 0.28);
}
.btn.btn-secondary {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
}
.btn.btn-danger {
  background: rgba(217, 79, 61, 0.1);
  color: var(--coral-deep);
  -webkit-text-fill-color: var(--coral-deep);
  border: 1px solid rgba(217, 79, 61, 0.22);
}
.btn.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  -webkit-text-fill-color: var(--ink-soft);
}
.wide { width: 100%; }

.panel, .q-item {
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border-radius: 22px;
  padding: 1.25rem;
}

.center { text-align: center; }

.features {
  display: grid;
  gap: 1.5rem;
  margin: 0.5rem 0 0;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 800px) {
  .features { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
}

.features h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.features p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

.hero-art svg {
  width: 100%;
  max-width: 420px;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 24px 50px rgba(11,36,56,0.18));
}

.section {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.section h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.q-list, .block-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.q-body {
  white-space: pre-wrap;
  line-height: 1.7;
  margin: 0.5rem 0;
}

.home-policy-note {
  margin: 1.5rem 0 0;
  font-size: 0.92rem;
}

.home-policy-note a {
  color: var(--sea);
  font-weight: 600;
}

/* トップを1画面に収める */
body.home {
  height: 100dvh;
  overflow: hidden;
}

body.home .wrap-home {
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100% - 2rem));
  height: 100dvh;
  max-height: 100dvh;
  padding: 1rem 0 0.65rem;
  overflow: hidden;
}

body.home .site-top {
  margin-bottom: 0;
  flex-shrink: 0;
}

body.home .site-top .brand {
  font-size: 1.05rem;
  font-weight: 700;
  opacity: 0.72;
}

body.home .site-nav-link {
  font-size: 0.92rem;
}

body.home .hero {
  flex: 1 1 auto;
  min-height: 0;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 0.25rem 0;
  align-content: center;
  align-items: center;
}

body.home .hero-copy {
  animation: home-copy-in 0.55s ease-out both;
}

body.home .brand-lg {
  font-size: clamp(3rem, 7vw, 4.4rem);
  margin-bottom: 0.7rem;
  color: var(--ink);
}

body.home .hero h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.25rem, 2.8vw, 1.85rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

body.home .lead {
  margin: 0;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.7;
  max-width: 30rem;
  color: var(--ink-soft);
}

body.home .hero-actions {
  margin-top: 1.4rem;
  display: grid;
  gap: 0.85rem;
  justify-items: start;
}

body.home .hero-create {
  min-width: 12.5rem;
  padding: 1rem 1.5rem;
  font-size: 1.02rem;
}

body.home .home-policy-note {
  margin: 0;
  font-size: 0.84rem;
  text-align: left;
  line-height: 1.5;
}

body.home .hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  animation: home-art-in 0.7s ease-out both;
}

body.home .hero-art-glow {
  position: absolute;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 154, 136, 0.28), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
}

body.home .hero-art svg {
  position: relative;
  width: auto;
  max-width: min(440px, 100%);
  max-height: min(48vh, 400px);
  filter: drop-shadow(0 22px 40px rgba(11, 36, 56, 0.18));
  animation: home-art-float 5.5s ease-in-out infinite;
}

body.home .site-footer {
  flex-shrink: 0;
  margin-top: 0;
}

@keyframes home-copy-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes home-art-in {
  from {
    opacity: 0;
    transform: translateX(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes home-art-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 899px) {
  body.home .hero {
    align-content: center;
    padding-top: 0.5rem;
  }

  body.home .hero-art {
    display: none;
  }

  body.home .brand-lg {
    font-size: clamp(2.6rem, 12vw, 3.4rem);
  }

  body.home .hero-break {
    display: none;
  }

  body.home .lead {
    font-size: 0.95rem;
  }

  body.home .hero-create {
    width: 100%;
    max-width: 20rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home .hero-copy,
  body.home .hero-art,
  body.home .hero-art svg {
    animation: none;
  }
}

.history-inline-note {
  margin: 1.25rem 0 0;
  font-size: 0.92rem;
}

.history-box-label {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.history-box-label a {
  color: var(--sea);
}

.ask-history .muted {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
}

.history-item {
  background: rgba(255, 255, 255, 0.45);
}

.answer-form,
.answer-block {
  margin: 0.75rem 0 1rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(223, 243, 238, 0.45);
  display: grid;
  gap: 0.65rem;
}

.answer-label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sea);
}

.answer-body {
  margin: 0;
}

.answer-note {
  margin: 0;
  font-size: 0.85rem;
}

.answer-form .warn {
  margin: 0;
  font-size: 0.9rem;
}

.share-block {
  margin: 0.75rem 0 1rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.4);
  display: grid;
  gap: 0.65rem;
}

.share-block .muted {
  margin: 0;
  font-size: 0.9rem;
}

.q-label {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sea);
}

.question-public .q-body {
  font-size: 1.05rem;
}

.badge-ok {
  background: rgba(15, 110, 99, 0.12);
  color: var(--sea);
}

.meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.row-actions, .actions, .block-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.block-list li {
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.5);
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sea);
  background: rgba(26, 154, 136, 0.12);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.error { color: var(--coral-deep); margin: 0; }
.ok { color: var(--sea); font-weight: 700; margin: 0; }
.warn {
  color: var(--coral-deep);
  background: rgba(217, 79, 61, 0.08);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

.notice {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(217, 79, 61, 0.25);
  background: rgba(217, 79, 61, 0.06);
  color: var(--ink-soft);
  display: grid;
  gap: 0.55rem;
}

.notice-title {
  margin: 0;
  color: var(--coral-deep);
  font-weight: 700;
}

.notice p,
.notice ul {
  margin: 0;
  line-height: 1.65;
  font-size: 0.95rem;
}

.notice ul {
  padding-left: 1.2rem;
}

.notice-foot {
  font-size: 0.88rem !important;
}

.notice a {
  color: var(--sea);
}

.flash {
  margin-bottom: 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
}

.url-block {
  display: grid;
  gap: 0.8rem;
}

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

.brand-sm {
  font-size: 1.15rem;
}

.site-footer {
  margin-top: 3rem;
  padding: 1.75rem 0 1.25rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.95rem;
  justify-items: center;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.75rem;
  justify-content: center;
}

.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-nav a:hover {
  color: var(--sea);
  text-decoration: underline;
}

.footer-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.legal {
  display: grid;
  gap: 1rem;
  max-width: 42rem;
  line-height: 1.8;
}

.legal h2 {
  margin: 1.25rem 0 0;
  font-size: 1.1rem;
}

.legal p,
.legal ul {
  margin: 0;
  color: var(--ink-soft);
}

.legal ul {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.legal a {
  color: var(--sea);
}

.guide-intro {
  margin-bottom: 0.85rem;
}

.guide-intro h1 {
  margin-bottom: 0.3rem;
  font-size: clamp(1.45rem, 5vw, 1.85rem);
}

.guide-intro .muted {
  font-size: 0.92rem;
  line-height: 1.55;
}

.guide-flow {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
  position: relative;
}

.guide-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(15, 110, 99, 0.12);
  box-shadow: 0 10px 28px rgba(11, 36, 56, 0.05);
  animation: guide-step-in 0.45s ease-out both;
}

.guide-step:nth-child(2) { animation-delay: 0.06s; }
.guide-step:nth-child(3) { animation-delay: 0.12s; }

.guide-step-num {
  margin: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: Outfit, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: linear-gradient(135deg, var(--sea), var(--sea-bright));
  box-shadow: 0 8px 18px rgba(15, 110, 99, 0.25);
  flex-shrink: 0;
}

.guide-step-body h2 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.guide-step-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.guide-warn {
  margin: 0 0 1.35rem;
}

.guide-block {
  margin: 0 0 1.1rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line);
}

.guide-block h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.guide-topics {
  display: grid;
  gap: 0.75rem;
}

.guide-topics h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.guide-topics p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.guide-topics a,
.guide-help a,
.guide-warn a {
  color: var(--sea);
  font-weight: 600;
}

.guide-help {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.guide-actions {
  margin: 0.25rem 0 0.5rem;
}

@keyframes guide-step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-step {
    animation: none;
  }
}

@media (min-width: 700px) {
  .guide-topics {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1.25rem;
  }
}

@media (min-width: 800px) {
  .guide-flow {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
  }

  .guide-step {
    position: relative;
  }

  .guide-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.85rem;
    right: -0.95rem;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid rgba(15, 110, 99, 0.35);
    border-top: 2px solid rgba(15, 110, 99, 0.35);
    transform: rotate(45deg);
  }
}

/* スマホ: 縦タイムライン（後勝ちでカード見た目を解除） */
@media (max-width: 799px) {
  .guide-flow {
    gap: 0;
    padding-left: 0.15rem;
  }

  .guide-step {
    position: relative;
    grid-template-columns: 2.35rem 1fr;
    gap: 0.7rem;
    padding: 0.55rem 0 0.95rem 0.15rem;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    align-items: start;
  }

  .guide-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 1.15rem;
    top: 2.45rem;
    bottom: 0.1rem;
    width: 2px;
    background: linear-gradient(
      180deg,
      rgba(15, 110, 99, 0.35),
      rgba(15, 110, 99, 0.12)
    );
  }

  .guide-step:not(:last-child)::after {
    content: none;
  }

  .guide-step-num {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 0.98rem;
    position: relative;
    z-index: 1;
  }

  .guide-step-body {
    padding-top: 0.15rem;
  }

  .guide-step-body h2 {
    margin: 0 0 0.25rem;
    font-size: 1.02rem;
  }

  .guide-step-body p {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .guide-warn {
    margin: 0.15rem 0 1rem;
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .guide-block {
    margin: 0 0 0.95rem;
    padding-top: 0.85rem;
  }

  .guide-topics {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .guide-topics h3 {
    font-size: 0.92rem;
  }

  .guide-topics p,
  .guide-help {
    font-size: 0.88rem;
  }

  .guide-actions {
    margin: 0.15rem 0 0.35rem;
  }

  .guide-actions .btn {
    width: 100%;
  }

  .page-intro {
    margin-bottom: 0.85rem;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(1100px, calc(100% - 1.25rem));
    padding: 1rem 0 2rem;
  }

  .site-top {
    gap: 0.5rem 0.75rem;
    margin-bottom: 1rem;
  }

  .site-nav {
    gap: 0.45rem 0.85rem;
  }

  .site-nav-link {
    font-size: 0.9rem;
    padding: 0.25rem 0;
  }

  .footer-nav {
    gap: 0.65rem 1.15rem;
  }
}

.create-actions {
  margin-top: 0.25rem;
}

.create {
  scroll-margin-top: 1.25rem;
}

.hero-copy .lead a {
  color: var(--sea);
  font-weight: 600;
}

.contact-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.fineprint {
  font-size: 0.85rem;
  margin: 0;
}

.fineprint a {
  color: var(--sea);
}
