@import url("https://fonts.googleapis.com/css2?family=Kiwi+Maru:wght@400;500&family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  --cream: #fbfaf6;
  --paper: #ffffff;
  --ink: #30443d;
  --muted: #82908a;
  --mint: #dff2e9;
  --mint-deep: #4d7a69;
  --peach: #ff8e7d;
  --peach-soft: #fff0ec;
  --lemon: #f7d879;
  --line: #e8ede9;
  --shadow: 0 18px 55px rgba(67, 91, 82, .09);
}

* { box-sizing: border-box; }

html {
  background: var(--cream);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at 12% 4%, rgba(255, 216, 200, .56), transparent 24rem),
    radial-gradient(circle at 92% 18%, rgba(211, 241, 227, .76), transparent 27rem),
    var(--cream);
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

body::before {
  width: 150px;
  height: 150px;
  left: -75px;
  top: 42%;
  border: 24px solid rgba(255, 142, 125, .08);
}

body::after {
  width: 105px;
  height: 105px;
  right: -45px;
  bottom: 8%;
  background: rgba(247, 216, 121, .12);
}

button, input, textarea { font: inherit; }
button { color: inherit; }

.grain { display: none; }

.masthead {
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 15px 15px 15px 5px;
  background: var(--mint-deep);
  color: white;
  font-family: "Kiwi Maru", sans-serif;
  font-size: 0;
  box-shadow: 0 9px 22px rgba(77, 122, 105, .18);
}

.brand-mark::before {
  content: "";
  width: 19px;
  height: 15px;
  border-radius: 6px;
  background: white;
  box-shadow: inset -5px 0 0 var(--mint);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 10px;
  border-width: 5px 5px 0 0;
  border-style: solid;
  border-color: white transparent transparent transparent;
}

.brand strong, .brand small { display: block; }
.brand strong {
  font-family: "Kiwi Maru", "Noto Sans SC", sans-serif;
  font-size: 16px;
  letter-spacing: .08em;
}
.brand small {
  margin-top: 2px;
  color: var(--muted);
  font: 600 8px/1 sans-serif;
  letter-spacing: .22em;
}

.sync-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(77, 122, 105, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .65);
  color: var(--muted);
  font-size: 11px;
  backdrop-filter: blur(10px);
}

.sync-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lemon);
}
.sync-pill.online i { background: #74b78f; box-shadow: 0 0 0 4px rgba(116,183,143,.12); }
.sync-pill.offline i { background: var(--peach); }
.header-actions, .header-account {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.header-account { margin-left: auto; }
.header-actions {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(77, 122, 105, .1);
}
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 4px;
  border: 1px solid rgba(77, 122, 105, .12);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: var(--mint-deep);
  font-size: 10px;
  cursor: pointer;
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--peach), #ffb363);
  color: white;
  font-size: 10px;
  font-weight: 700;
  background-position: center;
  background-size: cover;
}
.header-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 11px;
  border: 1px solid rgba(77, 122, 105, .12);
  border-radius: 999px;
  background: rgba(255,255,255,.65);
  color: var(--mint-deep);
  font-size: 10px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.mac-download {
  border-color: rgba(255, 142, 125, .22);
  background: var(--peach-soft);
  color: #a95247;
  font-weight: 700;
}
.mac-download span {
  padding: 3px 5px;
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: .04em;
}
.download-menu { position: relative; }
.download-menu summary { list-style: none; }
.download-menu summary::-webkit-details-marker { display: none; }
.download-menu[open] summary { background: var(--peach-soft); color: #a95247; }
.download-menu > div {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 0;
  width: 150px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
}
.download-menu > div a,
.download-menu > div span {
  display: block;
  padding: 8px 9px;
  border-radius: 9px;
  color: var(--mint-deep);
  font-size: 10px;
  text-decoration: none;
  white-space: nowrap;
}
.download-menu > div a:hover { background: var(--mint); }
.download-menu > div span { color: var(--muted); }
.notice-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--peach);
  color: white;
  font-size: 9px;
  font-weight: 700;
}
.notice-count[hidden] { display: none; }

