/* Memoria — digital legacy care: cold grey and white, a trace of lavender, mincho headings, hairline rules, no rounded cards */
:root {
  --bg: #f1f2f3;
  --paper: #f8f8f9;
  --white: #ffffff;
  --ink: #25272b;
  --ink-2: #4b4e55;
  --muted: #868990;
  --line: #d3d5d9;
  --line-2: #e4e5e8;
  --lav: #aaa3c7;
  --lav-soft: #ebe9f2;
  --lav-deep: #5d5680;
  --warn: #7b3b4a;
  --f-min: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --f-ja: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --f-en: "Cormorant Garamond", "Shippori Mincho", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --photo: saturate(.72) contrast(.98);
  color-scheme: light;
}
html:is([data-stage="2"], [data-stage="3"], [data-stage="4"]) { --lav: #a094c9; --lav-soft: #e8e5f1; }
html:is([data-stage="3"], [data-stage="4"]) { --bg: #eceef0; --photo: saturate(.45) contrast(1.02) brightness(.97); }
html[data-stage="4"] { --lav-deep: #4b3f78; --paper: #f4f4f6; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-variant-numeric: lining-nums; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-ja); font-weight: 300; font-size: 15px; line-height: 2; letter-spacing: .03em; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background .8s; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; }
strong, b { font-weight: 500; }
:focus-visible { outline: 1px solid var(--lav-deep); outline-offset: 3px; }
.container { max-width: 1120px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 820px; }
.min { font-family: var(--f-min); font-weight: 500; }
.en { font-family: var(--f-en); letter-spacing: .06em; }
.mono { font-family: var(--f-mono); letter-spacing: 0; }
.nb { white-space: nowrap; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* stage visibility helpers */
html[data-stage="0"] :is(.from-1, .from-2, .from-3, .from-4),
html[data-stage="1"] :is(.from-2, .from-3, .from-4),
html[data-stage="2"] :is(.from-3, .from-4),
html[data-stage="3"] .from-4,
html:is([data-stage="1"], [data-stage="2"], [data-stage="3"], [data-stage="4"]) .until-1,
html:is([data-stage="2"], [data-stage="3"], [data-stage="4"]) .until-2,
html:is([data-stage="3"], [data-stage="4"]) .until-3,
html[data-stage="4"] .until-4 { display: none !important; }

/* notice line + header */
.notice { border-bottom: 1px solid var(--line-2); font-size: 11.5px; color: var(--muted); background: var(--paper); }
.notice .container { display: flex; gap: 18px; min-height: 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.notice .count { color: var(--lav-deep); font-family: var(--f-mono); font-size: 11px; }
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 32px; min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo svg { width: 30px; height: 30px; flex: none; overflow: visible; }
.logo svg circle { fill: none; stroke: var(--ink); stroke-width: 1; transition: transform 1.6s cubic-bezier(.6, 0, .2, 1); }
.logo svg circle.b { stroke: var(--lav); }
html[data-stage="4"] .logo svg circle.a { transform: translateX(8px); }
html[data-stage="4"] .logo svg circle.b { transform: translateX(-8px); }
.logo .word { font-family: var(--f-en); font-size: 25px; font-weight: 500; font-style: italic; letter-spacing: .04em; line-height: 1; }
.logo .word small { display: block; font-family: var(--f-min); font-style: normal; font-size: 10px; letter-spacing: .32em; color: var(--muted); margin-top: 5px; }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: 13px; letter-spacing: .08em; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 26px; font-size: 13.5px; font-weight: 400; letter-spacing: .12em; text-decoration: none; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; border-radius: 0; transition: background .25s, color .25s; }
.btn:hover { background: var(--ink-2); }
.btn.line { background: transparent; color: var(--ink); }
.btn.line:hover { background: var(--ink); color: #fff; }
.btn.sm { padding: 9px 18px; font-size: 12.5px; }
.btn .arr { font-family: var(--f-en); }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; padding: 0; }
.menu-btn span { display: block; width: 22px; height: 1px; background: var(--ink); margin: 6px auto; }

/* section scaffolding */
.sec { padding-block: 112px; }
.sec.paper { background: var(--paper); border-block: 1px solid var(--line-2); }
.sec-head { margin-bottom: 56px; display: grid; gap: 18px; align-content: start; }
.sec-no { font-family: var(--f-en); font-size: 14px; letter-spacing: .24em; color: var(--muted); display: flex; align-items: center; gap: 14px; }
.sec-no::after { content: ""; width: 48px; height: 1px; background: var(--line); }
.sec-head h2 { font-family: var(--f-min); font-weight: 500; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.6; margin: 0; letter-spacing: .08em; text-wrap: balance; }
.sec-head p { margin: 0; color: var(--ink-2); max-width: 36em; }
.page-head { padding-block: 72px 48px; border-bottom: 1px solid var(--line); }
.crumb { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; letter-spacing: .08em; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.page-head h1 { font-family: var(--f-min); font-weight: 500; font-size: clamp(28px, 4vw, 42px); line-height: 1.55; margin: 22px 0 14px; letter-spacing: .08em; }
.page-head p { margin: 0; color: var(--ink-2); max-width: 40em; }
.photo { position: relative; overflow: hidden; background: var(--line-2); }
.photo > img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo); transition: filter 1s; }

/* hero */
.hero { position: relative; }
.hero-photo { position: relative; height: min(76vh, 720px); min-height: 460px; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; filter: var(--photo); }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(241, 242, 243, .92) 0, rgba(241, 242, 243, .7) 34%, rgba(241, 242, 243, 0) 62%); }
.hero-copy { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; }
.hero-copy .container { width: 100%; }
.hero-copy .inner { max-width: 540px; }
.hero h1 { font-family: var(--f-min); font-weight: 500; font-size: clamp(28px, 3.9vw, 46px); line-height: 1.7; letter-spacing: .1em; margin: 0 0 28px; }
.hero .lead { color: var(--ink-2); margin: 0 0 40px; max-width: 26em; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .eyebrow { font-family: var(--f-en); font-style: italic; font-size: 17px; color: var(--lav-deep); letter-spacing: .08em; margin-bottom: 20px; display: block; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); background: var(--paper); }
.stat { padding: 26px 28px; border-left: 1px solid var(--line-2); }
.stat:first-child { border-left: 0; }
.stat .k { font-size: 11.5px; color: var(--muted); letter-spacing: .12em; }
.stat .v { font-family: var(--f-en); font-size: 34px; line-height: 1.3; font-weight: 500; }
.stat .v.ja { font-family: var(--f-min); font-size: 28px; }
.stat .v small { font-family: var(--f-ja); font-size: 12px; margin-left: 4px; color: var(--ink-2); }
.stat.lav .v { color: var(--lav-deep); }

/* news */
.news { display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.news ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.news li { display: grid; grid-template-columns: 7.5em 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.news time { font-family: var(--f-mono); font-size: 12px; color: var(--muted); padding-top: 2px; }
.news li.imp span { color: var(--warn); }
.news li a { text-decoration: none; border-bottom: 1px solid var(--line); }

/* services */
.svc { display: grid; gap: 96px; }
.svc-item { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.svc-item:nth-child(even) .photo { order: 2; }
.svc-item .photo { aspect-ratio: 4 / 3; }
.svc-item .no { font-family: var(--f-en); font-size: 15px; letter-spacing: .2em; color: var(--muted); }
.svc-item h3 { font-family: var(--f-min); font-weight: 500; font-size: 23px; line-height: 1.65; margin: 10px 0 18px; letter-spacing: .08em; }
.svc-item p { margin: 0 0 14px; color: var(--ink-2); }
.svc-item .price-hint { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 22px; }
.svc-item .more { font-size: 13px; letter-spacing: .1em; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.svc-item .lav { color: var(--lav-deep); }

/* price */
table.price { width: 100%; border-collapse: collapse; font-size: 14px; }
table.price th, table.price td { padding: 20px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-weight: 300; }
table.price thead th { font-size: 11.5px; color: var(--muted); letter-spacing: .14em; padding-block: 10px; border-bottom-color: var(--ink); }
table.price td.num { text-align: right; font-family: var(--f-en); font-size: 21px; font-weight: 500; white-space: nowrap; }
table.price td.num small { font-family: var(--f-ja); font-size: 11.5px; color: var(--muted); font-weight: 300; margin-left: 2px; }
table.price td .sub { display: block; font-size: 12px; color: var(--muted); }
.price-note { font-size: 12.5px; color: var(--muted); margin-top: 18px; }
.price-note .warn { color: var(--warn); }

/* flow */
.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); counter-reset: f; }
.flow li { padding: 30px 28px 34px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); counter-increment: f; background: var(--white); }
.flow li::before { content: "0" counter(f); font-family: var(--f-en); font-size: 28px; color: var(--lav); display: block; line-height: 1; margin-bottom: 14px; }
.flow h3 { font-family: var(--f-min); font-weight: 500; font-size: 17px; margin: 0 0 8px; letter-spacing: .06em; }
.flow p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

/* voices */
.voices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.voice { padding: 36px 32px 34px 0; border-bottom: 1px solid var(--line); display: grid; gap: 16px; align-content: start; }
.voice:nth-child(even) { padding: 36px 0 34px 32px; border-left: 1px solid var(--line); }
.who { display: flex; gap: 14px; align-items: center; }
.av { width: 46px; height: 46px; border-radius: 50%; flex: none; overflow: hidden; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; font-family: var(--f-en); font-size: 15px; color: var(--ink-2); }
.av img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.who .n { font-size: 14px; font-weight: 400; display: block; line-height: 1.5; }
.who .d { font-size: 11.5px; color: var(--muted); line-height: 1.6; display: block; }
.voice > p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.voice .meta { font-family: var(--f-mono); font-size: 11px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.voice .meta .upd { color: var(--lav-deep); }
.hist-btn { justify-self: start; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 0 0 2px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; letter-spacing: .08em; }
.hist-btn:hover { border-color: var(--ink); }
.hist { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 1px solid var(--lav); display: grid; gap: 18px; }
.hist li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; font-size: 13.5px; color: var(--ink-2); }
.hist li .av { width: 34px; height: 34px; font-size: 12px; }
.hist li time { display: block; font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.hist li p { margin: 2px 0 0; }
.hist li.trigger { cursor: pointer; padding: 10px 10px 10px 0; margin: -10px -10px -10px 0; transition: background .3s; }
.hist li.trigger:hover, .hist li.trigger:focus-visible { background: var(--lav-soft); outline: none; }
.voice-hint { margin-top: 30px; font-size: 13px; color: var(--ink-2); }
.voice-hint a { color: var(--lav-deep); }

/* faq */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 24px 40px 24px 0; font-family: var(--f-min); font-weight: 500; font-size: 16px; position: relative; display: flex; gap: 18px; letter-spacing: .05em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q."; font-family: var(--f-en); color: var(--lav-deep); font-size: 18px; line-height: 1.6; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 1px; background: var(--ink); box-shadow: none; transition: transform .3s; }
.faq details:not([open]) summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 12px 1px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 1px 12px no-repeat; height: 12px; margin-top: -6px; }
.faq .a { padding: 0 0 26px 36px; color: var(--ink-2); font-size: 14px; }
.faq details.new summary::before { color: var(--warn); }

/* company */
.company { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.company .photo { aspect-ratio: 3 / 2; }
dl.tbl { margin: 0; display: grid; grid-template-columns: 8em 1fr; border-top: 1px solid var(--line); font-size: 14px; }
dl.tbl dt, dl.tbl dd { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
dl.tbl dt { color: var(--muted); font-size: 12.5px; letter-spacing: .08em; }

/* cta band */
.cta-band { padding-block: 96px; text-align: center; border-top: 1px solid var(--line); }
.cta-band h2 { font-family: var(--f-min); font-weight: 500; font-size: clamp(22px, 3vw, 30px); letter-spacing: .1em; margin: 0 0 14px; line-height: 1.7; }
.cta-band p { margin: 0 0 32px; color: var(--ink-2); }
.cta-band .tel { font-family: var(--f-en); font-size: 34px; letter-spacing: .08em; display: block; margin: 8px 0 28px; }

/* footer */
.site-footer { background: #e6e7e9; border-top: 1px solid var(--line); padding-block: 64px 28px; font-size: 12.5px; color: var(--ink-2); }
.site-footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.site-footer h4 { font-family: var(--f-en); font-size: 14px; font-weight: 500; letter-spacing: .2em; margin: 0 0 12px; color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.site-footer .legal button { background: none; border: 1px solid var(--line); color: var(--muted); padding: 1px 12px; font-size: 11.5px; cursor: pointer; }
.site-footer .legal button:hover { color: var(--ink); border-color: var(--ink); }
.site-footer .f-status { margin-top: 14px; font-family: var(--f-mono); font-size: 11px; color: var(--lav-deep); }

/* ---------- AI page ---------- */
.ai-steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.ai-steps.four { grid-template-columns: repeat(4, 1fr); }
.ai-steps > div { padding: 28px 24px 30px 0; border-bottom: 1px solid var(--line); }
.ai-steps > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.ai-steps .en { font-size: 30px; color: var(--lav); line-height: 1; }
.ai-steps h3 { font-family: var(--f-min); font-weight: 500; font-size: 17px; margin: 14px 0 8px; }
.ai-steps p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.ai-steps .new h3 { color: var(--warn); }
.demo-wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
.demo-intro p { color: var(--ink-2); }
.demo-intro .profile { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: center; padding: 22px 0; border-block: 1px solid var(--line); margin: 26px 0; }
.demo-intro .profile .av { width: 72px; height: 72px; }
.demo-intro .profile b { font-family: var(--f-min); font-weight: 500; font-size: 18px; display: block; }
.demo-intro .profile small { font-size: 12px; color: var(--muted); display: block; line-height: 1.7; }
.demo-notes { font-size: 12px; color: var(--muted); margin: 0; padding-left: 1.2em; }

/* setup form inside the demo */
.field { display: grid; gap: 8px; align-content: start; }
.field label, .field .lbl { font-size: 12.5px; letter-spacing: .1em; color: var(--ink-2); font-weight: 400; }
.field label .req { color: var(--warn); font-size: 11px; margin-left: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 0; background: var(--white); color: var(--ink); font-size: 15px; font-weight: 300; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field.err input, .field.err select, .field.err textarea { border-color: var(--warn); }
.field .msg { font-size: 12px; color: var(--warn); min-height: 0; margin: 0; }
.field .hint { font-size: 11.5px; color: var(--muted); margin: 0; }

/* chat */
.chat { position: relative; background: var(--white); border: 1px solid var(--line); display: grid; grid-template-rows: auto 1fr auto; height: 640px; max-height: 82vh; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: var(--paper); position: relative; z-index: 3; min-height: 64px; }
.chat-head .av { width: 38px; height: 38px; }
.chat-head .nm { font-size: 14px; font-weight: 400; line-height: 1.4; }
.chat-head .st { font-size: 11px; color: var(--muted); line-height: 1.4; display: block; transition: color .3s; }
.chat-head .st.typing { color: var(--lav-deep); }
.end-btn { margin-left: auto; background: var(--white); border: 1px solid var(--line); padding: 6px 12px; font-size: 12px; color: var(--ink-2); cursor: pointer; letter-spacing: .08em; white-space: nowrap; transition: border-color .3s; }
.end-btn:hover { border-color: var(--ink); color: var(--ink); }
.end-btn.loose { position: absolute; z-index: 6; margin: 0; }
.end-btn.tired { animation: tired 2.6s ease-in-out infinite; }
@keyframes tired { 50% { box-shadow: 0 0 0 4px var(--lav-soft); } }
.chat-log { overflow-y: auto; padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(var(--white), var(--paper)); scroll-behavior: smooth; overscroll-behavior: contain; }
.sys { align-self: center; font-size: 11px; color: var(--muted); background: var(--bg); padding: 2px 12px; margin: 8px 0; letter-spacing: .06em; text-align: center; max-width: 92%; }
.sys.warn { color: var(--warn); }
.row { display: flex; gap: 8px; align-items: flex-end; max-width: 84%; transition: transform .7s cubic-bezier(.6, 0, .2, 1), opacity .4s; }
.row .av { width: 32px; height: 32px; align-self: flex-start; }
.row .av.ghost { visibility: hidden; }
.row .col { display: flex; flex-direction: column; min-width: 0; }
.row.me .who-name, .row.ai .read, .chat.swapped .row.me .read { display: none; }
.chat.swapped .row.me .who-name, .chat.swapped .row.ai .read { display: inline; }
.row .who-name { font-size: 10.5px; color: var(--muted); margin: 0 0 2px 2px; }
.bubble { padding: 9px 14px; font-size: 14px; line-height: 1.75; font-weight: 400; word-break: break-word; white-space: pre-wrap; background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } }
.row .side { display: flex; flex-direction: column; justify-content: flex-end; font-size: 10px; color: var(--muted); line-height: 1.35; white-space: nowrap; padding-bottom: 2px; }
.row.ai { align-self: flex-start; }
.row.me { align-self: flex-end; flex-direction: row-reverse; }
.row.me .side { text-align: right; }
.row.me .bubble { background: var(--lav-soft); border-color: color-mix(in srgb, var(--lav) 40%, transparent); }
.row.me .av { display: none; }
.read { color: var(--lav-deep); }
/* swapped: the deceased takes your side, you take hers */
.chat.swapped .row.ai { align-self: flex-end; flex-direction: row-reverse; }
.chat.swapped .row.ai .side { text-align: right; }
.chat.swapped .row.ai .bubble { background: var(--lav-soft); border-color: color-mix(in srgb, var(--lav) 40%, transparent); }
.chat.swapped .row.ai .av, .chat.swapped .row.ai .who-name { display: none; }
.chat.swapped .row.me { align-self: flex-start; flex-direction: row; }
.chat.swapped .row.me .side { text-align: left; }
.chat.swapped .row.me .bubble { background: var(--bg); border-color: var(--line-2); }
.chat.swapped .row.me .av { display: grid; }
.chat.flipping .row { opacity: .15; }
.typing-row .bubble { display: inline-flex; gap: 5px; align-items: center; padding: 13px 14px; }
.typing-row .bubble i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dot 1.2s infinite; }
.typing-row .bubble i:nth-child(2) { animation-delay: .15s; }
.typing-row .bubble i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.composer { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-2); background: var(--white); }
.composer input { flex: 1; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); background: var(--paper); font-size: 15px; font-weight: 300; border-radius: 0; }
.composer input:focus { outline: none; border-color: var(--ink); }
.composer button { border: 1px solid var(--ink); background: var(--ink); color: #fff; padding: 0 18px; cursor: pointer; font-size: 13px; letter-spacing: .1em; }
.composer button:disabled, .composer input:disabled { opacity: .45; cursor: not-allowed; }
.chat-setup { position: absolute; inset: 64px 0 0; z-index: 4; background: var(--white); padding: 32px 28px; display: grid; align-content: start; gap: 20px; overflow: auto; }
.chat-setup h3 { font-family: var(--f-min); font-weight: 500; font-size: 19px; margin: 0; letter-spacing: .06em; }
.chat-setup p { margin: 0; font-size: 13px; color: var(--ink-2); }
.chat-setup dl { margin: 0; display: grid; grid-template-columns: 7em 1fr; font-size: 13px; border-top: 1px solid var(--line-2); }
.chat-setup dt, .chat-setup dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.chat-setup dt { color: var(--muted); }
.chat-ended { position: absolute; inset: auto 0 0; z-index: 4; background: var(--paper); border-top: 1px solid var(--line); padding: 16px; text-align: center; font-size: 13px; display: grid; gap: 10px; justify-items: center; }
.chat-ended a { color: var(--lav-deep); }

/* ---------- case page ---------- */
.case-sum { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); margin-top: 40px; }
.case-sum > div { padding: 18px 20px 18px 0; border-bottom: 1px solid var(--line); }
.case-sum > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.case-sum .k { font-size: 11px; color: var(--muted); letter-spacing: .14em; display: block; }
.case-sum .v { font-size: 14.5px; }
.case-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: start; }
.box-photo { position: relative; aspect-ratio: 4 / 3; }
.box-photo > img { position: absolute; inset: 0; }
.box-photo .ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: multiply; filter: none; }
.hot { position: absolute; background: transparent; border: 0; padding: 0; cursor: zoom-in; }
.hot:hover, .hot:focus-visible { outline: 1px solid rgba(255, 255, 255, .9); outline-offset: 2px; box-shadow: 0 0 0 1px rgba(40, 40, 60, .4), 0 0 24px rgba(170, 163, 199, .6); }
.hot.phone { border-radius: 4%; }
.hot.phone::after { content: ""; position: absolute; inset: 6% 8%; border-radius: 6px; box-shadow: 0 0 0 0 rgba(200, 196, 230, .55); animation: ring 2.8s ease-out infinite; pointer-events: none; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(200, 196, 230, .6); } 70%, 100% { box-shadow: 0 0 0 14px rgba(200, 196, 230, 0); } }
figure { margin: 0; }
figcaption { font-size: 12px; color: var(--muted); margin-top: 10px; }
.case-body h3 { font-family: var(--f-min); font-weight: 500; font-size: 18px; margin: 0 0 12px; letter-spacing: .06em; }
.case-body p { color: var(--ink-2); margin: 0 0 18px; font-size: 14.5px; }
.case-body ol { padding-left: 1.3em; margin: 0 0 22px; color: var(--ink-2); font-size: 14px; }
.case-body .upd { border-left: 2px solid var(--warn); padding: 4px 0 4px 16px; color: var(--warn); font-size: 13.5px; }

