:root {
  --paper: #f3f5f7;
  --paper-deep: #e7eaed;
  --paper-light: #ffffff;
  --card: #ffffff;
  --ink: #181b1f;
  --ink-soft: #343b40;
  --muted: #737b82;
  --muted-light: #9aa1a7;
  --line: rgba(24, 27, 31, 0.1);
  --line-strong: rgba(24, 27, 31, 0.18);
  --danger: #d95135;
  --danger-strong: #b23b25;
  --danger-bright: #ff9b7f;
  --danger-soft: #fbe8e2;
  --sage: #3e7b59;
  --sage-soft: #e7f0e9;
  --accent: #2b69d9;
  --accent-strong: #245bc4;
  --accent-bright: #5a8cff;
  --accent-muted: #8ab1ff;
  --accent-soft: #e9effd;
  --hero-glow: rgba(43, 105, 217, 0.24);
  --white: #ffffff;
  --font-display: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "Menlo", "Monaco", monospace;
  --radius-sm: 13px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --shadow-device: 0 42px 90px rgba(25, 32, 38, 0.22), 0 8px 24px rgba(25, 32, 38, 0.12);
  --shadow-sheet: 0 -24px 70px rgba(25, 32, 38, 0.18);
  --ease-out: cubic-bezier(0.2, 0.82, 0.22, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #e3e7ea;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 92% 4%, rgba(45, 108, 223, 0.08), transparent 25%),
    radial-gradient(circle at 7% 86%, rgba(217, 81, 53, 0.045), transparent 22%),
    linear-gradient(145deg, #eef1f3 0%, #e2e6e9 100%);
  overflow-x: hidden;
}

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

button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.ambient-grid {
  display: none;
}

.ambient-stamp {
  display: none;
}

.studio {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100vw - 52px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 416px minmax(205px, 0.78fr);
  gap: clamp(34px, 4vw, 70px);
  align-items: center;
}

.intro-panel,
.notes-panel {
  min-width: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(45px, 7vh, 82px);
}

.brand-mark {
  width: 52px;
  height: 52px;
  padding: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--paper-light);
  background: var(--ink);
  box-shadow: none;
}

.brand-symbol {
  width: 28px;
  height: 28px;
  display: block;
  flex: none;
  background: currentColor;
  -webkit-mask: url("./assets/brand-symbol.svg") center / contain no-repeat;
  mask: url("./assets/brand-symbol.svg") center / contain no-repeat;
}

.brand-copy {
  font-size: 8px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.17em;
}

.eyebrow,
.notes-label {
  margin: 0 0 13px;
  color: #62685f;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.eyebrow::before,
.notes-label::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  margin-right: 8px;
  vertical-align: middle;
  background: currentColor;
}

.intro-panel h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 5vw, 74px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.intro-panel h1 em {
  position: relative;
  z-index: 0;
  color: var(--accent);
  font-style: normal;
  white-space: nowrap;
}

.intro-panel h1 em::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -7px;
  bottom: 2px;
  left: 1px;
  height: 9px;
  border-radius: 50%;
  background: rgba(45, 108, 223, 0.14);
  transform: rotate(-1.5deg);
}

.intro-copy {
  max-width: 326px;
  margin: 25px 0 30px;
  color: #5b625a;
  font-size: 13px;
  line-height: 1.9;
}

.intro-principles {
  max-width: 340px;
  border-top: 1px solid var(--line-strong);
}

.principle {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.principle > span {
  padding-top: 2px;
  color: var(--muted-light);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.principle strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.principle p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.62;
}

.intro-action {
  width: min(100%, 340px);
  margin-top: 22px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--paper-light);
  background: var(--accent);
  font-size: 11px;
  font-weight: 600;
  transition: transform 180ms var(--ease-out), background 180ms ease;
}

.intro-action:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.intro-foot {
  margin-top: clamp(34px, 6vh, 66px);
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(45, 108, 223, 0.13);
}

.device-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.device {
  position: relative;
  width: 416px;
  height: 872px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 54px;
  background: #171b18;
  box-shadow: var(--shadow-device);
}

.device::before {
  content: "";
  position: absolute;
  z-index: 20;
  top: 17px;
  left: 50%;
  width: 92px;
  height: 25px;
  border-radius: 99px;
  background: #080a08;
  transform: translateX(-50%);
}

.device-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 45px;
  background: var(--paper);
}

.device-hint {
  margin: 20px 0 0;
  color: #5c625a;
  font-size: 9px;
  letter-spacing: 0.07em;
}

.device-button {
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: #0a0c09;
}

.device-button-a {
  top: 170px;
  left: -3px;
  height: 66px;
}

.device-button-b {
  top: 250px;
  left: -3px;
  height: 42px;
}

.device-button-c {
  top: 202px;
  right: -3px;
  height: 83px;
}

.notes-panel {
  align-self: center;
}

.notes-list {
  margin: 0 0 38px;
  padding: 0;
  border-top: 1px solid var(--line-strong);
  list-style: none;
}

.notes-list li {
  display: flex;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: #50584f;
  font-size: 10px;
  line-height: 1.55;
}

.notes-list li span {
  color: #93978d;
  font-family: var(--font-mono);
  font-size: 8px;
}

.notes-block {
  margin-bottom: 34px;
}

.palette {
  display: flex;
  gap: 7px;
}

.palette i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(30, 46, 39, 0.08);
}

.privacy-card {
  padding: 17px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.36);
}

.privacy-icon {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 21px;
}

.privacy-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.privacy-card strong {
  color: var(--ink-soft);
  font-weight: 700;
}

.notes-foot {
  margin: 31px 0 0;
  color: #868a80;
  font-size: 8px;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

/* App shell */

.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 108, 223, 0.09), transparent 26%),
    linear-gradient(180deg, #f8f9fa 0%, var(--paper) 62%, #eef1f3 100%);
}

