/* ============================================================
   Minutes — core app styles
   Palette: navy / orange / cream (institutional flattery)
   ============================================================ */

:root {
  --navy: #1C2B4A;
  --navy-deep: #121D33;
  --navy-soft: #33456B;
  --orange: #E07A2F;
  --orange-soft: #F3E1D0;
  --cream: #FAF6EE;
  --paper: #FFFFFF;
  --ink: #22293A;
  --ink-soft: #6A7183;
  --line: #E5E0D3;
  --green-ok: #3E7A4E;
  --red-live: #D65438;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.screen {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.screen.active { display: flex; }

.h-display { font-family: 'Fraunces', Georgia, serif; font-weight: 600; }

/* ---------- shared ---------- */
.pad { padding: 0 22px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 999px; font-weight: 600; font-size: 16px;
  padding: 16px 22px; border: none; width: 100%;
  font-family: inherit; cursor: pointer;
  transition: transform .08s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.label {
  font-size: 11px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px;
}
.field {
  width: 100%; background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 14px 16px; font-size: 16px;
  font-family: inherit; color: var(--ink); outline: none;
}
.field:focus { border-color: var(--orange); }
.hint { font-size: 12px; color: var(--ink-soft); margin-top: 8px; line-height: 1.5; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px 8px;
}
.topbar .back { font-size: 14px; color: var(--ink-soft); font-weight: 500; background: none; border: none; font-family: inherit; cursor: pointer; }
.topbar h3 { font-size: 16px; font-weight: 700; }
.topbar .spacer { width: 44px; }

/* ---------- home ---------- */
.home-header {
  display: flex; align-items: center; gap: 9px; padding: 20px 22px 0;
}
.home-header .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--orange); }
.home-header span { font-weight: 700; font-size: 15px; letter-spacing: .02em; color: var(--navy); }

