/*
 * The Pawroom website's one stylesheet (docs/site/prompt.md §5): the app's own colors with one accent, the system's
 * Japanese fonts (nothing is downloaded), generous space, real app screens, and almost no motion.
 */

:root {
  --ink: #1a1f24;
  --text: #3a4048;
  --sub: #5b626c;
  --line: #e6e8eb;
  --canvas: #f4f5f7;
  --bg: #ffffff;
  --accent: #0c8e86;
  --accent-text: #0a7770;
  --accent-mark: #0fa69d;
  --accent-soft: #f3faf9;
  --accent-line: #d9eeea;
  --on-accent: #ffffff;
  /* Filled buttons: the accent deepened so white words on it pass AA (5.3:1). */
  --button: #0a7770;
  --button-hover: #08625c;
  --warn-soft: #fbeeed;
  --warn-line: #f2d5d2;
  --screen-ring: rgba(16, 24, 32, 0.08);
  --screen-shadow: 0 30px 60px -20px rgba(16, 24, 32, 0.22), 0 8px 18px -8px rgba(16, 24, 32, 0.1);
  --wrap: 1120px;
  --gutter: 20px;
  --section: 72px;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Noto Sans CJK JP", "Yu Gothic UI", Meiryo, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f3f5;
    --text: #d6dbe0;
    --sub: #a9b0b8;
    --line: #2a3036;
    --canvas: #171b1f;
    --bg: #0f1215;
    --accent: #2cc3ba;
    --accent-text: #4fd6cd;
    --accent-mark: #2cc3ba;
    --accent-soft: #12201f;
    --accent-line: #1f3a37;
    --on-accent: #0f1215;
    --button: #2cc3ba;
    --button-hover: #4fd6cd;
    --warn-soft: #2a1b1a;
    --warn-line: #4a2b28;
    --screen-ring: rgba(255, 255, 255, 0.1);
    --screen-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 8px 18px -8px rgba(0, 0, 0, 0.4);
  }
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --section: 128px;
  }
}

/* ── Base ─────────────────────────────────────────────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.01em;
  font-feature-settings: "palt";
  text-wrap: balance;
  word-break: auto-phrase;
}

p,
li,
dd {
  text-wrap: pretty;
}

/* Short words break between phrases; long reading (the documents) fills its lines as Japanese body text does. */
.lead,
.feature-text,
.facts li,
.safety-grid p,
.premium-list p,
.closing p,
.note {
  word-break: auto-phrase;
}

p {
  margin: 0;
}

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

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

/* Headlines are kept in phrases: a line breaks only between them. */
h1 span,
h2 span {
  display: inline-block;
}

/* ── Header and footer ────────────────────────────────────────────────────────────────────────────────────────── */

.bar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-header nav a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--accent-text);
}

/* The header's links side by side; 「ログイン」 to the web console is a quiet capsule, the way back in for families
   who already use Pawroom (src/console-link.mjs). */
.site-header nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-header nav a.nav-login {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 150ms ease, color 150ms ease;
}

.site-header nav a.nav-login:hover {
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

/* 「Webで記録を見る」 above the legal links: the website's management console, said in one line. */
.footer-console {
  margin: 0 0 16px;
  font-size: 14px;
}

.footer-console a {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}

.footer-console a:hover {
  text-decoration: underline;
}

.site-footer {
  margin-top: var(--section);
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  font-size: 13px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
}

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

.footer-meta {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  color: var(--sub);
}

/* ── Buttons and small parts ──────────────────────────────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--button);
  color: var(--on-accent);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.button:hover {
  background: var(--button-hover);
  text-decoration: none;
}

.button--quiet {
  background: var(--accent-soft);
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.button--quiet:hover {
  background: var(--accent-line);
}

.label {
  margin-bottom: 12px;
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* An app screen: its own rounded screen, a hairline and a soft shadow, never tilted. */
.screen {
  margin: 0;
  border-radius: 13.5% / 6.2%;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--screen-ring), var(--screen-shadow);
  background: var(--canvas);
}

.screen img {
  width: 100%;
}

/* ── Hero ─────────────────────────────────────────────────────────────────────────────────────────────────────── */

.hero {
  padding-top: 24px;
}

.hero-grid {
  display: grid;
  gap: 40px;
}

.hero h1 {
  font-size: clamp(34px, 8.4vw, 60px);
  line-height: 1.25;
}

.lead {
  margin-top: 24px;
  max-width: 30em;
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
}