.app-shell.theme-cobalt {
  --paper: #f3f5f7;
  --paper-deep: #e9eef2;
  --ink: #181b1f;
  --ink-soft: #343b40;
  --accent: #245fd0;
  --accent-strong: #1e50b2;
  --accent-bright: #6b96eb;
  --accent-muted: #a9c1ee;
  --accent-soft: #e7edfa;
  --sage: #5e6e82;
  --sage-soft: #e7eaf0;
  --hero-glow: rgba(36, 95, 208, 0.24);
  --accent-shadow: rgba(36, 95, 208, 0.26);
  background:
    radial-gradient(circle at 100% 0%, rgba(36, 95, 208, 0.09), transparent 26%),
    linear-gradient(180deg, #f8f9fb, var(--paper) 62%, #e9eef2);
}

.app-shell.theme-graphite {
  --paper: #f1f2f3;
  --paper-deep: #e4e6e8;
  --ink: #1b1d20;
  --ink-soft: #3d4247;
  --accent: #474d54;
  --accent-strong: #30353a;
  --accent-bright: #858d94;
  --accent-muted: #c3c8cc;
  --accent-soft: #e9ebed;
  --sage: #5f7567;
  --sage-soft: #e7ece8;
  --hero-glow: rgba(71, 77, 84, 0.2);
  --accent-shadow: rgba(71, 77, 84, 0.22);
  background:
    radial-gradient(circle at 100% 0%, rgba(71, 77, 84, 0.08), transparent 26%),
    linear-gradient(180deg, #f7f7f8, var(--paper) 62%, #eaedef);
}

.app-shell.theme-forest {
  --paper: #f1f6f2;
  --paper-deep: #e3ece6;
  --ink: #15251b;
  --ink-soft: #34483b;
  --accent: #1e6a48;
  --accent-strong: #17563a;
  --accent-bright: #6a9b81;
  --accent-muted: #b6d2c2;
  --accent-soft: #e3efe8;
  --sage: #57745e;
  --sage-soft: #e3ece6;
  --hero-glow: rgba(30, 106, 72, 0.23);
  --accent-shadow: rgba(30, 106, 72, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(30, 106, 72, 0.09), transparent 26%),
    linear-gradient(180deg, #f8faf8, var(--paper) 62%, #e7efe9);
}

.app-shell.theme-celadon {
  --paper: #f6f4ed;
  --paper-deep: #eae7dc;
  --ink: #23251e;
  --ink-soft: #44463e;
  --accent: #55766b;
  --accent-strong: #456257;
  --accent-bright: #93afa3;
  --accent-muted: #c9d8d0;
  --accent-soft: #ecefe8;
  --sage: #6c7060;
  --sage-soft: #efede4;
  --hero-glow: rgba(85, 118, 107, 0.22);
  --accent-shadow: rgba(85, 118, 107, 0.23);
  background:
    radial-gradient(circle at 100% 0%, rgba(85, 118, 107, 0.09), transparent 26%),
    linear-gradient(180deg, #fbfaf6, var(--paper) 62%, #eeeae0);
}

.app-shell.theme-ocean {
  --paper: #eff6f7;
  --paper-deep: #e1eef0;
  --ink: #14262b;
  --ink-soft: #34494f;
  --accent: #087582;
  --accent-strong: #065e68;
  --accent-bright: #5aa8b2;
  --accent-muted: #a9d0d4;
  --accent-soft: #e0f0f1;
  --sage: #52747a;
  --sage-soft: #e2eeef;
  --hero-glow: rgba(8, 117, 130, 0.23);
  --accent-shadow: rgba(8, 117, 130, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(8, 117, 130, 0.09), transparent 26%),
    linear-gradient(180deg, #f8fbfb, var(--paper) 62%, #e7f0f1);
}

.app-shell.theme-glacier {
  --paper: #ecf4fc;
  --paper-deep: #ddebfa;
  --ink: #172530;
  --ink-soft: #344956;
  --accent: #2d70ae;
  --accent-strong: #255d8f;
  --accent-bright: #7ba9d3;
  --accent-muted: #bdd5ea;
  --accent-soft: #e4eff9;
  --sage: #667b8f;
  --sage-soft: #e6edf5;
  --hero-glow: rgba(45, 112, 174, 0.22);
  --accent-shadow: rgba(45, 112, 174, 0.23);
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 112, 174, 0.09), transparent 26%),
    linear-gradient(180deg, #f8fbff, var(--paper) 62%, #e6f0fb);
}

.app-shell.theme-salt {
  --paper: #f3f3f1;
  --paper-deep: #e8e9e6;
  --ink: #1d2529;
  --ink-soft: #3d474b;
  --accent: #636e76;
  --accent-strong: #505a62;
  --accent-bright: #949da3;
  --accent-muted: #c8cdd0;
  --accent-soft: #e8eaea;
  --sage: #666f72;
  --sage-soft: #e8eae9;
  --hero-glow: rgba(99, 110, 118, 0.20);
  --accent-shadow: rgba(99, 110, 118, 0.22);
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 110, 118, 0.09), transparent 26%),
    linear-gradient(180deg, #f8f8f7, var(--paper) 62%, #ebecea);
}

.app-shell.theme-indigo {
  --paper: #f2f1f7;
  --paper-deep: #e6e4ef;
  --ink: #1d1b2a;
  --ink-soft: #3c394e;
  --accent: #3f478b;
  --accent-strong: #333a72;
  --accent-bright: #858bc0;
  --accent-muted: #c0c4e0;
  --accent-soft: #e7e7f2;
  --sage: #5f5f7a;
  --sage-soft: #e7e5ed;
  --hero-glow: rgba(63, 71, 139, 0.23);
  --accent-shadow: rgba(63, 71, 139, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(63, 71, 139, 0.09), transparent 26%),
    linear-gradient(180deg, #f7f6fa, var(--paper) 62%, #eae8f0);
}

.app-shell.theme-amber {
  --paper: #f8f2e8;
  --paper-deep: #eee4d5;
  --ink: #2a2119;
  --ink-soft: #4b4033;
  --accent: #9a5808;
  --accent-strong: #7c4606;
  --accent-bright: #d3a358;
  --accent-muted: #e6c896;
  --accent-soft: #f4ebdd;
  --sage: #746343;
  --sage-soft: #efe8d8;
  --hero-glow: rgba(154, 88, 8, 0.24);
  --accent-shadow: rgba(154, 88, 8, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(154, 88, 8, 0.09), transparent 26%),
    linear-gradient(180deg, #fbf7f0, var(--paper) 62%, #f1e8da);
}

.app-shell.theme-walnut {
  --paper: #f5efe8;
  --paper-deep: #eadfd3;
  --ink: #2a2119;
  --ink-soft: #493d32;
  --accent: #764b33;
  --accent-strong: #5d3926;
  --accent-bright: #b18d74;
  --accent-muted: #dbc7b7;
  --accent-soft: #efe6dd;
  --sage: #6c5a4b;
  --sage-soft: #ece3db;
  --hero-glow: rgba(118, 75, 51, 0.23);
  --accent-shadow: rgba(118, 75, 51, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(118, 75, 51, 0.09), transparent 26%),
    linear-gradient(180deg, #faf6f1, var(--paper) 62%, #ede3d8);
}

.app-shell.theme-oat {
  --paper: #f8f4e7;
  --paper-deep: #eee7d5;
  --ink: #292319;
  --ink-soft: #4b4437;
  --accent: #7d6b3d;
  --accent-strong: #64552e;
  --accent-bright: #b6a06b;
  --accent-muted: #dcd0aa;
  --accent-soft: #f0ead9;
  --sage: #736a4d;
  --sage-soft: #ede8d9;
  --hero-glow: rgba(125, 107, 61, 0.22);
  --accent-shadow: rgba(125, 107, 61, 0.23);
  background:
    radial-gradient(circle at 100% 0%, rgba(125, 107, 61, 0.09), transparent 26%),
    linear-gradient(180deg, #fbf9f2, var(--paper) 62%, #f0eadb);
}

.app-shell.theme-turmeric {
  --paper: #faf7e8;
  --paper-deep: #efe9d2;
  --ink: #2a2518;
  --ink-soft: #4b4430;
  --accent: #806b08;
  --accent-strong: #695805;
  --accent-bright: #c2a948;
  --accent-muted: #e3d695;
  --accent-soft: #f2edd5;
  --sage: #726847;
  --sage-soft: #eee9d8;
  --hero-glow: rgba(128, 107, 8, 0.22);
  --accent-shadow: rgba(128, 107, 8, 0.23);
  background:
    radial-gradient(circle at 100% 0%, rgba(128, 107, 8, 0.09), transparent 26%),
    linear-gradient(180deg, #fcfaf2, var(--paper) 62%, #f1ebd9);
}

.app-shell.theme-olive {
  --paper: #f4f3e8;
  --paper-deep: #e8e6d7;
  --ink: #242419;
  --ink-soft: #424536;
  --accent: #4e5520;
  --accent-strong: #3c4218;
  --accent-bright: #92995e;
  --accent-muted: #c9cdac;
  --accent-soft: #e7e8d9;
  --sage: #65684d;
  --sage-soft: #e7e7dd;
  --hero-glow: rgba(78, 85, 32, 0.22);
  --accent-shadow: rgba(78, 85, 32, 0.23);
  background:
    radial-gradient(circle at 100% 0%, rgba(78, 85, 32, 0.09), transparent 26%),
    linear-gradient(180deg, #f9f8f3, var(--paper) 62%, #ebe9dc);
}

.app-shell.theme-lime {
  --paper: #f7f7eb;
  --paper-deep: #ebedd9;
  --ink: #252619;
  --ink-soft: #42452f;
  --accent: #657312;
  --accent-strong: #505b0d;
  --accent-bright: #a3ae56;
  --accent-muted: #d0d7a1;
  --accent-soft: #eaedd2;
  --sage: #6a7048;
  --sage-soft: #e9ebd9;
  --hero-glow: rgba(101, 115, 18, 0.23);
  --accent-shadow: rgba(101, 115, 18, 0.23);
  background:
    radial-gradient(circle at 100% 0%, rgba(101, 115, 18, 0.09), transparent 26%),
    linear-gradient(180deg, #fafaf3, var(--paper) 62%, #eeefde);
}

.app-shell.theme-rose {
  --paper: #f8f2f3;
  --paper-deep: #ede2e4;
  --ink: #2a1d21;
  --ink-soft: #4b373e;
  --accent: #9b4965;
  --accent-strong: #7d3650;
  --accent-bright: #d486a0;
  --accent-muted: #e8bdcc;
  --accent-soft: #f4e7ec;
  --sage: #6d5961;
  --sage-soft: #efe7ea;
  --hero-glow: rgba(155, 73, 101, 0.22);
  --accent-shadow: rgba(155, 73, 101, 0.23);
  background:
    radial-gradient(circle at 100% 0%, rgba(155, 73, 101, 0.08), transparent 26%),
    linear-gradient(180deg, #fbf7f8, var(--paper) 62%, #f1e7ea);
}

.app-shell.theme-orchid {
  --paper: #f8f0f8;
  --paper-deep: #ede2ef;
  --ink: #281d2a;
  --ink-soft: #483a4a;
  --accent: #8a3e83;
  --accent-strong: #73336d;
  --accent-bright: #c182bb;
  --accent-muted: #e0bddc;
  --accent-soft: #f1e6f0;
  --sage: #745f75;
  --sage-soft: #ede5ee;
  --hero-glow: rgba(138, 62, 131, 0.23);
  --accent-shadow: rgba(138, 62, 131, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(138, 62, 131, 0.09), transparent 26%),
    linear-gradient(180deg, #fbf7fb, var(--paper) 62%, #f0e6f1);
}

.app-shell.theme-wisteria {
  --paper: #f4f0fa;
  --paper-deep: #e8e2f1;
  --ink: #241f2b;
  --ink-soft: #453d4d;
  --accent: #7553a7;
  --accent-strong: #5f4189;
  --accent-bright: #aa91c8;
  --accent-muted: #d9cbea;
  --accent-soft: #eee9f6;
  --sage: #70647e;
  --sage-soft: #ece7f1;
  --hero-glow: rgba(117, 83, 167, 0.23);
  --accent-shadow: rgba(117, 83, 167, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(117, 83, 167, 0.09), transparent 26%),
    linear-gradient(180deg, #faf8fc, var(--paper) 62%, #ede6f4);
}

.app-shell.theme-heather {
  --paper: #f5eef0;
  --paper-deep: #eae0e5;
  --ink: #261e23;
  --ink-soft: #493c43;
  --accent: #78566d;
  --accent-strong: #614454;
  --accent-bright: #b08a9b;
  --accent-muted: #ddc5cf;
  --accent-soft: #f0e6ea;
  --sage: #74616a;
  --sage-soft: #eee5e9;
  --hero-glow: rgba(120, 86, 109, 0.22);
  --accent-shadow: rgba(120, 86, 109, 0.23);
  background:
    radial-gradient(circle at 100% 0%, rgba(120, 86, 109, 0.09), transparent 26%),
    linear-gradient(180deg, #faf7f8, var(--paper) 62%, #efe5e9);
}

.app-shell::before {
  display: none;
}

.statusbar {
  position: relative;
  z-index: 4;
  height: 46px;
  padding: 15px 26px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.signal-bars {
  height: 9px;
  display: flex;
  align-items: flex-end;
  gap: 1px;
}

.signal-bars i {
  width: 2px;
  border-radius: 2px;
  background: var(--ink);
}

.signal-bars i:nth-child(1) {
  height: 3px;
}

.signal-bars i:nth-child(2) {
  height: 5px;
}

.signal-bars i:nth-child(3) {
  height: 7px;
}

.signal-bars i:nth-child(4) {
  height: 9px;
}

.wifi-mark {
  width: 9px;
  height: 7px;
  border-top: 1.5px solid var(--ink);
  border-radius: 50%;
}

.battery-mark {
  position: relative;
  width: 16px;
  height: 7px;
  border: 1px solid var(--ink);
  border-radius: 2px;
}

.battery-mark::before {
  content: "";
  position: absolute;
  inset: 1px;
  right: 3px;
  border-radius: 1px;
  background: var(--ink);
}

.battery-mark::after {
  content: "";
  position: absolute;
  top: 1px;
  right: -3px;
  width: 2px;
  height: 3px;
  border-radius: 0 1px 1px 0;
  background: var(--ink);
}

.app-body {
  position: absolute;
  inset: 46px 0 0;
  z-index: 2;
  overflow: hidden;
}

.app-scroll {
  height: 100%;
  padding: 0 21px 122px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.app-scroll::-webkit-scrollbar {
  display: none;
}

.screen {
  min-height: 100%;
  animation: screen-in 360ms var(--ease-out) both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-head {
  padding: 7px 0 19px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.app-head > div:first-child {
  min-width: 0;
}

.app-date {
  margin: 0 0 9px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(19px, 5.8vw, 23px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.app-head h1 em {
  color: var(--accent);
  font-style: normal;
}

.head-actions {
  padding-top: 4px;
  display: flex;
  gap: 7px;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.56);
  transition: transform 160ms var(--ease-out), background 160ms ease;
}

.icon-button:hover {
  background: var(--paper-light);
  transform: translateY(-1px);
}

.icon-button .icon {
  width: 17px;
  height: 17px;
}

.section-kicker {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-card {
  position: relative;
  min-height: 181px;
  padding: 20px 20px 16px;
  overflow: hidden;
  border-radius: 24px;
  color: var(--paper-light);
  background:
    radial-gradient(circle at 83% 17%, var(--hero-glow), transparent 24%),
    var(--ink);
  box-shadow: 0 17px 38px rgba(30, 46, 39, 0.18);
}

.brand-watermark {
  position: absolute;
  z-index: 0;
  right: -20px;
  bottom: -30px;
  width: 158px;
  height: 158px;
  color: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.brand-watermark .brand-symbol {
  width: 100%;
  height: 100%;
}

.summary-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.summary-label {
  margin: 0 0 11px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.summary-number {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.summary-primary {
  color: inherit;
  text-align: left;
}

.summary-number strong {
  color: var(--accent-bright);
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.summary-number span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
}

.summary-next {
  width: 116px;
  padding: 11px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 15px;
  color: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
}

.summary-next small {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.summary-next strong {
  display: block;
  overflow: hidden;
  color: var(--paper-light);
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-next span {
  display: block;
  margin-top: 4px;
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: 8px;
}

.summary-next em {
  display: block;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.58);
  font-size: 7px;
  font-style: normal;
}

.summary-next:disabled {
  cursor: default;
  opacity: 0.66;
}

.summary-next.is-overdue {
  border-color: rgba(255, 155, 127, 0.3);
  background: rgba(255, 155, 127, 0.08);
}

.summary-next.is-overdue small,
.summary-next.is-overdue span {
  color: var(--danger-bright);
}

.summary-next.is-overdue em {
  color: rgba(255, 255, 255, 0.68);
}

.summary-ledger {
  position: absolute;
  z-index: 1;
  right: 20px;
  bottom: 16px;
  left: 20px;
  height: 37px;
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  align-items: end;
  gap: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.summary-ledger i {
  height: 6px;
  border-radius: 2px 2px 0 0;
  background: rgba(255, 255, 255, 0.14);
}

.summary-ledger i.is-week {
  height: 13px;
  background: rgba(255, 255, 255, 0.25);
}

.summary-ledger i.is-event {
  position: relative;
  height: 26px;
  background: var(--accent-bright);
  cursor: default;
  outline: none;
}

.summary-ledger i.is-event::after {
  content: attr(data-date);
  position: absolute;
  z-index: 5;
  bottom: calc(100% + 8px);
  left: 50%;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.2);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 3px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.summary-ledger i.is-event:hover::after,
.summary-ledger i.is-event:focus::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.summary-ledger i.is-tooltip-start::after {
  left: 0;
  transform: translate(0, 3px);
}

.summary-ledger i.is-tooltip-start:hover::after,
.summary-ledger i.is-tooltip-start:focus::after {
  transform: translate(0, 0);
}

.summary-ledger i.is-tooltip-end::after {
  right: 0;
  left: auto;
  transform: translate(0, 3px);
}

.summary-ledger i.is-tooltip-end:hover::after,
.summary-ledger i.is-tooltip-end:focus::after {
  transform: translate(0, 0);
}

.summary-caption {
  position: absolute;
  z-index: 1;
  right: 20px;
  left: 20px;
  bottom: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 7px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.summary-caption b {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.summary-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.summary-legend i {
  width: 3px;
  height: 9px;
  display: inline-block;
  border-radius: 2px 2px 0 0;
  background: var(--accent-bright);
}

.status-banner {
  margin-top: 12px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(190, 87, 62, 0.22);
  border-radius: 14px;
  color: var(--danger-strong);
  background: rgba(234, 208, 197, 0.36);
  font-size: 9px;
  line-height: 1.45;
}

.status-banner .icon {
  width: 15px;
  height: 15px;
}

.status-banner button {
  margin-left: auto;
  flex: none;
  color: var(--danger-strong);
  font-size: 9px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.filter-row {
  margin: 21px -21px 15px;
  padding: 0 21px;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: none;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.filter-chip.is-active {
  border-color: var(--ink);
  color: var(--paper-light);
  background: var(--ink);
}

.group-head {
  margin: 22px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.group-head h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.group-head span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.item-list {
  display: grid;
  gap: 8px;
}

.item-card {
  position: relative;
  width: 100%;
  padding: 12px 12px 12px 11px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 17px;
  text-align: left;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(24, 27, 31, 0.025);
  transition: transform 180ms var(--ease-out), border-color 180ms ease, box-shadow 180ms ease;
  animation: card-in 440ms var(--ease-out) both;
  animation-delay: calc(var(--index, 0) * 55ms);
}

.item-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 22px rgba(30, 46, 39, 0.08);
  transform: translateY(-2px);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item-card.is-overdue {
  border-color: rgba(190, 87, 62, 0.22);
  background: #fffaf8;
}

.item-card.is-new {
  animation: card-added 1.2s var(--ease-out) both;
}

@keyframes card-added {
  0% {
    box-shadow: 0 0 0 0 rgba(110, 131, 109, 0.3);
  }
  55% {
    box-shadow: 0 0 0 5px rgba(110, 131, 109, 0.16);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(110, 131, 109, 0);
  }
}

.date-tile {
  height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-light);
}

.date-tile small {
  margin-bottom: 1px;
  color: var(--accent);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.date-tile strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.item-main {
  min-width: 0;
}

.item-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-title {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-meta {
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.item-meta i {
  width: 2px;
  height: 2px;
  flex: none;
  border-radius: 50%;
  background: var(--muted-light);
}

.item-days {
  min-width: 39px;
  text-align: right;
}

.item-days strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.item-days span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 7px;
}

.is-overdue .item-days strong,
.is-overdue .item-days span {
  color: var(--danger-strong);
}

.is-overdue .date-tile small {
  color: var(--danger);
}

.item-status-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}

.is-overdue .item-status-dot {
  background: var(--danger);
}

.empty-state {
  padding: 42px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.62);
}

.empty-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 22px;
}

.empty-state h3 {
  margin: 0 0 7px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
}

.empty-state p {
  max-width: 230px;
  margin: 0 auto 17px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 40px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  transition: transform 160ms var(--ease-out), background 160ms ease;
}

.primary-button {
  color: var(--paper-light);
  background: var(--ink);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: #ffffff;
}

.danger-button {
  color: var(--white);
  background: var(--danger);
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.primary-button .icon,
.secondary-button .icon,
.danger-button .icon {
  width: 14px;
  height: 14px;
}

/* Bottom navigation */

.tabbar-wrap {
  position: absolute;
  z-index: 12;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 20px 15px 13px;
  background: linear-gradient(to bottom, transparent, rgba(243, 245, 247, 0.97) 35%);
  pointer-events: none;
}

.tabbar {
  position: relative;
  height: 60px;
  padding: 6px 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(30, 46, 39, 0.13);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(24, 27, 31, 0.1);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.tab-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 7px;
  transition: color 160ms ease, background 160ms ease;
}

.tab-button .icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
}

.tab-button.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.add-fab {
  position: absolute;
  z-index: 14;
  right: 21px;
  bottom: 88px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: var(--paper-light);
  background: var(--accent);
  box-shadow: 0 13px 25px var(--accent-shadow, rgba(43, 105, 217, 0.26));
  transition: transform 180ms var(--ease-out), background 180ms ease;
}

.add-fab:hover {
  background: var(--accent-strong);
  transform: translateY(-3px);
}

.add-fab .icon {
  width: 23px;
  height: 23px;
}

/* Detail */

.page-toolbar {
  padding: 2px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toolbar-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.detail-hero {
  position: relative;
  padding: 22px 20px 19px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: #ffffff;
}

.detail-topline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.detail-type {
  margin: 0 0 7px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.detail-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.owner-pill {
  height: 27px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #ffffff;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.owner-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--owner-color, var(--sage));
}

.detail-date-row {
  position: relative;
  z-index: 1;
  margin-top: 25px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.detail-date {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.detail-week {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.days-badge {
  min-width: 92px;
  padding: 11px 13px;
  border-radius: 16px;
  text-align: right;
  background: var(--ink);
  color: var(--paper-light);
}

.days-badge strong {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.days-badge span {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 8px;
}

.days-badge small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 7px;
}

.days-badge.is-overdue {
  background: var(--danger);
}

.detail-section {
  margin-top: 21px;
}

.detail-section-head {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-section-head h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.detail-section-head span {
  color: var(--muted);
  font-size: 8px;
}

.checklist-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #ffffff;
}

.check-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  padding: 12px 11px;
  border-bottom: 1px solid var(--line);
}

.check-row:last-child {
  border-bottom: 0;
}

.check-button {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: transparent;
  background: var(--paper-light);
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.check-button .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.3;
}

.check-row.is-done .check-button {
  border-color: var(--accent);
  color: var(--paper-light);
  background: var(--accent);
}

.check-copy {
  min-width: 0;
  font-size: 10px;
  line-height: 1.4;
}

.check-row.is-done .check-copy {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(115, 122, 112, 0.45);
}

.remove-check {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted-light);
}

.remove-check:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.remove-check .icon {
  width: 12px;
  height: 12px;
}

.add-check {
  width: 100%;
  padding: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 8px;
}

.add-check .icon {
  width: 13px;
  height: 13px;
}

.info-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #ffffff;
}

.info-row {
  padding: 12px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}

.info-label .icon {
  width: 14px;
  height: 14px;
}

.info-value {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
  text-align: right;
}

.info-value.is-off {
  color: var(--danger);
}

.note-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--muted);
  background: #ffffff;
  font-size: 9px;
  line-height: 1.7;
}

.note-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 9px;
}

.privacy-inline {
  margin-top: 14px;
  padding: 12px 13px;
  display: flex;
  gap: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.privacy-inline .icon {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.detail-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
}

.detail-actions button {
  min-height: 45px;
}

.history-line {
  padding: 4px 0 2px 14px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 8px;
  line-height: 1.7;
}

.history-line strong {
  color: var(--ink-soft);
  font-weight: 600;
}

/* Family */

.family-hero {
  padding: 4px 0 20px;
}

.family-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.family-hero p {
  max-width: 280px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.family-grid {
  display: grid;
  gap: 9px;
}

.family-card {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  background: #ffffff;
  transition: transform 180ms var(--ease-out), border-color 180ms ease;
}

.family-card-main {
  min-width: 0;
  padding: 15px 8px 15px 15px;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  text-align: left;
  color: inherit;
  background: transparent;
}

.family-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.family-card::after {
  content: "";
  position: absolute;
  right: -17px;
  bottom: -26px;
  width: 84px;
  height: 84px;
  border: 1px solid var(--owner-color, var(--sage));
  border-radius: 50%;
  opacity: 0.13;
  pointer-events: none;
}

.family-card-actions {
  position: relative;
  z-index: 1;
  padding: 12px 12px 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.family-edit-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--paper-light);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.family-edit-button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.family-edit-button .icon {
  width: 13px;
  height: 13px;
}

.family-add-card {
  width: 100%;
  min-height: 73px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  text-align: left;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.48);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease-out);
}

.family-add-card:hover {
  border-color: var(--accent);
  background: #ffffff;
  transform: translateY(-2px);
}

.family-add-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  color: var(--accent);
  background: var(--accent-soft);
}

.family-add-icon .icon {
  width: 17px;
  height: 17px;
}

.family-add-card strong,
.family-add-card small {
  display: block;
}

.family-add-card strong {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 12px;
}

.family-add-card small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.avatar-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--owner-ink, var(--paper-light));
  background: var(--owner-color, var(--sage));
  font-family: var(--font-display);
  font-size: 18px;
}

.family-name {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 700;
}

.family-meta {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.family-count {
  min-width: 42px;
  text-align: right;
}

.family-count strong {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
}

.family-count span {
  margin-left: 3px;
  color: var(--muted);
  font-size: 7px;
}

.family-note {
  margin-top: 20px;
  padding: 15px;
  display: flex;
  gap: 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 17px;
  background: var(--accent-soft);
}

.family-note .icon {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.family-note p {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.65;
}

.family-note strong {
  color: var(--ink-soft);
}

.section-title-row {
  margin: 22px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title-row h2 {
  margin: 0;
  font-size: 11px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
}

.text-button .icon {
  width: 12px;
  height: 12px;
}

/* Data */

.data-head {
  padding: 4px 0 19px;
}

.data-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.data-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.data-hero {
  position: relative;
  padding: 19px;
  overflow: hidden;
  border-radius: 23px;
  color: var(--paper-light);
  background: var(--ink);
}

.data-hero-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.52);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.11em;
}

.data-hero-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9eb19e;
  box-shadow: 0 0 0 4px rgba(158, 177, 158, 0.12);
}

.data-hero h2 {
  position: relative;
  z-index: 1;
  margin: 15px 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.data-hero p {
  position: relative;
  z-index: 1;
  max-width: 255px;
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 8px;
  line-height: 1.65;
}

.data-stats {
  position: relative;
  z-index: 1;
  margin-top: 19px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.data-stat {
  min-width: 0;
}

.data-stat:first-child {
  text-align: left;
}

.data-stat:nth-child(2) {
  text-align: center;
}

.data-stat:last-child {
  text-align: right;
}

.data-stat strong {
  display: block;
  font-size: 11px;
}

.data-stat span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 7px;
}

.settings-card {
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #ffffff;
}

.setting-row {
  width: 100%;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.setting-row:last-child {
  border-bottom: 0;
}

button.setting-row:hover {
  background: rgba(243, 245, 247, 0.27);
}

.setting-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  background: var(--accent-soft);
  color: var(--accent);
}

.setting-icon .icon {
  width: 15px;
  height: 15px;
}

.setting-copy {
  min-width: 0;
  flex: 1;
}

.setting-copy strong {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
}

.setting-copy span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.setting-tail {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.setting-tail .icon {
  width: 14px;
  height: 14px;
}

.toggle {
  position: relative;
  width: 35px;
  height: 21px;
  flex: none;
  border-radius: 999px;
  background: #c8c4b9;
  transition: background 180ms ease;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 5px rgba(30, 46, 39, 0.18);
  transition: transform 180ms var(--ease-out);
}

.toggle.is-on {
  background: var(--accent);
}

.toggle.is-on::after {
  transform: translateX(14px);
}

.data-footnote {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.65;
}

.danger-zone {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.danger-link {
  color: var(--danger);
  font-size: 8px;
  font-weight: 700;
}

/* Overlay and sheets */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  background: rgba(18, 27, 22, 0.36);
  backdrop-filter: blur(3px);
  animation: overlay-in 180ms ease both;
}

@keyframes overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sheet {
  width: 100%;
  max-height: 90%;
  overflow-y: auto;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: #ffffff;
  box-shadow: var(--shadow-sheet);
  animation: sheet-in 300ms var(--ease-out) both;
  scrollbar-width: none;
}

.sheet::-webkit-scrollbar {
  display: none;
}

@keyframes sheet-in {
  from {
    transform: translateY(40px);
  }
  to {
    transform: translateY(0);
  }
}

.sheet-handle {
  width: 35px;
  height: 4px;
  margin: 0 auto 15px;
  border-radius: 99px;
  background: rgba(30, 46, 39, 0.16);
}

.sheet-head {
  margin-bottom: 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.sheet-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.sheet-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.sheet-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.sheet-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-light);
}

.sheet-close .icon {
  width: 14px;
  height: 14px;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.type-option {
  min-width: 0;
  min-height: 46px;
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--paper);
  font-size: 7.5px;
  font-weight: 600;
}

.type-option .icon {
  width: 16px;
  height: 16px;
}

.type-option.is-active {
  border-color: var(--accent);
  color: var(--paper-light);
  background: var(--accent);
}

.custom-type-group[hidden] {
  display: none;
}

.form-group {
  margin-top: 16px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 9px;
  font-weight: 700;
}

.form-label small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 400;
}

.form-label-row {
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.form-label-row .form-label {
  margin-bottom: 0;
}

.form-inline-action {
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
}

.text-input,
.date-input,
.select-input,
.note-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.78);
  font-size: 10px;
  transition: border-color 160ms ease, background 160ms ease;
}

.text-input,
.date-input,
.select-input {
  height: 42px;
  padding: 0 12px;
}

.note-input {
  min-height: 70px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.55;
}

.text-input:focus,
.date-input:focus,
.select-input:focus,
.note-input:focus {
  border-color: var(--ink);
  background: var(--white);
  outline: none;
}

.text-input.has-error,
.date-input.has-error {
  border-color: var(--danger);
  background: rgba(234, 208, 197, 0.18);
}

.field-error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 7.5px;
}

.form-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.form-hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.55;
}

.owner-sheet {
  max-height: 92%;
}

.owner-preview {
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.owner-preview .avatar-mark {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 16px;
  font-size: 20px;
}

.owner-preview strong,
.owner-preview small {
  display: block;
}

.owner-preview strong {
  margin-bottom: 4px;
  font-size: 10px;
}

.owner-preview small {
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.5;
}

.owner-color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.owner-color-option {
  min-height: 42px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--paper);
  font-size: 8px;
  font-weight: 600;
}

.owner-color-option i {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 3px rgba(24, 27, 31, 0.05);
}

.owner-color-option.is-active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.owner-delete-action {
  margin-top: 14px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--danger);
  font-size: 8px;
  font-weight: 700;
}

.owner-delete-action .icon {
  width: 14px;
  height: 14px;
}

.owner-delete-sheet {
  max-height: 92%;
}

.owner-delete-summary {
  margin: 13px 0;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.owner-delete-summary .avatar-mark {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 13px;
  font-size: 17px;
}

.owner-delete-summary strong,
.owner-delete-summary small {
  display: block;
}

.owner-delete-summary strong {
  margin-bottom: 3px;
  font-size: 10px;
}

.owner-delete-summary small {
  color: var(--muted);
  font-size: 7.5px;
}

.confirm-sheet .field-error {
  margin-top: 7px;
  color: var(--danger);
}

.form-check-toggle {
  margin-top: 14px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 8.5px;
  cursor: pointer;
}

.form-check-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-check-box {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: transparent;
  background: var(--paper-light);
}

.form-check-box .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

.form-check-toggle input:checked + .form-check-box {
  border-color: var(--accent);
  color: var(--paper-light);
  background: var(--accent);
}

.form-check-toggle input:focus-visible + .form-check-box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lead-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-option {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--paper);
  font-size: 8px;
}

.lead-option.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}

.form-privacy {
  margin-top: 14px;
  padding: 10px 11px;
  display: flex;
  gap: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.55;
}

.form-privacy .icon {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--accent);
}

.sheet-actions {
  position: sticky;
  bottom: -18px;
  margin: 18px -18px -18px;
  padding: 13px 18px calc(16px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 8px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff 22%);
}

.sheet-actions button {
  min-height: 45px;
}

.guide-sheet {
  max-height: 92%;
}

.guide-hero {
  position: relative;
  padding: 18px;
  overflow: hidden;
  border-radius: 19px;
  color: var(--paper-light);
  background: var(--ink);
}

.guide-hero p {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.09em;
}

.guide-hero h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.05em;
}

.guide-steps {
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.guide-steps li {
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.guide-steps span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--paper-light);
  background: var(--accent);
  font-family: var(--font-mono);
  font-size: 7px;
}

.guide-steps strong {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
}

.guide-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.guide-callout {
  margin-top: 14px;
  padding: 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  background: var(--accent-soft);
  font-size: 8px;
  line-height: 1.65;
}

.guide-callout strong {
  color: var(--ink-soft);
}

/* Theme selection and Pro */

.theme-sheet {
  max-height: 80%;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.theme-card {
  position: relative;
  min-width: 0;
  padding: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  background: var(--paper);
  transition: border-color 160ms ease, transform 160ms var(--ease-out), box-shadow 160ms ease;
}

.theme-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.theme-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.theme-card.is-locked .theme-preview {
  filter: saturate(0.8);
}

.theme-preview {
  height: 112px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(24, 27, 31, 0.08);
  border-radius: 13px;
  color: var(--preview-ink);
  background: var(--preview-paper);
  overflow: hidden;
}

.theme-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-preview-top i {
  width: 28px;
  height: 4px;
  border-radius: 99px;
  background: var(--preview-accent);
}

.theme-preview-top b {
  width: 14px;
  height: 4px;
  border-radius: 99px;
  background: var(--preview-ink);
  opacity: 0.18;
}

.theme-preview-date {
  margin-top: 13px;
  font-size: 29px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
}

.theme-preview-line {
  width: 38px;
  height: 3px;
  margin: 5px 0 10px;
  border-radius: 99px;
  background: var(--preview-accent);
}

.theme-preview-row {
  height: 16px;
  margin-top: 4px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  background: var(--preview-surface);
}

.theme-preview-row.is-short {
  width: 82%;
}

.theme-preview-row i {
  width: 4px;
  height: 4px;
  flex: none;
  border-radius: 50%;
  background: var(--preview-accent);
}

.theme-preview-row b {
  width: 54%;
  height: 2px;
  border-radius: 99px;
  background: var(--preview-ink);
  opacity: 0.17;
}

.theme-card-copy {
  padding: 9px 3px 2px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 7px;
}

.theme-card-copy > span {
  display: contents;
}

.theme-card-copy strong {
  grid-column: 1;
  grid-row: 1;
  font-size: 10px;
  line-height: 1.3;
}

.theme-card-copy small {
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
  white-space: normal;
}

.theme-card-copy em {
  grid-column: 2;
  grid-row: 1;
  padding: 3px 5px;
  flex: none;
  border-radius: 99px;
  color: var(--muted);
  background: var(--paper-deep);
  font-family: var(--font-mono);
  font-size: 5.5px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.theme-card-copy em.is-pro {
  color: var(--paper-light);
  background: var(--ink);
}

.theme-lock {
  position: absolute;
  right: 12px;
  bottom: 38px;
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 99px;
  color: #ffffff;
  background: rgba(24, 27, 31, 0.84);
  font-size: 6px;
  font-weight: 700;
}

.theme-lock .icon {
  width: 8px;
  height: 8px;
}

.theme-selected {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(24, 27, 31, 0.2);
}

.theme-selected .icon {
  width: 10px;
  height: 10px;
  stroke-width: 2.4;
}

.theme-note {
  margin-top: 14px;
  padding: 11px 12px;
  display: flex;
  gap: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.55;
}

.theme-note .icon {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--accent);
}

.theme-note p {
  margin: 0;
}

.theme-note strong {
  color: var(--ink-soft);
}

.paywall-sheet {
  position: relative;
  max-height: 94%;
}

.paywall-close {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
}

.paywall-hero {
  position: relative;
  margin-top: 11px;
  padding: 23px 21px 21px;
  overflow: hidden;
  border-radius: 23px;
  color: #ffffff;
  background: var(--ink);
}

.paywall-hero p {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  color: var(--accent-muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.paywall-hero h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.paywall-hero > span:not(.brand-watermark) {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 8px;
}

.paywall-price {
  margin-top: 14px;
  padding: 14px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.paywall-price div {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.paywall-price strong {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.paywall-price span {
  color: var(--muted);
  font-size: 8px;
}

.paywall-price small {
  color: var(--muted);
  font-size: 7px;
  text-align: right;
}

.pro-status-card {
  margin-top: 14px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(45, 108, 223, 0.16);
  border-radius: 16px;
  background: var(--accent-soft);
}

.pro-status-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent);
}

.pro-status-card > span:nth-child(2) {
  min-width: 0;
}

.pro-status-card strong,
.pro-status-card small {
  display: block;
}

.pro-status-card strong {
  font-size: 9px;
}

.pro-status-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.pro-status-card em {
  margin-left: auto;
  flex: none;
  color: var(--accent-strong);
  font-size: 7px;
  font-style: normal;
  font-weight: 700;
}

.paywall-features {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.paywall-features li {
  padding: 12px 2px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.paywall-features .icon {
  width: 17px;
  height: 17px;
  padding: 3px;
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  stroke-width: 2;
}

.paywall-features strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 9px;
}

.paywall-actions {
  margin-top: 15px;
  display: grid;
  gap: 8px;
}

.paywall-actions button {
  width: 100%;
  min-height: 45px;
}

.paywall-legal {
  margin: 10px 8px 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.55;
  text-align: center;
}

/* Upcoming list */

.upcoming-sheet {
  max-height: 88%;
}

.upcoming-list {
  margin-top: 15px;
  display: grid;
  gap: 8px;
}

.upcoming-row {
  width: 100%;
  padding: 10px;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: left;
  background: var(--paper);
}

.upcoming-row.is-overdue {
  border-color: rgba(217, 81, 53, 0.2);
}

.upcoming-row.is-overdue .upcoming-date {
  color: var(--danger-strong);
  background: var(--danger-soft);
}

.upcoming-row.is-overdue .upcoming-tail {
  color: var(--danger-strong);
}

.upcoming-date {
  width: 43px;
  height: 46px;
  display: grid;
  place-content: center;
  border-radius: 12px;
  text-align: center;
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.upcoming-date strong,
.upcoming-date small {
  display: block;
}

.upcoming-date strong {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
}

.upcoming-date small {
  margin-top: 3px;
  font-size: 7px;
}

.upcoming-copy {
  min-width: 0;
}

.upcoming-copy strong,
.upcoming-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-copy strong {
  font-size: 10px;
}

.upcoming-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 7px;
}

.upcoming-tail {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-strong);
}

.upcoming-tail strong {
  font-size: 7px;
  white-space: nowrap;
}

.upcoming-tail .icon {
  width: 12px;
  height: 12px;
  stroke-width: 1.8;
}

/* Menus and confirmations */

.menu-popover {
  position: absolute;
  z-index: 50;
  top: 74px;
  right: 20px;
  width: 170px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 38px rgba(30, 46, 39, 0.19);
  animation: menu-in 160ms var(--ease-out) both;
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.menu-popover button {
  width: 100%;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  text-align: left;
  font-size: 9px;
}

.menu-popover button:hover {
  background: rgba(243, 245, 247, 0.4);
}

.menu-popover button.is-danger {
  color: var(--danger);
}

.menu-popover .icon {
  width: 14px;
  height: 14px;
}

.confirm-sheet {
  max-width: 360px;
  margin: auto 12px 12px;
  border-radius: 22px;
}

.confirm-sheet .sheet-handle {
  display: none;
}

.confirm-sheet h2 {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
}

.confirm-sheet p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.confirm-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.confirm-actions button {
  min-height: 43px;
}

/* Toast */

.global-toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 30px;
  max-width: min(310px, calc(100vw - 36px));
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--paper-light);
  background: rgba(30, 46, 39, 0.94);
  box-shadow: 0 12px 30px rgba(30, 46, 39, 0.23);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms var(--ease-out);
}

.global-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Responsive desktop */

@media (max-width: 1140px) {
  .studio {
    width: min(1040px, calc(100vw - 40px));
    grid-template-columns: minmax(220px, 1fr) 416px minmax(170px, 0.55fr);
    gap: 34px;
  }

  .intro-panel h1 {
    font-size: clamp(43px, 4.8vw, 62px);
  }

  .intro-copy {
    font-size: 12px;
  }

  .notes-list li {
    font-size: 9px;
  }
}

@media (max-width: 920px) {
  body {
    background:
      radial-gradient(circle at 22% 12%, rgba(212, 178, 95, 0.22), transparent 26%),
      linear-gradient(145deg, #e5dfd2, #d4ccbe);
  }

  .studio {
    width: 100%;
    min-height: 100vh;
    padding: 22px;
    grid-template-columns: minmax(210px, 0.75fr) 416px;
    gap: 28px;
    justify-content: center;
  }

  .notes-panel {
    display: none;
  }

  .intro-panel {
    justify-self: end;
    max-width: 300px;
  }

  .intro-panel h1 {
    font-size: clamp(39px, 6vw, 54px);
  }

  .intro-principles {
    display: none;
  }

  .intro-action {
    width: 230px;
  }
}

@media (max-width: 700px) {
  html,
  body {
    height: 100%;
    background: var(--paper);
  }

  body {
    overflow: hidden;
  }

  .ambient-grid,
  .ambient-stamp,
  .intro-panel,
  .notes-panel,
  .device-hint {
    display: none;
  }

  .studio {
    display: block;
    width: 100%;
    min-height: 100%;
    height: 100%;
    padding: 0;
  }

  .device-column {
    width: 100%;
    height: 100%;
  }

  .device {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--paper);
    box-shadow: none;
  }

  .device::before,
  .device-button {
    display: none;
  }

  .device-screen {
    border-radius: 0;
  }

  .app-shell {
    padding-top: env(safe-area-inset-top);
  }

  .global-toast {
    bottom: 92px;
  }
}

@media (max-height: 760px) and (min-width: 701px) {
  .studio {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .device {
    width: 366px;
    height: 768px;
    border-radius: 49px;
  }

  .device-screen {
    border-radius: 40px;
  }

  .brand-lockup {
    margin-bottom: 25px;
  }

  .intro-principles {
    display: none;
  }

  .intro-foot {
    margin-top: 22px;
  }

  .studio {
    grid-template-columns: minmax(220px, 1fr) 366px minmax(170px, 0.62fr);
  }
}

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