/* sns screenshots (recreated in HTML) */
.sns-grid { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: start; }
.sns { background: var(--white); border: 1px solid var(--line); font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif; font-weight: 400; letter-spacing: 0; line-height: 1.6; color: #17181a; box-shadow: 0 1px 0 rgba(0, 0, 0, .02), 0 18px 40px -24px rgba(30, 30, 50, .25); }
.sns-top { height: 92px; background: linear-gradient(135deg, #d9d6e4, #eef0f2); }
.sns-prof { padding: 0 16px 16px; border-bottom: 1px solid #eceef0; }
.sns-prof .av { width: 72px; height: 72px; margin-top: -36px; border: 3px solid #fff; }
.sns-prof .nm { font-size: 17px; font-weight: 700; margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sns-prof .tag { font-size: 11px; font-weight: 400; border: 1px solid #c9c4dc; color: #5d5680; padding: 0 8px; border-radius: 999px; }
.sns-prof .hd { font-size: 13px; color: #6b6f76; }
.sns-prof .bio { font-size: 13.5px; margin-top: 6px; }
.sns-prof .life { font-size: 12.5px; color: #6b6f76; margin-top: 6px; }
.posts { display: grid; gap: 0; }
.post { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #eceef0; font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif; font-weight: 400; letter-spacing: 0; line-height: 1.6; color: #17181a; background: var(--white); }
.post .av { width: 40px; height: 40px; }
.post .hd { font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; }
.post .hd b { font-weight: 700; }
.post .hd span { color: #6b6f76; }
.post .tx { font-size: 14px; margin-top: 2px; white-space: pre-wrap; }
.post .im { margin-top: 8px; border-radius: 12px; overflow: hidden; border: 1px solid #eceef0; aspect-ratio: 1; max-width: 220px; }
.post .im img { width: 100%; height: 100%; object-fit: cover; }
.post .rep { font-size: 12.5px; color: #6b6f76; margin-top: 8px; padding: 8px 10px; background: #f5f6f7; border-radius: 8px; }
.post .rep b { color: #17181a; font-weight: 700; }
.post .acts { display: flex; gap: 24px; font-size: 12px; color: #8a8e95; margin-top: 6px; }
.post-list { border: 1px solid var(--line); max-height: 720px; overflow: auto; }
.post-list .cap { padding: 10px 16px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--paper); font-family: var(--f-ja); letter-spacing: .06em; position: sticky; top: 0; z-index: 2; }

/* zoom modal (label) */
.zoom { position: fixed; inset: 0; z-index: 90; background: rgba(20, 21, 24, .86); display: grid; place-items: center; padding: 24px; }
.zoom-box { position: relative; width: min(980px, 100%); max-height: 92vh; display: grid; gap: 12px; }
.zoom-box img { width: 100%; max-height: 82vh; object-fit: contain; animation: zin .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes zin { from { transform: scale(1.12); filter: blur(5px); opacity: 0; } }
.zoom-close { justify-self: end; background: none; border: 1px solid rgba(255, 255, 255, .5); color: #fff; padding: 6px 16px; font-size: 12px; letter-spacing: .12em; cursor: pointer; }

/* phone modal: a photographed phone with a live screen projected onto it */
.phone-modal { position: fixed; inset: 0; z-index: 92; background: #101113; display: grid; place-items: center; padding: 16px; overflow: hidden; }
.phone-stage { position: relative; overflow: hidden; width: 300px; height: 500px; }
.phone-stage > img { position: absolute; max-width: none; height: auto; filter: saturate(.6) brightness(.82); }
.screen { position: absolute; left: 0; top: 0; width: 320px; height: 569px; transform-origin: 0 0; overflow: hidden; background: #000; color: #fff; font-family: -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; font-weight: 400; letter-spacing: 0; line-height: 1.45; user-select: none; -webkit-user-select: none; }
.screen .glare { position: absolute; inset: 0; z-index: 30; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, .13) 0, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .06) 100%); }
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; }
.lock-bg { position: absolute; inset: 0; background-size: cover; background-position: 40% 50%; filter: brightness(.55) saturate(.7); }
.lock-top { position: relative; text-align: center; padding-top: 22px; }
.lock-top .dt { font-size: 15px; font-weight: 500; opacity: .9; }
.lock-top .tm { font-size: 58px; font-weight: 600; line-height: 1.05; letter-spacing: -2px; }
.notifs { position: relative; margin-top: auto; padding: 0 8px 8px; display: grid; gap: 6px; }
.nt { background: rgba(245, 245, 250, .2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 15px; padding: 8px 11px; display: grid; grid-template-columns: 26px 1fr auto; gap: 1px 9px; font-size: 13px; }
.nt .ic { width: 26px; height: 26px; border-radius: 6px; grid-row: span 2; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.nt .ap { font-weight: 600; font-size: 13px; }
.nt .tt { font-size: 11px; opacity: .7; text-align: right; }
.nt .bd { grid-column: 2 / 4; font-size: 12.5px; line-height: 1.4; opacity: .95; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nt.stack { box-shadow: 0 6px 0 -3px rgba(245, 245, 250, .14), 0 11px 0 -6px rgba(245, 245, 250, .08); margin-bottom: 8px; }
.ic.line { background: #3bbf5c; color: #fff; }
.ic.cal { background: #fff; color: #e5483b; font-size: 11px; }
.ic.tel { background: #3bbf5c; color: #fff; }
.ic.mem { background: #ebe9f2; color: #5d5680; font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 17px; }
.ic.msg { background: #34c759; color: #fff; }
.lock-more { text-align: center; font-size: 11.5px; opacity: .7; }
.lock-foot { position: relative; text-align: center; font-size: 12px; opacity: .8; padding-bottom: 8px; }
.lock-foot::after { content: ""; display: block; width: 136px; height: 5px; border-radius: 3px; background: #fff; margin: 10px auto 0; }
.pass { background: rgba(10, 10, 14, .62); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); align-items: center; padding-top: 44px; }
.pass h4 { font-size: 17px; font-weight: 500; margin: 0 0 18px; }
.dots { display: flex; gap: 22px; margin-bottom: 18px; }
.dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid #fff; }
.dots i.on { background: #fff; }
.dots.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-12px); } 40%, 80% { transform: translateX(12px); } }
.pass .pmsg { height: 20px; font-size: 12.5px; color: #ffd0d6; margin-bottom: 12px; }
.keys { display: grid; grid-template-columns: repeat(3, 64px); gap: 12px 20px; }
.keys button { width: 64px; height: 64px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .18); color: #fff; font-size: 29px; font-weight: 400; line-height: 1; cursor: pointer; display: grid; place-items: center; align-content: center; font-family: inherit; }
.keys button small { font-size: 9.5px; letter-spacing: 2px; font-weight: 600; margin-top: 2px; }
.keys button:active, .keys button.hit { background: rgba(255, 255, 255, .5); }
.keys .blank { visibility: hidden; }
.pass .cancel { position: absolute; right: 28px; bottom: 16px; background: none; border: 0; color: #fff; font-size: 15px; cursor: pointer; font-family: inherit; }
.talk { background: #e9eaee; color: #111; }
.talk-head { background: #f6f6f8; padding: 18px 12px 8px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #dcdde2; font-size: 16px; font-weight: 600; }
.talk-head .bk { color: #3a7bd5; font-size: 22px; font-weight: 400; }
.talk-head small { font-size: 11px; color: #7a7c84; font-weight: 400; display: block; }
.talk-log { flex: 1; overflow-y: auto; padding: 12px 10px 18px; display: flex; flex-direction: column; gap: 7px; }
.talk-log .day { align-self: center; font-size: 11px; background: rgba(0, 0, 0, .14); color: #fff; padding: 1px 10px; border-radius: 10px; margin: 6px 0; }
.tl { display: flex; gap: 6px; align-items: flex-end; max-width: 86%; }
.tl .av { width: 30px; height: 30px; align-self: flex-start; border: 0; }
.tl .b { padding: 6px 10px; border-radius: 15px; font-size: 13px; line-height: 1.5; background: #fff; white-space: pre-wrap; }
.tl .t { font-size: 9.5px; color: #7a7c84; white-space: nowrap; line-height: 1.3; }
.tl.r { align-self: flex-end; flex-direction: row-reverse; }
.tl.r .b { background: #8de07a; }
.tl.r .t { text-align: right; }
.tl.odd .b { background: #c8f0bd; }
.banner { position: absolute; left: 10px; right: 10px; top: 12px; z-index: 20; background: rgba(250, 250, 252, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: #111; border-radius: 20px; padding: 12px 14px; display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; cursor: pointer; transform: translateY(-140%); transition: transform .55s cubic-bezier(.2, .9, .3, 1.1); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); border: 0; text-align: left; font-family: inherit; }
.banner.in { transform: none; }
.banner .ic { width: 34px; height: 34px; border-radius: 8px; grid-row: span 2; display: grid; place-items: center; }
.banner b { font-size: 14px; font-weight: 600; }
.banner span { font-size: 13.5px; line-height: 1.4; }
.phone-close { position: absolute; right: 16px; top: 16px; z-index: 5; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .35); color: #fff; padding: 6px 14px; font-size: 12px; letter-spacing: .1em; cursor: pointer; }
.phone-hint { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 5; text-align: center; color: rgba(255, 255, 255, .7); font-size: 12px; letter-spacing: .1em; pointer-events: none; }

/* ---------- order form ---------- */
.order { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: start; }
.form { display: grid; gap: 26px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.checks { display: grid; gap: 8px; font-size: 14px; }
.checks label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.checks input { accent-color: var(--ink); width: 16px; height: 16px; }
.form .agree { font-size: 12.5px; color: var(--muted); }
.form-done { border: 1px solid var(--line); background: var(--white); padding: 28px; display: grid; gap: 10px; }
.form-done h3 { font-family: var(--f-min); font-weight: 500; margin: 0; font-size: 19px; }
.form-done p { margin: 0; font-size: 14px; color: var(--ink-2); }
.side-box { border: 1px solid var(--line); background: var(--white); padding: 28px; position: sticky; top: 100px; }
.side-box h3 { font-family: var(--f-min); font-weight: 500; font-size: 17px; margin: 0 0 14px; }
.side-box p, .side-box li { font-size: 13.5px; color: var(--ink-2); }
.side-box ul { padding-left: 1.2em; margin: 0; }
.field.prefilled input { background: var(--lav-soft); color: var(--lav-deep); }
.verify { position: fixed; inset: 0; z-index: 95; background: var(--white); display: grid; place-items: center; text-align: center; animation: vfade 1.2s ease both; }
@keyframes vfade { from { opacity: 0; } }
.verify p { font-family: var(--f-min); font-size: clamp(18px, 2.6vw, 24px); letter-spacing: .14em; margin: 0; }
.verify small { display: block; margin-top: 16px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); letter-spacing: 0; }

/* ---------- alteration overlay ---------- */
.alter { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; cursor: pointer; background: #0d0d10; }
.alter canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; image-rendering: pixelated; }
.alter .msg { position: relative; text-align: center; color: #fff; font-family: var(--f-min); font-size: clamp(22px, 4vw, 40px); font-weight: 600; letter-spacing: .14em; text-shadow: 3px 0 rgba(170, 120, 255, .9), -3px 0 rgba(120, 220, 255, .8); animation: jit .18s steps(2) infinite; padding: 0 16px; }
.alter .msg small { display: block; margin-top: 18px; font-family: var(--f-en); font-size: 13px; letter-spacing: .3em; text-shadow: none; color: #bbb; }
@keyframes jit { 50% { transform: translate(2px, -1px); text-shadow: -3px 0 rgba(170, 120, 255, .9), 3px 0 rgba(120, 220, 255, .8); } }
html.glitching body { animation: gl .45s steps(3); }
@keyframes gl { 33% { filter: grayscale(1) contrast(1.5); transform: translateX(3px); } 66% { filter: invert(1); transform: translateX(-3px); } }

@media (max-width: 960px) {
  .svc-item, .company, .demo-wrap, .case-grid, .order, .sns-grid, .news { grid-template-columns: 1fr; gap: 36px; }
  .svc-item:nth-child(even) .photo { order: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .case-sum { grid-template-columns: repeat(2, 1fr); }
  .case-sum > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .ai-steps.four { grid-template-columns: repeat(2, 1fr); }
  .ai-steps.four > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .side-box { position: static; }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 4px 24px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .menu-btn { display: block; }
  .site-header .hdr-cta { display: none; }
  .sec { padding-block: 80px; }
  .hero-photo { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .hero-photo::after { background: linear-gradient(0deg, rgba(241, 242, 243, 1) 0, rgba(241, 242, 243, 0) 40%); }
  .hero-copy { position: relative; padding-block: 8px 48px; }
  .voices { grid-template-columns: 1fr; }
  .voice, .voice:nth-child(even) { padding: 30px 0; border-left: 0; }
  .flow { grid-template-columns: 1fr; }
  .ai-steps, .ai-steps.four { grid-template-columns: 1fr; }
  .ai-steps > div + div, .ai-steps.four > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .ai-steps > div { padding-right: 0; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .news li { grid-template-columns: 1fr; gap: 2px; }
  .chat { height: 600px; max-height: 86vh; }
  .chat-setup { padding: 24px 18px; }
  .row { max-width: 90%; }
  dl.tbl { grid-template-columns: 6.5em 1fr; }
  table.price th, table.price td { padding: 16px 4px; }
  table.price td.num { font-size: 18px; }
  .case-sum { grid-template-columns: 1fr; }
  .case-sum > div + div { padding-left: 0; border-left: 0; }
  .stat { padding: 18px 16px; }
  .stat .v { font-size: 28px; }
}