.status {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-mark);
}

.note {
  margin-top: 14px;
  color: var(--sub);
  font-size: 14px;
}

/* The phone rises out of a quiet panel and is cut by its foot, as a product shot. */
.hero-stage {
  height: clamp(420px, 118vw, 560px);
  border-radius: 28px;
  background: var(--canvas);
  overflow: hidden;
  display: flex;
  justify-content: center;
  padding-top: clamp(36px, 9vw, 56px);
}

.hero-stage .screen {
  width: min(64vw, 320px);
  flex: none;
  align-self: flex-start;
}

@media (min-width: 960px) {
  .hero {
    padding-top: 48px;
  }

  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 56px;
  }

  .hero h1 {
    font-size: clamp(44px, 4.6vw, 56px);
  }

  .hero-stage {
    height: 600px;
  }
}

/* ── Features ─────────────────────────────────────────────────────────────────────────────────────────────────── */

.feature {
  padding-top: var(--section);
}

.feature-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.feature h2,
.safety h2,
.premium h2,
.closing h2 {
  font-size: clamp(26px, 5.6vw, 40px);
  line-height: 1.32;
}

.feature-text {
  margin-top: 20px;
  max-width: 34em;
}

.facts {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  color: var(--sub);
  font-size: 15px;
  line-height: 1.75;
}

.facts li {
  position: relative;
  padding-left: 26px;
}

/* A small paw, the app's own mark, for each point. */
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 15px;
  height: 15px;
  background: var(--accent-mark);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16' rx='5.6' ry='4.6'/%3E%3Cellipse cx='5' cy='10.4' rx='2.2' ry='2.7' transform='rotate(-18 5 10.4)'/%3E%3Cellipse cx='9.4' cy='6.2' rx='2.3' ry='2.9' transform='rotate(-6 9.4 6.2)'/%3E%3Cellipse cx='14.6' cy='6.2' rx='2.3' ry='2.9' transform='rotate(6 14.6 6.2)'/%3E%3Cellipse cx='19' cy='10.4' rx='2.2' ry='2.7' transform='rotate(18 19 10.4)'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16' rx='5.6' ry='4.6'/%3E%3Cellipse cx='5' cy='10.4' rx='2.2' ry='2.7' transform='rotate(-18 5 10.4)'/%3E%3Cellipse cx='9.4' cy='6.2' rx='2.3' ry='2.9' transform='rotate(-6 9.4 6.2)'/%3E%3Cellipse cx='14.6' cy='6.2' rx='2.3' ry='2.9' transform='rotate(6 14.6 6.2)'/%3E%3Cellipse cx='19' cy='10.4' rx='2.2' ry='2.7' transform='rotate(18 19 10.4)'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.feature-screens {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 8px 0 40px;
}

.feature-screens .screen {
  width: min(64vw, 300px);
}

.feature-screens--pair .screen {
  width: min(42vw, 280px);
}

.screen--low {
  margin-top: 40px;
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: 5fr 7fr;
    gap: 72px;
  }

  .feature--flip .feature-words {
    order: 2;
  }

  .feature-screens {
    gap: 28px;
    padding-bottom: 56px;
  }

  .screen--low {
    margin-top: 72px;
  }
}

/* ── Safety ───────────────────────────────────────────────────────────────────────────────────────────────────── */

.safety {
  margin-top: var(--section);
  padding: var(--section) 0;
  background: var(--canvas);
}

.safety-grid {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0 48px;
}

