/* 議事録の体験版。色は common/base.css のトークンだけを使う */
.mn { max-width: 1180px; margin: 0 auto; padding: 20px var(--gutter) 56px; }

/* 作業の流れ（1→2→3→4） */
.mn-steps { display: flex; align-items: center; gap: 8px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; margin: 0 auto 22px; box-shadow: var(--shadow-s); }
.mn-steps button { display: flex; align-items: center; gap: 8px; padding: 7px 16px 7px 8px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.mn-steps button:disabled { cursor: default; opacity: .55; }
.mn-steps button:not(:disabled):hover { background: var(--sunken); color: var(--ink); }
.mn-steps .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); font-size: 13px; }
.mn-steps button[aria-current="step"] { background: var(--brand); color: #fff; }
.mn-steps button[aria-current="step"] .n { background: var(--accent); color: #fff; }
.mn-steps button.done .n { background: var(--ok-soft); color: var(--ok); }
.mn-steps-line { width: 16px; height: 2px; background: var(--line-2); flex: none; }

.scr-head { max-width: 780px; margin-bottom: 18px; }
.scr-head h2 { font-size: 24px; font-weight: 800; line-height: 1.4; }
.scr-lead { margin-top: 6px; color: var(--ink-2); line-height: 1.85; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; min-width: 0; box-shadow: var(--shadow-s); }
.btn-big { min-height: 50px; padding: 0 26px; font-size: 16px; border-radius: 12px; }

/* 1. 録音 */
.rec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px 18px 14px; box-shadow: var(--shadow-s); }
.rec-top { display: flex; align-items: center; gap: 12px; }
.rec-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-2); display: grid; place-items: center; flex: none; }
.rec-ico .ico { width: 22px; height: 22px; }
.rec-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rec-name b { font-size: 16.5px; line-height: 1.4; }
.rec-name span { font-size: 13px; color: var(--ink-3); }
.wave { margin-top: 14px; }
.wave svg { width: 100%; height: 84px; }
.wave rect { fill: var(--brand-2); opacity: .72; }
.wave rect.gap { fill: var(--accent); opacity: 1; }
.wave rect.low { fill: var(--accent); opacity: .55; }
.wave-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.wave-legend { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }

