/* Oh!nasu Works — shared styles
   Layout: asymmetric editorial grid; studio pages in aubergine/paper, app pages re-skin via body class (.ds = Daystitch leather). */
:root {
  /* studio palette — clean white page; aubergine is kept for the wordmark and small accents only */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --soft: #F5F4F2;
  --ink: #1F1D22;
  --muted: #615D66;
  --line: #E7E5E9;
  --brand: #4B2A5E;
  --btn: #1F1D22;
  --btn-ink: #FFFFFF;
  --accent: #3F7A33;

  --font-display: "Bricolage Grotesque", "Zen Kaku Gothic New", system-ui, sans-serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --font-serif: "Shippori Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 22px;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131215; --surface: #1B1A1E; --soft: #1F1E22; --ink: #F1EFF3; --muted: #A6A1AB; --line: #2E2C32;
    --brand: #C7A2E2; --btn: #F1EFF3; --btn-ink: #131215; --accent: #8CC27A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131215; --surface: #1B1A1E; --soft: #1F1E22; --ink: #F1EFF3; --muted: #A6A1AB; --line: #2E2C32;
  --brand: #C7A2E2; --btn: #F1EFF3; --btn-ink: #131215; --accent: #8CC27A;
  color-scheme: dark;
}

/* Daystitch skin: leather, stitching, kraft paper */
body.ds {
  --bg: #FFFFFF; --surface: #FFFFFF; --soft: #F8F2E8; --ink: #2E2620; --muted: #6E6156; --line: #ECE4D8;
  --brand: #9A6B3F; --btn: #2E2620; --btn-ink: #FFFFFF; --accent: #2F5D9E;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.ds {
    --bg: #161412; --surface: #1F1C19; --ink: #F1E8DC; --muted: #B3A492; --line: #342E28;
    --brand: #D9A672; --btn: #F1E8DC; --btn-ink: #161412; --accent: #8EB4EA; --soft: #26211C;
  }
}
:root[data-theme="dark"] body.ds {
  --bg: #161412; --surface: #1F1C19; --ink: #F1E8DC; --muted: #B3A492; --line: #342E28;
  --brand: #D9A672; --btn: #F1E8DC; --btn-ink: #161412; --accent: #8EB4EA; --soft: #26211C;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; line-height: 1.3; margin: 0; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- header ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--bg);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand small { font-family: var(--font-body); font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.nav { display: flex; gap: 20px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav { gap: 14px; font-size: 13px; } .nav .hide-sm { display: none; } .brand small { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none; border: 1.5px solid transparent;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- studio hero ---------- */
.hero { padding-block: clamp(36px, 7vw, 88px) clamp(28px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(44px, 7.6vw, 96px); letter-spacing: -.035em; line-height: .95;
}
.hero h1 { color: var(--brand); }
.hero h1 .bang { color: var(--accent); }
.hero h1 .works { display: block; font-weight: 400; font-style: normal; color: var(--muted); letter-spacing: -.02em; }
.hero .lead { margin-top: 22px; font-size: clamp(17px, 2vw, 20px); font-weight: 500; max-width: 30em; }
.hero .sub { margin-top: 10px; color: var(--muted); max-width: 34em; }
.hero .btn-row { margin-top: 28px; }
.hero-photo { position: relative; }
.hero-photo .frame { border-radius: 28px; overflow: hidden; aspect-ratio: 16 / 11; background: var(--soft); box-shadow: 0 30px 60px -34px rgb(0 0 0 / .35); }
.hero-photo .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo .tag {
  position: absolute; left: -14px; bottom: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 14px; display: flex; gap: 10px; align-items: center; font-size: 13px;
  box-shadow: 0 12px 30px -18px rgb(0 0 0 / .4);
}
.hero-photo .tag img { width: 34px; height: 34px; border-radius: 9px; }
.hero-photo .tag b { display: block; font-size: 14px; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .hero-photo .tag { left: 12px; } }

/* placeholder art when a photo isn't in place yet */
.ph { width: 100%; height: 100%; background: var(--soft); }

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { display: grid; gap: 10px; margin-bottom: clamp(28px, 4vw, 44px); max-width: 44em; }
.section-head h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4.4vw, 50px); letter-spacing: -.025em; }
.section-head p { color: var(--muted); }
body.ds .section-head h2, body.ds .ds-hero h1 { font-family: var(--font-serif); font-weight: 700; letter-spacing: 0; }