.safety-grid li {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.safety-grid h3,
.premium-list h3 {
  font-size: 17px;
  line-height: 1.5;
}

.safety-grid p,
.premium-list p {
  margin-top: 6px;
  color: var(--sub);
  font-size: 15px;
  line-height: 1.75;
}

@media (min-width: 768px) {
  .safety-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Premium ──────────────────────────────────────────────────────────────────────────────────────────────────── */

.premium {
  padding-top: var(--section);
}

.premium-card {
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 32px 24px;
  display: grid;
  gap: 32px;
}

.price {
  margin-top: 20px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.price-figure {
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.price-unit {
  font-size: 15px;
  font-weight: 600;
}

.premium-free {
  margin-top: 12px;
  color: var(--sub);
  font-size: 15px;
}

.premium-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 20px 40px;
}

.premium-terms {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--sub);
  font-size: 13px;
  line-height: 1.8;
}

.premium-terms a {
  display: inline-block;
  margin-top: 8px;
  margin-right: 16px;
}

@media (min-width: 768px) {
  .premium-card {
    padding: 56px;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px 64px;
  }

  .premium-list {
    grid-template-columns: 1fr 1fr;
  }

  .premium-terms {
    grid-column: 1 / -1;
  }
}

/* ── Closing ──────────────────────────────────────────────────────────────────────────────────────────────────── */

.closing {
  padding-top: var(--section);
  text-align: center;
}

.closing .app-icon {
  margin: 0 auto 28px;
  width: 96px;
  border-radius: 22.37%;
  box-shadow: 0 0 0 1px var(--screen-ring), 0 10px 24px -10px rgba(16, 24, 32, 0.25);
}

.closing p {
  margin: 16px auto 0;
  max-width: 32em;
}

.closing-links {
  font-weight: 600;
}

.fineprint {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.7;
}

.closing .fineprint {
  margin-top: 48px;
}

/* ── Documents: legal pages, help, account deletion ───────────────────────────────────────────────────────────── */

.doc {
  max-width: calc(40em + var(--gutter) * 2);
  margin: 0 auto;
  padding: 40px var(--gutter) 0;
  font-size: 15.5px;
  line-height: 1.9;
}

.doc h1 {
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.35;
  margin-bottom: 24px;
}

.doc h2 {
  margin: 2.6em 0 0.8em;
  font-size: 20px;
  line-height: 1.5;
  scroll-margin-top: 24px;
}

.doc h3 {
  margin: 2em 0 0.6em;
  font-size: 17px;
  line-height: 1.5;
}

.doc p,
.doc ul,
.doc ol,
.doc table,
.doc blockquote {
  margin: 0 0 1em;
}

.doc ul,
.doc ol {
  padding-left: 1.6em;
}

.doc li + li {
  margin-top: 0.3em;
}

.doc li > ol,
.doc li > ul {
  margin: 0.4em 0 0;
}

.doc hr {
  margin: 3em 0 1.5em;
  border: 0;
  border-top: 1px solid var(--line);
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.75;
}

.doc th,
.doc td {
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.doc th {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--ink);
}

.doc table.pairs td:first-child {
  width: 30%;
  color: var(--ink);
  font-weight: 600;
}

.doc td a {
  overflow-wrap: anywhere;
}

/* On a phone, tables become stacked rows that read without zooming. */
@media (max-width: 680px) {
  .doc table,
  .doc tbody,
  .doc tr,
  .doc td {
    display: block;
    width: 100%;
  }

  .doc thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .doc tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .doc td {
    padding: 2px 0;
    border: 0;
  }

  .doc table.pairs td:first-child {
    width: 100%;
    margin-bottom: 2px;
  }

  .doc table.grid td::before {
    content: attr(data-label);
    display: block;
    color: var(--sub);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
  }

  .doc table.grid td + td {
    margin-top: 8px;
  }

  .doc table.grid td:first-child {
    color: var(--ink);
    font-weight: 600;
  }

  .doc table.grid td:first-child::before {
    display: none;
  }
}

.related {
  margin-top: 40px;
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--canvas);
  font-size: 14.5px;
}

.related p {
  margin: 0;
}

.lead-small {
  font-size: 16px;
}

.callout {
  margin: 32px 0;
  padding: 4px 24px 8px;
  border-radius: 16px;
  background: var(--warn-soft);
  box-shadow: inset 0 0 0 1px var(--warn-line);
}

.callout h2 {
  margin-top: 1.2em;
}

.contact-address {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.contact-address a {
  overflow-wrap: anywhere;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 16px 0 28px;
}

.copy-status {
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
}

.aside {
  color: var(--sub);
  font-size: 14px;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq details:first-child {
  border-top: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 16px 36px 16px 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 2px solid var(--sub);
  border-bottom: 2px solid var(--sub);
  transform: rotate(45deg);
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.faq details[open] summary::after {
  transform: translateY(4px) rotate(-135deg);
}

.faq details p {
  padding: 0 0 18px;
  margin: 0;
  color: var(--text);
}

.plain-links {
  list-style: none;
  padding: 0 !important;
}

.notfound {
  padding-top: 96px;
}

/* ── Motion: a screen rises a little as it first comes into view, where the browser can tie it to scrolling. ── */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }

    @keyframes rise {
      from {
        opacity: 0;
        transform: translateY(16px);
      }
    }
  }
}
