@font-face {
  font-family: Noto;
  src: url("/noto-sans-jp.woff2") format("woff2");
  font-display: swap;
}
:root {
  --paper: #f8f8f4;
  --ink: #242424;
  --muted: #656560;
  --line: #d9d9d2;
  --yellow: #f2d15d;
  --gutter: 24px;
  font-family:
    Noto,
    -apple-system,
    sans-serif;
  color: var(--ink);
  background: #e9e9e5;
  font-size: 16px;
  line-height: 1.65;
  font-synthesis: none;
}
.top-actions {
  display: flex;
  gap: 0.25rem;
  margin-inline-start: auto;
}
.sections {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
}
.sections a {
  min-height: 48px;
  padding: 0.5rem 0;
}
.sections a[aria-current] {
  border-bottom: 3px solid var(--yellow);
}
.text-action {
  min-height: 48px;
  margin-top: 1rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.artifact-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  margin: 1.5rem 0;
}
select {
  font: inherit;
  min-height: 48px;
  padding: 0.6rem;
  max-width: 100%;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
}
select:focus-visible {
  outline: 3px solid #756014;
  outline-offset: 4px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  touch-action: manipulation;
}
button,
a {
  min-height: 48px;
}
button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-weight: 600;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #756014;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.05em;
}
h2 {
  font-size: 1rem;
  font-weight: 600;
}
h3 {
  font-size: 1rem;
}
p + p {
  margin-top: 0.6rem;
}
small,
.subtle,
.muted {
  font-size: 0.85rem;
  color: var(--muted);
}
.shell {
  max-width: 460px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: auto;
  background: var(--paper);
  padding-bottom: calc(6rem + env(safe-area-inset-bottom));
  overflow-wrap: anywhere;
}
.top {
  padding: calc(1rem + env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right)) 1rem
    max(var(--gutter), env(safe-area-inset-left));
}
.brand {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  margin-bottom: 1.5rem;
}
.brand strong {
  display: inline-grid;
  grid-template-columns: 28px minmax(0, 1fr);
  min-width: 0;
  align-items: center;
  column-gap: 0.65rem;
  row-gap: 0.125rem;
  font-weight: 500;
  line-height: 1.3;
}
.wordmark-name {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
}
.wordmark-company {
  grid-column: 2;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
}
.brand strong::before {
  content: "";
  grid-row: 1 / 3;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--ink) 1px, transparent 1.5px) center / 5px 5px,
    var(--yellow);
}
.icon-button {
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  border-radius: 50%;
}
.icon-button[aria-current] {
  background: var(--yellow);
}
.main {
  padding: 0.5rem max(var(--gutter), env(safe-area-inset-right)) 1.5rem
    max(var(--gutter), env(safe-area-inset-left));
  display: grid;
  gap: 1.5rem;
}
.primary {
  background: var(--yellow);
  border-color: transparent;
  border-radius: 999px;
  color: var(--ink);
  min-height: 60px;
}
.primary:active {
  background: #e5c34e;
}
.wide {
  width: 100%;
}
.contacts {
  border-top: 1px solid var(--line);
}
.contact {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 1.25rem 0;
  width: 100%;
  min-height: 100px;
  border-bottom: 1px solid var(--line);
}
.contact:active {
  background: #efefea;
}
.contact .label {
  flex: 1;
  min-width: 0;
}
.contact strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 500;
}
.contact small {
  display: block;
  margin-top: 0.2rem;
}
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  /* Decorative initials are aria-hidden; keep them inside the fixed avatar. */
  font-size: min(1.1rem, 24px);
  line-height: 1;
}
.avatar.large {
  width: 88px;
  height: 88px;
  font-size: min(2rem, 44px);
  border-style: dotted;
  border-color: var(--ink);
}
.arrow {
  font-size: 22px;
  color: var(--muted);
}
.connection-note {
  font-size: 0.8rem;
  color: var(--muted);
}
.status {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
}
.dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--ink);
  margin-top: 0.55rem;
}
.card {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 0;
  display: grid;
  gap: 0.75rem;
}
.card .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card p {
  white-space: pre-wrap;
}
.tabs {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 460px);
  padding: 0.5rem 1rem calc(0.5rem + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  z-index: 3;
}
.tabs a {
  position: relative;
  flex: 1;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  min-height: 54px;
  color: var(--muted);
}
.tabs a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}
.tabs a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--yellow);
}
.tabs svg,
button svg,
a svg {
  width: 23px;
  height: 23px;
  flex: none;
}
button .inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}
.record-controls {
  position: sticky;
  bottom: calc(4.5rem + env(safe-area-inset-bottom));
  background: var(--paper);
  padding: 1rem 0 0.5rem;
  display: grid;
  gap: 0.6rem;
}
.record-controls .primary {
  min-height: 64px;
}
.record-controls.waiting {
  display: none;
}
.stop svg {
  fill: currentColor;
  stroke-width: 0;
  width: 20px;
  height: 20px;
}
.record-profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.record-profile .subtle {
  flex-basis: 100%;
}
.record-profile.active {
  flex-direction: column;
  flex-wrap: nowrap;
  padding: 1rem 0;
  gap: 0.8rem;
  text-align: center;
}
.record-profile.active h2 {
  font-size: 1.1rem;
  font-weight: 500;
}
.record-state {
  color: var(--muted);
  font-size: 0.85rem;
}
.timer {
  font:
    400 2.5rem ui-monospace,
    Menlo,
    monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}