/* ---------- app catalogue ---------- */
.catalog { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.app-feature {
  grid-column: span 12; display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.app-feature .media { min-height: 320px; background: var(--soft); }
.app-feature .media img { width: 100%; height: 100%; object-fit: cover; }
.app-feature .body { padding: clamp(24px, 3.4vw, 44px); display: grid; gap: 14px; align-content: center; }
.app-id { display: flex; gap: 14px; align-items: center; }
.app-id img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 8px 18px -10px rgb(0 0 0 / .5); }
.app-id h3 { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.app-id .meta { font-size: 13px; color: var(--muted); }
.catno { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checks li { padding-left: 24px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 12px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.app-next {
  grid-column: span 6; border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: 26px; display: grid; gap: 8px; min-height: 170px; align-content: start; background: transparent;
}
.app-next h3 { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--muted); }
.app-next p { color: var(--muted); font-size: 14px; }
.bench { grid-column: span 12; border-radius: var(--radius); overflow: hidden; aspect-ratio: 21 / 7; background: var(--soft); }
.bench img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .app-feature { grid-template-columns: 1fr; }
  .app-feature .media { min-height: 220px; aspect-ratio: 16 / 9; }
  .app-next { grid-column: span 12; }
  .bench { aspect-ratio: 16 / 9; }
}

/* ---------- about / values ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value { padding-top: 18px; border-top: 2px solid var(--ink); display: grid; gap: 8px; }
.value h3 { font-size: 18px; font-weight: 700; }
.value p { color: var(--muted); font-size: 15px; }
@media (max-width: 820px) { .values { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact-box {
  display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px);
}
.mail { font-family: var(--font-mono); font-size: clamp(16px, 2.4vw, 22px); user-select: all; word-break: break-all; }
.copy { cursor: pointer; font: inherit; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px 48px; color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ================= Daystitch page ================= */
.stitch { border: 0; border-top: 2px dashed color-mix(in srgb, var(--brand) 55%, transparent); margin: 0; }
.ds-hero { position: relative; padding-block: clamp(30px, 5vw, 64px); }
.ds-hero .grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.ds-hero h1 { font-size: clamp(34px, 5.6vw, 64px); line-height: 1.22; }
.ds-hero .lead { margin-top: 18px; font-size: clamp(16px, 1.9vw, 19px); color: var(--muted); max-width: 32em; }
.ds-hero .btn-row { margin-top: 26px; }
.ds-hero .photo { border-radius: 26px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--soft);
  outline: 2px dashed color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 8px; }
.ds-hero .photo img { width: 100%; height: 100%; object-fit: cover; }
.ds-hero .appline { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ds-hero .appline img { width: 52px; height: 52px; border-radius: 12px; }
.launch {
  margin-top: 22px; display: inline-grid; gap: 2px; padding: 12px 16px; border-radius: 14px;
  background: var(--soft); border: 1px dashed color-mix(in srgb, var(--brand) 50%, transparent); font-size: 14px;
}
.launch b { color: var(--brand); font-size: 16px; }
@media (max-width: 820px) { .ds-hero .grid { grid-template-columns: 1fr; } }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 10px; align-content: start; }
.feature .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--brand); }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 18px; font-weight: 700; }
.feature p { color: var(--muted); font-size: 15px; }
.feature.wide { grid-column: span 2; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } .feature.wide { grid-column: span 2; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } .feature.wide { grid-column: span 1; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.split .photo { border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--soft); }
.split .photo img { width: 100%; height: 100%; object-fit: cover; }
.split h2 { font-family: var(--font-serif); font-size: clamp(26px, 3.6vw, 40px); }
.split p { color: var(--muted); margin-top: 14px; }
.flow { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; counter-reset: f; }
.flow li { counter-increment: f; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.flow li::before { content: counter(f); font-family: var(--font-mono); font-size: 13px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--brand); border: 1px solid var(--line); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split.rev .photo { order: -1; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 14px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }

.price-card {
  max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px, 4vw, 40px);
  outline: 2px dashed color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: -12px;
}
.price { font-family: var(--font-serif); font-size: clamp(40px, 6vw, 56px); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.price small { font-size: 16px; font-family: var(--font-body); color: var(--muted); font-weight: 500; }
.price-card ul { margin: 16px 0 0; padding-left: 1.2em; color: var(--muted); font-size: 15px; display: grid; gap: 4px; }

/* ---------- legal / support pages ---------- */
.doc { max-width: 760px; padding-block: clamp(36px, 6vw, 72px); }
.doc h1 { font-family: var(--font-serif); font-size: clamp(28px, 4vw, 40px); }
.doc .updated { color: var(--muted); font-size: 14px; margin-top: 8px; }
.doc h2 { font-size: 20px; margin-top: 40px; padding-top: 16px; border-top: 1px dashed var(--line); }
.doc p, .doc li { color: var(--ink); }
.doc p { margin-top: 12px; }
.doc ul { padding-left: 1.3em; display: grid; gap: 6px; margin-top: 12px; }
.doc a { color: var(--accent); }
.faq details { border-bottom: 1px solid var(--line); padding-block: 14px; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--brand); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin-top: 8px; }

/* entrance: visible by default; gentle lift only when motion is OK */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .rise.d2 { animation-delay: .08s; } .rise.d3 { animation-delay: .16s; }
  @keyframes rise { from { transform: translateY(14px); opacity: .001; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* ================= media & animated app illustrations ================= */
.media-fill { width: 100%; height: 100%; object-fit: cover; display: block; }
video.media-fill { background: var(--soft); }

/* "a day with Daystitch" story */
.day { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.day article { display: grid; gap: 12px; align-content: start; }
.day .shot { border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--soft); }
.day .time { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.day h3 { font-size: 19px; font-weight: 700; }
.day p { color: var(--muted); font-size: 15px; }
@media (max-width: 820px) { .day { grid-template-columns: 1fr; } }

/* showcase rows: text + illustration (+ photo) */
.show { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.show + .show { margin-top: clamp(56px, 8vw, 96px); }
.show.rev > :first-child { order: 2; }
.show h3 { font-family: var(--font-serif); font-size: clamp(24px, 3.2vw, 36px); line-height: 1.35; }
.show p { color: var(--muted); margin-top: 14px; }
.show .points { margin-top: 18px; }
.stage { position: relative; display: grid; place-items: center; min-height: 420px; padding: 28px 12px; border-radius: 28px; background: var(--soft); overflow: hidden; }
.stage .backdrop { position: absolute; inset: 0; }
.stage .backdrop img, .stage .backdrop video { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); }
.stage .backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / .05), rgb(0 0 0 / .28)); }
.stage > .phone, .stage > .watch, .stage > .bubbles { position: relative; z-index: 1; }
.caption { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: right; }
@media (max-width: 820px) { .show { grid-template-columns: 1fr; } .show.rev > :first-child { order: 0; } .stage { min-height: 380px; } }