.home-hero { padding: 22px 22px 6px; }
.home-hero h2 { font-size: 31px; line-height: 1.12; color: var(--navy); }
.home-hero h2 em { font-style: italic; color: var(--orange); }
.home-hero p { margin-top: 9px; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.home-cta { margin: 20px 22px 4px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 22px 10px; }
.section-head .label { margin: 0; }

.meet-list { padding-bottom: 30px; }
.meet-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; margin: 0 22px 10px;
  display: flex; flex-direction: column; gap: 6px; cursor: pointer;
}
.meet-card .row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.meet-card h4 { font-size: 15px; font-weight: 600; color: var(--navy); }
.meet-card .when { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }
.meet-card .meta { display: flex; gap: 12px; font-size: 12px; color: var(--ink-soft); }
.meet-card .meta b { color: var(--navy); font-weight: 600; }
.badge {
  font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px;
  display: inline-block; width: fit-content;
}
.badge.pending { color: #8A5A22; background: var(--orange-soft); }
.badge.done { color: var(--green-ok); background: #E4EFE4; }
.empty-note {
  margin: 8px 22px; padding: 22px; text-align: center;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  color: var(--ink-soft); font-size: 13.5px; line-height: 1.55;
}

/* ---------- new meeting ---------- */
.form-block { padding: 16px 22px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 8px 14px 8px 9px; font-size: 13.5px; font-weight: 500;
}
.chip .avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.chip .x { color: #AEB3BE; font-size: 16px; background: none; border: none; cursor: pointer; padding: 0 2px; }
.part-row { display: flex; gap: 8px; }
.part-row .field { flex: 1; }
.part-row .field.num { flex: 1.2; }
.add-btn {
  margin-top: 10px; background: var(--orange-soft); color: #8A5A22;
  border: none; border-radius: 999px; padding: 10px 18px;
  font-weight: 600; font-size: 13.5px; font-family: inherit; cursor: pointer;
}
.footer-cta {
  margin-top: auto; padding: 16px 22px 26px;
  background: linear-gradient(to top, var(--cream) 70%, transparent);
}

/* ---------- recording ---------- */
#screen-record { background: var(--navy-deep); color: #EDF0F7; }
.rec-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 24px 0;
}
.rec-live { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.rec-live .pulse {
  width: 10px; height: 10px; border-radius: 50%; background: var(--red-live);
  animation: pulse 1.6s ease-in-out infinite;
}
.rec-live.paused .pulse { background: var(--orange); animation: none; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.rec-offline { font-size: 12px; color: #9AA6C0; }

.rec-title-wrap { padding: 36px 24px 0; }
.rec-title-wrap .h-display { font-size: 25px; color: #fff; line-height: 1.2; }
.rec-title-wrap .sub { font-size: 13px; color: #9AA6C0; margin-top: 7px; }

.rec-clock {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500;
  font-size: 56px; text-align: center; margin-top: 38px; letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
#waveCanvas { display: block; width: 100%; height: 88px; margin-top: 24px; }
.speech-tag { display: flex; justify-content: center; margin-top: 14px; min-height: 30px; }
.speech-tag span {
  font-size: 12px; font-weight: 600; color: #F0D9C4;
  background: rgba(255,255,255,.08); border-radius: 999px; padding: 7px 16px;
  transition: opacity .4s ease;
}
.rec-controls { margin-top: auto; padding: 0 24px 32px; display: flex; flex-direction: column; gap: 12px; }
.btn-stop { background: var(--orange); color: #fff; }
.btn-pause { background: transparent; border: 1.5px solid rgba(255,255,255,.28); color: #E7EBF4; }
.rec-safety { text-align: center; font-size: 11.5px; color: #8792AD; padding-bottom: 6px; }

/* ---------- processing ---------- */
.proc {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 0 34px; text-align: center;
}
.proc .orb {
  width: 78px; height: 78px; border-radius: 50%;
  background: var(--orange-soft); border: 2px solid var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 24px;
}
.proc h3 { font-size: 22px; color: var(--navy); }
.proc > p { font-size: 13.5px; color: var(--ink-soft); margin-top: 9px; line-height: 1.55; }
.proc-steps { margin-top: 28px; width: 100%; display: flex; flex-direction: column; gap: 13px; text-align: left; }
.pstep { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink); }
.pstep .tick {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.pstep.done .tick { background: var(--navy); color: #fff; }
.pstep.now .tick { border: 2px solid var(--orange); color: var(--orange); }
.pstep.now { font-weight: 600; }
.pstep.wait { color: #AEB3BE; }
.pstep.wait .tick { border: 2px solid var(--line); color: transparent; }
.proc-footer { padding: 0 22px 28px; }

/* ---------- meeting view ---------- */
.tabrow { display: flex; gap: 8px; padding: 12px 18px 0; overflow-x: auto; }
.tab {
  font-size: 12.5px; font-weight: 600; padding: 9px 16px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft);
  font-family: inherit; cursor: pointer; white-space: nowrap;
}
.tab.on { background: var(--navy); border-color: var(--navy); color: #fff; }

.doc {
  background: var(--paper); margin: 14px 18px 18px;
  border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px;
}
.doc .kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.doc h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 22px; margin-top: 7px; color: var(--navy); }
.doc .docmeta { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.doc .body-note { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin-top: 14px; }

.audio-wrap { padding: 4px 0 0; }
.audio-wrap audio { width: 100%; margin-top: 12px; }

.pending-panel {
  margin: 14px 18px; padding: 20px;
  background: var(--orange-soft); border-radius: 18px;
  font-size: 13px; line-height: 1.6; color: #6B4A1F;
}
.pending-panel b { color: #513815; }

/* ============================================================
   Additions: agenda flow, confirm card, share preview,
   minutes rendering, transcript
   ============================================================ */

/* agenda mode toggle */
.mode-toggle { display: flex; background: #EAE6DA; border-radius: 12px; padding: 4px; margin-top: 8px; }
.mode-toggle div {
  flex: 1; text-align: center; font-size: 13px; font-weight: 600;
  padding: 10px 0; border-radius: 9px; color: var(--navy-soft); cursor: pointer;
}
.mode-toggle .on { background: var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,.08); color: var(--navy); }

/* agenda editor */
.agenda-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px 15px; margin-bottom: 9px;
}
.agenda-item.plain { border: none; padding: 6px 0; margin: 0; background: transparent; }
.agenda-item .num { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 15px; color: var(--orange); min-width: 18px; }
.agenda-item .txt { flex: 1; font-size: 14px; line-height: 1.45; }
.agenda-tools { display: flex; gap: 2px; }
.agenda-tools .tool {
  background: none; border: none; font-size: 12px; color: #B7BCC7;
  padding: 2px 5px; cursor: pointer; font-family: inherit;
}
.agenda-tools .tool.del { font-size: 16px; }
.coming-tile {
  border: 1.5px dashed var(--line); border-radius: 14px; padding: 14px;
  text-align: center; font-size: 13px; color: var(--ink-soft);
  background: rgba(255,255,255,.5); font-weight: 600;
}
.coming-tile span { font-weight: 400; font-size: 11.5px; }

/* agenda confirm */
.confirm-banner {
  margin: 14px 22px 0; background: var(--orange-soft); border-radius: 14px;
  padding: 13px 16px; font-size: 13px; line-height: 1.5; color: #6B4A1F;
}
.confirm-banner b { color: #513815; }
.conf-card {
  margin: 16px 22px 0; background: var(--paper); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px;
}
.conf-card .kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.conf-card .h-display { font-size: 19px; margin-top: 6px; color: var(--navy); }
.conf-card .confmeta { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.conf-divider { height: 1px; background: var(--line); margin: 14px 0 10px; }

/* minutes document rendering */
.doc h5 { font-size: 14px; font-weight: 700; margin: 18px 0 8px; color: var(--navy); }
.doc h5.muted { color: var(--ink-soft); }
.doc .summary { font-size: 13.5px; line-height: 1.65; margin-top: 14px; color: #343B4D; font-style: italic; }
.doc ul { list-style: none; }
.doc li { font-size: 13px; line-height: 1.6; padding-left: 16px; position: relative; margin-bottom: 7px; color: #343B4D; }
.doc li::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--orange);
}
.action-box { background: var(--orange-soft); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.action-box .label { color: #8A5A22; margin-bottom: 8px; }
.action-box li { color: #513815; }
.action-box li::before { background: #C08A4E; }
.off-agenda-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft); margin: 22px 0 2px;
}
.shadow-card {
  margin: 0 18px 16px; border-radius: 18px; padding: 20px;
  background: repeating-linear-gradient(-45deg, #F4F0E6, #F4F0E6 8px, #EFEBDE 8px, #EFEBDE 16px);
  border: 1.5px dashed #B8A57E;
}
.shadow-card .kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8A7A54; }
.shadow-card h4 { font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 600; margin-top: 5px; color: #4C4534; }
.shadow-card ol { margin: 10px 0 0 18px; font-size: 13px; color: #4C4534; line-height: 1.75; }
.chitchat {
  margin: 0 18px 18px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.55;
  padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
}
.chitchat b { color: var(--ink); }
.view-cta { padding: 4px 18px 26px; }

/* transcript */
.transcript { margin-top: 12px; }
.utt { display: flex; gap: 10px; margin-bottom: 11px; align-items: flex-start; }
.utt .who {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--navy);
  background: #E8ECF4; border-radius: 999px; padding: 4px 10px; margin-top: 1px;
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.utt .said { font-size: 13px; line-height: 1.55; color: #343B4D; }

/* share preview */
.msg-area { resize: vertical; min-height: 96px; line-height: 1.55; font-size: 14px; }
.pdf-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 15px 16px; display: flex; align-items: center; gap: 13px;
}
.pdf-card .icon {
  width: 44px; height: 52px; border-radius: 8px; background: var(--navy); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; letter-spacing: .05em; flex: 0 0 auto;
}
.pdf-card .icon span { font-size: 16px; margin-bottom: 2px; }
.pdf-card .t b { display: block; font-size: 13.5px; font-weight: 600; word-break: break-word; }
.pdf-card .t span { font-size: 11.5px; color: var(--ink-soft); }

/* participants add row reuse */
.part-row .add-btn { margin-top: 0; flex: 0 0 auto; align-self: center; }
