@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/inter.woff2') format('woff2'); }
@font-face { font-family: Newsreader; font-style: italic; font-weight: 400; font-display: swap; src: url('/assets/newsreader-italic.woff2') format('woff2'); }
@font-face { font-family: 'Zen Maru Gothic'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/zen-maru-katakana.woff2') format('woff2'); }

/* Nori connection website. Design system: Matcha.
   Light and dark follow the person's system setting through color-scheme and light-dark().
   Places (Connections, app pages) are left-aligned; moments (sign in, approve, return) are centred. */

:root {
  color-scheme: light dark;
  --bg: light-dark(#EFF2E8, #0E1410);
  --bar: light-dark(#DCE7C8, #18251C);
  --bar-ink: light-dark(#15301F, #E4ECDF);
  --bar-ink-2: light-dark(#4A6150, #9FB09F);
  --bar-line: light-dark(#CBD9B3, #223026);
  --surface: light-dark(#FFFFFF, #131B16);
  --surface-2: light-dark(#F1F4EA, #1A241D);
  --line: light-dark(#DCE3D0, #253128);
  --line-2: light-dark(#BCC8AE, #38473C);
  --ink: light-dark(#14271B, #E4ECDF);
  --ink-2: light-dark(#4A5D4F, #A0AE9F);
  --ink-3: light-dark(#5F6F63, #7F8D80);
  --primary: light-dark(#2D6A3E, #A8CF7C);
  --on-primary: light-dark(#FFFFFF, #0E1410);
  --accent: light-dark(#2D6A3E, #A8CF7C);
  --selected: light-dark(#E1EBD0, #1C2A1C);
  --hover: light-dark(#F3F6EE, #172019);
  --hover-surface: light-dark(#F7F9F4, #1B241D);
  --hover-overlay: light-dark(rgba(20, 39, 27, .08), rgba(228, 236, 223, .1));
  --ok: light-dark(#2E8B45, #93D06E);
  --ok-ink: light-dark(#27773B, #93D06E);
  --wait: light-dark(#C98A12, #E9B949);
  --wait-ink: light-dark(#7F5300, #E9B949);
  --danger: light-dark(#B3261E, #FF8A75);
  --on-danger: light-dark(#FFFFFF, #0E1410);
  --tile: light-dark(#EEF2E6, #1A241D);
  --avatar: light-dark(#2D6A3E, #A8CF7C);
  --on-avatar: light-dark(#FFFFFF, #0E1410);
  --mark-tile: #B5D65A;
  --mark-rice: #FFFFFF;
  --mark-nori: #123D2B;
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-tile: 10px;
  --font-ui: Inter, "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --font-voice: Newsreader, "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --font-kana: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; }
button { font: inherit; color: inherit; }
form { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header for places ---------- */
.bar { background: var(--bar); color: var(--bar-ink); border-bottom: 1px solid var(--bar-line); }
.bar-in { max-width: 1040px; height: 56px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: inherit; text-decoration: none; border-radius: var(--radius-control); }
.brand-mark { display: block; width: 28px; height: 28px; flex: none; }
.wordmark { font: 600 21px/1 var(--font-ui); letter-spacing: -0.04em; }
.kana { margin-left: -2px; padding-top: 2px; font: 500 12px/1 var(--font-kana); letter-spacing: 0.1em; color: var(--bar-ink-2); }
.signin-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--bar-ink-2); border-radius: var(--radius-control); color: var(--bar-ink); font: 500 14px/1 var(--font-ui); text-decoration: none; }

/* Account menu: a native disclosure, so it works without script. */
.account { position: relative; }
.account > summary { list-style: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -6px; border-radius: 999px; cursor: pointer; }
.account > summary::-webkit-details-marker { display: none; }
.avatar { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border-radius: 999px; background: var(--avatar); color: var(--on-avatar); font: 600 13px/1 var(--font-ui); }
.menu { position: absolute; top: calc(100% + 6px); right: -6px; z-index: 10; width: 240px; padding: 6px; display: flex; flex-direction: column; text-align: left; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: 0 18px 48px rgba(0, 0, 0, .16); transform-origin: top right; animation: menu-in 160ms var(--ease-out) both; }
.menu-who { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.menu-name { font: 600 14px/1.3 var(--font-ui); }
.menu-sub { font: 400 13px/1.3 var(--font-ui); color: var(--ink-2); overflow-wrap: anywhere; }
.menu-item { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--ink); font: 500 14px/1 var(--font-ui); text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover { background: var(--hover); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }

.notice { max-width: 1040px; margin: 0 auto; padding: 0 16px; font: 500 13px/1.4 var(--font-ui); color: var(--ink-2); }
.notice:empty { display: none; }
.notice:not(:empty) { padding-top: 14px; }

/* ---------- Places: the list, Your connections and app pages ---------- */
.shell { display: flex; flex-direction: column; gap: 24px; max-width: 1040px; margin: 0 auto; padding: 20px 16px 48px; }
.side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.content { min-width: 0; }
.is-page .side { display: none; }
.catalogue { display: flex; flex-direction: column; gap: 24px; }
.mobile-catalogue-label { display: none; }
.side-title { margin: 0; font: 600 28px/1.1 var(--font-ui); letter-spacing: -0.03em; }
.group { display: flex; flex-direction: column; gap: 10px; }
.group-label { margin: 0; font: 500 12px/1 var(--font-ui); letter-spacing: 0.02em; color: var(--ink-3); }
.rows { margin: 0; padding: 0; list-style: none; background: var(--surface); border-radius: var(--radius-card); overflow: hidden; }
.rows > li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 16px 0 14px; color: var(--ink); text-decoration: none; transition: background-color 140ms ease; }
.row:hover { background: var(--hover-surface); }
.row[aria-current="page"] { background: var(--selected); }
.row[aria-current="page"] .row-name { font-weight: 600; }
.tile { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border-radius: var(--radius-tile); background: var(--tile); color: var(--ink); }
.tile svg { display: block; width: 18px; height: 18px; }
.row-name { flex: 1; min-width: 0; font: 500 15px/1.3 var(--font-ui); }
.row-identity { display: block; margin-top: 3px; color: var(--ink-3); font-size: 11px; font-weight: 400; overflow-wrap: anywhere; }
.count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: 600 12px/22px var(--font-ui); text-align: center; }
.chev { display: block; width: 16px; height: 16px; flex: none; color: var(--ink-2); transition: transform 160ms var(--ease-out); }
.row:hover .chev { transform: translateX(2px); }

.status { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 500 13px/1.2 var(--font-ui); color: var(--ink-2); white-space: nowrap; }
.channel-status { white-space: normal; overflow-wrap: anywhere; }
.dot { position: relative; width: 7px; height: 7px; flex: none; border-radius: 999px; background: var(--ok); }
.is-waiting { color: var(--wait-ink); }
.is-waiting .dot { background: var(--wait); }
.is-waiting .dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--wait); animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
.is-off .dot, .is-ended .dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.status.is-off, .status.is-ended { color: var(--ink-3); font-weight: 400; font-size: 12px; }
@keyframes ping { 70%, 100% { transform: scale(2.8); opacity: 0; } }

.page { animation: slide-in 280ms var(--ease-out) both; }
.is-home .side { animation: fade-in 240ms ease both; }
.back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin: -10px 0 8px -10px; padding: 0 12px 0 4px; border-radius: var(--radius-control); color: var(--ink-2); font: 500 15px/1 var(--font-ui); text-decoration: none; }
.back:hover { color: var(--ink); background: var(--hover); }
.back svg { width: 20px; height: 20px; }
.page-head { display: flex; align-items: center; gap: 14px; }
.page-tile { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.page-tile svg { display: block; width: 26px; height: 26px; }
.page-text { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
h1 { margin: 0; font: 600 26px/1.1 var(--font-ui); letter-spacing: -0.03em; overflow-wrap: anywhere; }
h2 { margin: 0; font: 600 16px/1.35 var(--font-ui); letter-spacing: -0.01em; }
.summary { margin: 8px 0 0; font: 400 15px/1.5 var(--font-ui); color: var(--ink-2); }
.section { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.lead { margin: 0; max-width: 56ch; font: 400 15px/1.55 var(--font-ui); color: var(--ink-2); }
h2 + .lead { margin-top: -8px; }
.lead a:not(.btn) { color: var(--ink); text-underline-offset: 3px; }
.help .disclose-body { gap: 14px; }
.help-issue { display: flex; flex-direction: column; gap: 3px; }
.help-issue h3 { margin: 0; color: var(--ink); font: 600 14px/1.4 var(--font-ui); }

.message { display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 14px; border-radius: var(--radius-card); background: var(--surface); }
.message-text { margin: 0; font: 500 15px/1.6 var(--font-ui); overflow-wrap: anywhere; }
.message-bar { display: flex; justify-content: flex-end; }
.message-bar .btn { flex: 1 1 auto; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.section .actions .btn-primary { flex: 1 1 auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font: 500 14px/1 var(--font-ui); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 140ms ease, filter 140ms ease, transform 120ms ease; }
.btn:hover { background: var(--hover-surface); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }
.btn-primary:hover { background: var(--primary); filter: brightness(1.1); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); font-weight: 600; }
.btn-danger:hover { background: var(--danger); filter: brightness(1.08); }
.btn-quiet { background: transparent; border-color: transparent; }
.icon { display: block; width: 16px; height: 16px; flex: none; }
.ext { display: block; width: 14px; height: 14px; flex: none; opacity: .7; }
.when-copied { display: none; }
[data-copied] .when-idle { display: none; }
[data-copied] .when-copied { display: inline-flex; }
[data-copied] .icon.when-copied { display: block; animation: pop 240ms cubic-bezier(.3, 1.4, .5, 1) both; }

details.disclose > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-left: -8px; padding: 0 10px 0 6px; border-radius: var(--radius-control); color: var(--ink-2); font: 500 14px/1 var(--font-ui); list-style: none; cursor: pointer; }
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary:hover { color: var(--ink); background: var(--hover); }
.summary-text { text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 4px; }
details.disclose > summary:hover .summary-text { text-decoration-color: currentColor; }
details.disclose > summary svg { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
details.disclose[open] > summary svg { transform: rotate(90deg); }
.disclose-body { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; animation: rise 240ms var(--ease-out) both; }
.disclose-body p { margin: 0; max-width: 60ch; font: 400 14px/1.6 var(--font-ui); color: var(--ink-2); }
.disclose-body a:not(.btn) { color: var(--ink); text-underline-offset: 3px; }
.disclose-body .help-link a { display: inline-block; padding: 6px 0; }
.code { display: flex; align-items: flex-start; gap: 8px; padding: 6px 6px 6px 16px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface-2); }
.code-text { flex: 1; min-width: 0; padding: 10px 0; font: 400 13px/1.65 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.icon-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--hover-overlay); color: var(--ink); }
.field { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 4px 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius-control); background: var(--surface); }
.field-text { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 400 13px/1 var(--font-mono); }

/* Connections lists: a person's connections, and one app's installations. */
.list { margin: 28px 0 0; padding: 0; list-style: none; background: var(--surface); border-radius: var(--radius-card); overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line); }
.overview .list { margin-top: 20px; }
.connection-channels { margin-top: 24px; }
.connection-list > .connection-heading { display: none; }
.empty { margin: 10px 0 0; padding: 18px 16px; border-radius: var(--radius-card); background: var(--surface); font: 400 14px/1.5 var(--font-ui); color: var(--ink-2); }
.item { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 72px; padding: 12px 8px 12px 10px; transition: background-color 140ms ease; }
.item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item-main { font: 500 15px/1.3 var(--font-ui); overflow-wrap: anywhere; }
.item-sub { display: inline-flex; align-items: flex-start; gap: 7px; font: 400 12px/1.4 var(--font-ui); color: var(--ink-2); }
.item-lines { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item-line { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 5px; align-items: start; }
.item-marker { display: flex; align-items: center; justify-content: center; width: 12px; height: 1.4em; color: var(--ink-3); }
.item-marker svg { display: block; width: 9px; height: 9px; }
.item-line .date { white-space: nowrap; }
.item-date { color: var(--ink-3); font-size: 11px; font-weight: 400; }
.item > .tile { width: 52px; height: 52px; border-radius: 13px; }
.item > .tile svg { width: 26px; height: 26px; }
.item-actions .btn { padding: 0 10px; font-size: 13px; }
.item-link { color: inherit; text-decoration: none; }
.item-link::after { content: ""; position: absolute; inset: 0; }
.profile-link { position: relative; z-index: 1; }
.item-link .ext { display: inline-block; margin-left: 6px; vertical-align: -1px; opacity: .55; }
.item-link:focus-visible { outline: none; }
.item.has-link:hover { background: var(--hover-surface); }
.item.has-link:has(.item-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.is-recent { color: var(--ok-ink); }
.item.is-ended .item-main { color: var(--ink-2); }
.item.is-ended .tile { opacity: .55; }
.item-sub.is-ended { color: var(--ink-3); }
.item-actions { position: relative; z-index: 1; display: flex; gap: 8px; flex: none; margin-left: auto; }
.item .confirm, .item .confirm-text { display: none; }
.item[data-confirming] .confirm { display: flex; gap: 8px; }
.item[data-confirming] .confirm-text { display: inline; }
.item[data-confirming] .item-sub.confirm-text { display: inline-flex; color: var(--ink); }
.item[data-confirming] .idle { display: none; }
.item[data-confirming] .item-text { flex-basis: calc(100% - 62px); }
.more { margin-top: 10px; }
.more .disclose-body { padding-top: 0; }
.launch-cue { margin-top: 14px; }

/* ---------- Moments: sign in, approve, return and recovery ---------- */
.moment { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.moment-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 20px; }
.moment-word { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ink); text-decoration: none; font: 600 17px/1 var(--font-ui); letter-spacing: -0.035em; }
.moment-word .kana { margin-left: 0; font-size: 11px; color: var(--ink-2); }
.moment-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 48px 24px 32px; text-align: center; }
.moment-col { display: flex; flex-direction: column; align-items: center; gap: 22px; width: 100%; max-width: 360px; animation: rise-10 420ms var(--ease-out) both; }
.moment h1 { font-size: 28px; line-height: 1.15; text-wrap: balance; }
.moment .lead { margin: 0 auto; font-size: 16px; text-wrap: balance; }
.moment .lead code, .moment .lead strong { font: 500 14px/1 var(--font-mono); color: var(--ink); padding: 3px 6px; border-radius: 4px; background: var(--surface-2); }
.caution { margin: 0; font: 400 13px/1.55 var(--font-ui); color: var(--ink-2); }
.who { display: flex; align-items: center; gap: 10px; font: 500 15px/1 var(--font-ui); }
.who .avatar { width: 28px; height: 28px; font-size: 12px; }
.switch { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-underline-offset: 3px; }
.moment-stack { display: flex; flex-direction: column; gap: 12px; }
.moment .disclose { width: 100%; text-align: left; }
.moment .disclose > summary { display: flex; justify-content: center; margin-left: 0; }
.moment .disclose-body { text-align: left; }
.moment .disclose dl { margin: 0; padding: 14px 16px; border-radius: var(--radius-card); background: var(--surface); font: 400 13px/1.55 var(--font-ui); color: var(--ink-2); }
.moment .disclose dt { margin-top: 12px; font-weight: 600; color: var(--ink); }
.moment .disclose dt:first-child { margin-top: 0; }
.moment .disclose dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.moment-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 360px; margin-top: auto; padding-top: 32px; animation: rise-10 420ms 80ms var(--ease-out) both; }
.moment-actions .btn { width: 100%; height: 52px; font-size: 16px; }
.moment-actions form { width: 100%; }
.btn-google { font-weight: 500; }
/* Sign in and recovery centre the whole group, including its button. Approval, the
   leftover tab and disconnect retain their existing action placement. */
.moment.is-centred .moment-main { padding-top: 24px; padding-bottom: calc(56px + 8vh); }
.moment.is-centred .moment-col { margin-top: auto; }
.moment.is-centred .moment-col:last-child { margin-bottom: auto; }
.moment.is-centred .moment-actions { margin: 32px 0 auto; padding-top: 0; }
.quiet-link { color: var(--ink-2); font: 500 14px/1.4 var(--font-ui); text-underline-offset: 3px; }

.pair { display: flex; align-items: center; margin-bottom: 6px; }
.app-tile { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; flex: none; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--ink); }
.app-tile svg { display: block; width: 30px; height: 30px; }
.mark-lg { display: block; width: 64px; height: 64px; flex: none; }
.link { position: relative; display: flex; align-items: center; justify-content: center; width: 64px; height: 28px; flex: none; }
.link-line { position: absolute; top: 13px; left: 8px; right: 8px; height: 2px; border-radius: 2px; }
.link[data-state="pending"] .link-line { background-image: linear-gradient(90deg, var(--ink-2) 0 50%, transparent 50% 100%); background-size: 8px 2px; opacity: .75; animation: flow .8s linear infinite; }
.link[data-state="connected"] .link-line { background: var(--ok); transform-origin: left center; animation: draw 480ms var(--ease-out) both; }
.link-check { display: none; }
.link[data-state="connected"] .link-check { position: relative; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 999px; background: var(--ok); color: var(--bg); box-shadow: 0 0 0 4px var(--bg); animation: pop 360ms 360ms cubic-bezier(.3, 1.5, .5, 1) both; }
.link-check svg { width: 13px; height: 13px; }
@keyframes flow { from { background-position: 0 0; } to { background-position: 8px 0; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: none; } }

.mark-eye { transform-box: fill-box; transform-origin: center; }
.is-blink .mark-eye { animation: mark-blink 6.4s ease-in-out 1.2s infinite; }
@keyframes mark-blink { 0%, 92%, 100% { transform: scaleY(1); } 94.5% { transform: scaleY(.12); } }

/* Nori's voice on the leftover tab: the line is laid out in full first, so typing never re-wraps. */
.voice { width: 100%; --voice-size: 34px; --voice-box: 132px; }
.voice-line { display: flex; align-items: center; justify-content: center; min-height: var(--voice-box); font-size: calc(var(--voice-size) * 1.04); }
.voice-text { margin: 0; max-width: 100%; font: italic 400 1em/1.22 var(--font-voice); letter-spacing: -0.01em; color: var(--ink-2); text-wrap: balance; }
.ch { position: relative; }
.ch.is-hidden, .ch.is-kana, .ch.is-gone { color: transparent; }
.kn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -46%) scale(1); font: normal 500 .67em/1 var(--font-kana); white-space: nowrap; color: var(--accent); opacity: 0; pointer-events: none; }
.ch.is-kana .kn { opacity: 1; }
.ch.is-gone .kn { opacity: 0; transform: translate(-50%, -46%) scale(.2); transition: transform 320ms cubic-bezier(.5, 0, .75, 0), opacity 320ms ease-in; }
.ch.has-caret::before, .ch.has-caret-before::before { content: ""; position: absolute; bottom: .1em; width: max(3px, .085em); height: .9em; border-radius: 1.5px; background: var(--accent); transform: skewX(-9deg); }
.ch.has-caret::before { right: -.07em; }
.ch.has-caret-before::before { left: -.09em; }
.voice-line.is-idle .ch::before { animation: blink 1.06s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rise-10 { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Desktop: the list becomes a sidebar that stays ---------- */
@media (max-width: 720px) {
  .connection-list > .connection-empty { margin: 0; border-top: 0; }
  .connection-list > .connection-heading:first-child + .item { border-top: 0; }
  .overview .item-date { display: none; }
  .overview .item.is-ended .item-text { flex-basis: calc(100% - 62px); }
  .is-home .side-title, .is-home .connections-nav, .is-home .catalogue-label,
  .is-home .overview .back, .is-home .overview .summary, .is-home .catalogue .status { display: none; }
  .is-home .overview h1, .connection-channels h2 { font: 500 12px/1 var(--font-ui); letter-spacing: 0.02em; color: var(--ink-3); }
  .is-home .overview .list { margin-top: 10px; }
  .is-home .catalogue { gap: 0; }
  .is-home .mobile-catalogue-label { display: block; margin-bottom: 10px; }
}
@media (min-width: 721px) {
  .bar-in { height: 60px; padding: 0 32px; }
  .notice { padding: 0 32px; }
  .shell { display: grid; grid-template-columns: 248px minmax(0, 620px); gap: 64px; align-items: start; padding: 40px 32px 88px; }
  .is-home .content { display: block; }
  .is-page .side { display: flex; }
  .is-home .side { animation: none; }
  .page { animation-name: rise; }
  .side { grid-column: 1; grid-row: 1; gap: 22px; }
  .content { grid-column: 2; grid-row: 1; }
  .catalogue { gap: 22px; }
  .side-title, .back { display: none; }
  .rows { display: flex; flex-direction: column; gap: 2px; background: transparent; border-radius: 0; overflow: visible; }
  .rows > li + li { border-top: 0; }
  .row { min-height: 40px; padding: 0 10px 0 8px; gap: 10px; border-radius: var(--radius-control); }
  .row:hover { background: var(--hover); }
  .row .tile { width: 26px; height: 26px; background: transparent; }
  .row-name { font-size: 14px; }
  .row .chev { display: none; }
  .is-home .row-home { background: var(--selected); }
  .is-home .row-home .row-name { font-weight: 600; }
  h1 { font-size: 30px; }
  .page-head { gap: 16px; }
  .page-tile { width: 52px; height: 52px; }
  .section, .list { margin-top: 36px; }
  .overview .list { margin-top: 24px; }
  .connection-channels { margin-top: 36px; }
  .overview .connection-list { background: transparent; border-radius: 0; overflow: visible; }
  .connection-list > .connection-heading { display: block; margin-top: 36px; padding-bottom: 24px; border-top: 0; }
  .connection-list > .connection-heading:first-child { margin-top: 0; }
  .connection-list > .item { background: var(--surface); }
  .connection-list > .connection-heading + .item { border-top: 0; border-radius: var(--radius-card) var(--radius-card) 0 0; }
  .connection-list > .item:has(+ .connection-heading), .connection-list > .item:last-child { border-radius: 0 0 var(--radius-card) var(--radius-card); }
  .connection-list > .connection-heading + .item:last-child { border-radius: var(--radius-card); }
  .connection-list > .connection-empty { margin-top: 0; border-top: 0; }
  .overview .item-lines { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .empty { margin-top: 24px; }
  .message { gap: 16px; padding: 20px 20px 16px 22px; }
  .message-text { font-size: 16px; }
  .message-bar .btn, .section .actions .btn-primary { flex: 0 0 auto; }
  .item { gap: 14px; padding: 12px 12px 12px 14px; }
  .item > .tile { width: 56px; height: 56px; border-radius: 14px; }
  .item-line { column-gap: 6px; }
  .item-actions .btn { padding: 0 16px; font-size: 14px; }
  .item[data-confirming] .item-text { flex-basis: calc(100% - 70px); }
}
@media (min-width: 721px) and (max-width: 900px) {
  .shell.is-home { column-gap: 40px; }
  .overview .item-text { flex-basis: calc(100% - 70px); }
}
@media (min-width: 700px) {
  .moment-top { padding: 0 32px; }
  .moment-main { padding-top: 96px; }
  .moment-col { max-width: 560px; }
  .moment-col > .disclose { max-width: 440px; }
  .moment h1 { font-size: 34px; }
  .voice { --voice-size: 44px; --voice-box: 124px; }
  .moment-actions { margin-top: 40px; padding-top: 0; }
  .moment.is-centred .moment-actions { margin-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Additions: spacing for help disclosures, the leftover tab's states and an accessible status label. */
.help { margin-top: 12px; }
/* Preserve Return's place so the voice and its recovery note do not jump when it is spent. */
.returning .moment-col { flex: 1; }
.voice-area { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; width: 100%; }
.returning .moment-actions { min-height: 74px; padding-top: 22px; }
.returning[data-return-state="returned"] .moment-actions,
.returning[data-return-state="connected"] .moment-actions { visibility: hidden; }
@media (min-width: 700px) {
  .returning .moment-col, .voice-area { flex: none; }
  .voice-area { margin-top: 18px; }
  .returning .moment-actions { min-height: 52px; padding-top: 0; }
}
.returning .stalled { display: none; }
.returning[data-return-state="stalled"] .stalled { display: block; }
@media (min-width: 721px) {
  .status-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Real accounts and client names may be much longer than the design fixtures. */
.menu-name, .who, .item-sub, dd { overflow-wrap: anywhere; }
.who > span:not(.avatar) { min-width: 0; }
.item-main a { text-decoration: none; }
.item-main a:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .voice-line * { animation: none !important; } }

.code-text.config { white-space: pre; overflow-x: auto; overflow-wrap: normal; }