/* app UI is always light paper inside the frame (the real app's default look) */
.phone {
  --app-bg: #FBF7EF; --app-ink: #2E2620; --app-muted: #8A7B6C; --app-line: #EADFCD; --app-card: #FFFFFF;
  --app-blue: #2F6FD6; --app-red: #D2554F; --app-orange: #E0913C; --app-green: #3E9B63;
  width: 250px; height: 500px; border-radius: 40px; padding: 10px; background: #1B1917;
  box-shadow: 0 30px 60px -24px rgb(0 0 0 / .55), inset 0 0 0 1.5px #3A3632;
}
.screen { position: relative; width: 100%; height: 100%; border-radius: 31px; overflow: hidden; background: var(--app-bg); color: var(--app-ink); font-size: 12px; line-height: 1.5; }
.screen .island { position: absolute; top: 9px; left: 50%; width: 74px; height: 20px; margin-left: -37px; border-radius: 12px; background: #1B1917; z-index: 3; }
.screen .bar { padding: 40px 14px 8px; display: flex; justify-content: space-between; align-items: baseline; }
.screen .bar b { font-size: 16px; }
.screen .bar span { color: var(--app-muted); font-size: 11px; }
.state { position: absolute; inset: 0; padding-top: 0; }

/* meeting: three states cycle */
.cycle .state { opacity: 0; animation: cycle 12s infinite; }
.cycle .state:nth-child(2) { animation-delay: 4s; }
.cycle .state:nth-child(3) { animation-delay: 8s; }
@keyframes cycle { 0% { opacity: 0; transform: translateY(6px); } 4%, 30% { opacity: 1; transform: none; } 34%, 100% { opacity: 0; } }
.rec { margin: 70px auto 0; width: 86%; text-align: center; display: grid; gap: 14px; justify-items: center; }
.rec .dot { width: 54px; height: 54px; border-radius: 50%; background: var(--app-red); box-shadow: 0 0 0 10px color-mix(in srgb, #D2554F 18%, transparent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 18px color-mix(in srgb, #D2554F 6%, transparent); } }
.rec .clock { font-family: var(--font-mono); font-size: 26px; letter-spacing: .04em; }
.wave { display: flex; gap: 3px; align-items: center; height: 46px; }
.wave i { width: 4px; border-radius: 2px; background: var(--app-red); height: 30%; animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(3n) { animation-delay: .2s; } .wave i:nth-child(3n+1) { animation-delay: .45s; } .wave i:nth-child(4n) { animation-delay: .7s; }
@keyframes wave { 50% { height: 100%; } }
.rec small { color: var(--app-muted); }
.transcribe { padding: 46px 16px 0; display: grid; gap: 10px; }
.transcribe .prog { height: 6px; border-radius: 3px; background: var(--app-line); overflow: hidden; }
.transcribe .prog i { display: block; height: 100%; width: 0; background: var(--app-blue); animation: fill 3.6s ease-out infinite; }
@keyframes fill { to { width: 100%; } }
.transcribe p { background: var(--app-card); border: 1px solid var(--app-line); border-radius: 10px; padding: 8px 10px; }
.transcribe p span { color: var(--app-muted); font-size: 10px; display: block; }
.minutes { padding: 40px 12px 0; display: grid; gap: 8px; }
.card { background: var(--app-card); border: 1px solid var(--app-line); border-radius: 14px; padding: 10px 12px; }
.card h5 { margin: 0 0 4px; font-size: 13px; }
.card .k { font-size: 10px; font-weight: 700; color: var(--app-blue); letter-spacing: .04em; }
.card ul { margin: 2px 0 0; padding-left: 1.1em; }
.pastebtn { text-align: center; font-weight: 700; color: #fff; background: var(--app-ink); border-radius: 10px; padding: 7px; }

/* todo list */
.tabs { margin: 0 12px 8px; display: grid; grid-template-columns: repeat(4, 1fr); background: #EFE6D7; border-radius: 9px; padding: 2px; font-size: 10px; text-align: center; }
.tabs span { padding: 4px 0; border-radius: 7px; }
.tabs .on { background: #fff; font-weight: 700; box-shadow: 0 1px 2px rgb(0 0 0 / .1); }
.rows { margin: 0 12px; background: var(--app-card); border: 1px solid var(--app-line); border-radius: 14px; overflow: hidden; }
.row { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 8px; padding: 9px 10px; border-bottom: 1px solid var(--app-line); background: var(--app-card); }
.row:last-child { border-bottom: 0; }
.row .ck { width: 18px; height: 18px; border-radius: 50%; border: 1.6px solid var(--app-muted); margin-top: 1px; position: relative; }
.row .ck.red { border-color: var(--app-red); }
.row .meta { display: flex; gap: 8px; font-size: 10px; color: var(--app-muted); }
.row .flag { color: var(--app-red); font-weight: 700; }
.row.done-anim .ck { animation: checkfill 8s infinite; }
.row.done-anim .ck::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0; animation: checkmark 8s infinite; }
.row.done-anim .t { animation: strike 8s infinite; }
@keyframes checkfill { 0%, 18% { background: transparent; border-color: var(--app-red); } 24%, 60% { background: var(--app-green); border-color: var(--app-green); } 66%, 100% { background: transparent; border-color: var(--app-red); } }
@keyframes checkmark { 0%, 20% { opacity: 0; } 24%, 60% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes strike { 0%, 22% { text-decoration: none; opacity: 1; } 26%, 60% { text-decoration: line-through; opacity: .45; } 66%, 100% { text-decoration: none; opacity: 1; } }
.swipe { position: relative; overflow: hidden; }
.swipe .act { position: absolute; inset: 0 0 0 auto; width: 132px; display: grid; grid-template-columns: 1fr 1fr; font-size: 10px; font-weight: 700; color: #fff; text-align: center; }
.swipe .act span { display: grid; place-items: center; }
.swipe .act .o { background: var(--app-orange); } .swipe .act .r { background: var(--app-red); }
.swipe .row { animation: swipe 8s infinite; z-index: 1; }
@keyframes swipe { 0%, 62% { transform: none; } 70%, 88% { transform: translateX(-132px); } 96%, 100% { transform: none; } }
.proj { margin: 10px 12px 0; display: flex; gap: 10px; align-items: center; background: var(--app-card); border: 1px solid var(--app-line); border-radius: 14px; padding: 10px; }
.ring { width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(var(--app-green) 0 50%, #E3EBDD 50% 100%); position: relative; flex: none; }
.ring::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--app-card); }

/* week calendar + quick add typing */
.week { margin: 0 10px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.week .d { background: var(--app-card); border: 1px solid var(--app-line); border-radius: 9px; padding: 5px 0 6px; min-height: 150px; display: grid; align-content: start; gap: 2px; font-size: 9px; }
.week .n { font-size: 14px; font-weight: 700; }
.week .rk { color: var(--app-muted); }
.week .hol { color: var(--app-red); font-weight: 700; line-height: 1.2; }
.week .sun .n, .week .hol-day .n { color: var(--app-red); }
.week .sat .n { color: var(--app-blue); }
.week .today { outline: 2px solid var(--app-blue); outline-offset: -2px; }
.week .ev { margin: 4px 2px 0; border-radius: 5px; padding: 3px 2px; font-size: 8.5px; color: #fff; line-height: 1.25; }
.ev.blue { background: var(--app-blue); } .ev.green { background: var(--app-green); }
.ev.pop { opacity: 0; animation: pop 9s infinite; }
@keyframes pop { 0%, 52% { opacity: 0; transform: scale(.6); } 58%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
.qa { margin: 12px 10px 0; background: var(--app-card); border: 1.5px solid var(--app-blue); border-radius: 12px; padding: 9px 10px; font-size: 12px; display: flex; align-items: center; gap: 2px; white-space: nowrap; overflow: hidden; }
.qa .typed { display: inline-block; overflow: hidden; width: 0; animation: type 9s steps(13) infinite; }
.qa .caret { width: 1.5px; height: 14px; background: var(--app-blue); animation: blink 1s steps(1) infinite; }
@keyframes type { 0%, 6% { width: 0; } 44%, 92% { width: 9.6em; } 98%, 100% { width: 0; } }
@keyframes blink { 50% { opacity: 0; } }
.qa-hint { margin: 6px 12px 0; font-size: 10px; color: var(--app-blue); opacity: 0; animation: pop 9s infinite; animation-delay: -.6s; }

/* watch */
.watch { width: 170px; height: 204px; border-radius: 46px; background: #121212; padding: 12px; box-shadow: 0 26px 50px -22px rgb(0 0 0 / .6), inset 0 0 0 2px #2A2A2A; position: relative; }
.watch::before, .watch::after { content: ""; position: absolute; left: 34px; right: 34px; height: 40px; background: #CFC2AE; z-index: -1; border-radius: 10px; }
.watch::before { top: -34px; } .watch::after { bottom: -34px; }
.watch .face { height: 100%; border-radius: 36px; background: #000; color: #fff; padding: 22px 14px 12px; display: grid; gap: 8px; align-content: start; font-size: 11px; }
.watch .face small { color: #A9A9A9; font-size: 9px; }
.watch .nx { background: #20324F; border-radius: 12px; padding: 7px 9px; }
.watch .nx b { display: block; font-size: 13px; }
.watch .td { display: flex; justify-content: space-between; background: #1C1C1C; border-radius: 12px; padding: 7px 9px; }
.watch .td b { color: #8CD38F; }

/* siri-style bubbles */
.bubbles { width: min(320px, 100%); display: grid; gap: 10px; }
.bubble { padding: 11px 14px; border-radius: 18px; font-size: 14px; line-height: 1.6; box-shadow: 0 12px 30px -18px rgb(0 0 0 / .5); }
.bubble.me { justify-self: end; background: #2F6FD6; color: #fff; border-bottom-right-radius: 6px; animation: talk 10s infinite; }
.bubble.ai { justify-self: start; background: #FFFFFF; color: #2E2620; border-bottom-left-radius: 6px; animation: talk 10s infinite; animation-delay: 1.2s; opacity: 0; }
.bubble.me.b2 { animation-delay: 4.6s; opacity: 0; } .bubble.ai.b2 { animation-delay: 5.8s; }
.bubble small { display: block; font-size: 10px; opacity: .7; }
@keyframes talk { 0% { opacity: 0; transform: translateY(8px); } 4%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .cycle .state, .wave i, .rec .dot, .transcribe .prog i, .row.done-anim .ck, .row.done-anim .ck::after, .row.done-anim .t,
  .swipe .row, .ev.pop, .qa .typed, .qa .caret, .qa-hint, .bubble { animation: none !important; }
  .cycle .state { opacity: 0; } .cycle .state:last-child { opacity: 1; }
  .ev.pop, .qa-hint, .bubble { opacity: 1; } .qa .typed { width: 9.6em; } .transcribe .prog i { width: 100%; }
}
.show .phone p, .show .bubbles p { margin: 0; color: inherit; }

/* ================= にゃんグル skin (.ny): pop yellow & pink, K-pop playful ================= */
body.ny {
  --bg: #FFFFFF; --surface: #FFFFFF; --soft: #FFF6D9; --ink: #2B2134; --muted: #6B5F73; --line: #F0E4C8;
  --brand: #E6337A; --btn: #E6337A; --btn-ink: #FFFFFF; --accent: #7A4CE0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.ny {
    --bg: #17121B; --surface: #211A26; --soft: #2A2030; --ink: #F6EEF8; --muted: #BDB0C4; --line: #3A2E42;
    --brand: #FF7AB0; --btn: #FF7AB0; --btn-ink: #17121B; --accent: #B79BFF;
  }
}
:root[data-theme="dark"] body.ny {
  --bg: #17121B; --surface: #211A26; --soft: #2A2030; --ink: #F6EEF8; --muted: #BDB0C4; --line: #3A2E42;
  --brand: #FF7AB0; --btn: #FF7AB0; --btn-ink: #17121B; --accent: #B79BFF;
}
body.ny .ds-hero h1, body.ny .section-head h2, body.ny .split h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; }
body.ny .ds-hero .photo { aspect-ratio: 1098 / 1400; max-width: 460px; justify-self: center; border: 3px solid var(--ink); box-shadow: 0 8px 0 var(--ink); }
body.ny .feature { border-width: 2px; border-color: var(--ink); box-shadow: 0 5px 0 var(--ink); }
body.ny .feature .ico { background: var(--soft); font-size: 22px; }
body.ny .split .photo { border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); }
body.ny .price-card { border: 2px solid var(--ink); box-shadow: 0 6px 0 var(--ink); outline-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.price .was { font-size: .45em; color: var(--muted); text-decoration: line-through; margin-right: .3em; font-family: var(--font-body); }
.sale-badge { display: inline-block; font-weight: 800; font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--brand); color: var(--btn-ink); margin-bottom: 10px; }
.card-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.card-row figure { margin: 0; border-radius: 14px; overflow: hidden; border: 3px solid var(--ink); aspect-ratio: 3 / 4; box-shadow: 0 5px 0 var(--ink); background: var(--soft); }
.card-row img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 760px) { .card-row { grid-template-columns: repeat(3, 1fr); } .card-row figure:nth-child(n+4) { display: none; } }
.note { font-size: 13px; color: var(--muted); margin-top: 18px; }
.brand img.mark { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.app-feature .media img.contain { object-fit: cover; }
/* small screens: keep nav labels and the brand on one line */
.nav a, .brand span { white-space: nowrap; }
@media (max-width: 420px) { .nav { gap: 10px; font-size: 12.5px; } .brand { font-size: 17px; } }

/* ================= にゃんグル detailed page parts ================= */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 8px; }
.stats div { background: var(--surface); border: 2px solid var(--ink); border-radius: 16px; padding: 14px 10px; text-align: center; box-shadow: 0 4px 0 var(--ink); }
.stats b { display: block; font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); color: var(--brand); line-height: 1.1; }
.stats span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
@media (max-width: 820px) { .stats { grid-template-columns: repeat(3, 1fr); } }

.compare { width: 100%; border-collapse: separate; border-spacing: 0; border: 2px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--surface); font-size: 15px; }
.compare th, .compare td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--soft); font-size: 13px; letter-spacing: .04em; }
.compare thead th.us { background: var(--brand); color: var(--btn-ink); }
.compare td:first-child { font-weight: 700; white-space: nowrap; }
.compare td.us { font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.compare td.them { color: var(--muted); }
@media (max-width: 640px) { .compare { font-size: 13px; } .compare th, .compare td { padding: 10px; } .compare td:first-child { white-space: normal; } }

.thumb-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 18px; }
.thumb-row figure { margin: 0; display: grid; gap: 6px; }
.thumb-row img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 2px solid var(--ink); }
.thumb-row figcaption { font-size: 12px; font-weight: 700; text-align: center; color: var(--muted); }
.thumb-row.tall img { aspect-ratio: 9 / 14; }
@media (max-width: 640px) { .thumb-row { grid-template-columns: repeat(3, 1fr); } .thumb-row figure:nth-child(n+4) { display: none; } }

.game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.game { background: var(--surface); border: 2px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 0 5px 0 var(--ink); display: grid; }
.game img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-bottom: 2px solid var(--ink); }
.game div { padding: 12px 14px 14px; display: grid; gap: 4px; }
.game h3 { font-size: 16px; font-weight: 800; }
.game p { font-size: 13px; color: var(--muted); }
.game .tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: .06em; }
@media (max-width: 900px) { .game-grid { grid-template-columns: repeat(2, 1fr); } }

.rarity { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.rarity span { font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--surface); }
.rarity .ssr { background: linear-gradient(90deg, #FF9AD5, #FFE38A, #9AF0D0, #9CC8FF, #C9A2FF); color: #2B2134; }
.rarity .sp { background: #2B2134; color: #FFE38A; }
.banner-img { border-radius: 20px; overflow: hidden; border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); }
.banner-img img { width: 100%; display: block; }

.outfit-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(120px, 1fr); gap: 12px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; }
.outfit-row figure { margin: 0; scroll-snap-align: start; background: var(--soft); border: 2px solid var(--ink); border-radius: 16px; padding: 8px; display: grid; gap: 4px; }
.outfit-row img { width: 100%; aspect-ratio: 5 / 8; object-fit: contain; }
.outfit-row figcaption { font-size: 12px; font-weight: 700; text-align: center; }

.slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.slot { background: var(--surface); border: 2px solid var(--ink); border-radius: 18px; padding: 18px; display: grid; gap: 6px; box-shadow: 0 4px 0 var(--ink); }
.slot .big { font-size: 30px; }
.slot h3 { font-size: 16px; font-weight: 800; }
.slot p { font-size: 13.5px; color: var(--muted); }
@media (max-width: 900px) { .slot-grid { grid-template-columns: repeat(2, 1fr); } }

.lesson-mock { background: var(--surface); border: 3px solid var(--ink); border-radius: 22px; padding: 20px; box-shadow: 0 6px 0 var(--ink); display: grid; gap: 12px; }
.lesson-mock .lv { font-size: 12px; font-weight: 800; color: var(--accent); }
.lesson-mock h4 { font-size: 22px; font-weight: 800; }
.lesson-mock .ex { display: flex; justify-content: space-between; align-items: center; background: var(--soft); border-radius: 12px; padding: 10px 14px; }
.lesson-mock .ex b { color: var(--brand); font-size: 19px; }
.lesson-mock .ex span { font-size: 13px; color: var(--muted); }
.lesson-mock .q { border-top: 1px dashed var(--line); padding-top: 12px; font-size: 14px; font-weight: 700; }
.lesson-mock .q span { display: inline-block; margin: 6px 6px 0 0; padding: 5px 12px; border-radius: 999px; border: 2px solid var(--ink); font-size: 13px; }
.lesson-mock .q span.ok { background: #5FCB93; color: #fff; border-color: #2B2134; }

.cast-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.cast-grid figure { margin: 0; display: grid; gap: 6px; justify-items: center; }
.cast-grid img { width: 100%; max-width: 110px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid var(--ink); background: var(--soft); }
.cast-grid figcaption { font-size: 12px; font-weight: 700; text-align: center; }
@media (max-width: 820px) { .cast-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px) { .cast-grid { grid-template-columns: repeat(3, 1fr); } }

.section.tinted { background: var(--soft); }
.faq-short { max-width: 760px; }

/* ================= studio top: two apps side by side ================= */
.hero-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hero-app { display: grid; gap: 0; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 18px 40px -26px rgb(0 0 0 / .45); transition: transform .2s ease; }
.hero-app:hover { transform: translateY(-3px); }
.hero-app .shot { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--soft); }
.hero-app .row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.hero-app .row img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.hero-app .row b { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.hero-app .row small { display: block; font-size: 12px; color: var(--muted); }
.hero-apps .hero-app:nth-child(2) { margin-top: 36px; }
@media (max-width: 820px) { .hero-apps .hero-app:nth-child(2) { margin-top: 0; } }

.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.app-card { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.app-card .media { display: block; aspect-ratio: 16 / 10; background: var(--soft); overflow: hidden; }
.app-card .media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.app-card .media:hover img { transform: scale(1.03); }
.app-card .body { padding: clamp(22px, 3vw, 32px); display: grid; gap: 14px; align-content: start; }
.app-card .btn-row { margin-top: auto; padding-top: 4px; }
@media (max-width: 860px) { .app-grid { grid-template-columns: 1fr; } }
.app-soon { margin-top: 24px; padding: 16px 20px; border: 1.5px dashed var(--line); border-radius: 16px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.app-soon a { color: var(--ink); }
.hero-app .row > span { min-width: 0; }
.hero-app .row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) { .hero-app .row { padding: 10px; gap: 8px; } .hero-app .row img { width: 32px; height: 32px; } .hero-app .row b { font-size: 15px; } }

/* ---- 体験への入口（トップのアプリカード） ---- */
.hero-app { position: relative; }
.try-tag { position: absolute; top: 10px; left: 10px; z-index: 1; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: #fff; color: #1F1D22; box-shadow: 0 4px 14px -4px rgb(0 0 0 / .35); }
.try-tag.gold { background: #F7EBD3; color: #5C4520; border: 1px solid #D9B97E; }
.try-tag.pop { background: #FFC928; color: #2B2135; border: 2px solid #2B2135; box-shadow: 0 3px 0 #2B2135; }
@media (prefers-reduced-motion: no-preference) { .try-tag.pop { animation: tagBob 2.4s ease-in-out infinite; } }
@keyframes tagBob { 50% { transform: translateY(-3px); } }

/* ================= Daystitch: 実際の画面（スクリーンショット） ================= */
.dev { margin: 0; background: #1B1917; box-shadow: 0 26px 50px -24px rgb(0 0 0 / .5); overflow: hidden; }
.dev img { display: block; width: 100%; height: auto; }
.dev-phone { width: min(270px, 74%); border: 7px solid #1B1917; border-radius: 38px; }
.dev-phone img { border-radius: 31px; }
.dev-ipad { width: 100%; border: 8px solid #1B1917; border-radius: 22px; }
.dev-ipad img { border-radius: 14px; }
.dev-watch { width: 150px; border: 8px solid #121212; border-radius: 40px; }
.dev-watch img { border-radius: 32px; }
.stage.real, .stage.plain { background: linear-gradient(160deg, var(--soft), color-mix(in srgb, var(--brand) 12%, var(--soft))); }
.stage.real.wide { padding: 22px; min-height: 0; }
.stage.watches { display: flex; gap: 18px; justify-content: center; align-items: center; flex-wrap: wrap; }
.note-small { font-size: 12px !important; color: var(--muted); margin-top: 10px !important; }
/* 朝・昼・夜：スマホの上の方をのぞかせる */
.day .shot.peek { display: flex; justify-content: center; align-items: flex-start; padding-top: 22px; background: linear-gradient(160deg, var(--soft), color-mix(in srgb, var(--brand) 12%, var(--soft))); }
.day .shot.peek img { width: 62%; height: 100%; object-fit: cover; object-position: top; border: 6px solid #1B1917; border-bottom: 0; border-radius: 26px 26px 0 0; display: block; }
/* ヒーロー：iPad＋iPhone */
.ds-hero .photo.real-hero { aspect-ratio: auto; overflow: visible; background: none; position: relative; padding: 0 0 34px; border-radius: 0; box-shadow: none; outline: 0; }
.ds-hero .photo.real-hero img { height: auto; object-fit: initial; display: block; }
.ds-hero .photo.real-hero .ipad { width: 90%; border: 8px solid #1B1917; border-radius: 22px; box-shadow: 0 30px 60px -28px rgb(0 0 0 / .55); }
.ds-hero .photo.real-hero .iphone { position: absolute; right: 0; bottom: 0; width: 29%; border: 6px solid #1B1917; border-radius: 26px; box-shadow: 0 24px 40px -18px rgb(0 0 0 / .55); }
.app-card .media.ds-media { background: linear-gradient(160deg, var(--soft), color-mix(in srgb, var(--brand) 12%, var(--soft))); padding: 18px; }
.app-card .media.ds-media img { object-fit: contain; border: 6px solid #1B1917; border-radius: 16px; background: #1B1917; }
.app-card .media.gm-media { background: radial-gradient(ellipse at 50% 40%, #FFFFFF 0%, #F7F0E4 45%, #E6D6BB 100%); }

/* 見出しの改行：句読点の切れ目でだけ折り返す（「予定/も、」のような変な改行を防ぐ） */
.phr { display: inline-block; }
h1, h2, h3 { text-wrap: balance; line-break: strict; }

/* トップのフッター：アプリごとにまとめる */
.foot-grid .wrap { display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: start; }
.fg-brand { display: grid; gap: 4px; }
.fg-brand b { color: var(--ink); font-size: 15px; }
.fg-cols { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px !important; }
.fg-cols div { display: grid; gap: 8px; align-content: start; }
.fg-cols p { margin: 0 0 2px; font-size: 12px; font-weight: 700; color: var(--ink); letter-spacing: .04em; }
@media (max-width: 640px) {
  .foot-grid .wrap { grid-template-columns: 1fr; }
  .fg-cols { grid-template-columns: 1fr 1fr; }
  .fg-cols div:last-child { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 18px; }
  .fg-cols div:last-child p { width: 100%; }
}

/* ---------- Glow Mirror（No.03）: パールホワイトとシャンパンゴールド ---------- */
body.gm {
  --bg: #FFFFFF; --surface: #FFFFFF; --soft: #F7F2EA; --ink: #2A2622; --muted: #6F665C; --line: #ECE4D6;
  --brand: #B08D57; --btn: #2A2622; --btn-ink: #FFFFFF; --accent: #9A7434;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.gm {
    --bg: #141311; --surface: #1C1A17; --soft: #24211D; --ink: #F3ECE2; --muted: #B5AA9B; --line: #33302B;
    --brand: #D9B97E; --btn: #F3ECE2; --btn-ink: #141311; --accent: #E0C08A;
  }
}
:root[data-theme="dark"] body.gm {
  --bg: #141311; --surface: #1C1A17; --soft: #24211D; --ink: #F3ECE2; --muted: #B5AA9B; --line: #33302B;
  --brand: #D9B97E; --btn: #F3ECE2; --btn-ink: #141311; --accent: #E0C08A;
}
body.gm .section-head h2, body.gm .ds-hero h1 { font-family: var(--font-serif); font-weight: 700; letter-spacing: 0; }
.gm-glow { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 26px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #FFFFFF 0%, #F7F0E4 45%, #E9DCC6 100%); }
.gm-glow img { width: min(58%, 300px); height: auto; border-radius: 22%; box-shadow: 0 24px 60px rgba(120, 90, 40, .28); }
.gm-promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 820px) { .gm-promise { grid-template-columns: 1fr; } }
/* トップ：3アプリ並び */
.hero-apps .hero-app .row b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-apps .try-tag { font-size: 11px; padding: 4px 9px; white-space: nowrap; }
.hero-apps .hero-app:nth-child(3) { margin-top: 0; }
@media (max-width: 640px) {
  .hero-apps { grid-template-columns: repeat(3, 64%); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 22px; margin: 0 -2px; -webkit-overflow-scrolling: touch; }
  .hero-apps .hero-app { scroll-snap-align: start; }
}
/* アプリ一覧：3本そろって並べる */
@media (min-width: 1000px) {
  .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .app-card .body .btn-row { flex-direction: column; align-items: stretch; }
  .app-card .body .btn-row .btn { justify-content: center; text-align: center; }
}
.app-card .body { display: flex; flex-direction: column; gap: 14px; }
.app-card .body .btn-row { margin-top: auto; padding-top: 4px; }
/* トップの3枚：アプリ名が見切れないように */
.hero-apps .hero-app .row { gap: 8px; padding: 10px 10px; }
.hero-apps .hero-app .row img { width: 34px; height: 34px; border-radius: 9px; }
.hero-apps .hero-app .row b { font-size: clamp(13px, 1.25vw, 15.5px); overflow: visible; text-overflow: clip; }
.hero-apps .hero-app .row small { font-size: 11px; }

/* アプリページ上部：アプリ名を大きく（3アプリ共通） */
.app-name { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.app-name img { width: 52px; height: 52px; border-radius: 12px; flex: none; }
.app-name b { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3vw, 34px); line-height: 1.2; color: var(--ink); letter-spacing: -.01em; }
body.ds .app-name b, body.gm .app-name b { font-family: var(--font-serif); font-weight: 700; letter-spacing: 0; }
.app-name small { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.55; color: var(--muted); letter-spacing: .02em; }
.app-name small span { white-space: nowrap; }
/* 日本語の文章を文節の切れ目で改行する（data-budoux を付けた所） */
[data-budoux] { word-break: keep-all; overflow-wrap: anywhere; }
body.ny .stats span { white-space: nowrap; letter-spacing: -.02em; }
@media (max-width: 400px) { body.ny .stats span { font-size: 11.5px; } }

/* ---------- アプリ一覧：カードの境目をはっきり ---------- */
.app-card { --app-c: var(--brand); position: relative; border: 1.5px solid color-mix(in srgb, var(--ink) 14%, transparent);
  box-shadow: 0 22px 44px -30px rgb(0 0 0 / .45); }
.app-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--app-c); z-index: 2; }
.app-card.app-ds { --app-c: #9A6B3F; }
.app-card.app-ny { --app-c: #E6337A; }
.app-card.app-gm { --app-c: #B08D57; }
.app-card .body { border-top: 1px solid var(--line); }
.app-card .catno { color: var(--app-c); font-weight: 700; }
@media (max-width: 860px) {
  .app-grid { gap: 44px !important; }
  /* カードとカードの間に区切りの印 */
  .app-grid > .app-card + .app-card::after { content: ""; position: absolute; left: 50%; top: -26px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line); }
  .app-card { overflow: visible; }
  .app-card .media { border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0; }
  .app-card::before { border-radius: var(--radius) var(--radius) 0 0; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .app-card { border-color: color-mix(in srgb, var(--ink) 22%, transparent); } }
/* 枠をもう一段濃く */
.app-card { border: 2px solid color-mix(in srgb, var(--ink) 32%, transparent); }
.app-card .body { border-top-color: color-mix(in srgb, var(--ink) 18%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .app-card { border-color: color-mix(in srgb, var(--ink) 38%, transparent); } }
/* 言葉の途中で改行しない（対応ブラウザでは文節ごとに折り返す） */
.app-card p, .app-card li, .app-soon { word-break: auto-phrase; line-break: strict; }
/* 色の帯は枠の上辺そのものに（角の丸みに沿わせて、はみ出す線をなくす） */
.app-card::before { content: none !important; }
.app-card { border-top: 6px solid var(--app-c) !important; }
.app-card .media { border-radius: calc(var(--radius) - 4px) calc(var(--radius) - 4px) 0 0; }

/* ---------- 4アプリ並び（にゃんパス追加・全体のバランス調整） ---------- */
.try-tag.sky { background: #DFF1FF; color: #12466E; border: 2px solid #12466E; box-shadow: 0 3px 0 #12466E; }
.app-card.app-np { --app-c: #1E8FD9; }
/* トップの絵：2列×2段。右の列を少し下げて、リズムをつける */
@media (min-width: 641px) {
  .hero-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 460px; justify-self: end; width: 100%; }
  .hero-apps .hero-app:nth-child(2), .hero-apps .hero-app:nth-child(3) { margin-top: 0; }
  .hero-apps .hero-app:nth-child(even) { transform: translateY(32px); }
  .hero-apps .hero-app:nth-child(even):hover { transform: translateY(29px); }
  .hero-app .shot { aspect-ratio: 4 / 3; }
  .hero-apps .hero-app .row b { font-size: 15.5px; }
  .hero-apps { padding-bottom: 32px; }
}
@media (max-width: 640px) {
  .hero-apps { grid-template-columns: repeat(4, 64%); }
}
/* アプリ一覧：大きい画面は2列×2段で同じ大きさにそろえる */
@media (min-width: 1000px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .app-card .body .btn-row { flex-direction: row; align-items: center; }
  .app-card .body .btn-row .btn { flex: 1 1 0; }
}
/* フッター：アプリ4つ＋そのほか */
@media (min-width: 900px) { .fg-cols { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 641px) and (max-width: 899px) { .fg-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* 幅の狭いスマホ（iPhone SE など）でヘッダーがはみ出さないように */
@media (max-width: 360px) { .nav .hide-xs { display: none; } .nav { gap: 8px; font-size: 11.5px; } .brand { font-size: 15px; gap: 6px; } .brand .mark { width: 26px; height: 26px; } }
@media (max-width: 360px) { .stats { gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); } .stats div { padding: 12px 4px; } body.ny .stats span { font-size: 10.5px; } }
/* 比べる表：言葉の途中で改行しない（左の列は<br>の所だけで改行） */
.compare th, .compare td { word-break: keep-all; overflow-wrap: break-word; }
.compare td:first-child { white-space: nowrap; }
@media (max-width: 360px) { .compare th, .compare td { padding: 9px 8px; } }
@media (max-width: 360px) { .compare td.them, .compare thead th { font-size: 12px; } }

/* 1.3: App Store style screenshots */
.shot-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; margin-top: 8px; }
.shot-row figure { margin: 0; display: grid; gap: 8px; }
.shot-row img { width: 100%; height: auto; display: block; border-radius: 18px; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); }
.shot-row figcaption { font-size: 13px; font-weight: 700; text-align: center; color: var(--muted); }
.shot-row .wide { grid-column: span 2; }
@media (max-width: 760px) { .shot-row { grid-template-columns: repeat(2, 1fr); } }
.new-badge { display: inline-block; background: #FF4F8B; color: #fff; font-weight: 800; font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 2px solid var(--ink); margin-left: 8px; vertical-align: middle; }
/* 明るい色の上の白文字を読みやすく（見本画面の「正解！」） */
.lesson-mock .q span.ok { color: #12321F; }

/* ---------- 5アプリ並び（にゃんグリッシュ追加） ---------- */
.try-tag.mint { background: #DDF8EC; color: #0B5A41; border: 2px solid #0B5A41; box-shadow: 0 3px 0 #0B5A41; }
.app-card.app-eg { --app-c: #12A57A; }
/* トップの絵：大きい画面は3列（上3枚・下2枚を中央に）。絵を少し小さくして5枚でも窮屈にしない */
@media (min-width: 641px) {
  .hero-apps { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; max-width: 540px; padding-bottom: 8px; }
  .hero-apps .hero-app { grid-column: span 2; }
  .hero-apps .hero-app:nth-child(4) { grid-column: 2 / span 2; }
  .hero-apps .hero-app:nth-child(5) { grid-column: 4 / span 2; }
  .hero-apps .hero-app:nth-child(even), .hero-apps .hero-app:nth-child(even):hover { transform: none; }
  .hero-apps .hero-app:hover { transform: translateY(-3px); }
  .hero-apps .hero-app:nth-child(2) { margin-top: 18px; }
  .hero-app .shot { aspect-ratio: 1 / 1; }
  .hero-apps .hero-app .row { padding: 8px 8px; gap: 6px; }
  .hero-apps .hero-app .row img { width: 28px; height: 28px; border-radius: 8px; }
  .hero-apps .hero-app .row b { font-size: clamp(11.5px, 1.05vw, 13.5px); }
  .hero-apps .hero-app .row small { font-size: 10px; }
  .hero-apps .try-tag { font-size: 10px; padding: 3px 7px; top: 7px; left: 7px; }
}
@media (max-width: 640px) {
  .hero-apps { grid-template-columns: repeat(5, 62%); }
}
/* 新しいアプリの印 */
.hero-new::after { content: "NEW"; position: absolute; top: 7px; right: 7px; z-index: 1; font: 800 10px/1 var(--font-display); padding: 4px 7px; border-radius: 999px; background: #FF4F8B; color: #fff; border: 2px solid #2B2134; }
/* アプリ一覧：大きい画面は2列。5本目（最新）は横長に1枚で大きく */
@media (min-width: 1000px) {
  .app-grid > .app-card:nth-child(5) { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto; }
  .app-grid > .app-card:nth-child(5) .media { min-width: 0; aspect-ratio: auto; height: 100%; min-height: 360px; border-radius: calc(var(--radius) - 4px) 0 0 calc(var(--radius) - 4px); }
  .app-grid > .app-card:nth-child(5) .body { min-width: 0; background: var(--surface); }
  .app-grid > .app-card:nth-child(5) .media img { height: 100%; object-fit: cover; }
  .app-grid > .app-card:nth-child(5) .body { border-top: 0; border-left: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); }
}
/* フッター：アプリ5つ＋そのほか */
@media (min-width: 900px) { .fg-cols { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
