/* ===== Pop Studio — warm cream, tangerine, candy color blocks ===== */

:root {
  --bg: #FAF3E7;
  --bg-deep: #EFE6D4;
  --ink: #231B12;
  --muted: #8A7B64;
  --primary: #F4502A;
  --yellow: #FFC838;
  --blue: #2E66E5;
  --pink: #F9AFC3;
  --card: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: "Bricolage Grotesque", sans-serif;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  justify-content: center;
}

.screen {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  padding: calc(18px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }

/* ---------- shared ---------- */

.overline {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
  min-height: 44px;
}
.pill-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.pill-yellow { background: var(--yellow); color: var(--ink); }
.pill-ink { background: var(--ink); color: var(--bg); }

/* ---------- HOME ---------- */

.wordmark { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.wordmark .dot { color: var(--primary); }

.avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.pro-badge {
  background: var(--blue);
  color: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 2px 7px;
}

.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
  font-weight: 800; font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hero-title {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -1px;
}
.hero-sub { font-size: 15px; color: var(--muted); margin-top: 8px; font-weight: 500; }

.record-wrap { text-align: center; margin: 34px 0 38px; }

.record-btn {
  width: 150px; height: 150px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.record-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.record-ring {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 5px solid var(--bg);
}
.record-caption {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
}
.home-status { margin-top: 10px; font-size: 13px; color: var(--primary); font-weight: 600; min-height: 1.2em; }

.section-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.section-title { margin-bottom: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.folder-back {
  width: 32px; height: 32px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--card);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  padding-bottom: 2px;
}
.folder-back:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }

.chip-btn {
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 7px 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.chip-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }

.talk-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.talk-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 15px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.talk-card:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.talk-block {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  flex-shrink: 0;
}
.talk-block.c0 { background: var(--blue); }
.talk-block.c1 { background: var(--pink); }
.talk-block.c2 { background: var(--yellow); }

.talk-info { min-width: 0; flex: 1; }
.talk-title { display: block; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talk-meta { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 2px; }

.folder-block {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.folder-block::before {
  content: "";
  position: absolute;
  top: 8px; left: 7px;
  width: 14px; height: 5px;
  background: var(--ink);
  border-radius: 2px 2px 0 0;
}
.folder-block::after {
  content: "";
  position: absolute;
  top: 13px; left: 7px; right: 7px; bottom: 8px;
  border: 2px solid var(--ink);
  border-radius: 2px;
}

.kebab {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--card);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2.5px;
}
.kebab i { width: 3.5px; height: 3.5px; border-radius: 50%; background: var(--ink); display: block; }

.doc-chip {
  flex-shrink: 0;
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 10px;
}

.empty-note { color: var(--muted); font-size: 14px; font-weight: 500; }

/* ---------- RECORDING ---------- */

.status-chip-wrap { text-align: center; margin-bottom: 22px; }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--primary);
  color: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
}
.status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  animation: pulse 1.2s ease-in-out infinite;
}
.status-chip.paused .status-dot { animation: none; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.timer {
  text-align: center;
  font-size: 64px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 18px;
}

.waveform {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 22px;
}
.waveform i {
  display: block;
  width: 5px;
  border-radius: 3px;
  background: var(--primary);
  height: 4px;
  transition: height 0.08s linear;
}

.live-card {
  flex: 1;
  min-height: 0;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  margin-bottom: 22px;
}
.live-transcript {
  flex: 1;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 500;
}
.live-final { color: var(--muted); }
.live-interim { color: var(--ink); font-weight: 600; }
.live-caret {
  display: inline-block;
  width: 9px; height: 18px;
  background: var(--primary);
  vertical-align: -3px;
  margin-left: 2px;
}

.controls-row {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.icon-pause { display: inline-flex; gap: 3px; }
.icon-pause i { display: block; width: 4px; height: 14px; background: var(--ink); border-radius: 1px; }
.icon-pause.play i:first-child {
  width: 0; height: 0; background: none; border-radius: 0;
  border-left: 12px solid var(--ink);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
.icon-pause.play i:last-child { display: none; }

.icon-stop { display: inline-block; width: 14px; height: 14px; background: var(--primary); border-radius: 3px; }

/* ---------- FORMATTING ---------- */

.formatting-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.formatting-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 20px 26px;
  font-size: 16px;
  font-weight: 700;
}
.pulse-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
.error-note { color: var(--primary); font-weight: 600; font-size: 14px; text-align: center; max-width: 320px; }

/* ---------- DOCUMENT ---------- */

.back-link {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 8px 8px 0;
}

.formatted-badge {
  background: var(--blue);
  color: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 5px 10px;
}

.doc-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 14px;
}

.meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.meta-chip {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.doc-actions .pill-btn {
  text-decoration: none;
  font-size: 14px;
  padding: 12px 22px;
}
.pill-white { background: var(--card); color: var(--ink); }
.icon-doc {
  display: inline-block;
  width: 14px; height: 14px;
  background: var(--yellow);
  border-radius: 3px;
}

.sticker-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 15px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 16px 18px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 500;
}
.sticker-card.yellow { background: var(--yellow); }
.sticker-card .overline { margin-bottom: 8px; }
.sticker-card .overline.on-yellow { color: var(--ink); }
.sticker-card .overline.accent-primary { color: var(--primary); }
.sticker-card .overline.accent-blue { color: var(--blue); }
.sticker-card p { margin-bottom: 10px; }
.sticker-card p:last-child { margin-bottom: 0; }

.kp-row { display: flex; gap: 10px; margin-bottom: 9px; align-items: baseline; }
.kp-row:last-child { margin-bottom: 0; }
.kp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; transform: translateY(1px); }
.kp-dot.c0 { background: var(--primary); }
.kp-dot.c1 { background: var(--blue); }
.kp-dot.c2 { background: var(--yellow); border: 1px solid var(--ink); }