main {
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto;
  padding: 12px 0 70px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, auto) minmax(320px, 1fr);
  align-items: center;
  gap: 38px;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
  animation: float-in .55s ease-out both;
}

.hero .eyebrow { display: none; }

.eyebrow {
  margin: 0 0 13px;
  color: var(--peach);
  font: 700 10px/1.4 sans-serif;
  letter-spacing: .19em;
}

.hero h1 {
  margin: 0;
  font-family: "Kiwi Maru", "Noto Sans SC", sans-serif;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .01em;
}
.hero h1 br { display: none; }

.hero h1 em {
  position: relative;
  color: var(--mint-deep);
  font-style: normal;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  bottom: -5px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 142, 125, .24);
  transform: rotate(-1deg);
  z-index: -1;
}

.hero-copy {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.recorder-shell {
  position: relative;
  width: min(760px, 100%);
  margin: 18px auto 26px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(77, 122, 105, .09);
  border-radius: 28px;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  box-shadow: var(--shadow);
  animation: float-in .55s .08s ease-out both;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.quick-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(77, 122, 105, .12);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(224,243,235,.72), rgba(255,241,238,.62));
}
.quick-result[hidden] { display: none; }
.quick-result-head { display: flex; align-items: center; gap: 9px; }
.quick-result span { color: var(--mint-deep); font-size: 10px; font-weight: 700; }
.quick-version-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 9px;
  background: rgba(255,255,255,.62);
}
.quick-version-switch button {
  border: 0;
  border-radius: 7px;
  padding: 4px 8px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}
.quick-version-switch button.active {
  background: white;
  color: var(--mint-deep);
  box-shadow: 0 2px 7px rgba(67,91,82,.09);
  font-weight: 700;
}
.quick-version-switch button:disabled { opacity: .48; cursor: default; }
.auto-copy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 3px 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}
.auto-copy-toggle i {
  position: relative;
  width: 24px;
  height: 14px;
  border-radius: 999px;
  background: #cbd4d0;
  transition: background .2s;
}
.auto-copy-toggle i::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: white;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(48,68,61,.22);
}
.auto-copy-toggle.active { color: var(--mint-deep); }
.auto-copy-toggle.active i { background: #79b69d; }
.auto-copy-toggle.active i::after { transform: translateX(10px); }
.quick-result p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.quick-result > button {
  border: 0;
  border-radius: 12px;
  padding: 11px 15px;
  background: var(--mint-deep);
  color: white;
  cursor: pointer;
}

.recorder-shell::before {
  content: "";
  position: absolute;
  width: 135px;
  height: 135px;
  right: -54px;
  top: -66px;
  border-radius: 50%;
  background: var(--mint);
  opacity: .72;
}

.recorder-shell.permission-error {
  animation: nudge .38s ease both;
}

.recorder-topline {
  position: relative;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.destination-picker {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  margin-right: 14px;
  padding: 2px 5px 2px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f2f5f3;
  color: var(--muted);
  font-size: 9px;
}
.destination-picker select {
  max-width: 190px;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.destination-picker.active {
  border-color: rgba(77,122,105,.14);
  background: var(--mint);
  color: var(--mint-deep);
}
.destination-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0 7px;
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(223,242,233,.62);
  color: var(--mint-deep);
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.destination-banner strong { font-size: 11px; }
.destination-banner span { color: var(--muted); font-size: 9px; }
.recorder-shell.group-destination {
  border-color: color-mix(in srgb, var(--space-color) 34%, white);
  background:
    radial-gradient(circle at 100% 0,
      color-mix(in srgb, var(--space-color) 38%, transparent), transparent 40%),
    color-mix(in srgb, var(--space-color) 20%, white);
  box-shadow: 0 18px 55px color-mix(in srgb, var(--space-color) 13%, transparent);
}
.recorder-shell.group-destination .destination-banner {
  background: color-mix(in srgb, var(--space-color) 32%, white);
  color: var(--space-color);
  box-shadow: inset 3px 0 0 var(--space-color);
}
.recorder-shell.group-destination .record-button {
  background: var(--space-color);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--space-color) 28%, transparent);
}
.recorder-shell.group-destination .save-button {
  background: color-mix(in srgb, var(--space-color) 18%, white);
  color: var(--space-color);
}
.recorder-shell.group-destination #draft-input {
  border-color: color-mix(in srgb, var(--space-color) 24%, white);
  background: color-mix(in srgb, var(--space-color) 12%, white);
}
.recorder-shell.group-destination .quick-result {
  border-color: color-mix(in srgb, var(--space-color) 34%, white);
  background: color-mix(in srgb, var(--space-color) 22%, white);
}

