:root {
  color-scheme: only light;
  --bg: #fff;
  --surface: #f6f7f9;
  --ink: #20242b;
  --muted: #626874;
  --line: #e3e5e9;
  --action: #505bb7;
  --soft: #eeeffa;
  --warn: #9b461c;
  font:
    14px/1.6 "Yu Gothic UI",
    Meiryo,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.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: 4px;
  padding: 7px 10px;
  max-width: 100%;
}
button,
a {
  cursor: pointer;
}
button:hover {
  background: var(--surface);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}
h1 {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 500;
  margin: 0 0 10px;
}
h2 {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 10px;
}
h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 6px;
}
p {
  margin: 0 0 10px;
}
small,
.muted {
  font-size: 12px;
  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.link {
  border: 0;
  background: transparent;
  color: var(--action);
  padding: 3px 0;
  text-align: left;
}
.shell {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  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: 9px 10px;
  color: var(--ink);
  border-radius: 4px;
}
.sidebar nav a.active {
  background: var(--soft);
  color: var(--action);
}
.account {
  margin: 30px 8px 0;
  display: grid;
  gap: 8px;
}
.main {
  padding: 28px;
  min-width: 0;
  max-width: 1500px;
  width: 100%;
}
.head,
.row,
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.head {
  margin-bottom: 24px;
}
.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;
}
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);
}
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 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; }
.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; }
.report-prose { max-width: 800px; font-size: 16px; line-height: 1.95; overflow-wrap: anywhere; 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. */
.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-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; }
@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; }
}