.kp-divider { border-top: 2px solid #edf0f5; margin: 14px 0; }
.ks-dot {
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--blue);
  flex-shrink: 0;
  transform: translateY(1px);
}
.ks-text strong { font-weight: 800; }

.action-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 11px;
  cursor: pointer;
}
.action-row:last-child { margin-bottom: 0; }
.action-box {
  width: 16px; height: 16px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 2px;
  background: var(--card);
}
.action-row.done .action-box { background: var(--primary); }
.action-row.done .action-text { text-decoration: line-through; color: var(--muted); }

.doc-h2 { font-weight: 800; font-size: 15px; margin: 12px 0 6px; }

.doc-quote {
  border-left: 4px solid var(--primary);
  padding-left: 12px;
  margin: 10px 0;
  font-style: italic;
}
.doc-quote .attr { font-style: normal; font-weight: 700; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- SPLASH / LOGIN ---------- */

.splash-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}

.splash-mark {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.splash-mark .record-ring { width: 36px; height: 36px; border-width: 4px; }

.splash-title { margin-bottom: 2px; }
.splash-title .dot { color: var(--primary); }

.login-card {
  width: 100%;
  max-width: 340px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 20px;
  text-align: left;
  margin-top: 24px;
}
.login-card .overline { color: var(--ink); margin-bottom: 7px; }
.login-gap { margin-top: 14px; }
.login-btn { width: 100%; justify-content: center; margin-top: 18px; }
.auth-toggle { display: block; margin: 14px auto 0; }

.login-card .error-note {
  margin: 16px auto 0;
  font-size: 13px;
  line-height: 1.5;
}

.legal-note {
  margin-top: 12px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.legal-note a { color: var(--muted); font-weight: 700; }

/* ---------- PLAN BANNER & LIMIT ---------- */

.plan-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 11px 14px;
  margin-bottom: 22px;
}
.plan-banner .chip-btn { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.plan-title { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; }
.plan-banner .talk-meta { color: var(--ink); opacity: 0.75; }

.limit-note {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin: -12px 0 14px;
}
.limit-note.urgent { color: var(--primary); }

/* ---------- UPGRADE OVERLAY ---------- */

.upgrade-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 40;
  display: flex;
  justify-content: center;
  overflow-y: auto;
  padding: calc(30px + env(safe-area-inset-top)) 22px calc(30px + env(safe-area-inset-bottom));
}
.upgrade-inner {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: auto 0;
}

.upgrade-badge {
  background: var(--blue);
  color: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 5px 12px;
  margin-bottom: 16px;
}

.upgrade-heading {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
}
.upgrade-sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 10px;
  max-width: 320px;
}

.price-card {
  width: 100%;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 22px;
  margin: 24px 0;
  text-align: left;
}
.price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 18px;
}
.price-big {
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -3px;
  line-height: 1;
}
.price-per { font-size: 16px; font-weight: 700; }

.benefit {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 9px;
}
.benefit:last-child { margin-bottom: 0; }

.upgrade-cta { width: 100%; max-width: 320px; justify-content: center; }

.text-btn {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  margin-top: 16px;
  text-decoration: underline;
  padding: 8px;
}

/* ---------- MODAL ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 27, 18, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 50;
}
.modal-card {
  width: 100%;
  max-width: 340px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 20px;
}
.modal-card .overline { color: var(--ink); }

.modal-input {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  background: var(--bg);
}
.modal-input:focus { outline: 3px solid var(--yellow); }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.modal-actions .pill-btn { font-size: 14px; padding: 11px 20px; }

.folder-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--bg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
}
.folder-option:active, .folder-option.selected { background: var(--yellow); }
.folder-option .mini-folder {
  width: 18px; height: 14px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  position: relative;
  flex-shrink: 0;
}
.folder-option .mini-folder::before {
  content: "";
  position: absolute;
  top: -5px; left: -2px;
  width: 8px; height: 3px;
  background: var(--ink);
  border-radius: 2px 2px 0 0;
}
.modal-scroll { max-height: 300px; overflow-y: auto; }