.timer {
  color: var(--mint-deep);
  font-variant-numeric: tabular-nums;
}

.wave {
  position: relative;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 5px 0 4px;
}

.wave span {
  width: 4px;
  height: 7px;
  border-radius: 9px;
  background: #a8cdbd;
  opacity: .72;
}

.wave span:nth-child(3n) { height: 14px; }
.wave span:nth-child(4n) { height: 20px; }
.recording .wave span { animation: voice .7s ease-in-out infinite alternate; background: var(--peach); }
.recording .wave span:nth-child(3n) { animation-delay: -.25s; }
.recording .wave span:nth-child(4n) { animation-delay: -.42s; }

#draft-input {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 15px 17px;
  outline: none;
  background: #fbfcfa;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
  transition: border-color .2s, box-shadow .2s;
}

#draft-input:focus {
  border-color: #a7cebd;
  box-shadow: 0 0 0 4px rgba(167, 206, 189, .16);
}
#draft-input::placeholder { color: #adb7b2; }

.recorder-actions {
  display: flex;
  gap: 10px;
  margin-top: 13px;
}

.record-button, .end-button, .save-button {
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  padding: 0 18px;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, background .18s;
}

.record-button:hover, .end-button:hover, .save-button:hover { transform: translateY(-2px); }

.record-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--peach);
  color: white;
  box-shadow: 0 10px 22px rgba(255, 142, 125, .22);
}

.end-button {
  flex: 1;
  background: #fff1ee;
  color: #b85e50;
  border: 1px solid rgba(184, 94, 80, .14);
  font-weight: 700;
}

.end-button[hidden], .save-button[hidden] { display: none; }

.record-dot {
  width: 11px;
  height: 11px;
  border: 3px solid rgba(255,255,255,.55);
  border-radius: 50%;
  background: white;
}
.recording .record-dot { border-radius: 3px; animation: pulse 1s infinite; }
.paused .record-dot { border-radius: 3px; animation: none; }

.save-button {
  background: var(--mint);
  color: var(--mint-deep);
  font-weight: 600;
}

.local-note {
  margin: 13px 2px 0;
  color: #98a49f;
  font-size: 10px;
  text-align: center;
}

