:root {
  color-scheme: only light;
  --bg: #fff;
  --surface: #f6f7f9;
  --ink: #20242b;
  --muted: #626874;
  --line: #e3e5e9;
  --action: #505bb7;
  --soft: #eeeffa;
  --warn: #9b461c;
  font:
    16px/1.7 "Yu Gothic UI",
    Meiryo,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.chat-workspace { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 24px; align-items: start; }
.ai-chat { width: 100%; min-width: 0; max-width: 820px; margin: 0 auto; }
.ai-chat.is-new { min-height: min(620px, calc(100svh - 220px)); display: flex; flex-direction: column; justify-content: center; }
.ai-chat.is-new .chat-intro { text-align: center; margin-bottom: 28px; }
.ai-chat.is-new .chat-intro h2 { font-size: clamp(22px, 2vw, 28px); font-weight: 500; }
.ai-chat.is-new .chat-messages:empty { display: none; }
.chat-history { position: sticky; top: 20px; min-width: 0; border-radius: 12px; background: var(--surface); padding: 14px; }
.chat-history > button { width: 100%; }
.chat-history h2 { font-size: 14px; margin: 24px 8px 0; }
.chat-history p { font-size: 12px; margin: 8px; }
.chat-history nav { display: grid; max-height: 65vh; overflow-y: auto; margin: 16px -6px 8px; }
.chat-history nav a { display: grid; gap: 4px; padding: 12px 10px; border-radius: 8px; color: var(--ink); min-width: 0; }
.chat-history-row { display: grid; grid-template-columns: minmax(0,1fr) 38px; align-items: center; border-radius: 8px; }
.chat-history-row:hover, .chat-history-row.active { background: var(--soft); }
.chat-history-row.active > a { color: var(--action); box-shadow: inset 3px 0 var(--action); }
.chat-history nav a:hover { text-decoration: none; }
.chat-history-row .chat-options-button { min-width: 34px; min-height: 40px; padding: 0; margin-right: 4px; border: 0; background: transparent; font-size: 24px; }
.chat-history-row .chat-options-button:hover { background: var(--bg); }
#chat-history-list > label { display: grid; gap: 4px; margin-top: 14px; font-size: 12px; }
#chat-history-list > label select { width: 100%; min-width: 0; }
.chat-options { position: fixed; inset: auto; margin: 0; padding: 8px; width: 224px; max-width: calc(100vw - 16px); box-sizing: border-box; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); box-shadow: 0 8px 28px #20242b24; }
.chat-options:popover-open { display: grid; gap: 2px; }
.chat-options button { border: 0; text-align: left; padding: 11px 14px; border-radius: 7px; }
.chat-options button:hover { background: var(--surface); }
.chat-options .chat-trash-action { color: #b13636; border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; margin-top: 5px; }
.chat-rename { width: 420px; max-width: calc(100vw - 32px); box-sizing: border-box; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.chat-rename::backdrop { background: #20242b55; }
.chat-rename h2 { margin-top: 0; }
.chat-rename label { display: grid; gap: 8px; }
.chat-rename input { min-width: 0; width: 100%; box-sizing: border-box; }
.chat-rename .controls { justify-content: flex-end; }
.chat-history nav span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-history nav small { color: var(--muted); font-size: 11px; }
.chat-history-toggle { display: none; }
.chat-older { display: block; margin: 20px auto 0; }
.chat-intro h2 { overflow-wrap: anywhere; }
@media (max-width: 1000px) {
  .chat-workspace { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .chat-history { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .chat-history-toggle { display: block; }
  #chat-history-list { display: none; grid-column: 1 / -1; }
  .chat-history.is-open #chat-history-list { display: block; }
  .chat-history nav { max-height: 45vh; }
}
.chat-message { border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.chat-intro { padding: 8px 0; }
.chat-intro h2 { margin: 0; }
.chat-messages { display: grid; gap: 18px; margin: 24px 0; }
.chat-message { min-width: 0; overflow-wrap: anywhere; }
.chat-message > small { color: var(--muted); }
.chat-user { background: var(--soft); margin-left: 10%; }
.chat-answer { margin-right: 4%; }
.chat-paragraph + .chat-paragraph { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; }
.chat-paragraph { margin-top: 14px; }
.chat-paragraph p { line-height: 1.9; margin: 10px 0; }
.chat-kind { font-size: 12px; color: var(--muted); }
.chat-sources { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-sources a { background: var(--surface); border-radius: 7px; padding: 6px 10px; font-size: 12px; overflow-wrap: anywhere; }
.chat-compose { background: var(--bg); border: 1px solid var(--line); border-radius: 24px; padding: 18px 20px 14px; box-shadow: 0 3px 16px #20242b08; }
.chat-compose:focus-within { border-color: #a9aed4; }
.chat-compose textarea { display: block; width: 100%; box-sizing: border-box; resize: vertical; min-height: 88px; max-height: 320px; border: 0; background: transparent; padding: 0; font-size: 16px; line-height: 1.7; }
.chat-compose textarea:focus-visible { outline: none; }
.chat-compose-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.chat-compose-tools select, .chat-scope { width: auto; max-width: calc(100% - 56px); color: var(--muted); font-size: 13px; }
.chat-compose-tools select { border: 0; border-radius: 8px; background: var(--surface); padding: 8px 10px; text-overflow: ellipsis; }
.chat-scope { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-compose .chat-send { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: #fff; }
.chat-compose .chat-send:hover { background: #3b414b; }
.chat-progress { color: var(--action); padding: 16px; background: var(--soft); border-radius: 10px; }
@media (max-width: 600px) {
  .ai-chat.is-new { min-height: min(480px, calc(100svh - 260px)); }
  .chat-compose, .chat-message { padding: 16px; }
  .chat-compose { border-radius: 20px; }
  .chat-compose .chat-send { flex-basis: 44px; width: 44px; height: 44px; }
  .chat-user { margin-left: 5%; }
  .chat-answer { margin-right: 0; }
}
.task-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.task-metrics .metric { border: 1px solid var(--line); border-radius: 6px; padding: 16px; display: grid; color: var(--ink); }
.task-metrics strong { font-size: 24px; font-weight: 500; }
.customer-work { border: 1px solid var(--line); border-radius: 6px; padding: 20px; margin: 14px 0; }
.customer-context { margin: 12px 0; }
.customer-context p { margin-top: 8px; }
.task-item { border-top: 1px solid var(--line); padding: 12px 0; overflow-wrap: anywhere; }
.task-meta { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.task-fields { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(130px, 1fr)); gap: 10px; align-items: end; margin: 12px 0; }
.task-fields > button { justify-self: start; }
.quick-task { margin-top: 14px; }
.candidate { border: 1px solid var(--line); border-radius: 6px; padding: 16px; min-width: 0; }
.candidate blockquote { margin: 12px 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--muted); }
.candidate > button { display: block; margin-top: 12px; }
.calendar-scroll { overflow-x: auto; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); min-width: 700px; border: 1px solid var(--line); }
.calendar-day, .calendar-blank, .weekday { border: 1px solid var(--line); padding: 8px; }
.weekday { text-align: center; background: var(--surface); }
.calendar-day { min-height: 110px; }
.calendar-day.is-today { background: var(--soft); }
.calendar-task { display: block; font-size: 12px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
audio#player { width: 100%; margin: 24px 0; }
@media (max-width: 1000px) { .task-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .task-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .task-fields { grid-template-columns: minmax(0, 1fr); } .customer-work { padding: 12px; } }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
.legal-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.legal-page h1 { margin-top: 24px; }
.legal-page h2 { margin-top: 30px; }
a {
  color: var(--action);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 8px;
  padding: 9px 12px;
  max-width: 100%;
}
button,
a {
  cursor: pointer;
}
button:hover {
  background: var(--surface);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:not(.link) { min-height: 44px; }
:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}
h1 {
  font-size: 26px;
  line-height: 1.4;
  font-weight: 600;
  margin: 0 0 10px;
}
h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 10px;
}
h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 6px;
}
p {
  margin: 0 0 10px;
}
small,
.muted {
  font-size: 13px;
  color: var(--muted);
}
label {
  display: grid;
  gap: 4px;
}
input,
select,
textarea {
  min-width: 0;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
button.primary {
  background: var(--action);
  color: white;
  border-color: var(--action);
}
button.primary:hover { background: #414b9c; border-color: #414b9c; }
button.link {
  border: 0;
  background: transparent;
  color: var(--action);
  padding: 3px 0;
  text-align: left;
}
.shell {
  display: grid;
  grid-template-columns: 192px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  font-size: 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 24px 14px;
}
.brand {
  font-weight: 500;
  margin: 0 8px 28px;
}
.menu-toggle {
  display: none;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.sidebar nav a {
  padding: 12px 10px;
  color: var(--ink);
  border-radius: 8px;
}
.sidebar nav a.active {
  font-weight: 600;
  background: var(--soft);
  color: var(--action);
}
.nav-count { display: block; font-size: 12px; font-weight: 400; }
.account {
  margin: 30px 8px 0;
  display: grid;
  gap: 8px;
}
.main {
  padding: 28px;
  min-width: 0;
  max-width: 1200px;
  width: 100%;
  margin-inline: auto;
}
.head,
.row,
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.head {
  margin-bottom: 32px;
}
.controls {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.controls label {
  min-width: 130px;
}
.section {
  margin-top: 28px;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.stack {
  display: grid;
  gap: 14px;
}
.form {
  display: grid;
  gap: 14px;
  max-width: 660px;
}
.form.wide {
  max-width: none;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  margin: 24px 0;
}
.stat {
  padding: 16px 10px;
}
.stat strong {
  font: 500 28px Arial;
  display: block;
  margin-top: 5px;
}
.entry {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.entry p:last-child {
  margin-bottom: 0;
}
.tag {
  display: inline-block;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  border-radius: 3px;
  padding: 2px 7px;
}
.warn {
  color: var(--warn);
}
.notice {
  padding: 12px 16px;
  background: var(--soft);
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.notice.error {
  background: #fff1e9;
  color: #803c1a;
}
.empty {
  padding: 24px 0;
  color: var(--muted);
}
.pane {
  background: var(--surface);
  padding: 18px;
}
.new-customer {
  margin-top: 10px;
}
.detail-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin: 14px 0 24px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 26px;
}
.recording-title-editor { margin: 12px 0; }
.recording-title-editor[open] > summary { margin-bottom: 12px; }
video {
  width: 100%;
  background: #f6f7f9;
  border: 1px solid var(--line);
  aspect-ratio: 16/9;
}
.video-empty {
  aspect-ratio: 16/9;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}
.inbox-board { display: grid; gap: 20px; }
.inbox-library-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.inbox-library-heading h2 { margin-bottom: 6px; }
.inbox-library-heading p { color: var(--muted); margin: 0; font-size: 14px; }
.inbox-library-heading .settings-button, .recording-next .settings-button { background: var(--bg); color: var(--action); border: 1px solid var(--line); border-radius: 8px; }
.inbox-toolbar { border-bottom: 1px solid var(--line); }
.inbox-toolbar .tabs { margin: 0; }
.inbox-toolbar .tabs a { padding: 12px 8px; }
.inbox-filter { max-width: none; padding: 16px; border-radius: 12px; background: var(--surface); }
.inbox-filter label:first-of-type { flex: 1; min-width: min(100%, 240px); }
.inbox-filter label { font-size: 14px; gap: 6px; }
.inbox-filter input { width: 100%; }
.inbox-filter > a { padding: 10px 0; font-size: 14px; }
.inbox-count { display: inline-block; margin-left: 3px; font-size: 12px; }
.inbox-hint { margin: 0; color: var(--muted); }
.inbox-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); gap: 20px; align-items: stretch; }
.inbox-recording, .inbox-trash-card { min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.inbox-recording { display: flex; flex-direction: column; }
.inbox-recording-info { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 20px; min-width: 0; overflow-wrap: anywhere; }
.inbox-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.inbox-review { display: inline-block; border-radius: 20px; padding: 3px 10px; background: var(--surface); font-size: 12px; }
.inbox-review.needs-review { color: #924719; background: #fff2e6; }
.inbox-review.review-done, .inbox-processing .is-ready { color: #21714b; }
.inbox-review.review-done { background: #edf8f1; }
.inbox-recording h2, .inbox-trash-card h2 { margin: 0; font-size: 17px; line-height: 1.6; font-weight: 600; }
.inbox-recording h2 a { color: var(--ink); }
.inbox-links { margin: 0; padding-block: 12px; border-block: 1px solid var(--line); }
.inbox-links > div { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; }
.inbox-links > div + div { margin-top: 4px; }
.inbox-links dt { color: var(--muted); font-size: 12px; }
.inbox-links dd { margin: 0; }
.inbox-processing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 12px; }
.inbox-processing small, .inbox-processing span { display: block; }
.inbox-source { font-size: 12px; }
.inbox-card-action { margin-top: auto; display: block; padding: 11px 14px; border: 1px solid var(--line); border-radius: 6px; text-align: center; }
.inbox-card-action.is-primary { background: var(--action); color: white; border-color: var(--action); }
.inbox-card-action:hover { text-decoration: none; filter: brightness(.96); }
.inbox-trash-card { padding: 20px; display: grid; gap: 16px; overflow-wrap: anywhere; }
.inbox-empty { padding: 20px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; }
.inbox-preview { position: relative; min-width: 0; min-height: 160px; background: var(--surface); overflow: hidden; }
.inbox-preview video { display: none; border: 0; object-fit: contain; }
.inbox-thumbnail { display: block; width: 100%; aspect-ratio: 16/9; object-fit: contain; }
.inbox-thumbnail:not([src]) { visibility: hidden; }
.inbox-thumbnail-status { position: absolute; bottom: 8px; left: 0; width: 100%; text-align: center; font-size: 12px; }
.inbox-recording.is-playing .inbox-thumbnail, .inbox-recording.is-playing .inbox-thumbnail-status { display: none; }
.inbox-recording.is-playing video { display: block; }
.inbox-preview audio { display: block; width: 100%; height: 160px; }
.inbox-preview-open { position: absolute; inset: 0; width: 100%; border: 0; border-radius: 0; background: transparent; color: white; display: grid; place-items: center; }
.inbox-preview-open:hover { background: #0002; }
.inbox-preview-open span { background: #000a; border-radius: 20px; padding: 7px 16px; }
.inbox-preview-open[hidden] { display: none; }
.inbox-preview-placeholder { aspect-ratio: 16/9; display: grid; place-items: center; background: var(--surface); color: var(--muted); font-size: 13px; text-align: center; padding: 16px; }
.inbox-preview [data-action="inbox-preview-close"], .inbox-preview [data-preview-error] { margin: 10px; }
.recording-classify { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.recording-picker { display: grid; gap: 4px; min-width: 0; }
.recording-picker details { margin: 0; }
.recording-picker summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: inherit; overflow-wrap: anywhere; }
.recording-picker summary::-webkit-details-marker { display: none; }
.recording-picker summary::after { content: ""; width: 7px; height: 7px; flex: none; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.recording-picker details[open] summary::after { transform: rotate(225deg); }
.picker-panel { margin-top: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.picker-panel input { width: 100%; }
.picker-results { margin-top: 6px; max-height: min(32vh, 260px); overflow-y: auto; overscroll-behavior: contain; }
.picker-results small { display: block; padding: 6px 8px; }
.picker-results button { display: block; width: 100%; border: 0; text-align: left; overflow-wrap: anywhere; }
.picker-results button[aria-pressed="true"] { background: var(--surface); color: var(--action); }
.picker-results button:focus-visible { outline-offset: -2px; }
.recording-processing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; margin: 0 0 24px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.recording-processing p { margin: 8px 0; }
.recording-classify-heading h2 { margin: 8px 0; font-size: 20px; }
.recording-classify-heading p { margin: 0; color: var(--muted); }
.recording-next { margin-block: 24px; padding-block: 20px; border-block: 1px solid var(--line); }
.recording-next > strong { display: block; margin-bottom: 12px; }
@media (max-width: 700px) {
  .inbox-card-grid { gap: 16px; }
  .inbox-recording-info, .inbox-trash-card, .recording-classify { padding: 16px; }
  .inbox-library-heading > .controls { width: 100%; }
  .inbox-library-heading > .controls > * { flex: 1; text-align: center; }
  .inbox-toolbar .tabs { gap: 4px; }
  .inbox-filter label { flex: 1; }
  .recording-classify .controls > button { flex-basis: 100%; }
}
blockquote {
  border-left: 2px solid var(--line);
  padding: 6px 12px;
  margin: 10px 0;
}
.table-wrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
}
th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td {
  overflow-wrap: anywhere;
}
.grid {
  min-width: 850px;
}
.grid td {
  border-right: 1px solid var(--line);
}
.customer-overview .grid {
  min-width: 1300px;
}
.customer-overview .table-wrap {
  scroll-padding-inline-end: 88px;
}
.customer-overview th:last-child,
.customer-overview td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  min-width: 80px;
  width: 80px;
  background: var(--bg);
  box-shadow: -1px 0 var(--line);
}
.customer-overview th:last-child {
  background: var(--surface);
}
.customer-overview td:nth-child(4),
.customer-overview td:nth-child(5) {
  min-width: 220px;
}
.customer-overview td:nth-child(6) {
  min-width: 140px;
}
.customer-overview button {
  white-space: nowrap;
}
.grid input,
.grid select {
  min-width: 120px;
  width: 100%;
}
.tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.tabs a {
  padding: 7px 4px;
  border-bottom: 2px solid transparent;
}
.tabs a.active {
  border-color: var(--action);
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.auth {
  max-width: 420px;
  margin: 9vh auto;
  padding: 24px;
}
.auth form {
  margin-top: 24px;
}
.loading {
  padding: 40px;
}
.progress {
  margin-top: 8px;
}
progress {
  width: 100%;
}
details {
  margin: 12px 0;
}
summary {
  cursor: pointer;
  color: var(--action);
}
[hidden] {
  display: none !important;
}
.footer {
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.transcript-tools {
  margin-top: 16px;
}
.transcript-tools summary {
  font-size: 12px;
  color: var(--muted);
}
.transcript-navigation {
  margin: 16px 0;
}
.transcript-document {
  max-width: 780px;
  font-size: 16px;
  line-height: 2;
  overflow-wrap: anywhere;
}
.transcript-document p {
  margin: 0 0 1.5em;
}
.transcript-source:target,
.transcript-highlight {
  background: var(--soft);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.6 monospace;
}
.account small {
  overflow-wrap: anywhere;
}
@media (max-width: 850px) {
  label {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }
  select {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* WebKit can paint a long native option beyond the select's measured box. */
  label:has(> select) {
    overflow: clip;
  }
  select:focus-visible {
    outline-offset: -2px;
  }
  .main {
    overflow-wrap: anywhere;
  }
  .two > *,
  .detail-grid > *,
  .controls > * {
    min-width: 0;
    max-width: 100%;
  }
  input,
  select,
  textarea {
    font-size: 16px;
    min-height: 44px;
  }
  input[type="checkbox"] {
    min-height: 24px;
    width: 24px;
    height: 24px;
  }
  button,
  summary,
  .sidebar nav a {
    min-height: 44px;
  }
  summary {
    padding-block: 10px;
  }
  .table-wrap > table:not(.grid) {
    min-width: 640px;
  }
  .table-wrap button {
    white-space: nowrap;
  }
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px;
  }
  .brand {
    margin: 0;
  }
  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 44px;
  }
  .sidebar-menu {
    display: none;
  }
  .sidebar.menu-open .sidebar-menu {
    display: block;
    padding-top: 12px;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .account {
    margin: 10px 0 0;
    display: flex;
    align-items: center;
  }
  .main {
    padding: 20px;
  }
  .sidebar nav a {
    padding: 8px;
  }
  .two {
    gap: 18px;
  }
}
@media (max-width: 580px) {
  .two,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .main {
    padding: 16px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat {
    padding: 14px 8px;
  }
  .controls > * {
    flex: 1;
  }
  [data-form="bulk-deal"] > .controls > strong,
  [data-form="bulk-deal"] > .controls > button {
    flex-basis: 100%;
  }
  .timeline li {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
  }
  .head {
    align-items: start;
  }
  .form input,
  .form select,
  .form textarea {
    font-size: 16px;
  }
  .row {
    align-items: start;
  }
  .grid {
    min-width: 750px;
  }
}

.data-sections { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-top: 0; }
.data-back { display: inline-block; margin-bottom: 16px; }
.data-home { max-width: 1080px; }
.data-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.data-home-card { display: block; padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.data-home-card:hover { background: var(--surface); text-decoration: none; }
.data-home-card h2 { display: flex; justify-content: space-between; gap: 12px; font-size: 18px; }
.data-home-card h2 span { color: var(--action); }
.data-home-card p { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.data-records { margin-top: 36px; }
.data-records nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; margin-top: 12px; }
.data-records nav a { display: flex; justify-content: space-between; gap: 16px; padding: 15px 2px; border-bottom: 1px solid var(--line); }
.data-records nav a span { color: var(--muted); }
.data-edit-link { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; padding: 18px 20px; border-radius: 8px; background: var(--surface); }
.meeting-navigation { display: flex; flex-wrap: wrap; gap: 16px; justify-content: flex-end; }
.meeting-guide { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-width: 0; }
.meeting-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 12px; gap: 8px; border-bottom: 1px solid var(--line); }
.meeting-steps li { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 8px; font-size: 14px; color: var(--muted); }
.meeting-steps li[aria-current="step"] { background: var(--soft); color: var(--action); font-weight: 600; }
.meeting-steps li:has(button) { padding: 0; }
.meeting-steps button { display: flex; align-items: center; gap: 8px; width: 100%; height: 100%; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; }
.meeting-step-number { display: grid; place-items: center; flex: 0 0 26px; height: 26px; border: 1px solid currentColor; border-radius: 50%; }
.meeting-steps small { display: block; font-size: 12px; }
.meeting-next { padding: 20px; }
.meeting-next p { max-width: 44rem; margin: 8px 0 16px; }
.meeting-next .meeting-step-caption { font-size: 13px; color: var(--action); margin: 0 0 6px; }
@media (max-width: 580px) {
  .meeting-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; gap: 4px; }
  .meeting-steps li { padding: 8px; font-size: 13px; }
  .meeting-steps button { padding: 8px; }
  .meeting-next { padding: 16px; }
}
.meeting-preparation-heading { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 16px; }
.meeting-preparation-heading p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.meeting-overview .task-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.meeting-period { margin-top: 14px; }
.meeting-period form { margin: 12px 0; }
.meeting-activity { padding-block: 16px; border-bottom: 1px solid var(--line); }
.meeting-activity:last-child { border-bottom: 0; }
.meeting-activity-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; margin: 10px 0; }
.meeting-activity > .line-text { margin: 16px 0; }
.meeting-activity-summary, .meeting-activity > .line-text { max-width: 44rem; line-height: 1.85; }
.meeting-progress .two { margin-top: 16px; }
.meeting-section-title { margin-top: 12px; }
@media (max-width: 480px) {
  .meeting-overview .task-metrics { grid-template-columns: minmax(0, 1fr); }
  .meeting-overview .metric { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
}
@media (max-width: 700px) {
  .data-home-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .data-home-card { padding: 18px; }
  .data-records nav { grid-template-columns: minmax(0, 1fr); }
}
.line-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Keep customer reports readable in place, including long Japanese paragraphs. */
.report-card { padding-block: 20px; }
.report-card > .row h3 { font-size: 17px; line-height: 1.6; }
.recording-analysis-text, .report-prose { max-width: 800px; overflow-wrap: anywhere; }
.report-prose { font-size: 16px; line-height: 1.95; margin: 18px 0; }
.report-prose p { margin: 0 0 1em; }
.report-prose h4 { font-size: 17px; line-height: 1.65; margin: 28px 0 12px; font-weight: 600; }
.report-prose h4:first-child { margin-top: 0; }
.report-prose h5 { font-size: 14px; line-height: 1.65; margin: 18px 0 6px; font-weight: 600; color: var(--muted); }

/* Sales meeting: group each customer's context and next actions. */
.main:has(.meeting-board) { max-width: 960px; }
.meeting-board { display: grid; gap: 20px; padding: 20px; background: var(--surface); border-radius: 10px; overflow-wrap: anywhere; }
.meeting-board > .section, .meeting-session-card, .meeting-filter { margin: 0; padding: 24px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.meeting-board > .toolbar p { margin: 0; }
.meeting-board .task-metrics { margin: 0; }
.meeting-board .metric { background: var(--bg); border-radius: 10px; padding: 20px; }
.meeting-board .metric:hover { border-color: var(--action); text-decoration: none; }
.meeting-board .metric strong { margin-top: 6px; }
.meeting-board > .meeting-customers { padding: 0; border: 0; background: transparent; }
.meeting-empty { grid-column: 1 / -1; padding: 20px; background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; }
.meeting-customers > .row { margin: 4px 0 12px; }
.meeting-customers > .row h2 { margin: 0; }
.meeting-board h2 { font-size: 18px; font-weight: 600; }
.meeting-customer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.meeting-board .customer-work { margin: 0; padding: 24px; min-width: 0; border-radius: 10px; background: var(--bg); }
.meeting-board .customer-work > .row { align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.meeting-board .customer-work h2 { margin: 0; }
.meeting-board .customer-work h2 small { display: block; margin-top: 4px; font-weight: 400; }
.meeting-board .customer-context { margin: 16px 0; }
.meeting-board .customer-context p { white-space: pre-wrap; }
.meeting-board .customer-context .tag { margin: 0 4px 6px 0; }
.meeting-board .task-item { padding: 16px 0; }
.meeting-board .task-meta { font-size: 13px; }
.meeting-board .task-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.meeting-board .task-fields > label:first-child { grid-column: 1 / -1; }
.meeting-board .controls > * { min-width: 0; max-width: 100%; }
.meeting-board .form { max-width: 800px; }
.meeting-session-card > details { margin-top: 16px; }
@media (max-width: 1000px) {
  .meeting-customer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 580px) {
  .meeting-board { padding: 10px; gap: 14px; margin-inline: -6px; }
  .meeting-board > .section, .meeting-session-card, .meeting-filter, .meeting-board .customer-work { padding: 16px; border-radius: 8px; }
  .meeting-board > .meeting-customers { padding: 0; }
  .meeting-customer-grid { gap: 14px; }
  .meeting-board .metric { padding: 14px; border-radius: 8px; }
  .meeting-board .controls > label { flex-basis: 100%; }
  .meeting-board .task-fields { grid-template-columns: minmax(0, 1fr); }
}
/* Customer chart: compact context above full-width, readable reports. */
.customer-chart { display: grid; gap: 20px; padding: 20px; background: var(--surface); border-radius: 10px; overflow-wrap: anywhere; }
.customer-back { justify-self: start; }
.customer-card { min-width: 0; padding: 24px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.customer-card h2 { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.customer-card > .row { align-items: baseline; margin-bottom: 16px; }
.customer-card > .row h2 { margin-bottom: 0; }
.customer-profile h1 { font-size: 26px; font-weight: 600; margin-bottom: 6px; }
.customer-eyebrow { color: var(--action); font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.customer-contact { color: var(--muted); margin: 0; }
.customer-profile-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--muted); }
.customer-profile-meta strong { color: var(--ink); font-weight: 500; }
.customer-note { border-left: 3px solid var(--line); padding-left: 14px; margin: 8px 0 16px; }
.customer-note p { margin: 6px 0 0; }
.customer-edit { border-top: 1px solid var(--line); margin: 0; padding-top: 10px; }
.customer-edit[open] > summary { margin-bottom: 16px; }
.customer-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.customer-chart #customer-reports { display: grid; gap: 20px; min-width: 0; }
.customer-card .entry:first-of-type, .customer-card .task-item:first-of-type { padding-top: 0; }
.customer-card .entry:last-of-type, .customer-card .timeline li:last-child { border-bottom: 0; }
.customer-card .task-item:first-of-type { border-top: 0; }
.customer-card .empty { padding: 16px 0; margin: 0; }
.customer-card .report-card + .report-card { margin-top: 12px; }
.customer-report-group > h2 { color: var(--action); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.customer-card .task-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-card .task-fields > label:first-child { grid-column: 1 / -1; }
.customer-card .controls > * { min-width: 0; max-width: 100%; }
.customer-card .timeline p { margin: 6px 0 0; }
.settings-board { max-width: 1120px; }
.settings-intro { margin-bottom: 20px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.settings-card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.settings-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.settings-card h2 { margin: 0; font-size: 18px; font-weight: 600; }
.settings-service { display: flex; align-items: center; gap: 12px; }
.service-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; font: 600 20px Arial, sans-serif; }
.zoom-icon { color: #265eb7; background: #edf4ff; }
.line-icon { color: #21714b; background: #edf8f1; }
.connection-state { border-radius: 20px; background: var(--surface); color: var(--muted); padding: 4px 10px; font-size: 12px; white-space: nowrap; }
.connection-state.connected { background: #edf8f1; color: #21714b; }
.connection-state.attention { background: #fff3e8; color: var(--warn); }
.settings-accounts { margin: 20px 0; }
.settings-account { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; padding: 8px 0; overflow-wrap: anywhere; }
.settings-account > span { min-width: 0; }
.settings-account form { flex-basis: 100%; }
.settings-placeholder { color: var(--muted); margin: 0; }
.settings-action { margin: 16px 0 12px; }
.settings-action button, .settings-button { min-height: 42px; padding: 9px 16px; }
.settings-button { display: inline-block; border-radius: 4px; background: var(--action); color: white; text-align: center; text-decoration: none; }
.settings-button:hover { text-decoration: none; filter: brightness(.95); }
.settings-details { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.settings-details > summary { font-size: 13px; }
.settings-details[open] > summary { margin-bottom: 16px; }
.settings-card .form { width: 100%; max-width: none; }
.settings-card .controls { flex-wrap: wrap; }
.settings-card .entry { overflow-wrap: anywhere; }
.settings-card .entry:last-child { border-bottom: 0; padding-bottom: 0; }
.settings-status { margin: 20px 0 0; }
.settings-status > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.settings-status dd { margin: 0; white-space: nowrap; font-weight: 600; }
.settings-staff-list { margin-top: 20px; }
.settings-storage { margin-top: 24px; color: var(--muted); font-size: 12px; }
.settings-storage[open] > summary { margin-bottom: 12px; }
@media (max-width: 800px) {
  .settings-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .settings-card { padding: 20px; }
}
@media (max-width: 480px) {
  .settings-card { padding: 16px; }
  .settings-action button, .settings-button { width: 100%; }
  .settings-status { font-size: 13px; }
}
@media (max-width: 1000px) {
  .customer-summary-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 580px) {
  .customer-chart { padding: 10px; gap: 14px; margin-inline: -6px; }
  .customer-card { padding: 16px; border-radius: 8px; }
  .customer-summary-grid, .customer-chart #customer-reports { gap: 14px; }
  .customer-profile h1 { font-size: 24px; }
  .customer-card .task-fields { grid-template-columns: minmax(0, 1fr); }
  .customer-card .controls { align-items: stretch; }
  .customer-card .controls > label { flex-basis: 100%; }
  .customer-card .timeline li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

.media-parts { width: 100%; margin-block: 16px; }
.media-parts ol { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); }
.media-parts button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding: 14px; border: 1px solid #e3e5e9; border-radius: 10px; background: #fff; color: #20242b; cursor: pointer; }
.media-parts button[aria-pressed=true] { background: #eeeffa; border-color: #505bb7; color: #505bb7; }