.limit {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0;
}
.pulse {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
}
.pulse i {
  width: 4px;
  height: 10px;
  background: var(--ink);
  border-radius: 4px;
  animation: pulse 1s infinite alternate;
}
.pulse i:nth-child(2n) {
  animation-delay: 0.3s;
  height: 24px;
}
.pulse i:nth-child(3n) {
  animation-delay: 0.6s;
  height: 16px;
}
@keyframes pulse {
  to {
    transform: scaleY(0.45);
  }
}
.error {
  border-left: 3px solid #8b4138;
  padding: 0.75rem 1rem;
  display: grid;
  gap: 0.6rem;
}
.success {
  padding: 0.6rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.form,
.auth-panel {
  display: grid;
  gap: 1.25rem;
}
.auth-panel {
  padding: 0.75rem 0;
}
label {
  display: grid;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}
input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #9d9d96;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 0.85rem;
  font-size: 1rem;
}
textarea {
  min-height: 120px;
}
audio {
  width: 100%;
  max-width: 100%;
  min-height: 54px;
}
summary {
  cursor: pointer;
  min-height: 48px;
  padding: 0.65rem 0;
  font-size: 0.9rem;
  font-weight: 500;
}
details p {
  font-size: 0.85rem;
}
.badge {
  display: inline-block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}
.danger {
  color: #8b4138;
}
.quiet {
  border-color: transparent;
  color: var(--muted);
  font-weight: 400;
}
.sticky-note {
  font-size: 0.8rem;
  text-align: center;
  color: var(--muted);
}
.skip {
  position: fixed;
  top: -100px;
  left: 1rem;
  background: var(--paper);
  padding: 1rem;
  z-index: 10;
}
.skip:focus {
  top: 0;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
h1:focus {
  outline: none;
}
.contact-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  padding: 0.5rem 0;
}
.contact-profile > div {
  flex: 1;
  min-width: 0;
}
.contact-action,
.contact-history {
  display: grid;
  gap: 0.75rem;
}
.contact-action {
  position: fixed;
  bottom: calc(4.75rem + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 2 * var(--gutter)), 412px);
  padding: 1rem 0 0.5rem;
  margin: 0;
  background: var(--paper);
  z-index: 2;
}
.shell.is-contact {
  padding-bottom: calc(12rem + env(safe-area-inset-bottom));
}
.shell.is-recording {
  padding-bottom: calc(11rem + env(safe-area-inset-bottom));
}
.is-recording .record-controls {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 2 * var(--gutter)), 412px);
}
.is-live-call .top {
  padding-top: calc(12px + env(safe-area-inset-top));
  padding-bottom: 12px;
}
.is-live-call .brand {
  margin-bottom: 12px;
}
.is-live-call h1 {
  font-size: 1.5rem;
  line-height: 1.35;
  overflow-wrap: break-word;
  line-break: strict;
}
.is-live-call .record-profile.active {
  padding: 12px 0;
  gap: 12px;
}
.is-live-call .record-profile.active p + p {
  margin-top: 0;
}
.call-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  padding: 12px 0;
}
.is-recording .call-controls {
  bottom: 0;
  width: min(100%, 460px);
  padding: 12px max(var(--gutter), env(safe-area-inset-right))
    calc(12px + env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
}
.call-controls button {
  min-width: 0;
  min-height: 64px;
  padding: 12px;
  line-height: 1.4;
}
.call-controls > :only-child {
  grid-column: 1 / -1;
}
.contact-action .subtle {
  text-align: center;
}
/* Only the navigation surface blurs its backdrop; text stays fully opaque.
   Unsupported preference queries keep the solid, readable default. */
@supports (
  (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))
) {
  @media (prefers-reduced-transparency: no-preference) and (prefers-contrast: no-preference) {
    .tabs {
      background: transparent;
    }
    .tabs::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      background: rgb(248 248 244 / 94%);
      -webkit-backdrop-filter: blur(12px);
      backdrop-filter: blur(12px);
    }
  }
}
.contact-history {
  margin-top: 1.25rem;
}
.empty-history {
  padding: 1rem 0;
  color: var(--muted);
}
.empty-history h2 {
  font-size: 0.9rem;
  font-weight: 400;
}
.back-link {
  max-width: 100%;
}
.facts {
  margin: 0;
}
.facts > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
}
.debug-events {
  max-height: 18rem;
  overflow-y: auto;
  overflow-wrap: anywhere;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  padding-inline-start: 1.25rem;
}
.debug-events li {
  margin-block: 0.4rem;
}
#live-debug p {
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media (min-width: 700px) {
  .shell {
    margin: 1rem auto;
    min-height: calc(100dvh - 2rem);
    border-radius: 24px;
  }
}
@media (max-width: 365px) {
  :root {
    --gutter: 20px;
  }
}
.usage-panel p,
.usage-panel dd,
.usage-panel summary {
  overflow-wrap: anywhere;
}
.usage-panel dd {
  margin-inline-start: 0;
}
.usage-panel dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 12px;
}