.live-state {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -1px 0 12px;
  color: var(--muted);
  font-size: 10px;
}
.live-state strong { margin-left: auto; color: var(--mint-deep); font-weight: 600; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #c7d0cc; }
.live-state.active .live-dot { background: var(--peach); box-shadow: 0 0 0 4px rgba(255,142,125,.13); animation: pulse 1s infinite; }
.limit-warning {
  display: none;
  margin: 0 0 12px;
  padding: 9px 11px;
  border-radius: 11px;
  background: #fff7dc;
  color: #906b1a;
  font-size: 10px;
}
.limit-warning.visible { display: block; }

.inbox-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.history-controls { display: flex; align-items: center; gap: 7px; }
.history-controls span { min-width: 38px; color: var(--muted); font-size: 10px; text-align: center; }
.history-controls button:disabled { opacity: .35; cursor: default; }
.history-filter {
  display: inline-flex;
  max-width: min(720px, 70vw);
  gap: 2px;
  overflow-x: auto;
  padding: 3px;
  border-radius: 11px;
  background: rgba(255,255,255,.72);
}
#group-history-filters { display: contents; }
.history-filter button {
  border: 0;
  border-radius: 8px;
  padding: 6px 9px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}
.history-filter button.active {
  background: var(--mint);
  color: var(--mint-deep);
  font-weight: 700;
}
.history-filter .group-filter {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--space-color) 28%, transparent);
  white-space: nowrap;
}
.history-filter .group-filter.active {
  background: color-mix(in srgb, var(--space-color) 16%, white);
  color: var(--space-color);
}

.inbox-head h2 {
  margin: 0;
  font-family: "Kiwi Maru", "Noto Sans SC", sans-serif;
  font-size: 25px;
  font-weight: 500;
}

.inbox-head .eyebrow { margin-bottom: 7px; color: #8cad9f; }

.quiet-button {
  border: 0;
  border-radius: 999px;
  background: white;
  padding: 8px 13px;
  color: var(--muted);
  font-size: 11px;
  box-shadow: 0 5px 16px rgba(67,91,82,.07);
  cursor: pointer;
}

.clip-list {
  display: block;
  padding: 4px 3px 20px;
}

.clip-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 12px 35px rgba(67, 91, 82, .065);
  animation: float-in .4s both;
  transition: transform .2s, box-shadow .2s;
}
.clip-card + .clip-card { margin-top: 18px; }

.history-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  color: var(--muted);
  font-size: 10px;
}
.history-loader span:first-child {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a8cdbd;
  box-shadow: 0 0 0 5px rgba(168,205,189,.13);
}
.history-loader.done span:first-child { background: #d3d9d6; box-shadow: none; }

.clip-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 17px 38px rgba(67, 91, 82, .1);
}

.clip-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font: 10px/1.3 sans-serif;
}

.status-badge {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--mint-deep);
  font-weight: 600;
}
.status-badge.busy { background: #fff7dc; color: #9b7521; }
.status-badge.failed { background: var(--peach-soft); color: #c35f50; }
.device { margin-left: auto; max-width: 85px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-author {
  max-width: 170px;
  overflow: hidden;
  color: var(--mint-deep);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clip-card.read-only .clip-title,
.clip-card.read-only textarea { cursor: default; }
.clip-card.shared-card {
  border-color: color-mix(in srgb, var(--space-color) 25%, white);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--space-color) 26%, white),
      color-mix(in srgb, var(--space-color) 16%, white));
  box-shadow: inset 4px 0 0 var(--space-color), var(--shadow);
}
.clip-card.new-arrival {
  animation: new-message-arrival 1.8s cubic-bezier(.2,.8,.2,1) both;
}
.clip-card.shared-card .version-panel {
  background: color-mix(in srgb, var(--space-color) 14%, white);
}
.clip-card.shared-card .optimized-panel {
  background: color-mix(in srgb, var(--space-color) 18%, white);
}
.clip-space {
  padding: 4px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--space-color) 14%, white);
  color: var(--space-color);
  font-weight: 600;
}
.clip-space[hidden] { display: none; }
.favorite-button {
  border: 0;
  background: transparent;
  color: #a8b1ad;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.favorite-button.active { color: #e3a846; }

.clip-title {
  width: 100%;
  margin: 16px 0 9px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: "Kiwi Maru", "Noto Sans SC", sans-serif;
  font-size: 17px;
  font-weight: 500;
}

.version-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 10px;
  padding: 4px;
  border-radius: 12px;
  background: #f1f5f2;
}
.version-tabs button {
  border: 0;
  border-radius: 9px;
  padding: 7px 12px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}
