/* rebase 公式サイト。色は管理画面（apps/web/app/globals.css）のトークンと揃える。 */
:root {
  --ground: #f7f6f2;
  --ink: #1f2421;
  --muted: #5c665f;
  --line: #e3e0d7;
  --brand: #0e6e68;
  --brand-dark: #0a514d;
  --brand-tint: #e3f0ee;
  --brand-line: #b9d8d4;
  --night: #14312e;
  --night-deep: #0c1f1c;
  --night-ink: #cfdcd9;
  --warn: #8a4207;
  --warn-tint: #fbeeda;
  --danger: #a3271f;
  --danger-tint: #fbe6e3;
  --sky-fg: #ffffff;
  --sky-sub: #cfdcd9;
  --font: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Noto Sans JP', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
}
[data-sky='morning'] {
  --sky-fg: #1f2421;
  --sky-sub: #47514b;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--brand-dark);
}
h1,
h2,
h3,
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid #f3c98b;
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}

/* 空：夜 → 明け方 → 朝。3 枚を重ねて不透明度で切り替える */
.backdrop,
.backdrop::before,
.backdrop::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: '';
  transition: opacity 0.9s ease;
}
.backdrop {
  background: linear-gradient(180deg, var(--night-deep), var(--night) 70%, #1b423d);
}
.backdrop::before {
  background: linear-gradient(180deg, #1d3f3a, #55604a 62%, #b98a54);
  opacity: 0;
}
.backdrop::after {
  background: linear-gradient(180deg, #cfe5e1, #f7f6f2 70%);
  opacity: 0;
}
[data-sky='dawn'] .backdrop::before {
  opacity: 1;
}
[data-sky='morning'] .backdrop::after {
  opacity: 1;
}

/* ヘッダー */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px max(16px, calc((100vw - 1120px) / 2));
  background: rgba(20, 49, 46, 0.94);
  backdrop-filter: blur(8px);
  color: #fff;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.02em;
  min-height: 44px;
}
.top-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.top-nav a {
  color: var(--night-ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 0 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}
.top-nav a:hover {
  color: #fff;
  background: #2a4a46;
}
.top-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
@media (max-width: 900px) {
  .top-nav {
    display: none;
  }
  .top-cta {
    margin-left: auto;
  }
}

/* 物語 */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
}
.story {
  min-width: 0;
}
.hero {
  min-height: calc(92vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 0;
  color: var(--sky-fg);
}
.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f3c98b;
}
.hero h1 {
  margin-top: 14px;
  font-size: clamp(30px, 4.1vw, 46px);
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.hero h1 em {
  font-style: normal;
  color: #9fd0ca;
}
.hero-lead {
  margin-top: 22px;
  max-width: 34em;
  color: var(--sky-sub);
  font-size: 17px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: #fff;
  color: var(--brand-dark);
}
.btn-primary:hover {
  background: var(--brand-tint);
}
.btn-ghost {
  border-color: #5d7a75;
  color: #fff;
}
.btn-ghost:hover {
  background: #2a4a46;
}
.btn-light {
  background: #fff;
  color: var(--brand-dark);
}
.hint {
  margin-top: 40px;
  font-size: 13px;
  color: var(--sky-sub);
}
.hint::before {
  content: '↓ ';
}
.scene {
  min-height: 86vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px 30px 26px;
  max-width: 560px;
  box-shadow: 0 18px 40px -24px rgba(12, 31, 28, 0.55);
}
.clock {
  font-family: var(--mono);
  font-size: 56px;
  line-height: 1;
  font-weight: 500;
  color: var(--brand);
  letter-spacing: -0.02em;
}
.clock-sm {
  font-size: 34px;
}
.when {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.card h2 {
  margin-top: 14px;
  font-size: 25px;
  line-height: 1.45;
  font-weight: 900;
}
.card h2 + p {
  margin-top: 12px;
  color: #3c443f;
}
.feat {
  margin-top: 16px;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-dark);
  background: var(--brand-tint);
  border-radius: 8px;
  padding: 3px 12px;
}

/* 端末 */
.stage {
  min-width: 0;
}
.phone-dock {
  position: sticky;
  top: 84px;
  height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone {
  width: 320px;
  height: min(640px, 100%);
  background: #0c1f1c;
  border-radius: 40px;
  padding: 10px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.screen {
  height: 100%;
  background: #eeece5;
  border-radius: 31px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.av {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  flex: none;
}
.av.line {
  background: var(--brand);
  color: #fff;
}
.nm {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}
.nm small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  color: var(--muted);
}
.chat {
  flex: 1;
  min-height: 0;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.55;
}
.m {
  max-width: 86%;
  animation: rise 0.45s ease both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.m .b {
  border-radius: 14px;
  padding: 8px 12px;
}
.m.guest {
  align-self: flex-start;
}
.m.guest .b {
  background: #fff;
  border: 1px solid var(--line);
}
.m.host,
.m.me {
  align-self: flex-end;
}
.m.host .b {
  background: var(--brand);
  color: #fff;
}
.m.me .b {
  background: var(--night);
  color: #fff;
}
.m .ja {
  margin-top: 3px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--muted);
}
.m .tag {
  margin-top: 3px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-dark);
  text-align: right;
}
.m.note {
  align-self: center;
  max-width: 96%;
  font-size: 11px;
  font-weight: 700;
  color: #47514b;
  background: #dcd8cc;
  border-radius: 999px;
  padding: 2px 12px;
  text-align: center;
}
.m.card-msg {
  align-self: flex-start;
  width: 94%;
  max-width: 94%;
  background: #fff;
  border: 1px solid #d6d2c6;
  border-radius: 14px;
  overflow: hidden;
}
.card-msg .strip {
  font-size: 11px;
  font-weight: 900;
  padding: 5px 12px;
}
.card-msg .strip.warn {
  background: var(--warn-tint);
  color: var(--warn);
}
.card-msg .strip.danger {
  background: var(--danger-tint);
  color: var(--danger);
}
.card-msg .strip.brand {
  background: var(--brand-tint);
  color: var(--brand-dark);
}
.card-msg .body {
  padding: 9px 12px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-msg .who {
  font-weight: 900;
  font-size: 13px;
}
.card-msg .who small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  color: var(--muted);
}
.card-msg .row {
  font-size: 12px;
  border-radius: 8px;
  padding: 6px 9px;
  background: var(--ground);
}
.card-msg .row.draft {
  background: #f1f8f7;
  border: 1px solid var(--brand-line);
}
.card-msg .row b {
  color: var(--brand-dark);
}
.card-msg dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  font-size: 12px;
}
.card-msg dt {
  color: var(--muted);
}
.card-msg dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}
.card-msg .btns {
  display: flex;
  gap: 6px;
}
.card-msg .btns span {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  padding: 6px 0;
  border: 1px solid #cfcbbf;
}
.card-msg .btns span.go {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.card-msg .btns span.pressed {
  box-shadow: 0 0 0 3px #f3c98b;
}
.inline-phone {
  display: none;
}

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .stage {
    display: none;
  }
  .hero {
    min-height: auto;
    padding: 56px 0 40px;
  }
  .scene {
    min-height: auto;
    padding: 28px 0;
    gap: 16px;
  }
  .card {
    padding: 24px 20px;
    max-width: none;
  }
  .clock {
    font-size: 44px;
  }
  .card h2 {
    font-size: 21px;
  }
  .inline-phone {
    display: block;
    background: #eeece5;
    border: 8px solid #0c1f1c;
    border-radius: 28px;
    overflow: hidden;
  }
  .inline-phone .chat {
    overflow: visible;
  }
  .inline-phone .m {
    animation: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .m {
    animation: none;
  }
  .backdrop,
  .backdrop::before,
  .backdrop::after {
    transition: none;
  }
}

/* 物語の終わり */
.story-end {
  padding: 72px 16px 96px;
  text-align: center;
  color: var(--ink);
}
.story-end .inner {
  max-width: 640px;
  margin: 0 auto;
}
.story-end h2 {
  margin-top: 10px;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  line-height: 1.4;
}
.story-end h2 + p {
  margin-top: 14px;
  color: #3c443f;
}
.note {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
}

/* セクション共通 */
.sec {
  background: var(--ground);
  padding: 88px 16px;
}
.sec-alt {
  background: #fff;
}
.inner {
  max-width: 1120px;
  margin: 0 auto;
}
.sec-head {
  max-width: 640px;
}
.sec-no {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-dark);
}
.sec-no span:first-child {
  font-family: var(--mono);
  font-size: 15px;
}
.sec h2 {
  margin-top: 10px;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.4;
  font-weight: 900;
}
.sec-lead {
  margin-top: 14px;
  color: #3c443f;
}

/* 管理画面 */
.admin {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.admin-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-tabs button {
  font: inherit;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--ink);
}
.admin-tabs button b {
  display: block;
  font-size: 16px;
}
.admin-tabs button span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.admin-tabs button[aria-selected='true'] {
  border-color: var(--brand);
  background: var(--brand-tint);
}
.browser {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 50px -34px rgba(12, 31, 28, 0.6);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #efede6;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.browser-bar i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cfcbbf;
}
.browser-bar span {
  margin-left: 10px;
}
.shot-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.more {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.more li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}
.more b {
  display: block;
  font-size: 15px;
}
.more span {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}

/* 安心設計 */
.principles {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.principles li {
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px;
}
.kanji {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--night);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
}
.principles h3 {
  margin-top: 14px;
  font-size: 19px;
  line-height: 1.5;
  font-weight: 900;
}
.principles p {
  margin-top: 8px;
  font-size: 15px;
  color: #3c443f;
}

/* 導入の流れ */
.steps {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.steps li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px;
}
.step-n {
  font-family: var(--mono);
  font-size: 30px;
  line-height: 1;
  color: var(--brand);
}
.steps h3 {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 900;
}
.steps p {
  margin-top: 6px;
  font-size: 14px;
  color: #3c443f;
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 36px 18px 0;
  min-height: 44px;
  font-weight: 700;
  font-size: 16px;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  position: absolute;
  right: 6px;
  top: 14px;
  font-family: var(--mono);
  font-size: 22px;
  color: var(--brand);
}
.faq details[open] summary::after {
  content: '−';
}
.faq details p {
  padding: 0 0 20px;
  font-size: 15px;
  color: #3c443f;
}

/* 導入相談 */
.contact {
  background: var(--night);
  color: #fff;
  padding: 88px 16px;
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.contact .clock {
  color: #9fd0ca;
}
.contact h2 {
  margin-top: 10px;
  font-size: clamp(26px, 3.8vw, 40px);
  line-height: 1.4;
  font-weight: 900;
}
.contact-copy p:last-child {
  margin-top: 16px;
  color: var(--night-ink);
}
.contact-box {
  background: #1b423d;
  border: 1px solid #2a4a46;
  border-radius: 20px;
  padding: 28px 26px;
}
.contact-box h3 {
  font-size: 19px;
  font-weight: 900;
}
.contact-box p {
  margin-top: 8px;
  color: var(--night-ink);
  font-size: 15px;
}
.contact-box .btn {
  margin-top: 18px;
}

/* フッター */
.foot {
  background: var(--night-deep);
  color: var(--night-ink);
  padding: 40px 16px;
  font-size: 14px;
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 40px;
  align-items: start;
}
.foot .logo {
  color: #fff;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  max-width: 420px;
}
.foot nav a {
  color: var(--night-ink);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
}
.foot nav a:hover {
  color: #fff;
  text-decoration: underline;
}
.copy {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #9db3ae;
}
@media (max-width: 900px) {
  .admin,
  .faq-grid,
  .contact-grid,
  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sec,
  .contact {
    padding: 64px 16px;
  }
}

/* 導入相談フォーム */
.form .field {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form .field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0 14px;
}
.form label {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.form label em {
  font-style: normal;
  font-size: 11px;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f3c98b;
  color: #3d2503;
}
.form input,
.form select,
.form textarea {
  font: inherit;
  font-size: 16px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #5d7a75;
  background: #14312e;
  color: #fff;
}
.form textarea {
  resize: vertical;
}
.form input::placeholder,
.form textarea::placeholder {
  color: #9db3ae;
}
.form .hp {
  position: absolute;
  left: -9999px;
}
.form .form-note {
  margin-top: 14px;
  font-size: 13px;
}
.form .btn {
  width: 100%;
  cursor: pointer;
}
.form .btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.form-status {
  min-height: 1.8em;
  font-size: 14px;
}
.contact-box p.form-status.ok {
  color: #9fd0ca;
}
.contact-box p.form-status.error {
  color: #f3c98b;
}
