:root {
  --brand: #1a9e98; --brand-2: #2dbdb6; --brand-soft: #e3f6f5; --bg: #f4f7f8; --card: #fff; --text: #1d2730; --muted: #6b7785;
  --line: #e2e8ec; --ok: #0f9d58; --warn: #c27c0e; --err: #d93025; --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand); text-decoration: none; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top nav { display: flex; align-items: center; gap: 14px; }
.top nav a.on { font-weight: 600; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 18px 60px; }
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.01em; } h2 { font-size: 18px; margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: 13px; } small { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.card.narrow { max-width: 420px; margin: 70px auto; text-align: center; }
.login-logo { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 10px; }
.stack { display: grid; gap: 12px; text-align: left; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 500; }
input, textarea, select { font: inherit; color: var(--text); background: #fbfcfd; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%; }
input:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgb(45 189 182 / .18); }
textarea { resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 500; font-size: 14px; cursor: pointer;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.btn:hover { border-color: var(--brand-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #158a85; }
.btn.small { padding: 5px 11px; font-size: 13px; } .btn.block { width: 100%; padding: 12px; }
.btn.danger { color: var(--err); } .btn:disabled { opacity: .5; cursor: default; }
.flash { padding: 10px 14px; border-radius: 10px; margin: 8px 0; } .flash.err { background: #fdeceb; color: #a4221a; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 6px 0 0; max-width: 680px; }

/* new meeting */
.new-meeting { scroll-margin-top: 80px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
.span2 { grid-column: span 2; } .span3 { grid-column: 1 / -1; }
label small { font-weight: 400; }
.choose { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.choice { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 18px; cursor: pointer;
  border: 2px dashed var(--line); border-radius: 14px; background: #fbfdfd; font: inherit; color: var(--text); transition: border-color .15s, background .15s; }
.choice:hover, .choice.over { border-color: var(--brand-2); background: var(--brand-soft); }
.choice.busy { pointer-events: none; opacity: .6; }
.choice input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.choice b { font-size: 16px; } .choice small { max-width: 300px; }
.ci { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); position: relative; }
.ci.rec::after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--err); }
.ci.up::after { content: "⬆"; color: var(--brand); font-size: 20px; font-weight: 700; }
.upload-progress { margin-top: 14px; }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .4s; }
.bar.big { height: 12px; margin: 16px 0 10px; }

/* list */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.list-head h2 { margin: 0; } .search input { width: 300px; max-width: 70vw; border-radius: 99px; }
.meeting-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 16px; align-items: center; padding: 14px 6px; border-top: 1px solid var(--line); color: var(--text); }
.meeting-row:hover { background: #f8fbfb; }
.mr-date { display: flex; flex-direction: column; align-items: center; border-radius: 10px; background: var(--brand-soft); padding: 6px 0; }
.mr-date b { color: var(--brand); font-size: 15px; } .mr-date small { font-size: 11px; }
.mr-main { display: flex; flex-direction: column; min-width: 0; } .mr-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.badge { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.badge.st-done { color: var(--ok); background: #e7f6ee; border-color: transparent; }
.badge.st-error { color: var(--err); background: #fdeceb; border-color: transparent; }
.badge.st-recording, .badge.st-transcribing, .badge.st-writing, .badge.st-converting { color: var(--brand); background: var(--brand-soft); border-color: transparent; }
.empty { text-align: center; padding: 26px; }

/* meeting page */
.back { margin: 0 0 8px; font-size: 14px; }
.m-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.m-head p { margin: 4px 0 0; } .m-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.recorder .rec-main { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; }
.rec-btn { width: 88px; height: 88px; border-radius: 50%; border: 4px solid #f3c6c3; background: #fff; cursor: pointer; display: grid; place-items: center; }
.rec-btn span { width: 44px; height: 44px; border-radius: 50%; background: var(--err); transition: border-radius .2s, transform .2s; }
.rec-btn.on { border-color: var(--err); animation: pulse 1.6s infinite; } .rec-btn.on span { border-radius: 8px; transform: scale(.7); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(217 48 37 / .35); } 70% { box-shadow: 0 0 0 16px rgb(217 48 37 / 0); } }
.rec-info { display: flex; flex-direction: column; gap: 6px; } .rec-info b { font-size: 16px; }
.rec-time { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.meter { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; max-width: 360px; }
.meter span { display: block; height: 100%; width: 0; background: var(--brand-2); transition: width .1s; }
.rec-side { display: flex; flex-direction: column; gap: 8px; }
.live-text { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; max-height: 420px; overflow: auto; }
.live-text p { margin: 0 0 10px; line-height: 1.6; } .live-text p.pending { color: var(--muted); font-style: italic; } .live-text p.warn { color: var(--warn); }
.ts { display: inline-block; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 0 6px; margin-right: 6px; }
.processing .steps-row { display: flex; gap: 8px; flex-wrap: wrap; }
.stp { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 5px 12px; border-radius: 99px; background: var(--bg); }
.stp i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.stp.now { color: var(--brand); background: var(--brand-soft); font-weight: 600; } .stp.now i { background: var(--brand-2); animation: pulse 1.6s infinite; }
.stp.done { color: var(--ok); } .stp.done i { background: var(--ok); }
.player { padding: 12px 16px; position: sticky; top: 62px; z-index: 3; } .player audio { width: 100%; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tab { font: inherit; padding: 8px 16px; border-radius: 10px 10px 0 0; border: 1px solid transparent; background: none; cursor: pointer; color: var(--muted); font-weight: 500; }
.tab.on { background: var(--card); border-color: var(--line); border-bottom-color: var(--card); color: var(--text); }

/* protocol */
.protocol { padding: 30px 36px; }
.proto-head { border-bottom: 2px solid var(--brand); padding-bottom: 14px; margin-bottom: 8px; }
.proto-head h2 { text-align: center; letter-spacing: .08em; font-size: 20px; }
.proto-head dl { display: grid; grid-template-columns: 140px 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.proto-head dt { color: var(--muted); } .proto-head dd { margin: 0; }
.protocol h3 { font-size: 16px; margin: 22px 0 8px; color: var(--brand); }
.protocol .summary { background: var(--brand-soft); border-radius: 10px; padding: 12px 16px; margin: 0; }
.protocol ol, .protocol ul { padding-left: 22px; margin: 0; } .protocol li { margin: 0 0 8px; }
.topics > li p { margin: 4px 0; } .dec li { color: #0b6b3a; }
.dec li::marker { content: "✓  "; color: var(--ok); }
.tasks { width: 100%; border-collapse: collapse; font-size: 14px; }
.tasks th, .tasks td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.tasks th { background: var(--brand-soft); font-weight: 600; } .tasks td:first-child { width: 36px; text-align: center; }
.ai-note { margin-top: 24px; font-size: 12.5px; border-top: 1px dashed var(--line); padding-top: 10px; }
.dialogue .legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.spk { font-size: 12.5px; padding: 3px 10px; border-radius: 99px; font-weight: 600; }
.turn { display: grid; grid-template-columns: 72px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f3f5; }
.turn b { font-size: 13.5px; } .turn p { margin: 2px 0 0; line-height: 1.6; }
.c0 { --c: #1a9e98; } .c1 { --c: #6a5acd; } .c2 { --c: #d97706; } .c3 { --c: #2563eb; } .c4 { --c: #c2185b; } .c5 { --c: #0f766e; } .c6 { --c: #7c3aed; } .c7 { --c: #b45309; }
.turn b { color: var(--c); } .spk { color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
dialog.regen { border: none; border-radius: 16px; padding: 24px; width: min(560px, 92vw); box-shadow: 0 20px 60px rgb(0 0 0 / .25); }
dialog::backdrop { background: rgb(15 25 30 / .45); }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.danger-row { text-align: right; margin-top: 10px; }

@media (max-width: 760px) {
  .grid, .choose { grid-template-columns: 1fr; } .span2 { grid-column: auto; }
  .recorder .rec-main { grid-template-columns: 1fr; justify-items: center; text-align: center; } .meter { margin: 0 auto; width: 100%; }
  .meeting-row { grid-template-columns: 60px 1fr; } .mr-meta { grid-column: 2; align-items: flex-start; }
  .protocol { padding: 20px; } .proto-head dl { grid-template-columns: 1fr; }
}
@media print {
  .top, .back, .m-actions, .player, .tabs, .danger-row, .dialogue, .processing, .recorder { display: none !important; }
  body { background: #fff; } main { padding: 0; max-width: none; } .card { border: none; padding: 0; }
  .protocol { padding: 0; } .m-head { display: none; } .protocol h3 { color: #000; } .summary { background: #f3f3f3 !important; }
}
.turn .ts { align-self: start; justify-self: start; margin-top: 2px; }
::placeholder { color: #a3adb7; font-weight: 400; opacity: 1; }
.recorder .flash a { color: inherit; text-decoration: underline; font-weight: 600; } .recorder .flash { margin-top: 14px; }

/* categories, people, voice, phone microphone */
.flash.ok { background: #e7f6ee; color: #0b6b3a; }
.who { font-size: 13px; }
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat { flex-direction: row; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--text); }
.cat input { width: auto; margin-top: 3px; accent-color: var(--brand); }
.cat span { display: flex; flex-direction: column; } .cat b { font-size: 15px; }
.cat:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pick-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.pick-tools { display: flex; gap: 6px; } .pick-tools input { width: 160px; padding: 5px 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 210px; overflow: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); background: #fbfcfd; cursor: pointer; color: var(--text); }
.chip small { font-size: 11.5px; } .chip i { font-style: normal; font-size: 12px; color: var(--muted); }
.chip.on { border-color: var(--brand); background: var(--brand); color: #fff; } .chip.on small, .chip.on i { color: #dff5f4; }
.chip[hidden] { display: none; }
.cat-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 6px; vertical-align: 2px; background: #eef1f4; color: var(--muted); }
.cat-tag.board { background: #efeafd; color: #5b3fc4; }
.filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.form-end { display: flex; align-items: flex-end; }
.people .person { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.p-main { display: flex; flex-direction: column; min-width: 0; } .p-actions { display: flex; gap: 6px; }
.row-actions .grow { flex: 1; }
.read-text { margin: 12px 0 16px; padding: 14px 18px; border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 0 10px 10px 0; font-size: 16px; line-height: 1.7; }
.voice-row { display: flex; gap: 22px; align-items: center; }
.voice-have { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; } .voice-have audio { flex: 1; min-width: 240px; }
.mic-join { display: flex; gap: 20px; align-items: center; } .mic-join p { margin: 6px 0; } .mic-join a { word-break: break-all; }
.qr { flex: none; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; } .qr:empty { display: none; }
.qr img, .qr canvas { display: block; }
@media (max-width: 760px) {
  .cats { grid-template-columns: 1fr; }
  .people .person { grid-template-columns: 40px 1fr; } .people .badge, .p-actions { grid-column: 2; justify-self: start; }
  .mic-join { flex-direction: column; text-align: center; } .voice-row { flex-direction: column; text-align: center; }
}
@media print { .mic-join { display: none !important; } }

/* lists: summary numbers, nav */
.nav-end { display: flex; align-items: center; gap: 14px; margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; display: flex; flex-direction: column; }
.stat b { font-size: 26px; letter-spacing: -.02em; color: var(--brand); } .stat span { font-size: 13px; color: var(--muted); }
.stat.warn b { color: var(--warn); }
.filters .n { font-size: 11px; opacity: .75; margin-left: 2px; }
.empty .btn { margin-top: 6px; }
.danger-zone form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .danger-zone .btn { margin-left: auto; }
.btn.block { width: 100%; }
@media (max-width: 760px) { .top { flex-wrap: wrap; padding: 10px 14px; } .top nav { gap: 10px; flex-wrap: wrap; } .nav-end { margin-left: 0; } }

/* left sidebar (signed in) */
:root { --side-w: 240px; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 20; display: flex; flex-direction: column;
  background: #0f2a2e; color: #cfe3e2; padding: 16px 12px; }
.side-brand .brand { color: #fff; padding: 4px 8px 18px; }
.side-brand .brand span { font-size: 15px; line-height: 1.25; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side-label { margin: 16px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6f9896; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: #cfe3e2; font-size: 14.5px; font-weight: 500; }
.side-nav a:hover { background: rgb(255 255 255 / .07); color: #fff; }
.side-nav a.on { background: var(--brand); color: #fff; }
.side svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid rgb(255 255 255 / .1); margin-top: 10px; }
.side-user .avatar { background: rgb(45 189 182 / .2); color: #7fe0db; width: 36px; height: 36px; flex: none; }
.su-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.su-main b { color: #fff; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-main small { color: #8fb3b1; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-out { color: #8fb3b1; padding: 6px; border-radius: 8px; display: grid; } .su-out:hover { color: #fff; background: rgb(255 255 255 / .08); }
main.with-side { margin-left: var(--side-w); max-width: none; padding: 28px 36px 60px; }
main.with-side > * { max-width: 1100px; }
.mobile-top { display: none; }
.side-shade { display: none; }
.player { top: 12px; }
@media (max-width: 900px) {
  .mobile-top { display: flex; justify-content: flex-start; gap: 10px; }
  .nav-toggle { font: inherit; font-size: 20px; line-height: 1; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
  .side { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgb(0 0 0 / .3); }
  body.nav-open .side { transform: none; }
  body.nav-open .side-shade { display: block; position: fixed; inset: 0; z-index: 15; background: rgb(15 25 30 / .45); }
  main.with-side { margin-left: 0; padding: 20px 16px 60px; }
  .player { top: 62px; }
}
@media print { .side, .mobile-top, .side-shade { display: none !important; } main.with-side { margin: 0; padding: 0; } }

/* join code */
.join-card { text-align: center; } .join-ico { font-size: 40px; }
.code-input { font-size: 34px; text-align: center; letter-spacing: .35em; font-weight: 700; font-variant-numeric: tabular-nums; padding: 12px; }
.join-code { font-size: 46px; font-weight: 800; letter-spacing: .12em; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1.1; margin: 4px 0 8px; }
.mj-main { flex: 1; min-width: 0; } .mic-join h2 { margin-bottom: 4px; }
.joined { margin: 10px 0; font-size: 14px; } .jp { display: inline-block; padding: 2px 10px; margin: 2px 4px 2px 0; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; }
.jp.live { color: var(--ok); border-color: #b9e6cc; background: #eefaf3; }
.history td small { color: var(--muted); } .history td:first-child { width: auto; text-align: left; white-space: nowrap; }