.version-tabs button.active {
  background: white;
  color: var(--mint-deep);
  box-shadow: 0 3px 10px rgba(67,91,82,.08);
  font-weight: 700;
}

.version-deck {
  display: block;
}

.version-panel {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 11px;
  background: #f8faf8;
  transition: border-color .18s, box-shadow .18s;
}
.version-panel:not(.selected) { display: none; }
.version-panel.selected {
  border-color: #9fc8b7;
  box-shadow: 0 0 0 3px rgba(159,200,183,.13);
}
.version-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--mint-deep);
  font-size: 10px;
  font-weight: 600;
}
.version-label i {
  color: #9ba8a2;
  font-size: 9px;
  font-style: normal;
  font-weight: 400;
}

.raw-text {
  width: 100%;
  resize: vertical;
  border: 0;
  border-radius: 14px;
  padding: 12px 13px;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.75;
}
.raw-text:focus { box-shadow: inset 0 0 0 1px #a7cebd; }
.raw-text::placeholder { color: #a5afaa; }

.optimized-panel {
  background: var(--peach-soft);
}
.optimized-panel .version-label { color: #c76c5e; }
.optimized-text {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  border: 0;
  border-radius: 14px;
  padding: 12px 13px;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.75;
}
.optimized-text:focus { box-shadow: inset 0 0 0 1px #e4a99e; }
.optimized-text::placeholder { color: #b79d98; }
.optimization-loading { margin: 14px 0; color: #c76c5e; font-size: 10px; }
.optimization-loading b {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 5px;
  vertical-align: -2px;
  border: 2px solid rgba(199,108,94,.2);
  border-top-color: #c76c5e;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.clip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  position: sticky;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 3;
  padding: 9px;
  border: 1px solid rgba(77,122,105,.1);
  border-radius: 14px;
  background: rgba(249,251,249,.92);
  backdrop-filter: blur(14px);
}

.clip-actions button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 7px 9px;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}
.clip-actions button:first-child {
  border-color: var(--mint-deep);
  background: var(--mint-deep);
  color: white;
}
.clip-actions button:disabled { cursor: not-allowed; opacity: .42; }
.clip-actions .delete-action {
  margin-left: auto;
  color: #b85e50;
}
.paste-note {
  margin: 8px 1px 0;
  color: #a4aea9;
  font-size: 9px;
}

.clip-error { display: none; margin: 10px 0 0; color: #c35f50; font-size: 10px; }
.clip-error.visible { display: block; }

.empty { display: none; padding: 48px 0; text-align: center; color: var(--muted); }
.empty.visible { display: block; }
.empty span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  border-radius: 17px 17px 17px 5px;
  background: var(--mint);
  color: var(--mint-deep);
  font-size: 26px;
}
.empty p { font-size: 12px; line-height: 1.8; }

dialog {
  width: min(410px, calc(100% - 30px));
  border: 0;
  border-radius: 26px;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(48,68,61,.25);
}
dialog::backdrop { background: rgba(48,68,61,.45); backdrop-filter: blur(8px); }
dialog form { padding: 30px; }
dialog h2 { margin: 0; font-family: "Kiwi Maru", "Noto Sans SC", sans-serif; font-size: 25px; font-weight: 500; }
dialog p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.75; }
dialog label { display: block; margin: 21px 0 14px; color: var(--muted); font-size: 11px; }
dialog input {
  width: 100%;
  margin-top: 7px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f9fbf9;
  outline: none;
}
dialog input:focus { border-color: #a7cebd; box-shadow: 0 0 0 4px rgba(167,206,189,.15); }
dialog button {
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 13px;
  background: var(--mint-deep);
  color: white;
  cursor: pointer;
}
.confirm-dialog .confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 22px;
}
.confirm-dialog .confirm-actions button {
  background: white;
  color: var(--muted);
  border: 1px solid var(--line);
}
.confirm-dialog .confirm-actions .danger-button {
  border-color: #d97868;
  background: #c76657;
  color: white;
}
dialog small { display: block; margin-top: 11px; color: var(--muted); text-align: center; font-size: 9px; }
.login-error {
  display: none;
  margin: -5px 0 12px !important;
  color: #c35f50 !important;
  font-size: 11px !important;
}
.login-error.visible { display: block; }

.tool-dialog { width: min(620px, calc(100% - 30px)); }
.tool-dialog form { position: relative; }
#collaboration-dialog {
  max-height: 86dvh;
  overflow: hidden;
}
#collaboration-dialog form {
  max-height: 86dvh;
  overflow-y: auto;
  padding: 21px 24px 18px;
  overscroll-behavior: contain;
}
#collaboration-dialog h2 { font-size: 22px; }
.tool-dialog .dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  padding: 7px;
  border-radius: 50%;
  background: #f0f4f1;
  color: var(--muted);
}
.session-rule {
  margin: 5px 40px 10px 0 !important;
  padding: 7px 10px;
  border-radius: 12px;
  background: #fff7f2;
}
.collaboration-entry-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px;
  border-radius: 14px;
  background: #eef3f0;
}
.collaboration-entry-tabs button {
  padding: 10px;
  background: transparent;
  color: var(--muted);
}
.collaboration-entry-tabs button.active {
  background: white;
  color: var(--mint-deep);
  box-shadow: 0 4px 14px rgba(67,91,82,.08);
}
.collaboration-entry-panel { display: none; padding-top: 10px; }
.collaboration-entry-panel.active { display: block; }
.collaboration-entry-panel h3 {
  margin: 17px 2px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.collaboration-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin: 3px 0 12px;
}
.collaboration-search input { margin: 0; }
.collaboration-search button { width: auto; padding: 9px 16px; }
.search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--space-color) 24%, white);
  border-radius: 14px;
  background: color-mix(in srgb, var(--space-color) 9%, white);
}
.search-result strong::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--space-color);
}
.search-result small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.search-result button { width: auto; flex: 0 0 auto; padding: 8px 11px; font-size: 10px; }
.search-result button:disabled { opacity: .5; cursor: default; }
.entry-empty {
  margin: 10px 1px !important;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
}
.entry-empty[hidden] { display: none; }
.collaboration-invite,
.collaboration-space {
  margin: 7px 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}