.flow-title { margin: 26px 0 12px; font-size: 16px; font-weight: 800; }
.flow { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.flow li { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px 16px 16px; box-shadow: var(--shadow-s); }
.flow li:not(:last-child)::after { content: ""; position: absolute; right: -13px; top: 30px; width: 12px; height: 12px; border-top: 2.5px solid var(--line-2); border-right: 2.5px solid var(--line-2); transform: rotate(45deg); z-index: 1; }
.flow .st-head { display: flex; align-items: center; gap: 10px; }
.flow .st-no { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 14px; display: grid; place-items: center; flex: none; }
.flow .st-name { font-size: 16px; font-weight: 800; }
.flow .st-body { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.flow .st-result { margin-top: auto; padding: 8px 10px; border-radius: var(--r-s); background: var(--accent-soft); color: var(--accent-deep); font-size: 13px; font-weight: 700; line-height: 1.55; }
.cost-note { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.pick-foot {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 16px; margin: 20px calc(var(--gutter) * -1) 0; padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  background: rgba(246, 244, 238, .94); backdrop-filter: blur(6px); border-top: 1px solid var(--line);
}
.pick-note { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; flex: 1; }

/* 読み取り中（文字が流れる） */
.reading { position: fixed; inset: 0; z-index: 1050; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; background: rgba(22, 36, 44, .45); padding: 16px; }
.reading-card { width: min(400px, 100%); background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-l); padding: 22px 24px 20px; text-align: center; }
.reading-lines { height: 110px; overflow: hidden; border-radius: 8px; background: var(--paper); padding: 8px 10px; text-align: left; font-size: 12.5px; line-height: 1.7; color: var(--ink-2); display: flex; flex-direction: column; justify-content: flex-end; }
.reading-lines div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reading-lines b { color: var(--brand-2); margin-right: 8px; font-feature-settings: "tnum"; }
.reading-title { margin-top: 14px; font-weight: 700; font-size: 16px; }
.reading-bar { height: 6px; border-radius: 3px; background: var(--sunken); margin-top: 12px; overflow: hidden; }
.reading-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .12s linear; }
.reading-count { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.reading-note { margin-top: 8px; font-size: 12px; color: var(--ink-3); line-height: 1.6; }

/* 2. 文字起こしを確かめる */
.rv-tabs { display: none; }
.rv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.t-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--sunken); gap: 2px; }
.seg button { height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.t-count { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.t-note { margin-top: 10px; padding: 7px 10px; border-radius: var(--r-s); background: var(--sunken); font-size: 12.5px; color: var(--ink-2); line-height: 1.65; }
.t-list { margin-top: 8px; }
.t-row { display: grid; grid-template-columns: 54px 58px minmax(0, 1fr); gap: 0 10px; padding: 9px 8px; border-top: 1px solid var(--line); border-radius: 0; line-height: 1.8; font-size: 14.5px; scroll-margin: 12px 0 120px; }
.t-row:first-child { border-top: 0; }
.t-time { font-size: 13px; color: var(--brand-2); font-weight: 700; padding-top: 1px; font-feature-settings: "tnum"; }
.t-sp { font-size: 13px; font-weight: 800; padding-top: 1px; white-space: nowrap; }
.t-sp.s1 { color: var(--c1); } .t-sp.s2 { color: var(--c2); } .t-sp.s3 { color: var(--c3); } .t-sp.s4 { color: var(--c4); } .t-sp.s0 { color: var(--ink-3); }
.t-text { min-width: 0; overflow-wrap: anywhere; }
.t-row.unc, .t-row.gap { background: var(--accent-soft); }
.t-row.gap .t-text { color: var(--ink-2); }
.t-row.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 55% { background: var(--warn-soft); box-shadow: inset 3px 0 0 var(--accent); } 100% { box-shadow: none; } }
.t-flag { display: inline-flex; align-items: center; height: 20px; margin-left: 8px; padding: 0 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--warn-line); color: var(--warn); font-size: 11.5px; font-weight: 700; vertical-align: 1px; white-space: nowrap; }
.low { text-decoration: underline wavy var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.fx del { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1.5px; background: var(--bad-soft); padding: 0 2px; border-radius: 3px; }
.fx ins { text-decoration: none; background: var(--ok-soft); color: var(--ok); font-weight: 700; padding: 0 3px; border-radius: 3px; margin-left: 2px; }
.fx.off { background: var(--warn-soft); border-radius: 3px; padding: 0 2px; border-bottom: 1.5px dotted var(--warn); }
.t-legend { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.t-empty { padding: 36px 10px; text-align: center; color: var(--ink-3); }

.f-panel { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.f-panel h3 { font-size: 16px; font-weight: 800; }
.f-lead { margin-top: 4px; font-size: 13px; color: var(--ink-2); line-height: 1.75; }
.f-note { margin-top: 8px; font-size: 12px; color: var(--ink-3); line-height: 1.65; }
.f-h2 { margin-top: 22px; }
.fix-list { margin-top: 10px; display: grid; gap: 10px; }
.fix { border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 12px 10px; background: var(--paper); }
.fix.off { background: var(--surface); border-style: dashed; }
.fix-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
.fix-top b { color: var(--brand-2); font-feature-settings: "tnum"; }
.fix-words { margin-top: 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 15px; }
.fix-words s { color: var(--bad); text-decoration-thickness: 1.5px; }
.fix-words .arrow { color: var(--ink-3); }
.fix-words b { color: var(--ok); }
.fix.off .fix-words s { text-decoration: none; color: var(--ink); font-weight: 700; }
.fix.off .fix-words b { color: var(--ink-3); font-weight: 500; text-decoration: line-through; }
.fix-reason { margin-top: 4px; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.fix-foot { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fix-foot .btn { min-height: 32px; font-size: 13px; padding: 0 12px; }
.fix.unsure { background: var(--warn-soft); border-color: var(--warn-line); }
.fix.unsure .fix-words { font-size: 14.5px; }

/* 3. 議事録 */
.mn-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.m-head { padding: 14px 18px; }
.m-title { display: block; font-size: 18px; line-height: 1.5; }
.m-meta { margin-top: 2px; display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 13.5px; color: var(--ink-2); }
.m-writer { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.m-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 12px; }
.m-tabs button { height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); font-size: 14px; font-weight: 700; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.m-tabs button:hover { background: var(--sunken); }
.m-tabs button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.m-tabs .cnt { font-size: 12px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); display: inline-grid; place-items: center; }
.m-tabs button[aria-selected="true"] .cnt { background: rgba(255, 255, 255, .2); color: #fff; }
.m-tabs .cnt.warn { background: var(--warn-soft); color: var(--warn); }
.m-body { padding: 8px 18px 14px; }
.m-lead { padding: 8px 0 4px; font-size: 13px; color: var(--ink-3); line-height: 1.7; }
.m-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); line-height: 1.8; }
.m-item:first-of-type { border-top: 0; }
.m-num { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-2); font-size: 12.5px; font-weight: 800; display: grid; place-items: center; flex: none; margin-top: 3px; }
.m-text { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.tchips { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: 1px; }
.tchip { height: 22px; padding: 0 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-2); font-size: 12px; font-weight: 700; font-feature-settings: "tnum"; }
.tchip:hover, .tchip[aria-pressed="true"] { background: var(--brand-2); color: #fff; }
.tchips.block { display: flex; margin: 6px 0 0; }

.task { padding: 14px 0; border-top: 1px solid var(--line); }
.task:first-of-type { border-top: 0; }
.task-top { display: flex; gap: 12px; align-items: flex-start; }
.task-title { flex: 1; min-width: 0; font-weight: 700; line-height: 1.7; overflow-wrap: anywhere; }
.task-flds { margin: 8px 0 0 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.tf { display: grid; gap: 3px; min-width: 0; }
.tf > span { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.tf .val { font-size: 14.5px; min-height: 38px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tf em.tag { font-style: normal; font-size: 11.5px; color: var(--warn); font-weight: 700; }
.tf .val .tag { font-size: 11.5px; color: var(--warn); font-weight: 700; }
.tf-in { display: flex; gap: 6px; min-width: 0; }
.tf input { flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--warn-line); border-radius: 6px; background: var(--warn-soft); color: var(--ink); font-size: 14.5px; }
.tf input::placeholder { color: var(--warn); opacity: .75; }
.tf.set input { border-color: var(--ok); background: var(--ok-soft); }
.tf .ok-btn { flex: none; height: 38px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--warn-line); background: var(--surface); color: var(--warn); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.tf .done-mark { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--ok); }
.task-note { margin: 8px 0 0 36px; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.task .tchips { margin: 6px 0 0 36px; display: flex; }
.alert { margin: 8px 0 6px; padding: 9px 12px; border-radius: var(--r-s); background: var(--warn-soft); color: var(--warn); font-size: 13.5px; font-weight: 700; line-height: 1.6; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.m-note { margin-bottom: 4px; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.unc-item { padding: 12px 0; border-top: 1px solid var(--line); line-height: 1.8; }
.unc-item:first-of-type { border-top: 0; }
.unc-item .how { margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.unc-item .how b { color: var(--ink); }

/* 根拠の発言（PC：右に常に出す／スマホ：下から出す） */
.evi { position: sticky; top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-s); overflow: hidden; max-height: calc(100vh - 24px); display: flex; flex-direction: column; }
.evi-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--brand); color: #fff; }
.evi-close { display: none; width: 32px; height: 32px; border-radius: 50%; color: #fff; font-size: 22px; line-height: 1; }
.evi-body { padding: 10px 14px 14px; overflow: auto; }
.evi-empty { font-size: 13px; color: var(--ink-3); line-height: 1.85; padding: 6px 2px; }
.evi-line { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 0 8px; padding: 8px 6px; border-radius: 8px; font-size: 13.5px; line-height: 1.75; }
.evi-line.hit { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.evi-line .t-time { font-size: 12px; }
.evi-line .who { font-weight: 800; font-size: 12.5px; }
.evi-line .tx { grid-column: 2; overflow-wrap: anywhere; }
.evi .btn { margin-top: 8px; min-height: 36px; font-size: 13.5px; }

/* 4. 書き出し */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { padding: 12px 14px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.tile b { display: block; font-size: 26px; line-height: 1.2; font-weight: 800; }
.tile span { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.tile.warn b { color: var(--warn); } .tile.ok b { color: var(--ok); }
.ex-cards { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ex-card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px 18px; box-shadow: var(--shadow-s); }
.ex-card b { font-size: 16px; }
.ex-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; flex: 1; }
.ex-card .btn { margin-top: 10px; align-self: flex-start; }
.ex-note { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.preview { margin-top: 26px; }
.preview h3, .limits h3 { font-size: 16px; font-weight: 800; }
.table-wrap { margin-top: 10px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.table-wrap th { background: var(--brand); color: #fff; font-weight: 700; text-align: left; padding: 7px 9px; white-space: nowrap; }
.table-wrap td { padding: 6px 9px; border-top: 1px solid var(--line); vertical-align: top; }
.table-wrap td.nw { white-space: nowrap; }
.table-wrap td.w { min-width: 260px; }
.table-wrap td.m { min-width: 240px; color: var(--ink-2); }
.table-wrap td.y { background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.limits { margin-top: 26px; padding: 16px 18px; border-radius: var(--r-l); background: var(--sunken); border-left: 4px solid var(--brand-2); }
.limits ul { margin: 8px 0 0 18px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }

@media (max-width: 1020px) {
  .rv-grid { grid-template-columns: minmax(0, 1fr); }
  .rv-tabs { display: flex; gap: 6px; margin-bottom: 12px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
  .rv-tabs button { flex: 1; height: 38px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
  .rv-tabs button[aria-selected="true"] { background: var(--brand); color: #fff; }
  .rv-grid[data-rv="text"] .f-panel { display: none; }
  .rv-grid[data-rv="fix"] .t-panel { display: none; }
  .f-panel { position: static; max-height: none; }
  .mn-grid { grid-template-columns: minmax(0, 1fr); }
  .evi { position: fixed; left: 0; right: 0; bottom: var(--dock-h, 0px); top: auto; z-index: 55; border-radius: var(--r-l) var(--r-l) 0 0; max-height: 52vh; transform: translateY(105%); transition: transform .22s ease-out; box-shadow: var(--shadow-l); padding-bottom: env(safe-area-inset-bottom); }
  .evi.open { transform: none; }
  .evi-close { display: inline-grid; place-items: center; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .flow li:not(:last-child)::after { right: auto; left: 28px; top: auto; bottom: -13px; transform: rotate(135deg); }
}
@media (max-width: 640px) {
  .mn { padding-top: 14px; }
  .mn-steps { gap: 2px; padding: 4px; width: 100%; justify-content: space-between; margin-bottom: 18px; }
  .mn-steps button { flex-direction: column; gap: 2px; padding: 5px 2px; font-size: 11.5px; flex: 1; border-radius: 14px; }
  .mn-steps-line { width: 6px; }
  .scr-head h2 { font-size: 20px; }
  .scr-lead { font-size: 14px; line-height: 1.8; }
  .rec { padding: 14px; }
  .rec-top { flex-wrap: wrap; row-gap: 10px; }
  .rec-name { flex: 1 1 0; min-width: 150px; }
  .rec-name b { font-size: 15.5px; }
  .pick-foot { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 10px; }
  .pick-note { font-size: 11.5px; }
  .btn-big { width: 100%; }
  .panel { padding: 12px; border-radius: var(--r-m); }
  .t-row { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "time sp" "text text"; padding: 9px 4px; font-size: 14.5px; line-height: 1.8; }
  .t-row .t-time { grid-area: time; } .t-row .t-sp { grid-area: sp; } .t-row .t-text { grid-area: text; }
  .t-count { width: 100%; margin-left: 0; }
  .seg button { padding: 0 11px; font-size: 13px; }
  .m-body { padding: 4px 12px 12px; }
  .m-head { padding: 12px 14px; }
  .m-tabs { gap: 5px; }
  .m-tabs button { height: 36px; padding: 0 11px; font-size: 13.5px; }
  .task-flds, .task-note, .task .tchips { margin-left: 0; }
  .task-flds { grid-template-columns: minmax(0, 1fr); }
  .tf input { font-size: 16px; }
  .ex-cards { grid-template-columns: minmax(0, 1fr); }
  .ex-card .btn { align-self: stretch; }
  .tile b { font-size: 22px; }
}