.collaboration-invite,
.collaboration-space > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.space-head-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}
.space-head-actions button {
  width: auto;
  padding: 6px 8px;
  font-size: 9px;
}
.space-head-actions .space-code {
  border: 1px solid color-mix(in srgb, var(--space-color) 28%, white);
  background: color-mix(in srgb, var(--space-color) 12%, white);
  color: var(--space-color);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-weight: 700;
  letter-spacing: .04em;
}
.space-head-actions .manage-space {
  background: #f1f4f2;
  color: var(--muted);
}
.collaboration-space:not(.expanded):not(.personal-space) > .collaboration-members,
.collaboration-space:not(.expanded):not(.personal-space) > .collaboration-card-actions,
.collaboration-space:not(.expanded):not(.personal-space) > .join-request-list {
  display: none;
}
.collaboration-invite strong,
.collaboration-invite small,
.collaboration-space strong,
.collaboration-space span { display: block; }
.collaboration-invite small,
.collaboration-space span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.collaboration-invite > div:last-child { display: flex; gap: 6px; }
.collaboration-invite button,
.collaboration-card-actions button { width: auto; padding: 8px 11px; font-size: 10px; }
.collaboration-invite button.secondary,
.collaboration-card-actions button.danger-soft {
  border: 1px solid #efcdc6;
  background: #fff5f2;
  color: #b85e50;
}
.collaboration-space.archived { background: #fafbf9; opacity: .82; }
.collaboration-space .space-title::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--space-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--space-color) 14%, transparent);
}
.space-color-select {
  width: auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--muted);
  font-size: 10px;
}
.personal-space > button {
  width: auto;
  margin-top: 10px;
  padding: 8px 11px;
  font-size: 10px;
}
.join-request-list {
  margin-top: 11px;
  padding: 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--space-color) 9%, white);
}
.join-request-list > strong { color: var(--space-color); font-size: 10px; }
.join-request-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 8px;
}
.join-request-list > div > div { display: flex; gap: 5px; }
.join-request-list button { width: auto; padding: 7px 9px; font-size: 9px; }
.join-request-list button.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
}
.collaboration-members {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 7px 0;
  color: var(--muted);
  font-size: 10px;
}
.collaboration-members > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--space-color) 10%, white);
}
.collaboration-members i { font-style: normal; }
.collaboration-members button {
  width: auto;
  padding: 3px 6px;
  border-radius: 999px;
  background: white;
  color: #a6534b;
  font-size: 8px;
}
.collaboration-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.collaboration-card-actions button.selected { background: #385f50; }
.collaboration-card-actions .exit-group,
.collaboration-card-actions .danger-soft { font-weight: 600; }
.collaboration-card-actions input {
  width: 165px;
  margin: 0;
  padding: 8px 10px;
  font-size: 10px;
}
.tool-create-row { display: flex; gap: 7px; margin-top: 16px; }
.tool-create-row input { margin: 0; }
.tool-create-row button { width: 90px; }
.color-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 14px 0;
  padding: 0;
  border: 0;
}
.color-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
}
.color-picker label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  cursor: pointer;
}
.color-picker input { position: absolute; opacity: 0; pointer-events: none; }
.color-picker i {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--swatch);
}
.color-picker label:has(input:checked) {
  border-color: var(--swatch);
  box-shadow: inset 0 0 0 1px var(--swatch);
}
.profile-required .dialog-close { display: none; }
.avatar-editor {
  display: grid;
  grid-template-columns: 48px max-content max-content;
  align-items: center;
  column-gap: 9px;
  margin: 11px 0 15px;
}
.profile-avatar-large { width: 48px; height: 48px; font-size: 16px; }
.avatar-upload,
#profile-avatar-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: auto;
  padding: 8px 11px;
  margin: 0;
  line-height: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--mint-deep);
  font-size: 9px;
  cursor: pointer;
}
.avatar-upload input { display: none; }
#profile-avatar-remove { color: #b45549; }
.profile-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 15px;
  padding: 12px 13px;
  border: 1px solid #f0ddd7;
  border-radius: 14px;
  background: #fff8f5;
}
.profile-session span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}
.profile-session #logout-button {
  flex: 0 0 auto;
  width: auto;
  padding: 8px 13px;
  border: 1px solid #e8b9ad;
  background: white;
  color: #b45549;
  font-size: 10px;
  font-weight: 700;
}
.profile-session #logout-button:hover {
  background: #c76657;
  color: white;
  transform: translateY(-1px);
}
.tool-error { min-height: 16px; color: #c35f50 !important; }
.tool-dialog select {
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbf9;
}
.date-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.date-range input[type="date"] { cursor: pointer; }
.check-row { display: flex !important; align-items: center; gap: 8px; }
.check-row input { width: auto; margin: 0; }
.export-submit { margin-top: 8px; }

@keyframes float-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse { 50% { opacity: .45; transform: scale(.8); } }
@keyframes voice { to { height: 34px; opacity: 1; } }
@keyframes nudge {
  25% { transform: translateX(-6px); }
  55% { transform: translateX(5px); }
  80% { transform: translateX(-2px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes new-message-arrival {
  0% {
    opacity: 0;
    transform: translateY(-16px) scale(.985);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--space-color) 55%, transparent);
  }
  24% {
    opacity: 1;
    transform: translateY(0) scale(1.008);
    box-shadow:
      0 0 0 7px color-mix(in srgb, var(--space-color) 22%, transparent),
      inset 4px 0 0 var(--space-color),
      var(--shadow);
  }
  100% {
    opacity: 1;
    transform: none;
    box-shadow: inset 4px 0 0 var(--space-color), var(--shadow);
  }
}

@media (max-width: 680px) {
  html, body { width: 100%; overflow-x: hidden; }
  input, textarea, select { font-size: 16px !important; }
  .masthead {
    width: calc(100% - 24px);
    padding: 10px 0 8px;
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
  .brand { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 12px 12px 12px 4px; }
  .brand-mark::before { width: 15px; height: 12px; }
  .brand-mark::after { left: 9px; bottom: 7px; }
  .brand strong { font-size: 14px; }
  .brand small { display: none; }
  .header-actions {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 1fr .72fr;
    gap: 4px;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
  .header-account { margin-left: 0; gap: 4px; }
  .profile-chip { padding: 3px 7px 3px 3px; font-size: 9px; }
  .profile-avatar { width: 24px; height: 24px; }
  .header-tool {
    width: 100%;
    justify-content: center;
    min-width: 0;
    padding: 7px 4px;
    font-size: 9px;
    white-space: nowrap;
  }
  .sync-pill {
    justify-content: center;
    min-width: 28px;
    padding: 7px 5px;
  }
  .sync-pill span { display: none; }
  .download-menu > div { left: 0; width: 145px; }
  .destination-picker { margin-right: 7px; }
  .destination-picker > span { display: none; }
  .destination-picker select { max-width: 112px; }
  main { padding-top: 16px; }
  .hero { display: block; text-align: left; }
  .hero .eyebrow { display: none; }
  .hero h1 { font-size: 27px; line-height: 1.15; }
  .hero h1 br { display: none; }
  .hero-copy { margin-top: 8px; font-size: 10px; line-height: 1.55; }
  .recorder-shell { margin-top: 16px; margin-bottom: 25px; padding: 15px; border-radius: 21px; }
  .quick-result {
    position: relative;
    display: block;
    min-height: 84px;
    margin-top: 11px;
    padding: 10px 58px 10px 11px;
    border-radius: 15px;
  }
  .quick-result-head {
    display: grid;
    grid-template-columns: auto auto auto;
    justify-content: start;
    gap: 5px;
    white-space: nowrap;
  }
  .quick-result span { font-size: 9px; }
  .quick-version-switch button { padding: 4px 6px; font-size: 8px; }
  .auto-copy-toggle {
    gap: 3px;
    padding: 2px 0;
    font-size: 9px;
    white-space: nowrap;
  }
  .auto-copy-toggle span { display: inline; }
  .quick-result p {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.45;
  }
  .quick-result > button {
    position: absolute;
    right: 9px;
    bottom: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 9px;
  }
  .wave { height: 38px; margin: 5px 0; }
  #draft-input { min-height: 116px; }
  .inbox-head { margin-bottom: 10px; }
  .inbox-head h2 { font-size: 20px; }
  .inbox-head .eyebrow { display: none; }
  .history-controls { gap: 4px; }
  .history-controls > span { display: none; }
  .history-filter button { padding: 6px 7px; }
  .quiet-button { padding: 7px 9px; }
  .clip-card { padding: 14px; }
  .clip-card + .clip-card { margin-top: 12px; }
  .clip-title { margin-top: 11px; }
  .version-panel { padding: 8px; }
  .raw-text { min-height: 150px; font-size: 14px; }
  .optimized-text { min-height: 150px; font-size: 14px; }
  .clip-actions { flex-wrap: nowrap; overflow-x: auto; }
  .clip-actions button { white-space: nowrap; }
  .clip-author { max-width: 95px; }
  .tool-dialog form { padding: 22px 17px; }
  .date-range { grid-template-columns: 1fr; }
  .collaboration-card-actions input { width: 100%; }
  .recorder-actions { align-items: stretch; }
  .record-button, .end-button, .save-button { padding: 0 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
