:root {
  color-scheme: light;
  --bg: #edf2f0;
  --surface: #fbfcfa;
  --surface-2: #e4ece8;
  --ink: #142321;
  --muted: #5c6c67;
  --line: #cbd8d2;
  --primary: #226b68;
  --primary-dark: #174f4d;
  --accent: #b97821;
  --danger: #bd4f57;
  --blue: #426aa0;
  --saffron: #e2b84b;
  --coral: #d56b60;
  --cyan: #55b9c3;
  --plum: #75618b;
  --night: #0d1b1a;
  --shadow: 0 16px 40px rgba(18, 42, 37, 0.09);
  --radius: 8px;
  --focus-ring: #0c7d78;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 180ms;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1110;
  --surface: #121d1b;
  --surface-2: #1d2a27;
  --ink: #edf5f1;
  --muted: #a6b7b0;
  --line: rgba(218, 235, 228, 0.17);
  --primary: #72c6be;
  --primary-dark: #9ddbd4;
  --accent: #e7be62;
  --danger: #ef7c83;
  --blue: #91b5e8;
  --saffron: #edc65f;
  --coral: #e47b70;
  --cyan: #6fcbd3;
  --plum: #aa91c0;
  --night: #081210;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --focus-ring: #f1d36d;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  min-height: 44px;
  border-radius: var(--radius);
  opacity: 0;
  background: var(--ink);
  color: var(--surface);
  padding: 11px 16px;
  pointer-events: none;
  transform: translateY(-140%);
  transition: opacity var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out);
}

.skip-link:focus-visible {
  opacity: 1;
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  pointer-events: auto;
  transform: translateY(0);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

:where(a, button) {
  touch-action: manipulation;
}

body.is-home {
  overflow-x: hidden;
  background: #08111c;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 238px;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  padding: 22px 16px;
  backdrop-filter: blur(18px);
}

.side-actions {
  display: flex;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav a,
.logout-form button,
.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 11px 12px;
  text-align: left;
}

.side-nav a:hover,
.logout-form button:hover,
.mobile-nav a:hover {
  background: var(--surface-2);
}

.side-nav svg,
.logout-form svg,
.mobile-nav svg,
.button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.logout-form {
  margin-top: auto;
}

.logout-form button {
  width: 100%;
}

.app-shell {
  margin-left: 238px;
  padding: 32px;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.home-shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.topbar.compact {
  max-width: 920px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.muted,
.empty {
  color: var(--muted);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-action-form {
  display: inline-flex;
  margin: 0;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 9px 13px;
}

.button,
.icon-button,
.side-nav a,
.mobile-nav a {
  transition: border-color var(--duration-fast) ease, background-color var(--duration-fast) ease, color var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) ease;
}

.button:active,
.icon-button:active,
.glass-icon:active,
.glass-chip:active,
.bubble-link:active {
  transform: scale(0.97);
}

.button:hover {
  border-color: #b9c6c1;
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.button.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.button.wide {
  width: 100%;
}

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

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  padding: 18px;
}

.panel.span-2 {
  grid-column: span 2;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head a {
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
}

.task-stack,
.content-list,
.mini-list {
  display: grid;
  gap: 12px;
}

.task-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.task-item.priority-high {
  border-left-color: var(--danger);
}

.task-item.priority-medium {
  border-left-color: var(--accent);
}

.task-item.done {
  opacity: 0.68;
}

.task-item.done .task-title {
  text-decoration: line-through;
}

.task-item.overdue {
  background: #fff8f6;
}

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

.task-title {
  display: block;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.icon-button.ghost {
  border-color: transparent;
  background: transparent;
}

.icon-button:hover,
.icon-button.copied {
  border-color: var(--primary);
  color: var(--primary);
}

.mini-list a {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.mini-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-list small {
  color: var(--muted);
  white-space: nowrap;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
}

.quick-grid.large {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.quick-link,
.quick-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.quick-link {
  display: grid;
  gap: 6px;
  border-left: 4px solid var(--accent);
  padding: 13px;
}

.quick-link span,
.quick-entry strong {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.quick-link small,
.quick-entry small {
  color: var(--muted);
}

.quick-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  border-left: 5px solid var(--accent);
  padding: 14px;
}

.quick-entry a:first-child {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.quick-entry span {
  overflow-wrap: anywhere;
  color: var(--muted);
}

.metric {
  margin-bottom: 3px;
  color: var(--primary-dark);
  font-size: 44px;
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(150px, auto) minmax(150px, auto) auto;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-bar input,
.filter-bar select,
.field input,
.field select,
.field textarea,
.login-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
}

.field textarea {
  resize: vertical;
}

.field input[type="color"] {
  width: 72px;
  min-height: 42px;
  padding: 4px;
}

.field input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.form-card {
  display: grid;
  max-width: 920px;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--shadow);
}

.field label,
.login-form label,
.secret-row label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.field small {
  color: var(--muted);
}

.field-error,
.form-errors {
  color: var(--danger);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.content-list {
  max-width: 980px;
}

.list-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.list-card h2 {
  margin: 8px 0;
}

.list-card p,
.list-card small {
  color: var(--muted);
}

.item-actions {
  display: flex;
  gap: 6px;
}

.pill {
  display: inline-flex;
  border-radius: 999px;
  background: #e7efec;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.article-view {
  max-width: 920px;
}

.article-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.article-head p {
  margin-top: 10px;
  color: var(--muted);
}

.markdown-body {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  line-height: 1.75;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin-top: 1.2em;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.calendar-weekday,
.calendar-day {
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.calendar-weekday {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
  padding: 10px;
  text-align: center;
}

.calendar-day {
  min-height: 118px;
  padding: 9px;
}

.calendar-day.today {
  background: #eef7f4;
}

.muted-day {
  background: #fafafa;
  color: #97a19e;
}

.day-number {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.today .day-number {
  background: var(--primary);
  color: #fff;
}

.day-tasks {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.calendar-task {
  overflow: hidden;
  border-radius: 6px;
  background: #eaf0ff;
  color: #27406c;
  font-size: 12px;
  padding: 5px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-task.done {
  background: #e9eee8;
  color: var(--muted);
  text-decoration: line-through;
}

.secret-grid,
.delete-panel {
  display: grid;
  max-width: 820px;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}

.secret-row {
  display: grid;
  gap: 7px;
}

.copy-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.copy-line code {
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf9;
  padding: 10px 12px;
}

.messages {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.message {
  border: 1px solid #b8d7ca;
  border-radius: var(--radius);
  background: #effaf5;
  color: #244b3d;
  padding: 10px 12px;
}

.login-panel {
  display: grid;
  width: min(920px, 100%);
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: center;
}

.login-copy h1 {
  font-size: 48px;
}

.login-copy p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
}

.mobile-nav {
  display: none;
}

.home-page {
  min-height: 200vh;
  background:
    linear-gradient(180deg, rgba(6, 13, 24, 0.12), rgba(6, 13, 24, 0.48) 52%, rgba(6, 13, 24, 0.95) 100%),
    var(--home-bg) center top / cover fixed no-repeat;
  color: #f8fbff;
}

[data-theme="dark"] .home-page {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(2, 6, 12, 0.6) 54%, rgba(0, 0, 0, 0.96) 100%),
    var(--home-bg) center top / cover fixed no-repeat;
}

.home-top {
  position: fixed;
  inset: 22px 28px auto 28px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.home-left-actions,
.home-right-actions {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.glass-chip,
.glass-icon,
.glass-panel,
.home-widget,
.home-search,
.bubble-link,
.login-glass {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.11));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(22px) saturate(150%);
}

[data-theme="dark"] .glass-chip,
[data-theme="dark"] .glass-icon,
[data-theme="dark"] .glass-panel,
[data-theme="dark"] .home-widget,
[data-theme="dark"] .home-search,
[data-theme="dark"] .bubble-link,
[data-theme="dark"] .login-glass {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, rgba(13, 23, 33, 0.54), rgba(11, 19, 28, 0.26));
}

.glass-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  padding: 11px 16px;
}

.glass-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
}

.glass-icon svg,
.glass-chip svg {
  width: 18px;
  height: 18px;
}

.home-hero {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(300px, 0.85fr) minmax(380px, 0.72fr);
  gap: clamp(22px, 6vw, 96px);
  align-items: center;
  padding: 88px clamp(24px, 5vw, 76px) 132px;
}

.home-clock {
  max-width: 640px;
  border-radius: 26px;
  padding: clamp(24px, 4vw, 46px);
}

.home-kicker {
  display: block;
  color: #e6c760;
  font-size: clamp(18px, 2.4vw, 34px);
  font-weight: 900;
}

.home-clock strong {
  display: block;
  margin: 8px 0 2px;
  color: #f2d66f;
  font-size: clamp(78px, 13vw, 184px);
  line-height: 0.88;
}

.home-clock > span:last-of-type {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 800;
}

.home-today-list {
  display: grid;
  gap: 9px;
  margin-top: 26px;
}

.home-today-list a,
.home-today-list p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.home-today-list svg {
  width: 17px;
  height: 17px;
}

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

.home-widget {
  min-height: 154px;
  border-radius: 26px;
  color: #fff;
  padding: 22px;
}

.home-widget.wide {
  grid-column: span 2;
  min-height: 188px;
}

.home-widget span,
.home-widget small {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
}

.home-widget strong {
  display: block;
  margin: 11px 0 2px;
  color: #f3d86f;
  font-size: 58px;
  line-height: 1;
}

.home-widget.urgent strong {
  color: #ffb3ad;
}

.home-mini-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.home-mini-list a {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding: 7px 0;
}

.home-mini-list b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-mini-list em {
  color: rgba(255, 255, 255, 0.68);
  font-style: normal;
  white-space: nowrap;
}

.home-mini-list p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.home-search-row {
  margin-top: -106px;
  padding: 0 clamp(24px, 5vw, 76px) 28px;
}

.home-search {
  display: grid;
  width: min(720px, 100%);
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 999px;
  margin-inline: auto;
  padding: 14px 20px;
}

.home-search input {
  min-height: 36px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
}

.home-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.bubble-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  padding: 0 clamp(18px, 5vw, 76px) 84px;
}

.bubble-link {
  display: grid;
  min-width: 154px;
  min-height: 62px;
  align-content: center;
  border-radius: 999px;
  color: #fff;
  padding: 11px 26px;
  position: relative;
  overflow: hidden;
}

.bubble-link::before,
.bubble-link::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bubble) 70%, #ffffff 30%);
  opacity: 0.38;
  transform: translateY(-50%);
}

.bubble-link::before {
  left: 12px;
}

.bubble-link::after {
  right: 12px;
}

.bubble-link span,
.bubble-link small {
  position: relative;
  z-index: 1;
  text-align: center;
}

.bubble-link span {
  font-size: 17px;
  font-weight: 900;
}

.bubble-link small {
  color: rgba(255, 255, 255, 0.72);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  top: calc(100vh - 54px);
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: rgba(255, 255, 255, 0.84);
  transform: translateX(-50%);
}

.home-login-section {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 96px 20px;
}

.login-glass {
  width: min(460px, 100%);
  border-radius: 26px;
  color: #fff;
  padding: 28px;
}

.login-glass h2 {
  margin: 8px 0 10px;
  font-size: 30px;
}

.login-glass p {
  color: rgba(255, 255, 255, 0.74);
}

.home-login-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.home-login-form label {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.home-login-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 10px 12px;
}

.home-login-form input:focus {
  border-color: rgba(242, 214, 111, 0.75);
  outline: 0;
}

@media (max-width: 980px) {
  .sidebar {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
  }

  .mobile-nav a {
    justify-content: center;
    border-radius: 0;
    padding: 9px 4px;
  }

  .mobile-nav span {
    font-size: 12px;
  }

  .app-shell {
    margin-left: 0;
    padding: 20px 16px 76px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .panel.span-2 {
    grid-column: auto;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    display: block;
    border: 0;
    background: transparent;
  }

  .calendar-weekday {
    display: none;
  }

  .calendar-day {
    min-height: auto;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .muted-day {
    display: none;
  }

  .home-page {
    background-attachment: scroll;
  }

  .home-top {
    inset: 14px 14px auto 14px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: auto;
    padding: 82px 16px 118px;
  }

  .home-clock {
    max-width: none;
    border-radius: 20px;
  }

  .home-widget-grid {
    grid-template-columns: 1fr;
  }

  .home-widget.wide {
    grid-column: auto;
  }

  .home-search-row {
    margin-top: -84px;
    padding-inline: 16px;
  }

  .bubble-nav {
    justify-content: flex-start;
    padding-inline: 16px;
  }

  .bubble-link {
    flex: 1 1 150px;
  }
}

@media (max-width: 720px) {
  h1 {
    font-size: 27px;
  }

  .topbar,
  .article-head {
    display: grid;
  }

  .action-row {
    width: 100%;
  }

  .action-row .button {
    flex: 1 1 auto;
  }

  .list-card,
  .quick-entry {
    grid-template-columns: 1fr;
  }

  .item-actions {
    justify-content: flex-start;
  }

  .login-panel {
    grid-template-columns: 1fr;
  }

  .login-copy h1 {
    font-size: 36px;
  }

  .home-clock strong {
    font-size: clamp(72px, 24vw, 116px);
  }

  .home-widget {
    min-height: 128px;
  }

  .glass-chip span {
    display: none;
  }

  .glass-chip {
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
  }
}

/* Product workspace */
.home-widget-grid.has-calendar {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-widget-grid.has-calendar .home-widget.wide {
  grid-column: span 3;
}

.calendar-entry {
  text-decoration: none;
}

.workspace-page {
  position: relative;
  min-height: 100vh;
  margin: -32px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(8, 18, 29, 0.86), rgba(13, 26, 35, 0.66) 48%, rgba(8, 15, 24, 0.9)),
    var(--workspace-bg) center / cover fixed no-repeat;
  color: #f7fbfc;
  padding: 34px clamp(24px, 4vw, 58px) 52px;
}

.workspace-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 38%);
}

.workspace-page > * {
  position: relative;
  z-index: 1;
}

.workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  max-width: 1380px;
  margin: 0 auto 22px;
}

.workspace-header h1 {
  margin: 4px 0 8px;
  font-size: 36px;
}

.workspace-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.workspace-kicker {
  color: #f4d66f;
  font-size: 14px;
  font-weight: 800;
}

.glass-button {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(16px);
}

.quick-capture {
  display: grid;
  max-width: 1380px;
  min-height: 58px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
  margin: 0 auto 22px;
  padding: 8px 10px 8px 20px;
  backdrop-filter: blur(20px) saturate(135%);
}

.quick-capture > svg {
  width: 20px;
  height: 20px;
  color: #f4d66f;
}

.quick-capture input[type="text"] {
  min-width: 0;
  min-height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
}

.quick-capture input::placeholder {
  color: rgba(255, 255, 255, 0.64);
}

.quick-capture button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #f4d66f;
  color: #16212b;
  cursor: pointer;
}

.quick-capture button svg {
  width: 18px;
  height: 18px;
}

.quick-capture small {
  grid-column: 2 / 3;
  margin-top: -7px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
}

.task-quick-capture {
  max-width: none;
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
  margin-bottom: 14px;
}

.task-quick-capture input[type="text"] {
  color: var(--ink);
}

.task-quick-capture input::placeholder {
  color: var(--muted);
}

.workspace-grid {
  display: grid;
  max-width: 1380px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto;
}

.workspace-panel {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
  padding: 18px;
  backdrop-filter: blur(22px) saturate(130%);
}

.workspace-panel.span-2 {
  grid-column: span 2;
}

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

.workspace-panel-head span {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.workspace-panel-head h2 {
  color: #fff;
  font-size: 17px;
}

.workspace-panel-head > a {
  color: #f4d66f;
  font-size: 13px;
  font-weight: 800;
}

.workspace-task-stack .task-item {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(5, 13, 21, 0.3);
  color: #fff;
}

.workspace-task-stack .task-meta {
  color: rgba(255, 255, 255, 0.62);
}

.workspace-task-stack .icon-button {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.workspace-empty,
.agenda-empty {
  display: grid;
  min-height: 116px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.68);
  text-align: center;
}

.workspace-empty p,
.agenda-empty p {
  margin: 0;
}

.mini-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  gap: 4px;
}

.mini-weekday,
.mini-day {
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
}

.mini-weekday {
  aspect-ratio: auto;
  color: rgba(255, 255, 255, 0.48);
  font-weight: 800;
}

.mini-day.outside {
  opacity: 0.28;
}

.mini-day.today {
  background: #f4d66f;
  color: #17222b;
  font-weight: 900;
}

.mini-day.has-task:not(.today) {
  box-shadow: inset 0 -3px 0 #6fc8be;
}

.workspace-list {
  display: grid;
}

.workspace-list a {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 9px 0;
}

.workspace-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-list time {
  color: rgba(255, 255, 255, 0.58);
}

.storage-brief {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.storage-brief strong {
  color: #f4d66f;
  font-size: 42px;
}

.storage-brief span {
  color: rgba(255, 255, 255, 0.64);
}

.workspace-panel .usage-meter {
  background: rgba(255, 255, 255, 0.14);
}

.locked-workspace {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
}

.workspace-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workspace-link-row a {
  border: 1px solid color-mix(in srgb, var(--link-color) 60%, rgba(255, 255, 255, 0.5));
  border-radius: 999px;
  background: color-mix(in srgb, var(--link-color) 54%, transparent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 11px;
}

/* Calendar workspace */
.calendar-header {
  align-items: center;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px;
  backdrop-filter: blur(16px);
}

.calendar-nav a {
  display: grid;
  min-width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
}

.calendar-nav .today-link {
  min-width: 62px;
  padding: 0 10px;
}

.calendar-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.calendar-layout {
  display: grid;
  max-width: 1380px;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 16px;
  margin: 0 auto;
}

.calendar-surface,
.day-agenda {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(22px) saturate(130%);
}

.calendar-week-row,
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-week-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.calendar-week-row span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
  padding: 12px;
  text-align: center;
}

.calendar-cell {
  display: grid;
  min-width: 0;
  min-height: 112px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.11);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  color: #fff;
  padding: 9px;
}

.calendar-cell:nth-child(7n) {
  border-right: 0;
}

.calendar-cell.outside {
  background: rgba(0, 0, 0, 0.12);
  opacity: 0.44;
}

.calendar-cell.selected {
  outline: 2px solid #f4d66f;
  outline-offset: -2px;
  background: rgba(244, 214, 111, 0.1);
}

.calendar-cell-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.calendar-cell.today .calendar-cell-number {
  background: #f4d66f;
  color: #18232b;
}

.calendar-cell-tasks {
  display: grid;
  align-content: start;
  gap: 4px;
}

.calendar-dot-task {
  overflow: hidden;
  border-left: 3px solid #6fc8be;
  border-radius: 4px;
  background: rgba(5, 13, 21, 0.34);
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  padding: 4px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-dot-task.priority-high {
  border-left-color: #ff898f;
}

.calendar-dot-task.priority-low {
  border-left-color: #8ab1e8;
}

.calendar-dot-task.done {
  opacity: 0.5;
  text-decoration: line-through;
}

.day-agenda {
  min-width: 0;
  padding: 18px;
}

.day-agenda-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: 14px;
}

.day-agenda-head span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
}

.day-agenda-head h2 {
  margin-top: 3px;
  color: #fff;
  font-size: 22px;
}

.day-agenda-head > a {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: #f4d66f;
  color: #17222b;
}

.day-agenda-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.agenda-item {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-left: 3px solid #6fc8be;
  background: rgba(7, 16, 25, 0.3);
  padding: 11px;
}

.agenda-item.priority-high {
  border-left-color: #ff898f;
}

.agenda-item.priority-low {
  border-left-color: #8ab1e8;
}

.agenda-item button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  padding: 1px;
}

.agenda-item a {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.agenda-item strong {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-item span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
}

.agenda-item.done {
  opacity: 0.55;
}

.agenda-item.done strong {
  text-decoration: line-through;
}

/* Markdown studio */
.markdown-editor {
  min-height: 100vh;
  margin: -32px;
  background: #eef1ee;
  color: #1c2625;
}

[data-theme="dark"] .markdown-editor {
  background: #10161b;
  color: #eef5f2;
}

.editor-header {
  display: grid;
  min-height: 74px;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 18px;
}

.editor-back,
.editor-toolbar button,
.reader-actions a,
.reader-actions button,
.account-actions a {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.editor-title-field {
  display: grid;
  gap: 3px;
}

.editor-title-field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.editor-title-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.editor-actions,
.editor-mode {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-mode {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  padding: 3px;
}

.editor-mode button {
  min-height: 32px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 5px 10px;
}

.editor-mode button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(21, 32, 29, 0.08);
}

.editor-toolbar {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 18px;
}

.editor-toolbar button {
  width: 34px;
  height: 34px;
  border-color: transparent;
  background: transparent;
}

.editor-toolbar button:hover {
  background: var(--surface-2);
}

.editor-save-state {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.editor-errors {
  margin: 12px 18px 0;
}

.editor-layout {
  display: grid;
  min-height: calc(100vh - 126px);
  grid-template-columns: minmax(0, 1fr) 310px;
}

.editor-writing {
  position: relative;
  min-width: 0;
  background: var(--surface);
  transition: box-shadow 160ms ease;
}

.editor-writing.is-dragging {
  box-shadow: inset 0 0 0 3px var(--primary);
}

.editor-writing textarea {
  width: 100%;
  min-height: calc(100vh - 126px);
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 15px;
  line-height: 1.8;
  padding: 42px clamp(24px, 6vw, 88px) 80px;
  resize: none;
  tab-size: 4;
}

.editor-drop-hint {
  position: absolute;
  inset: auto 20px 18px auto;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  pointer-events: none;
}

.editor-preview {
  display: none;
  min-width: 0;
  min-height: calc(100vh - 126px);
  overflow: auto;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: 42px clamp(24px, 5vw, 72px) 80px;
}

.editor-settings {
  display: grid;
  align-content: start;
  gap: 18px;
  border-left: 1px solid var(--line);
  background: var(--surface-2);
  padding: 20px;
}

.editor-setting-group,
.editor-setting-grid > div {
  display: grid;
  gap: 7px;
}

.editor-setting-group label,
.editor-setting-grid label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.editor-setting-group input,
.editor-setting-group textarea,
.editor-setting-grid input,
.editor-setting-grid select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 10px;
}

.editor-setting-group textarea {
  resize: vertical;
}

.editor-setting-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 10px;
}

.cover-preview {
  display: grid;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
}

.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.source-file-link {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--primary-dark);
  font-size: 12px;
}

.source-file-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-stats {
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  padding-top: 15px;
}

.markdown-editor[data-mode="split"] .editor-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 280px;
}

.markdown-editor[data-mode="split"] .editor-preview,
.markdown-editor[data-mode="preview"] .editor-preview {
  display: block;
}

.markdown-editor[data-mode="preview"] .editor-writing {
  display: none;
}

.markdown-editor[data-mode="preview"] .editor-layout {
  grid-template-columns: minmax(0, 1fr) 310px;
}

.editor-preview-empty {
  color: var(--muted);
}

/* Blog library and reader */
.blog-library,
.journal-reader {
  max-width: 1320px;
  margin: 0 auto;
}

.library-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.library-header h1 {
  margin-bottom: 10px;
}

.library-header p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
}

.library-stats {
  display: grid;
  grid-template-columns: repeat(3, 130px) minmax(240px, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.library-stats > div {
  display: grid;
  gap: 3px;
  border-right: 1px solid var(--line);
  padding: 14px 18px;
}

.library-stats strong {
  color: var(--primary-dark);
  font-size: 28px;
}

.library-stats span {
  color: var(--muted);
  font-size: 12px;
}

.library-stats .library-recent {
  border-right: 0;
}

.library-recent a,
.library-recent b {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.library-status-tabs {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  padding: 3px;
}

.library-status-tabs a {
  border-radius: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 7px 11px;
}

.library-status-tabs a.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(20, 35, 31, 0.07);
}

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

.journal-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(27, 42, 37, 0.06);
}

.journal-cover {
  display: grid;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  place-items: center;
  background: #314c5a;
}

.journal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.journal-card:hover .journal-cover img {
  transform: scale(1.025);
}

.journal-cover.placeholder {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent),
    #355c68;
  color: #f4d66f;
  font-size: 64px;
  font-weight: 900;
}

.journal-card:nth-child(3n + 2) .journal-cover.placeholder {
  background-color: #786047;
}

.journal-card:nth-child(3n) .journal-cover.placeholder {
  background-color: #4c6361;
}

.journal-card-body {
  display: grid;
  align-content: start;
  padding: 17px;
}

.journal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}

.journal-card h2 {
  margin: 12px 0 8px;
  font-size: 20px;
  line-height: 1.35;
}

.journal-card p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 66px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.journal-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  padding-top: 12px;
}

.journal-card-foot div {
  display: flex;
  gap: 5px;
}

.journal-card-foot a {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
}

.journal-card-foot a:hover {
  background: var(--surface-2);
}

.journal-card-foot svg {
  width: 15px;
  height: 15px;
}

.article-empty {
  grid-column: 1 / -1;
}

.reader-hero {
  position: relative;
  display: grid;
  min-height: 310px;
  overflow: hidden;
  align-items: end;
  border-radius: 8px;
  background: #2e4a54;
  color: #fff;
  padding: clamp(28px, 6vw, 72px);
}

.reader-hero > img,
.reader-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.reader-hero > img {
  object-fit: cover;
}

.reader-hero-shade {
  background: linear-gradient(90deg, rgba(7, 14, 20, 0.88), rgba(7, 14, 20, 0.38) 70%, rgba(7, 14, 20, 0.2));
}

.reader-heading,
.reader-actions {
  position: relative;
  z-index: 1;
}

.reader-heading {
  max-width: 860px;
}

.reader-heading .journal-meta {
  color: rgba(255, 255, 255, 0.68);
}

.reader-heading h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
}

.reader-heading p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.65;
}

.reader-tags {
  color: #f4d66f;
  font-size: 13px;
  font-weight: 800;
}

.reader-actions {
  position: absolute;
  inset: 20px 20px auto auto;
  display: flex;
  gap: 7px;
}

.reader-actions a,
.reader-actions button {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(9, 17, 24, 0.34);
  color: #fff;
  backdrop-filter: blur(12px);
}

.reader-layout {
  display: grid;
  max-width: 1120px;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(26px, 5vw, 70px);
  align-items: start;
  margin: 34px auto 80px;
}

.reader-toc {
  position: sticky;
  top: 28px;
  color: var(--muted);
  font-size: 12px;
}

.reader-toc > span {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-weight: 900;
}

.reader-toc ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 14px;
}

.reader-body {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  font-size: 16px;
  line-height: 1.85;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 7px;
}

.markdown-body pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #111a21;
  color: #e6f0ed;
  padding: 16px;
}

.markdown-body code {
  overflow-wrap: anywhere;
  border-radius: 4px;
  background: var(--surface-2);
  padding: 2px 5px;
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid var(--line);
  padding: 8px 10px;
}

/* Account management */
.account-topbar p {
  margin-top: 10px;
}

.account-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.account-table-head,
.account-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 1fr) minmax(220px, 0.8fr) 90px;
  gap: 18px;
  align-items: center;
}

.account-table-head {
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 11px 16px;
}

.account-row {
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

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

.account-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.account-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: #315f67;
  color: #fff;
  font-weight: 900;
}

.account-identity div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.account-identity small,
.account-storage small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-storage {
  display: grid;
  gap: 7px;
}

.account-storage > span {
  font-size: 13px;
  font-weight: 800;
}

.account-badges,
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill.admin {
  background: #fff1c7;
  color: #76500e;
}

.pill.owner {
  background: #f7dbe9;
  color: #8a2856;
}

.pill.danger {
  background: #fde7e7;
  color: #8f2632;
}

.account-actions {
  justify-content: flex-end;
}

.account-form input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.form-note {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
}

.form-note svg {
  width: 18px;
  height: 18px;
  color: var(--primary-dark);
}

.security-card input[inputmode="numeric"] {
  font-size: 24px;
  text-align: center;
}

@media (max-width: 1180px) {
  .home-widget-grid.has-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-widget-grid.has-calendar .home-widget.wide {
    grid-column: span 2;
  }

  .workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-panel.span-2 {
    grid-column: span 2;
  }

  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-layout,
  .markdown-editor[data-mode="preview"] .editor-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .markdown-editor[data-mode="split"] .editor-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .markdown-editor[data-mode="split"] .editor-settings {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .account-table-head,
  .account-row {
    grid-template-columns: minmax(200px, 1fr) minmax(220px, 1fr) 150px 80px;
  }
}

@media (max-width: 980px) {
  .workspace-page {
    margin: -20px -16px -76px;
    padding: 24px 16px 96px;
    background-attachment: scroll;
  }

  .workspace-header,
  .library-header {
    display: grid;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .day-agenda {
    min-height: 260px;
  }

  .markdown-editor {
    margin: -20px -16px -76px;
    padding-bottom: 76px;
  }

  .editor-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .editor-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .editor-layout,
  .markdown-editor[data-mode="split"] .editor-layout,
  .markdown-editor[data-mode="preview"] .editor-layout {
    grid-template-columns: 1fr;
  }

  .markdown-editor[data-mode="write"] .editor-preview,
  .markdown-editor[data-mode="preview"] .editor-writing {
    display: none;
  }

  .markdown-editor[data-mode="split"] .editor-writing,
  .markdown-editor[data-mode="split"] .editor-preview {
    display: block;
  }

  .editor-settings,
  .markdown-editor[data-mode="split"] .editor-settings {
    grid-column: auto;
    grid-template-columns: 1fr 1fr;
  }

  .library-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .library-stats .library-recent {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .reader-layout {
    grid-template-columns: 1fr;
  }

  .reader-toc {
    position: static;
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
  }

  .account-table-head {
    display: none;
  }

  .account-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .account-storage,
  .account-badges {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .home-widget-grid.has-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-widget-grid.has-calendar .home-widget.wide {
    grid-column: 1 / -1;
  }

  .workspace-header h1 {
    font-size: 30px;
  }

  .quick-capture {
    border-radius: 8px;
    padding-left: 12px;
  }

  .quick-capture small {
    display: none;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .workspace-panel.span-2 {
    grid-column: auto;
  }

  .calendar-week-row span {
    padding: 9px 2px;
  }

  .calendar-cell {
    min-height: 68px;
    padding: 5px;
  }

  .calendar-cell-tasks {
    display: flex;
    gap: 3px;
  }

  .calendar-dot-task {
    width: 6px;
    height: 6px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #6fc8be;
    color: transparent;
    padding: 0;
  }

  .calendar-dot-task.priority-high {
    background: #ff898f;
  }

  .calendar-dot-task.priority-low {
    background: #8ab1e8;
  }

  .calendar-cell-number {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .editor-mode button {
    padding-inline: 8px;
  }

  .editor-toolbar {
    overflow-x: auto;
  }

  .editor-writing textarea,
  .editor-preview {
    min-height: 64vh;
    padding: 24px 18px 68px;
  }

  .editor-settings,
  .markdown-editor[data-mode="split"] .editor-settings {
    grid-template-columns: 1fr;
  }

  .article-grid,
  .library-toolbar {
    grid-template-columns: 1fr;
  }

  .library-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .library-stats > div {
    padding: 12px 8px;
  }

  .reader-hero {
    min-height: 360px;
    padding: 78px 22px 28px;
  }

  .reader-heading h1 {
    font-size: 34px;
  }

  .reader-actions {
    inset: 16px 16px auto 16px;
  }

  .account-row {
    grid-template-columns: 1fr;
  }

  .account-actions,
  .account-storage,
  .account-badges {
    grid-column: auto;
  }

  .account-actions {
    justify-content: flex-start;
  }
}

html {
  scroll-behavior: smooth;
}

body.is-home {
  height: 100vh;
  overflow: hidden;
}

.home-page {
  height: 100vh;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.home-stage,
.home-login-section {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.home-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 86px clamp(24px, 4vw, 64px) 28px;
}

.home-hero {
  min-height: 0;
  align-items: start;
  padding: 0;
}

.home-left-column {
  display: grid;
  max-width: 720px;
  gap: 18px;
  align-content: start;
  padding-top: clamp(78px, 12vh, 126px);
}

.home-time-block {
  color: #f5d967;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.26);
}

.home-date-line {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 2vw, 24px);
  align-items: baseline;
  font-size: clamp(24px, 3.2vw, 46px);
  font-weight: 900;
}

.home-date-line #live-weekday {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(22px, 2.4vw, 36px);
}

.home-time-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.home-time-row strong {
  display: block;
  max-width: 100%;
  color: #f5d967;
  font-size: clamp(84px, 10.6vw, 174px);
  line-height: 0.9;
  white-space: nowrap;
}

.home-time-row strong.has-seconds {
  font-size: clamp(64px, 7.2vw, 126px);
}

.time-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  padding: 8px 11px;
  backdrop-filter: blur(14px);
}

.time-mode-toggle[aria-pressed="true"] {
  border-color: rgba(245, 217, 103, 0.78);
  background: rgba(245, 217, 103, 0.18);
  color: #f5d967;
}

.time-mode-toggle svg {
  width: 15px;
  height: 15px;
}

.home-today-card {
  width: min(560px, 100%);
  border-radius: 22px;
  padding: 16px 18px;
}

.home-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 900;
}

.home-card-head a {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.home-card-head svg {
  width: 16px;
  height: 16px;
}

.home-today-list {
  margin-top: 0;
}

.home-task-pill {
  margin: 0;
}

.home-task-pill button {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-weight: 800;
  padding: 5px 0;
  text-align: left;
}

.home-task-pill.done button {
  color: rgba(255, 255, 255, 0.58);
}

.home-task-pill.done span {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.home-task-pill svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.home-widget-grid {
  padding-top: clamp(72px, 11vh, 118px);
}

.home-widget {
  min-height: 128px;
  border-radius: 22px;
}

.home-widget.wide {
  min-height: 156px;
}

.calendar-carousel {
  position: relative;
  overflow: hidden;
  padding: 0;
}

.calendar-carousel-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  color: #fff;
  padding: 18px 20px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
  transition: transform 560ms cubic-bezier(0.22, 1, 0.36, 1), opacity 360ms ease;
}

.calendar-carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.calendar-carousel-slide.is-leaving {
  opacity: 0;
  transform: translateY(-100%);
}

.calendar-carousel-slide > span,
.calendar-carousel-slide > small {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-carousel-slide > strong {
  display: block;
  margin: 11px 0 2px;
  color: #f3d86f;
  font-size: 58px;
  line-height: 1;
}

.calendar-carousel-slide > strong.calendar-carousel-empty {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #fff;
  font-size: 0;
}

.calendar-carousel-empty svg {
  width: 18px;
  height: 18px;
}

.home-dock {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding-bottom: 0;
}

.home-search-row {
  display: none;
}

.home-search {
  width: min(720px, 56vw);
  padding: 12px 19px;
}

.scroll-cue {
  position: static;
  width: 30px;
  height: 22px;
  transform: none;
}

.bubble-nav {
  width: min(920px, 72vw);
  justify-content: center;
  padding: 0;
}

.bubble-link {
  min-width: 166px;
  min-height: 58px;
  border-color: color-mix(in srgb, var(--bubble) 48%, rgba(255, 255, 255, 0.72));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--bubble) 62%, rgba(255, 255, 255, 0.48)), color-mix(in srgb, var(--bubble) 46%, rgba(255, 255, 255, 0.18)));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.46);
  padding: 10px 25px;
}

.bubble-link::before,
.bubble-link::after {
  display: none;
}

.bubble-link span {
  color: #fff;
  font-size: 16px;
}

.bubble-link small {
  color: rgba(255, 255, 255, 0.8);
}

.home-login-section {
  min-height: 100vh;
}

@media (max-width: 1180px) {
  .home-stage {
    padding-inline: 28px;
  }

  .home-hero {
    gap: 34px;
    grid-template-columns: minmax(0, 0.9fr) minmax(390px, 0.8fr);
  }

  .home-search,
  .bubble-nav {
    width: min(760px, 84vw);
  }
}

@media (max-width: 980px) {
  body.is-home {
    overflow: hidden;
  }

  .home-page {
    background-attachment: scroll;
  }

  .home-stage {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto;
    overflow-y: auto;
    padding: 88px 16px 28px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-left-column,
  .home-widget-grid {
    padding-top: 0;
  }

  .home-time-row strong {
    font-size: clamp(74px, 25vw, 116px);
  }

  .home-time-row strong.has-seconds {
    font-size: clamp(58px, 17vw, 94px);
  }

  .home-widget-grid {
    grid-template-columns: 1fr;
  }

  .home-widget.wide {
    grid-column: auto;
  }

  .home-search,
  .bubble-nav {
    width: 100%;
  }

  .bubble-nav {
    justify-content: flex-start;
  }

  .bubble-link {
    flex: 1 1 155px;
  }
}

@media (max-width: 720px) {
  .home-date-line {
    font-size: clamp(22px, 8vw, 32px);
  }

  .home-date-line #live-weekday {
    font-size: clamp(18px, 6vw, 26px);
  }

  .home-time-row {
    align-items: flex-end;
  }

  .time-mode-toggle span {
    display: none;
  }
}

@media (max-width: 720px) {
  .home-stage {
    gap: 12px;
    padding: 84px 16px 20px;
  }

  .home-hero {
    gap: 12px;
  }

  .home-left-column {
    gap: 12px;
  }

  .home-time-row {
    gap: 10px;
  }

  .home-time-row strong {
    font-size: clamp(68px, 23vw, 108px);
  }

  .home-time-row strong.has-seconds {
    font-size: clamp(48px, 14vw, 74px);
  }

  .time-mode-toggle {
    width: 42px;
    height: 42px;
    justify-content: center;
    padding: 0;
  }

  .home-today-card {
    border-radius: 20px;
    padding: 14px 16px;
  }

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

  .home-widget-grid.has-calendar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-widget-grid.has-calendar .home-widget.wide {
    grid-column: 1 / -1;
  }

  .home-widget {
    min-height: 92px;
    border-radius: 20px;
    padding: 14px 16px;
  }

  .home-widget-grid.has-calendar > .home-widget:not(.wide) {
    padding-inline: 12px;
  }

  .home-widget strong {
    margin: 7px 0 0;
    font-size: 42px;
  }

  .home-widget.wide {
    grid-column: 1 / -1;
    min-height: 92px;
  }

  .calendar-carousel-slide {
    padding: 12px;
  }

  .calendar-carousel-slide > strong {
    margin-top: 7px;
    font-size: 42px;
  }

  .calendar-carousel-slide > strong.calendar-carousel-empty {
    width: 36px;
    height: 36px;
  }

  .home-mini-list {
    margin-top: 7px;
  }

  .home-mini-list p {
    margin-top: 2px;
  }

  .home-dock {
    gap: 8px;
  }

  .home-search {
    min-height: 52px;
    padding: 8px 16px;
  }

  .scroll-cue {
    height: 16px;
  }

  .bubble-nav {
    gap: 8px;
  }

  .bubble-link {
    min-width: 0;
    min-height: 50px;
    flex: 1 1 calc(50% - 8px);
    padding: 8px 14px;
  }

  .bubble-link span {
    font-size: 14px;
  }

  .bubble-link small {
    font-size: 12px;
  }
}

.mobile-nav {
  grid-template-columns: repeat(5, 1fr);
}

.home-time-block {
  color: var(--time-color, #f5d967);
}

.home-date-line > span:first-child,
.home-time-row strong {
  color: var(--time-color, #f5d967);
}

.seconds-icon[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--time-color, #f5d967) 70%, rgba(255, 255, 255, 0.35));
  background: color-mix(in srgb, var(--time-color, #f5d967) 24%, rgba(255, 255, 255, 0.14));
  color: var(--time-color, #f5d967);
}

.home-file-section {
  display: grid;
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  place-items: center;
  padding: 96px clamp(24px, 5vw, 76px);
}

.home-file-shell {
  display: grid;
  width: min(1320px, 100%);
  grid-template-columns: minmax(430px, 0.9fr) minmax(540px, 1.15fr);
  gap: clamp(42px, 6vw, 96px);
  align-items: center;
}

.home-file-copy {
  min-width: 0;
  color: #fff;
}

.home-file-copy h2 {
  margin: 8px 0 12px;
  color: var(--time-color, #f5d967);
  font-size: clamp(58px, 6.4vw, 98px);
  line-height: 0.98;
}

.home-file-copy .action-row {
  flex-wrap: nowrap;
}

.home-file-copy .button {
  min-height: 48px;
  padding-inline: 20px;
  white-space: nowrap;
}

.home-file-copy p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  line-height: 1.7;
}

.home-file-panel {
  display: grid;
  gap: 16px;
  border-radius: 28px;
  color: #fff;
  padding: clamp(22px, 3vw, 32px);
}

.home-card-head b {
  color: var(--time-color, #f5d967);
  font-size: 28px;
}

.usage-meter {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 56%, transparent);
}

.usage-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.glass-meter {
  background: rgba(255, 255, 255, 0.18);
}

.glass-meter span {
  background: linear-gradient(90deg, var(--time-color, #f5d967), #66d6c8);
}

.home-file-panel > p {
  margin: -4px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
}

.home-file-list {
  display: grid;
  gap: 10px;
}

.home-file-list a {
  display: grid;
  gap: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 10px;
}

.home-file-list span {
  overflow: hidden;
  color: #fff;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-file-list small,
.home-file-list p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 1180px) and (min-width: 981px) {
  .home-file-shell {
    grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1fr);
    gap: 32px;
  }

  .home-file-copy h2 {
    font-size: clamp(54px, 7vw, 78px);
  }
}

.storage-strip {
  display: grid;
  max-width: 980px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.storage-strip.compact {
  max-width: 920px;
}

.storage-strip h2 {
  margin-bottom: 4px;
  color: var(--primary-dark);
  font-size: 24px;
}

.storage-strip p {
  margin-bottom: 0;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  max-width: 1100px;
}

.file-preview-card {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 26px;
  text-align: center;
}

.file-preview-card svg {
  width: 54px;
  height: 54px;
  color: var(--primary-dark);
}

.file-preview-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.file-preview-card p {
  max-width: 540px;
  margin-bottom: 0;
  color: var(--muted);
}

.stat-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.stat-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 11px;
}

.stat-list dt {
  color: var(--muted);
  font-weight: 700;
}

.stat-list dd {
  margin: 0;
  font-weight: 900;
  text-align: right;
}

@media (max-width: 980px) {
  .home-file-section {
    padding: 88px 16px 28px;
  }

  .home-file-shell,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .home-file-copy .action-row {
    flex-wrap: wrap;
  }

  .home-file-copy h2 {
    font-size: clamp(44px, 14vw, 72px);
  }
}

@media (max-width: 720px) {
  .mobile-nav a {
    gap: 5px;
  }

  .mobile-nav svg {
    width: 17px;
    height: 17px;
  }

  .mobile-nav span {
    font-size: 11px;
  }

  .home-file-section {
    padding: 84px 16px 24px;
  }

  .home-file-shell {
    gap: 14px;
  }

  .home-file-copy p {
    font-size: 15px;
  }

  .home-file-panel {
    border-radius: 22px;
    padding: 18px;
  }
}

.home-file-section,
.home-journal-section {
  position: relative;
}

.home-section-cue {
  position: absolute;
  z-index: 3;
  bottom: 18px;
  left: 50%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(24, 39, 57, 0.3);
  color: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(9, 20, 34, 0.2);
  backdrop-filter: blur(16px) saturate(135%);
  transform: translateX(-50%);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.home-section-cue:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateX(-50%) translateY(-2px);
}

.home-section-cue svg {
  width: 20px;
  height: 20px;
}

.home-journal-section {
  display: grid;
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  place-items: center;
  padding: 96px clamp(24px, 5vw, 76px);
}

.home-journal-shell {
  display: grid;
  width: min(1180px, 100%);
  grid-template-columns: minmax(300px, 0.72fr) minmax(520px, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.home-journal-copy {
  color: #fff;
}

.home-journal-copy h2 {
  margin: 8px 0 12px;
  color: var(--time-color, #f5d967);
  font-size: clamp(46px, 6vw, 92px);
  letter-spacing: 0;
  line-height: 0.98;
}

.home-journal-copy > p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  line-height: 1.7;
}

.home-journal-summary {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin: 22px 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.home-journal-summary strong {
  color: var(--time-color, #f5d967);
  font-size: 44px;
  line-height: 1;
}

.home-journal-feed {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.home-journal-authors {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  gap: 10px;
  padding: 4px 3px 9px;
  scrollbar-width: thin;
}

.home-author-bubble {
  position: relative;
  display: grid;
  min-width: 154px;
  min-height: 66px;
  flex: 0 0 auto;
  align-content: center;
  gap: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(35, 57, 79, 0.42);
  color: rgba(255, 255, 255, 0.78);
  padding: 10px 17px;
  backdrop-filter: blur(16px) saturate(130%);
}

.home-author-bubble.active {
  border-color: color-mix(in srgb, var(--time-color, #f5d967) 72%, white);
  background: color-mix(in srgb, var(--time-color, #f5d967) 22%, rgba(35, 57, 79, 0.58));
  color: #fff;
}

.home-author-bubble strong,
.journal-author-bubble strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-author-bubble strong {
  color: #fff;
  font-size: 16px;
}

.home-author-bubble small,
.home-author-bubble small span {
  display: flex;
  min-width: 0;
  gap: 4px;
  align-items: center;
}

.home-author-bubble small {
  overflow: hidden;
  gap: 7px;
  font-size: 10px;
  white-space: nowrap;
}

.home-author-bubble small svg {
  width: 11px;
  height: 11px;
}

.home-journal-board {
  display: grid;
  min-width: 0;
  gap: 14px;
  border-radius: 28px;
  color: #fff;
  padding: clamp(22px, 3vw, 32px);
}

.home-journal-board .home-card-head > a {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.86);
}

.home-journal-board .home-card-head svg {
  width: 17px;
  height: 17px;
}

.home-journal-list {
  display: grid;
}

.home-journal-entry {
  display: grid;
  min-width: 0;
  grid-template-columns: 104px minmax(0, 1fr) 24px;
  gap: 16px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 14px 0;
}

.home-journal-entry:first-child {
  border-top: 0;
  padding-top: 4px;
}

.home-journal-entry:last-child {
  padding-bottom: 2px;
}

.home-journal-cover {
  display: grid;
  width: 104px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.home-journal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-journal-cover.placeholder {
  background: color-mix(in srgb, var(--time-color, #f5d967) 22%, rgba(30, 51, 72, 0.62));
}

.home-journal-cover b {
  color: rgba(255, 255, 255, 0.9);
  font-size: 28px;
}

.home-journal-entry-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.home-journal-meta,
.home-journal-foot,
.home-journal-author {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
}

.home-journal-meta {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 800;
}

.home-journal-meta em {
  font-style: normal;
}

.home-journal-entry-copy > strong,
.home-journal-entry-copy > small {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.home-journal-entry-copy > strong {
  -webkit-line-clamp: 1;
  color: #fff;
  font-size: 17px;
  line-height: 1.35;
}

.home-journal-entry-copy > small {
  -webkit-line-clamp: 1;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.45;
}

.home-journal-foot {
  justify-content: space-between;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.home-journal-foot > span:last-child {
  display: flex;
  gap: 5px;
  align-items: center;
}

.home-journal-foot svg {
  width: 13px;
  height: 13px;
  margin-left: 4px;
}

.home-journal-author {
  overflow: hidden;
}

.home-journal-author img,
.home-journal-author > i:not(.owner-mark) {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  object-fit: cover;
  color: #fff;
  font-size: 9px;
  font-style: normal;
}

.home-journal-author b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-journal-author .owner-mark {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  color: var(--time-color, #f5d967);
}

.home-journal-arrow {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 160ms ease, transform 160ms ease;
}

.home-journal-entry:hover .home-journal-arrow {
  color: var(--time-color, #f5d967);
  transform: translateX(3px);
}

.home-journal-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.home-journal-empty svg {
  width: 38px;
  height: 38px;
  color: var(--time-color, #f5d967);
}

.home-journal-empty strong {
  color: #fff;
  font-size: 18px;
}

@media (max-width: 980px) {
  .home-journal-section {
    padding: 88px 16px 38px;
  }

  .home-journal-shell {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .home-journal-copy h2 {
    font-size: clamp(44px, 14vw, 72px);
  }

  .home-journal-copy > p {
    margin-bottom: 8px;
  }

  .home-journal-summary {
    margin: 12px 0 16px;
  }
}

@media (max-width: 720px) {
  .home-section-cue {
    bottom: 8px;
    width: 36px;
    height: 36px;
  }

  .home-journal-section {
    align-content: start;
    padding: 76px 16px 48px;
  }

  .home-journal-shell {
    gap: 14px;
  }

  .home-journal-copy > p {
    font-size: 15px;
    line-height: 1.55;
  }

  .home-journal-summary {
    display: none;
  }

  .home-journal-authors {
    margin-right: -16px;
    padding-right: 16px;
  }

  .home-author-bubble {
    min-width: 142px;
    min-height: 58px;
    padding: 8px 14px;
  }

  .home-journal-board {
    gap: 10px;
    border-radius: 22px;
    padding: 16px;
  }

  .home-journal-entry {
    grid-template-columns: 76px minmax(0, 1fr) 18px;
    gap: 11px;
    padding: 10px 0;
  }

  .home-journal-cover {
    width: 76px;
  }

  .home-journal-entry-copy > strong {
    font-size: 15px;
  }

  .home-journal-entry-copy > small,
  .home-journal-author,
  .home-journal-foot > span:last-child {
    display: none;
  }

  .home-journal-foot {
    min-height: 0;
  }
}

.home-login-section {
  align-items: stretch;
  place-items: stretch center;
  padding: 74px clamp(18px, 4vw, 64px) 52px;
}

.home-login-screen {
  display: grid;
  width: min(1240px, 100%);
  min-height: calc(100vh - 126px);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(20px, 4vh, 38px);
}

.folder-hub {
  align-self: start;
  border-radius: 28px;
  color: #fff;
  padding: clamp(18px, 2.4vw, 30px);
}

.folder-hub .home-card-head {
  margin-bottom: 16px;
}

.folder-hub .home-card-head > div {
  display: grid;
  gap: 3px;
}

.folder-hub .home-card-head small {
  color: rgba(255, 255, 255, 0.62);
}

.folder-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.folder-link {
  position: relative;
  display: grid;
  min-height: 112px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--folder-color, #6c8fcd) 32%, rgba(255, 255, 255, 0.24)), rgba(255, 255, 255, 0.11));
}

.folder-link a {
  display: grid;
  gap: 8px;
  min-width: 0;
  align-content: end;
  padding: 16px;
}

.folder-link svg {
  width: 26px;
  height: 26px;
  color: color-mix(in srgb, var(--folder-color, #f5d967) 64%, white);
}

.folder-link strong,
.folder-link small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-link strong {
  color: #fff;
  font-size: 17px;
}

.folder-link small {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.folder-actions {
  position: absolute;
  inset: 10px 10px auto auto;
  display: flex;
  gap: 6px;
}

.folder-actions a {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  padding: 0;
}

.folder-actions svg {
  width: 15px;
  height: 15px;
  color: #fff;
}

.folder-add {
  align-content: end;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.12);
  padding: 16px;
}

.second-bubble-hub {
  max-height: min(48vh, 430px);
  overflow: hidden;
  color: #fff;
}

.second-bubble-hub .home-card-head {
  margin-bottom: 18px;
}

.second-category-rows {
  display: grid;
  max-height: min(36vh, 320px);
  overflow-y: auto;
  gap: 12px;
  padding-right: 6px;
  scrollbar-width: thin;
}

.second-category-row {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.second-category-row h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  font-weight: 900;
  text-transform: capitalize;
}

.second-bubble-nav {
  display: flex;
  min-width: 0;
  gap: 14px;
  flex-wrap: wrap;
  background: transparent;
  padding: 0;
}

.second-bubble-link {
  flex: 0 1 214px;
  min-width: 180px;
  min-height: 62px;
  justify-items: center;
  text-align: center;
}

.second-bubble-link.manage-bubble {
  border-style: dashed;
}

.second-nav-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.login-glass {
  width: min(700px, 100%);
  justify-self: center;
}

.login-glass .action-row {
  justify-content: flex-start;
}

.task-meta svg {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
}

.security-layout {
  display: grid;
  max-width: 980px;
  grid-template-columns: minmax(260px, 0.72fr) minmax(360px, 1fr);
  gap: 24px;
  align-items: start;
}

.security-copy {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
  box-shadow: var(--shadow);
}

.security-copy h1 {
  margin-bottom: 12px;
}

.security-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.security-card {
  max-width: none;
}

.blog-studio {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.blog-stats {
  display: grid;
  gap: 18px;
}

.blog-stats strong {
  display: block;
  color: var(--primary-dark);
  font-size: 54px;
  line-height: 1;
}

.stat-pair {
  display: grid;
  gap: 8px;
}

.stat-pair span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  padding-bottom: 8px;
}

.stat-pair b {
  color: var(--ink);
}

.blog-main {
  display: grid;
  gap: 14px;
}

.studio-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, auto) auto;
  gap: 10px;
}

.search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 12px;
}

.search-box input,
.studio-toolbar select {
  width: 100%;
  min-height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.studio-toolbar select {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 12px;
}

.article-board {
  display: grid;
  gap: 12px;
}

.article-card,
.file-card {
  display: grid;
  min-width: 0;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 12px 30px rgba(33, 50, 47, 0.05);
}

.article-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.article-card h2,
.file-card h2 {
  margin: 9px 0 8px;
  font-size: 22px;
}

.article-card p,
.file-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.article-reader {
  max-width: 980px;
}

.empty-panel {
  display: grid;
  place-items: center;
  gap: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  padding: 42px 20px;
  text-align: center;
}

.empty-panel svg {
  width: 44px;
  height: 44px;
  color: var(--primary-dark);
}

.empty-panel p {
  max-width: 440px;
  margin-bottom: 0;
  color: var(--muted);
}

.file-library-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  margin-bottom: 18px;
}

.storage-card,
.upload-drop-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.storage-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
}

.storage-card h2 {
  color: var(--primary-dark);
  font-size: 28px;
}

.storage-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.storage-card > strong {
  color: var(--accent);
  font-size: 34px;
}

.storage-card .usage-meter {
  grid-column: 1 / -1;
}

.upload-drop-card {
  display: grid;
  gap: 9px;
  align-content: center;
  padding: 18px;
}

.upload-drop-card svg {
  width: 34px;
  height: 34px;
  color: var(--primary-dark);
}

.upload-drop-card span {
  color: var(--muted);
  line-height: 1.55;
}

.folder-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.folder-filter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.folder-filter.active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}

.folder-filter small {
  color: var(--muted);
  font-weight: 900;
}

.file-toolbar {
  grid-template-columns: minmax(260px, 1fr) auto;
  margin-bottom: 14px;
}

.file-card-grid {
  display: grid;
  gap: 12px;
  max-width: 1120px;
}

.file-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.file-card-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-2));
  color: var(--primary-dark);
}

.file-card-icon svg {
  width: 30px;
  height: 30px;
}

@media (max-width: 1180px) {
  .blog-studio {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
  }
}

@media (max-width: 980px) {
  .home-login-screen {
    min-height: auto;
  }

  .folder-nav-grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  }

  .security-layout,
  .file-library-head {
    grid-template-columns: 1fr;
  }

  .studio-toolbar {
    grid-template-columns: 1fr;
  }

  .blog-stats {
    grid-template-columns: 1fr;
  }

  .file-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .file-card .item-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .home-login-section {
    padding: 84px 16px 24px;
  }

  .folder-hub {
    border-radius: 22px;
    padding: 16px;
  }

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

  .folder-link {
    min-height: 94px;
    border-radius: 18px;
  }

  .folder-link a,
  .folder-add {
    padding: 12px;
  }

  .folder-link strong {
    font-size: 14px;
  }

  .second-bubble-hub {
    max-height: none;
  }

  .second-category-rows {
    max-height: none;
    gap: 14px;
    padding-right: 0;
  }

  .second-category-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .second-category-row h3 {
    font-size: 15px;
  }

  .second-bubble-nav {
    max-height: none;
    gap: 10px;
  }

  .second-bubble-link {
    min-width: 0;
    flex: 1 1 calc(50% - 10px);
  }

  .second-bubble-link.manage-bubble {
    flex-basis: 100%;
  }

  .login-glass {
    padding: 20px;
  }

  .article-card,
  .file-card {
    grid-template-columns: 1fr;
  }

  .folder-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Public journal and social profile */
.public-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  min-height: 62px;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  padding: 8px clamp(16px, 4vw, 52px);
  backdrop-filter: blur(18px);
}

.public-brand,
.public-header nav,
.public-header-actions {
  display: flex;
  align-items: center;
}

.public-brand {
  justify-self: start;
  gap: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  letter-spacing: 0;
}

.public-header nav {
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.public-header nav a:hover {
  color: var(--ink);
}

.public-header-actions {
  justify-self: end;
  gap: 8px;
}

.public-login-link {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
}

.public-shell {
  min-height: calc(100vh - 62px);
}

.public-journal-index,
.social-profile,
.profile-editor-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.public-journal-layout {
  display: grid;
  width: min(1240px, calc(100% - 32px));
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
  margin: 0 auto;
}

.public-journal-layout .public-journal-index {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.journal-author-rail {
  position: sticky;
  top: 78px;
  display: grid;
  max-height: calc(100vh - 94px);
  gap: 18px;
  overflow: hidden;
  padding-top: clamp(46px, 8vw, 96px);
}

.author-rail-head h2 {
  margin: 7px 0 8px;
  font-size: 22px;
}

.author-rail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.author-id-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  padding: 0 0 8px;
}

.author-id-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.author-id-search > svg,
.author-id-search button svg,
.author-id-search a svg {
  width: 16px;
  height: 16px;
}

.author-id-search button,
.author-id-search a {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.journal-author-list {
  display: grid;
  overflow-y: auto;
  gap: 10px;
  padding: 2px 7px 14px 2px;
  scrollbar-width: thin;
}

.journal-author-bubble {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 72px;
  align-content: center;
  gap: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 18px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.journal-author-bubble:hover {
  border-color: var(--primary);
  transform: translateX(2px);
}

.journal-author-bubble.active {
  border-color: var(--primary-dark);
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
}

.journal-author-bubble strong {
  font-size: 17px;
}

.home-author-bubble strong,
.journal-author-bubble strong {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.journal-author-bubble small,
.journal-author-bubble small span {
  display: flex;
  min-width: 0;
  gap: 4px;
  align-items: center;
}

.journal-author-bubble small {
  flex-wrap: wrap;
  gap: 5px 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.journal-author-bubble small svg {
  width: 11px;
  height: 11px;
}

.owner-role {
  color: #bd4d83;
}

.author-unread-dot {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #75e8b1;
  box-shadow: 0 0 0 4px rgba(117, 232, 177, 0.15), 0 0 16px rgba(117, 232, 177, 0.8);
}

.journal-author-bubble.unread,
.home-author-bubble.unread {
  border-color: rgba(117, 232, 177, 0.75);
  box-shadow: 0 0 0 2px rgba(117, 232, 177, 0.11), 0 0 24px rgba(117, 232, 177, 0.32);
  animation: author-bubble-glow 2.4s ease-in-out infinite;
}

.author-filter-empty {
  margin: 8px 3px;
  color: var(--muted);
  font-size: 12px;
}

@keyframes author-bubble-glow {
  50% {
    box-shadow: 0 0 0 3px rgba(117, 232, 177, 0.16), 0 0 30px rgba(117, 232, 177, 0.48);
  }
}

@media (prefers-reduced-motion: reduce) {
  .journal-author-bubble.unread,
  .home-author-bubble.unread {
    animation: none;
  }
}

/* TasteSkill redesign: personal observatory, operational desk, public journal. */
::selection {
  background: color-mix(in srgb, var(--saffron) 58%, transparent);
  color: var(--night);
}

body:not(.is-home) {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--cyan) 4%, var(--bg)), var(--bg) 38%, color-mix(in srgb, var(--saffron) 4%, var(--bg)));
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 18%, transparent);
}

.button.primary:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

[data-theme="dark"] .button.primary {
  color: #071513;
}

.eyebrow,
.section-kicker {
  color: var(--accent);
}

.auth-shell {
  background: linear-gradient(90deg, var(--night) 0 46%, var(--bg) 46% 100%);
}

.login-panel {
  width: min(1080px, 100%);
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.72fr);
  gap: clamp(58px, 9vw, 132px);
}

.login-copy {
  color: #f3f7f4;
}

.login-copy .eyebrow {
  color: var(--saffron);
}

.login-copy h1,
.journal-index-head h1,
.public-post-copy h2,
.reader-heading h1,
.public-article-heading h1,
.home-file-copy h2,
.home-journal-copy h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Noto Serif SC", "Songti SC", STSong, serif;
  font-weight: 800;
}

.login-copy h1 {
  max-width: 8em;
  color: #f8fbf9;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.05;
}

.login-copy p {
  max-width: 460px;
  color: rgba(235, 245, 240, 0.68);
  line-height: 1.8;
}

.login-copy .button {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.login-form {
  position: relative;
  overflow: hidden;
  border: 0;
  border-top: 5px solid var(--saffron);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(8, 27, 24, 0.16);
  padding: clamp(24px, 4vw, 42px);
}

.sidebar {
  border-right-color: var(--line);
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  box-shadow: 10px 0 38px rgba(16, 42, 37, 0.045);
}

.workspace-brand-symbol {
  border-color: color-mix(in srgb, var(--saffron) 52%, var(--line));
  background: color-mix(in srgb, var(--saffron) 13%, var(--surface));
  color: var(--accent);
}

.workspace-brand-copy small i {
  background: var(--cyan);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 18%, transparent);
}

.side-nav a.active {
  background: color-mix(in srgb, var(--primary) 9%, var(--surface-2));
  color: var(--primary-dark);
}

.side-nav a.active::before {
  background: var(--saffron);
}

.side-nav a {
  min-height: 44px;
}

.mobile-nav {
  border-top-color: var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(18px) saturate(120%);
}

.home-page {
  background:
    linear-gradient(180deg, rgba(6, 20, 20, 0.08), rgba(6, 20, 20, 0.40) 48%, rgba(5, 14, 14, 0.90) 100%),
    var(--home-bg) center top / cover fixed no-repeat;
}

.site-icp-footer {
  padding: 4px 24px 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.app-shell + .site-icp-footer {
  margin-left: 252px;
}

.site-icp-footer a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.site-icp-footer a:hover,
.site-icp-footer a:focus-visible {
  color: var(--primary);
}

.home-icp-footer {
  position: absolute;
  z-index: 3;
  right: clamp(18px, 4vw, 56px);
  bottom: 20px;
  padding: 0;
  color: rgba(255, 255, 255, 0.68);
}

.home-icp-footer a:hover,
.home-icp-footer a:focus-visible {
  color: #fff;
}

[data-theme="dark"] .home-page {
  background:
    linear-gradient(180deg, rgba(2, 9, 9, 0.18), rgba(2, 13, 12, 0.58) 52%, rgba(2, 9, 9, 0.96) 100%),
    var(--home-bg) center top / cover fixed no-repeat;
}

.glass-chip,
.glass-icon,
.glass-panel,
.home-widget,
.home-search,
.login-glass {
  border-color: rgba(225, 243, 236, 0.26);
  border-radius: 10px;
  background: rgba(8, 28, 27, 0.68);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(118%);
}

.glass-chip,
.glass-icon {
  border-radius: 999px;
}

[data-theme="dark"] .glass-chip,
[data-theme="dark"] .glass-icon,
[data-theme="dark"] .glass-panel,
[data-theme="dark"] .home-widget,
[data-theme="dark"] .home-search,
[data-theme="dark"] .login-glass {
  border-color: rgba(225, 243, 236, 0.18);
  background: rgba(4, 18, 17, 0.78);
}

.home-date-line {
  font-weight: 780;
}

.home-time-row strong {
  font-weight: 720;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.34);
}

.home-today-card {
  border-left: 4px solid var(--saffron);
  border-radius: 8px;
}

.home-card-head a,
.home-section-cue,
.scroll-cue {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}

.home-widget {
  position: relative;
  border-radius: 8px;
  border-top-width: 3px;
}

.home-widget.urgent {
  border-top-color: var(--coral);
}

.home-widget.urgent strong {
  color: #ff9e99;
}

.home-widget.calendar-carousel {
  border-top-color: var(--saffron);
}

.home-widget-grid > .home-widget:nth-child(3) {
  border-top-color: var(--cyan);
}

.home-widget.wide {
  border-top-color: #78b99c;
}

.calendar-carousel-slide > strong,
.home-widget:not(.urgent) > strong {
  color: #f4ca67;
}

.home-mini-list a:last-child {
  border-bottom: 0;
}

.home-search {
  border-radius: 8px;
  background: rgba(7, 25, 24, 0.76);
}

.bubble-link {
  border-color: color-mix(in srgb, var(--bubble) 72%, rgba(255, 255, 255, 0.65));
  background: color-mix(in srgb, var(--bubble) 72%, rgba(13, 34, 34, 0.34));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.bubble-link:hover {
  border-color: color-mix(in srgb, var(--bubble) 58%, #fff);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24), 0 0 0 2px color-mix(in srgb, var(--bubble) 24%, transparent);
}

.home-login-screen {
  width: min(1360px, 100%);
}

.second-bubble-hub,
.login-glass {
  border-top: 3px solid var(--saffron);
}

.second-category-row {
  border-top-color: rgba(255, 255, 255, 0.14);
}

.second-category-row h3 {
  color: #efc766;
  font-family: "Iowan Old Style", "Noto Serif SC", "Songti SC", serif;
}

.second-bubble-link.manage-bubble {
  border-color: var(--saffron);
  background: rgba(128, 91, 25, 0.66);
}

.home-file-section,
.home-journal-section {
  position: relative;
}

.home-file-section::before,
.home-journal-section::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.home-file-section::before {
  background: linear-gradient(90deg, rgba(5, 27, 29, 0.78), rgba(5, 20, 20, 0.26) 62%, rgba(5, 17, 17, 0.58));
}

.home-journal-section::before {
  background: linear-gradient(90deg, rgba(25, 18, 14, 0.74), rgba(8, 20, 19, 0.24) 58%, rgba(4, 16, 15, 0.66));
}

.home-file-section > *,
.home-journal-section > * {
  position: relative;
  z-index: 1;
}

.home-file-copy .home-kicker {
  color: #7dd4dc;
}

.home-journal-copy .home-kicker {
  color: #efc766;
}

.home-file-copy h2 {
  color: #73d2dc;
}

.home-journal-copy h2 {
  color: #f0c868;
}

.home-file-panel,
.home-journal-panel {
  border-radius: 8px;
}

.home-file-panel {
  border-top: 4px solid var(--cyan);
}

.home-journal-panel {
  border-top: 4px solid var(--saffron);
}

.workspace-page {
  background:
    linear-gradient(135deg, rgba(5, 24, 22, 0.95), rgba(11, 34, 30, 0.84) 52%, rgba(5, 18, 18, 0.96)),
    var(--workspace-bg) center / cover fixed no-repeat;
}

.workspace-page::before {
  background: linear-gradient(180deg, rgba(94, 194, 184, 0.05), transparent 32%, rgba(0, 0, 0, 0.12));
}

.workspace-kicker,
.quick-capture > svg,
.workspace-panel-head > a,
.storage-brief strong {
  color: #efc766;
}

.glass-button,
.quick-capture,
.workspace-panel {
  border-radius: 7px;
  background: rgba(7, 29, 26, 0.82);
  backdrop-filter: blur(14px) saturate(108%);
}

.quick-capture {
  border-color: rgba(120, 196, 180, 0.34);
  border-left: 4px solid var(--saffron);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.quick-capture button {
  border-radius: 6px;
  background: var(--saffron);
}

.workspace-panel {
  border-color: rgba(200, 231, 220, 0.16);
  border-top: 3px solid var(--cyan);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.workspace-panel:nth-child(1),
.workspace-panel:nth-child(5) {
  border-top-color: var(--saffron);
}

.workspace-panel:nth-child(2),
.workspace-panel:nth-child(6) {
  border-top-color: var(--cyan);
}

.workspace-panel:nth-child(3) {
  border-top-color: #7cb99a;
}

.workspace-panel:nth-child(4) {
  border-top-color: var(--plum);
}

.workspace-task-stack .task-item {
  border-radius: 5px;
  background: rgba(3, 16, 15, 0.48);
}

.mini-day.today {
  background: var(--saffron);
}

.mini-day.has-task:not(.today) {
  box-shadow: inset 0 -3px 0 var(--cyan);
}

.topbar h1,
.library-header h1,
.file-library-head h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Noto Serif SC", "Songti SC", STSong, serif;
}

.library-stats {
  border-top: 3px solid var(--primary);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.library-stats > div:nth-child(2) strong {
  color: var(--primary);
}

.library-stats > div:nth-child(3) strong {
  color: var(--accent);
}

.library-status-tabs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.library-toolbar,
.file-toolbar {
  border-left: 3px solid var(--cyan);
  padding-left: 10px;
}

.journal-card,
.file-card,
.storage-card,
.upload-drop-card,
.form-card,
.panel,
.empty-panel {
  border-radius: 6px;
  box-shadow: none;
}

.journal-card {
  border-top: 3px solid var(--saffron);
}

.journal-card:nth-child(3n + 2) {
  border-top-color: var(--cyan);
}

.journal-card:nth-child(3n) {
  border-top-color: var(--plum);
}

.journal-card h2,
.reader-heading h1 {
  font-family: "Iowan Old Style", "Noto Serif SC", "Songti SC", serif;
}

.journal-cover.placeholder,
.public-post-cover.is-placeholder {
  background: var(--primary);
  color: #f6d676;
}

.journal-card:nth-child(3n + 2) .journal-cover.placeholder,
.public-post-card:nth-child(3n + 2) .public-post-cover.is-placeholder {
  background: #955e51;
}

.journal-card:nth-child(3n) .journal-cover.placeholder,
.public-post-card:nth-child(3n) .public-post-cover.is-placeholder {
  background: #5d557a;
}

.storage-card {
  border-top: 4px solid var(--cyan);
}

.upload-drop-card {
  border-top: 4px solid var(--saffron);
  background: color-mix(in srgb, var(--saffron) 7%, var(--surface));
}

.file-card {
  border-left: 4px solid var(--cyan);
}

.file-card-icon {
  border-radius: 5px;
  background: color-mix(in srgb, var(--cyan) 14%, var(--surface-2));
  color: color-mix(in srgb, var(--primary-dark) 70%, var(--cyan));
}

.folder-filter {
  border-radius: 5px;
}

.folder-filter.active {
  border-color: var(--primary);
  box-shadow: inset 3px 0 0 var(--saffron);
}

body.is-public {
  background: var(--bg);
}

.public-header {
  border-top: 4px solid var(--saffron);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.public-brand {
  color: var(--primary-dark);
  font-family: "Iowan Old Style", "Palatino Linotype", "Noto Serif SC", "Songti SC", serif;
  font-weight: 900;
}

.public-brand,
.mini-author {
  min-height: 44px;
}

.public-journal-layout {
  width: min(1320px, calc(100% - 40px));
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(34px, 5vw, 72px);
}

.journal-author-rail {
  border-left: 3px solid var(--cyan);
  padding-left: 18px;
}

.author-rail-head h2 {
  font-family: "Iowan Old Style", "Noto Serif SC", "Songti SC", serif;
  font-size: 26px;
}

.journal-author-bubble {
  min-height: 70px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, var(--primary) 12%);
}

.journal-author-bubble:nth-child(3n + 2) {
  background: color-mix(in srgb, var(--surface) 88%, var(--saffron) 12%);
}

.journal-author-bubble:nth-child(3n) {
  background: color-mix(in srgb, var(--surface) 90%, var(--plum) 10%);
}

.author-id-search input,
.public-search input {
  min-height: 44px;
}

.author-id-search button,
.author-id-search a {
  width: 44px;
  height: 44px;
}

.journal-index-head {
  position: relative;
  border-bottom: 4px double var(--ink);
  padding-top: clamp(48px, 8vw, 92px);
}

.journal-index-head::before {
  position: absolute;
  right: 0;
  bottom: -4px;
  width: min(34%, 280px);
  height: 4px;
  background: var(--saffron);
  content: "";
}

.journal-index-head h1 {
  max-width: 9em;
  color: var(--ink);
  font-size: clamp(48px, 7vw, 88px);
  line-height: 0.96;
}

.journal-index-head > strong {
  color: var(--primary-dark);
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 56px;
}

.public-search {
  max-width: none;
  border-bottom-width: 2px;
}

.public-post-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.public-post-card {
  border-radius: 4px;
  box-shadow: 0 12px 32px rgba(17, 43, 38, 0.055);
}

.public-post-card:first-child {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  border-top: 5px solid var(--saffron);
}

.public-post-card:first-child .public-post-cover {
  width: 100%;
  min-width: 0;
  min-height: 360px;
  aspect-ratio: auto;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.public-post-card:first-child .public-post-copy {
  align-content: center;
  padding: clamp(24px, 4vw, 48px);
}

.public-post-card:first-child .public-post-copy h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.public-post-card:not(:first-child):nth-child(even) {
  border-top: 3px solid var(--cyan);
}

.public-post-card:not(:first-child):nth-child(odd) {
  border-top: 3px solid var(--plum);
}

.public-post-copy h2 {
  font-size: 24px;
}

.public-article-body,
.reader-body {
  font-family: "Iowan Old Style", "Noto Serif SC", "Songti SC", STSong, serif;
  font-size: 17px;
  line-height: 1.9;
}

.public-empty,
.empty-panel {
  border-style: solid;
  border-right: 0;
  border-left: 0;
  background: transparent;
}

@media (max-width: 980px) {
  .auth-shell {
    background: var(--bg);
  }

  .login-panel {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .login-copy {
    color: var(--ink);
  }

  .login-copy h1 {
    color: var(--ink);
  }

  .login-copy p {
    color: var(--muted);
  }

  .login-copy .button {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink);
  }

  .public-journal-layout {
    width: min(100% - 28px, 900px);
    grid-template-columns: 1fr;
    gap: 0;
  }

  .journal-author-rail {
    position: static;
    max-height: none;
    border-left: 0;
    border-bottom: 3px solid var(--cyan);
    padding: 28px 0 20px;
  }

  .journal-author-list {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .journal-author-bubble {
    min-width: 210px;
  }

  .public-post-card:first-child {
    grid-template-columns: 1fr;
  }

  .public-post-card:first-child .public-post-cover {
    min-height: 280px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .auth-shell {
    padding: 18px;
  }

  .login-copy h1 {
    max-width: 10em;
    font-size: 42px;
  }

  .glass-panel,
  .home-widget,
  .home-search,
  .login-glass,
  .home-today-card {
    border-radius: 8px;
  }

  .home-widget-grid.has-calendar > .home-widget:not(.wide) {
    border-top-width: 3px;
  }

  .home-file-copy h2,
  .home-journal-copy h2 {
    font-size: clamp(48px, 16vw, 68px);
  }

  .workspace-page {
    margin: -24px -18px;
    padding: 28px 18px 100px;
  }

  .public-header {
    border-top-width: 3px;
  }

  .journal-index-head {
    padding-top: 36px;
  }

  .journal-index-head h1 {
    font-size: clamp(42px, 15vw, 64px);
  }

  .public-post-grid {
    grid-template-columns: 1fr;
  }

  .public-post-card:first-child {
    grid-column: auto;
  }

  .public-post-card:first-child .public-post-cover {
    min-height: 220px;
  }

  .public-post-card:first-child .public-post-copy {
    padding: 20px;
  }

  .public-post-card:first-child .public-post-copy h2 {
    font-size: 30px;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-chip,
  .glass-icon,
  .glass-panel,
  .home-widget,
  .home-search,
  .login-glass,
  .quick-capture,
  .workspace-panel {
    background: #102b29;
  }

  .sidebar,
  .mobile-nav,
  .public-header {
    background: var(--surface);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .glass-chip,
  .glass-icon,
  .glass-panel,
  .home-widget,
  .home-search,
  .login-glass,
  .quick-capture,
  .workspace-panel {
    background: #102b29;
    backdrop-filter: none;
  }

  .sidebar,
  .mobile-nav,
  .public-header {
    background: var(--surface);
    backdrop-filter: none;
  }
}

/* Keep the filing record at the actual bottom of the final home screen. */
#journal-section > .home-icp-footer {
  position: absolute;
  right: auto;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
}

/* WorkSpace shell */
.sidebar {
  width: 252px;
  gap: 14px;
  border-right-color: color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  padding: 18px 14px 14px;
  box-shadow: 8px 0 34px rgba(26, 37, 35, 0.035);
}

.workspace-brand {
  min-height: 48px;
  padding: 0 8px 10px;
}

.workspace-brand-symbol {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
}

.workspace-brand-symbol svg {
  width: 20px;
  height: 20px;
}

.workspace-brand-copy {
  min-width: 0;
}

.workspace-brand-copy strong {
  font-size: 17px;
  line-height: 1.15;
}

.workspace-brand-copy small {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  margin-top: 5px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-brand-copy small i {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #c78738;
  box-shadow: 0 0 0 3px rgba(199, 135, 56, 0.13);
}

.side-nav {
  display: block;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 4px 6px 0;
  scrollbar-color: color-mix(in srgb, var(--muted) 25%, transparent) transparent;
  scrollbar-width: thin;
}

.side-nav-group {
  display: grid;
  gap: 3px;
  margin-bottom: 15px;
}

.side-nav-group:last-child {
  margin-bottom: 0;
}

.side-nav-label {
  padding: 0 10px 5px;
  color: color-mix(in srgb, var(--muted) 85%, transparent);
  font-size: 10px;
  font-weight: 800;
}

.side-nav a {
  position: relative;
  min-height: 38px;
  gap: 11px;
  border-radius: 7px;
  padding: 9px 10px;
  color: color-mix(in srgb, var(--ink) 86%, var(--muted));
  font-size: 13px;
  font-weight: 650;
}

.side-nav a::before {
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
  content: "";
}

.side-nav a:hover {
  background: color-mix(in srgb, var(--surface-2) 76%, transparent);
}

.side-nav a.active {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface-2));
  color: color-mix(in srgb, var(--accent) 76%, var(--ink));
}

.side-nav a.active::before {
  background: var(--accent);
}

.side-nav a.active svg {
  stroke-width: 2.4;
}

.side-nav a > span {
  min-width: 0;
  flex: 1;
}

.side-nav a > em {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 4px;
  color: var(--accent);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  padding: 2px 4px;
}

.sidebar-utilities {
  display: grid;
  gap: 10px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.sidebar .side-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.sidebar .side-actions .icon-button {
  width: 100%;
  min-width: 0;
  height: 34px;
  border-radius: 6px;
}

.sidebar-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 6px;
}

.sidebar-account-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  border-radius: 7px;
  padding: 6px;
}

.sidebar-account-main:hover {
  background: var(--surface-2);
}

.sidebar-account-main > span:first-child {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--blue) 32%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.sidebar-account-main > span:last-child,
.sidebar-account-main b,
.sidebar-account-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-main b {
  font-size: 12px;
}

.sidebar-account-main small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.sidebar-account .logout-form {
  margin: 0;
}

.sidebar-account .logout-form button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 6px;
  padding: 0;
}

.app-shell {
  margin-left: 252px;
}

/* Blog audience */
.editor-settings .editor-setting-grid {
  grid-template-columns: 1fr;
}

.audience-picker {
  display: grid;
  gap: 7px;
  margin: 0;
  border: 0;
  padding: 0;
}

.audience-picker legend {
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.audience-option {
  position: relative;
  display: grid;
  min-height: 54px;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  padding: 8px 10px;
}

.audience-option:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.audience-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  box-shadow: inset 3px 0 var(--accent);
}

.audience-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.audience-option > svg {
  width: 18px;
  height: 18px;
  justify-self: center;
  color: var(--muted);
}

.audience-option:has(input:checked) > svg {
  color: var(--accent);
}

.audience-option b,
.audience-option small {
  display: block;
}

.audience-option b {
  font-size: 12px;
}

.audience-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.pill.audience,
.public-audience {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pill.audience svg,
.public-audience svg {
  width: 12px;
  height: 12px;
}

.pill.audience.public {
  color: var(--muted);
}

.pill.audience.members,
.public-audience.members {
  border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
  color: var(--blue);
}

.pill.audience.superusers,
.public-audience.superusers {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  color: var(--accent);
}

.public-audience {
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.public-post-meta .public-audience::before {
  display: none;
}

.home-journal-meta .public-audience {
  margin-left: auto;
}

/* API token settings */
.api-topbar {
  align-items: center;
}

.api-secret-banner {
  display: grid;
  grid-template-columns: minmax(200px, 0.7fr) minmax(260px, 1.4fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  padding: 16px;
}

.api-secret-banner > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.api-secret-banner > div > svg {
  width: 22px;
  color: var(--accent);
}

.api-secret-banner b,
.api-secret-banner small {
  display: block;
}

.api-secret-banner small {
  margin-top: 3px;
  color: var(--muted);
}

.api-secret-banner code,
.api-endpoint-reference code,
.api-token-main code {
  overflow: hidden;
  color: var(--ink);
  font-family: Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-settings-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(420px, 1.28fr);
  gap: 38px;
  align-items: start;
}

.api-token-create,
.api-token-library,
.api-endpoint-reference {
  min-width: 0;
}

.api-token-form {
  display: grid;
  gap: 16px;
  margin: 0;
}

.api-scope-picker {
  display: grid;
  gap: 7px;
  margin: 0;
  border: 0;
  padding: 0;
}

.api-scope-picker legend {
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 800;
}

.api-scope-picker > label {
  display: grid;
  min-height: 58px;
  grid-template-columns: 18px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  padding: 9px 11px;
}

.api-scope-picker > label:has(input:checked) {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  background: color-mix(in srgb, var(--blue) 7%, var(--surface));
}

.api-scope-picker b,
.api-scope-picker small {
  display: block;
}

.api-scope-picker small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.api-scope-picker svg {
  width: 19px;
  color: var(--muted);
}

.api-token-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.api-token-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(120px, auto) 36px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 2px;
}

.api-token-row.inactive {
  opacity: 0.56;
}

.api-token-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 7px;
  background: color-mix(in srgb, var(--blue) 9%, var(--surface-2));
  color: var(--blue);
}

.api-token-icon svg {
  width: 18px;
}

.api-token-main,
.api-token-meta {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.api-token-main strong {
  font-size: 13px;
}

.api-token-main code,
.api-token-meta,
.api-token-meta small {
  color: var(--muted);
  font-size: 10px;
}

.api-token-scopes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.api-token-scopes em {
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  padding: 2px 4px;
}

.api-token-meta {
  text-align: right;
}

.api-endpoint-reference {
  margin-top: 38px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

.api-endpoint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.api-endpoint-grid > div {
  display: grid;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  padding: 14px 10px;
}

.api-endpoint-grid > div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.api-endpoint-grid b {
  overflow-wrap: anywhere;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.api-endpoint-grid span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .api-settings-layout {
    grid-template-columns: 1fr;
  }

  .api-secret-banner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .api-secret-banner code {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 980px) {
  .app-shell {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .editor-save-state {
    display: none;
  }

  .api-secret-banner {
    grid-template-columns: 1fr;
  }

  .api-secret-banner code,
  .api-secret-banner .button {
    grid-column: auto;
    grid-row: auto;
  }

  .api-token-row {
    grid-template-columns: 36px minmax(0, 1fr) 34px;
  }

  .api-token-meta {
    grid-column: 2;
    text-align: left;
  }

  .api-token-row > form {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .api-endpoint-grid {
    grid-template-columns: 1fr;
  }

  .api-endpoint-grid > div:nth-child(odd) {
    border-right: 0;
  }
}

.journal-index-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding: clamp(46px, 8vw, 96px) 0 34px;
}

.section-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.journal-index-head h1 {
  margin: 9px 0 12px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1;
}

.journal-index-head p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.journal-index-head > strong {
  display: grid;
  color: var(--primary-dark);
  font-size: 46px;
  line-height: 1;
  text-align: right;
}

.journal-index-head > strong small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.public-search {
  display: grid;
  max-width: 720px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin: 26px 0;
  border-bottom: 1px solid var(--ink);
  padding: 0 2px 10px;
}

.public-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.public-search button,
.public-search a {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.public-search svg {
  width: 18px;
  height: 18px;
}

.public-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 70px;
}

.public-post-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.public-post-cover {
  display: grid;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background: #3f6868;
}

.public-post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.public-post-card:hover .public-post-cover img {
  transform: scale(1.025);
}

.public-post-cover.is-placeholder span {
  color: rgba(255, 255, 255, 0.9);
  font-family: Georgia, "Microsoft YaHei", serif;
  font-size: 64px;
  font-weight: 900;
}

.public-post-card:nth-child(3n + 2) .public-post-cover.is-placeholder {
  background: #8b694a;
}

.public-post-card:nth-child(3n) .public-post-cover.is-placeholder {
  background: #526388;
}

.public-post-copy {
  display: grid;
  align-content: start;
  padding: 17px;
}

.public-post-meta,
.public-post-foot,
.public-post-counts,
.mini-author {
  display: flex;
  align-items: center;
}

.public-post-meta {
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.public-post-meta span::before {
  content: "·";
  margin-right: 10px;
}

.public-post-copy h2 {
  margin: 12px 0 8px;
  font-size: 21px;
  line-height: 1.35;
}

.public-post-copy > p {
  display: -webkit-box;
  min-height: 70px;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.public-post-foot {
  justify-content: space-between;
  gap: 12px;
  margin-top: 17px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.mini-author {
  min-width: 0;
  gap: 8px;
  font-size: 12px;
}

.mini-author > img,
.mini-author > span {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  object-fit: cover;
  font-weight: 900;
}

.public-post-counts {
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.public-post-counts svg {
  width: 14px;
  height: 14px;
  margin-left: 5px;
}

.owner-mark {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #ee6ca7, #e3a83d);
  color: #fff;
  padding: 3px;
  vertical-align: middle;
}

.owner-mark.large {
  width: 21px;
  height: 21px;
}

.public-empty {
  display: grid;
  grid-column: 1 / -1;
  min-height: 300px;
  place-items: center;
  align-content: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.public-empty.compact {
  min-height: 220px;
}

.public-empty svg {
  width: 38px;
  height: 38px;
}

.public-empty h2,
.public-empty p {
  margin: 0;
}

.public-empty h2 {
  color: var(--ink);
}

.public-pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  margin: -38px 0 56px;
}

.public-pagination a {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Public article */
.public-article-head {
  position: relative;
  display: grid;
  min-height: 410px;
  overflow: hidden;
  place-items: end start;
  background: #284c4c;
  color: #fff;
  padding: clamp(32px, 6vw, 82px) max(24px, calc((100vw - 1120px) / 2));
}

.public-article-head > img,
.public-article-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.public-article-head > img {
  object-fit: cover;
}

.public-article-shade {
  background: linear-gradient(90deg, rgba(10, 17, 20, 0.92), rgba(10, 17, 20, 0.52) 68%, rgba(10, 17, 20, 0.28));
}

.public-article-heading,
.public-article-actions {
  position: relative;
  z-index: 1;
}

.public-article-heading {
  width: min(850px, 100%);
}

.article-author {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.article-author > span:last-child,
.article-author b,
.article-author small {
  display: block;
}

.article-author b {
  display: flex;
  gap: 5px;
  align-items: center;
}

.article-author small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.public-article-meta {
  display: flex;
  gap: 18px;
  margin-top: 26px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.public-article-heading h1 {
  margin: 14px 0 12px;
  font-family: Georgia, "Microsoft YaHei", serif;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.08;
}

.public-article-heading > p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.7;
}

.article-tag-line {
  margin-top: 16px;
  color: #f3d779;
  font-size: 12px;
  font-weight: 800;
}

.public-article-actions {
  position: absolute;
  inset: 22px 24px auto auto;
  display: flex;
  gap: 7px;
}

.public-article-actions a {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(8, 14, 18, 0.28);
  backdrop-filter: blur(12px);
}

.public-reader-layout {
  display: grid;
  width: min(1120px, calc(100% - 32px));
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(28px, 6vw, 74px);
  align-items: start;
  margin: 38px auto 80px;
}

.public-reader-toc {
  position: sticky;
  top: 92px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.public-reader-toc > b {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
}

.public-reader-toc ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 16px;
}

.public-reader-main,
.public-reader-body {
  min-width: 0;
}

.public-reader-body {
  border: 0;
  background: transparent;
  padding: 0;
}

.article-reactions {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin: 52px 0 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.article-reactions > div:first-child {
  display: grid;
  gap: 5px;
}

.reaction-error {
  color: var(--danger);
}

.reaction-picker {
  position: relative;
  flex: 0 0 auto;
}

.reaction-trigger {
  display: flex;
  min-width: 116px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.reaction-trigger svg,
.reaction-trigger > span {
  width: 19px;
  height: 19px;
  font-size: 18px;
}

.reaction-trigger svg:last-child {
  width: 14px;
}

.reaction-menu {
  position: absolute;
  inset: auto 0 calc(100% + 9px) auto;
  z-index: 15;
  display: flex;
  visibility: hidden;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  opacity: 0;
  background: var(--surface);
  padding: 7px;
  box-shadow: var(--shadow);
  transform: translateY(5px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.reaction-picker:hover .reaction-menu,
.reaction-picker:focus-within .reaction-menu,
.reaction-picker.is-open .reaction-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.reaction-option {
  display: grid;
  width: 58px;
  min-height: 66px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 5px;
}

.reaction-option:hover,
.reaction-option.is-selected {
  border-color: var(--line);
  background: var(--surface-2);
}

.reaction-option span {
  font-size: 23px;
}

.reaction-option b,
.reaction-option small {
  font-size: 10px;
  line-height: 1;
}

.reaction-option small {
  color: var(--muted);
}

.article-author-band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.article-author-band h2,
.article-author-band p {
  margin: 4px 0 0;
}

.article-author-band h2 {
  font-size: 19px;
}

.article-author-band p {
  color: var(--muted);
  line-height: 1.55;
}

.profile-avatar {
  display: grid;
  overflow: hidden;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar.small {
  width: 42px;
  height: 42px;
  font-size: 15px;
}

.profile-avatar.medium {
  width: 62px;
  height: 62px;
  font-size: 22px;
}

.profile-avatar.large {
  width: 132px;
  height: 132px;
  font-size: 42px;
}

/* Social profile */
.social-profile {
  width: min(980px, 100%);
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--surface);
}

.profile-masthead {
  border-bottom: 1px solid var(--line);
}

.profile-cover {
  position: relative;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  background: #3d6567;
}

.profile-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-summary {
  position: relative;
  padding: 74px 24px 22px;
}

.profile-summary > .profile-avatar {
  position: absolute;
  top: -68px;
  left: 24px;
  border: 5px solid var(--surface);
}

.profile-actions {
  position: absolute;
  inset: 14px 24px auto auto;
}

.profile-identity h1 {
  margin: 0;
  font-size: 29px;
}

.profile-id-line,
.profile-facts,
.profile-stats,
.feed-author-line,
.feed-metrics {
  display: flex;
  align-items: center;
}

.profile-id-line {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.account-level {
  border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  color: var(--primary-dark);
  padding: 3px 7px;
  font-size: 10px;
}

.profile-identity > p {
  max-width: 680px;
  margin: 16px 0 12px;
  line-height: 1.65;
}

.profile-identity > p.muted {
  color: var(--muted);
}

.profile-facts {
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.profile-facts span,
.profile-facts a {
  display: flex;
  gap: 5px;
  align-items: center;
}

.profile-facts svg {
  width: 15px;
  height: 15px;
}

.profile-facts a {
  color: var(--blue);
}

.profile-stats {
  gap: 24px;
  margin: 18px 0 0;
}

.profile-stats > div {
  display: flex;
  gap: 5px;
  align-items: baseline;
}

.profile-stats dt {
  font-weight: 900;
}

.profile-stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}

.profile-tabs span {
  position: relative;
  min-width: 130px;
  padding: 15px 20px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.profile-tabs span::after {
  position: absolute;
  right: 28px;
  bottom: 0;
  left: 28px;
  height: 3px;
  border-radius: 3px;
  background: var(--primary);
  content: "";
}

.profile-feed {
  display: grid;
}

.profile-feed-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 20px 24px;
}

.feed-author-line {
  min-width: 0;
  gap: 5px;
  font-size: 13px;
}

.feed-author-line > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-post-link h2 {
  margin: 9px 0 6px;
  font-size: 21px;
}

.feed-post-link p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.feed-post-link > img {
  width: min(620px, 100%);
  aspect-ratio: 16 / 8;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
}

.feed-metrics {
  gap: clamp(24px, 8vw, 80px);
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
}

.feed-metrics span {
  display: flex;
  gap: 6px;
  align-items: center;
}

.feed-metrics svg {
  width: 16px;
  height: 16px;
}

/* Profile editor */
.profile-editor-page {
  max-width: 980px;
}

.page-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.page-heading-row h1 {
  margin: 6px 0;
}

.page-heading-row p {
  margin: 0;
  color: var(--muted);
}

.profile-editor-form {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.profile-visual-editor {
  position: relative;
  padding-bottom: 68px;
}

.profile-visual-editor > .profile-avatar {
  position: absolute;
  bottom: 0;
  left: 24px;
  border: 5px solid var(--surface);
}

.image-edit-button,
.avatar-edit-button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  background: rgba(8, 15, 20, 0.66);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.image-edit-button {
  right: 16px;
  bottom: 16px;
  padding: 9px 12px;
  font-size: 12px;
}

.avatar-edit-button {
  right: 7px;
  bottom: 7px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.image-edit-button svg,
.avatar-edit-button svg {
  width: 17px;
  height: 17px;
}

.native-file-fields {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
}

.profile-fields > label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-fields > label.full {
  grid-column: 1 / -1;
}

.profile-fields input,
.profile-fields textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  background: var(--bg);
  color: var(--ink);
  padding: 11px 12px;
}

.profile-fields input:focus,
.profile-fields textarea:focus {
  border-color: var(--primary);
}

.profile-fields small {
  color: var(--muted);
  font-weight: 400;
}

.handle-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding-left: 12px;
}

.handle-input input {
  border: 0;
  background: transparent;
}

.profile-form-actions {
  border-top: 1px solid var(--line);
  padding: 16px 24px;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .public-journal-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .journal-author-rail {
    position: static;
    max-height: none;
    gap: 13px;
    padding-top: 32px;
  }

  .journal-author-list {
    display: flex;
    overflow-x: auto;
    padding: 2px 3px 12px;
    scrollbar-width: none;
  }

  .journal-author-list::-webkit-scrollbar {
    display: none;
  }

  .journal-author-bubble {
    min-width: 210px;
    flex: 0 0 210px;
  }

  .public-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-reader-layout {
    grid-template-columns: 1fr;
  }

  .public-reader-toc {
    position: static;
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
  }

  .mobile-nav {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 720px) {
  .public-header {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 8px 12px;
  }

  .public-header nav {
    display: none;
  }

  .public-brand {
    font-size: 14px;
  }

  .public-journal-layout {
    width: min(100% - 24px, 1180px);
  }

  .public-journal-layout .public-journal-index {
    width: 100%;
  }

  .journal-author-rail {
    padding-top: 24px;
  }

  .author-rail-head p {
    display: none;
  }

  .journal-author-bubble {
    min-width: 188px;
    min-height: 66px;
    flex-basis: 188px;
  }

  .journal-index-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 42px 0 24px;
  }

  .journal-index-head > strong {
    display: flex;
    gap: 8px;
    align-items: baseline;
    font-size: 30px;
    text-align: left;
  }

  .public-post-grid {
    grid-template-columns: 1fr;
  }

  .public-article-head {
    min-height: 430px;
    padding: 82px 20px 28px;
  }

  .public-article-heading h1 {
    font-size: 36px;
  }

  .public-article-actions {
    inset: 16px 16px auto auto;
  }

  .public-reader-layout {
    width: min(100% - 28px, 1120px);
    margin-top: 24px;
  }

  .article-reactions {
    align-items: start;
  }

  .reaction-menu {
    position: fixed;
    inset: auto 10px 14px;
    justify-content: center;
  }

  .reaction-option {
    width: calc((100vw - 64px) / 5);
    max-width: 64px;
  }

  .article-author-band {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .article-author-band > .button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .social-profile {
    border: 0;
  }

  .profile-summary {
    padding: 62px 16px 20px;
  }

  .profile-summary > .profile-avatar {
    top: -52px;
    left: 16px;
  }

  .profile-avatar.large {
    width: 104px;
    height: 104px;
  }

  .profile-actions {
    inset: 12px 16px auto auto;
  }

  .profile-feed-item {
    padding: 17px 14px;
  }

  .feed-metrics {
    justify-content: space-between;
    gap: 8px;
  }

  .profile-editor-page {
    width: 100%;
  }

  .profile-fields {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .profile-fields > label.full {
    grid-column: auto;
  }
}

/* UI/UX Pro Max refinement: clearer hierarchy, touch safety and short-screen fit. */
.glass-chip,
.glass-icon,
.glass-panel,
.home-widget,
.home-search,
.login-glass {
  border-color: rgba(255, 255, 255, 0.24);
  background: linear-gradient(145deg, rgba(26, 39, 57, 0.54), rgba(22, 32, 47, 0.30));
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(20px) saturate(135%);
}

[data-theme="dark"] .glass-chip,
[data-theme="dark"] .glass-icon,
[data-theme="dark"] .glass-panel,
[data-theme="dark"] .home-widget,
[data-theme="dark"] .home-search,
[data-theme="dark"] .login-glass {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(145deg, rgba(9, 18, 29, 0.72), rgba(7, 14, 23, 0.42));
}

.glass-chip:hover,
.glass-icon:hover,
.home-card-head a:hover,
.home-section-cue:hover,
.scroll-cue:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background-color: rgba(255, 255, 255, 0.18);
}

.home-page {
  min-height: 400dvh;
  background:
    linear-gradient(180deg, rgba(5, 12, 21, 0.10), rgba(5, 12, 21, 0.34) 46%, rgba(4, 9, 17, 0.88) 100%),
    var(--home-bg) center top / cover fixed no-repeat;
  overscroll-behavior-y: contain;
}

.home-stage,
.home-login-section,
.home-file-section,
.home-journal-section {
  min-height: 100dvh;
}

.home-top {
  inset: 20px 24px auto;
}

.home-right-actions,
.home-left-actions {
  gap: 8px;
}

.home-time-row strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.home-date-line,
.home-card-head,
.home-widget > span,
.calendar-carousel-slide > span {
  text-wrap: balance;
}

.home-widget {
  overflow: hidden;
}

.home-widget > span,
.home-widget > small,
.calendar-carousel-slide > span,
.calendar-carousel-slide > small {
  font-size: 12px;
  line-height: 1.35;
}

.calendar-carousel-slide {
  padding-inline: 16px;
}

.calendar-carousel-slide > small {
  text-overflow: clip;
}

.home-search {
  min-height: 56px;
}

.home-search input {
  min-height: 32px;
}

.scroll-cue,
.home-section-cue {
  min-width: 44px;
  min-height: 44px;
}

.scroll-cue {
  display: grid;
  place-items: center;
}

.bubble-link {
  transition: border-color 220ms ease, box-shadow 220ms ease, filter 220ms ease, transform 220ms var(--ease-out);
}

.bubble-link:hover {
  filter: brightness(1.08) saturate(1.06);
  transform: translateY(-2px);
}

.workspace-page {
  background:
    linear-gradient(135deg, rgba(7, 16, 26, 0.90), rgba(14, 29, 37, 0.72) 48%, rgba(6, 13, 22, 0.92)),
    var(--workspace-bg) center / cover fixed no-repeat;
}

.workspace-page::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 34%, rgba(0, 0, 0, 0.08));
}

.workspace-header h1 {
  letter-spacing: 0;
  text-wrap: balance;
}

.workspace-panel {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(12, 24, 33, 0.55);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(120%);
}

.workspace-panel:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.quick-capture {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(11, 23, 34, 0.58);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.quick-capture button {
  width: 44px;
  height: 44px;
}

.workspace-panel-head > a,
.workspace-list a,
.locked-workspace {
  min-height: 44px;
}

.workspace-panel-head > a {
  display: inline-flex;
  align-items: center;
}

.workspace-list a {
  align-items: center;
}

.workspace-link-row a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding-inline: 13px;
}

.app-shell {
  max-width: 1760px;
  min-height: 100vh;
  margin-left: 252px;
  padding: clamp(24px, 2.6vw, 40px);
}

.topbar,
.library-header,
.file-library-head,
.folder-filter-row,
.file-toolbar,
.file-card-grid,
.form-card,
.detail-grid,
.content-list,
.quick-grid,
.task-stack,
.calendar-workspace {
  max-width: 1320px;
}

.file-card-grid,
.detail-grid {
  max-width: 1180px;
}

.storage-card,
.upload-drop-card,
.journal-card,
.file-card,
.form-card,
.panel,
.empty-panel {
  box-shadow: 0 10px 30px rgba(27, 42, 37, 0.055);
}

.journal-card,
.file-card,
.storage-card,
.upload-drop-card,
.form-card,
.panel {
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out);
}

.journal-card:hover,
.file-card:hover,
.upload-drop-card:hover {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  box-shadow: 0 16px 38px rgba(27, 42, 37, 0.09);
  transform: translateY(-2px);
}

.field input:not([type="checkbox"]):not([type="color"]),
.field select,
.field textarea,
.search-box input,
.studio-toolbar select,
.profile-fields input,
.profile-fields textarea,
.home-login-form input,
.task-filters input,
.task-filters select {
  min-height: 44px;
}

.search-box:focus-within,
.handle-input:focus-within {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 20%, transparent);
}

.search-box input:focus-visible,
.handle-input input:focus-visible,
.quick-capture input:focus-visible {
  outline: 0;
}

.public-header {
  backdrop-filter: blur(16px) saturate(120%);
}

.public-header nav a,
.public-login-link,
.public-search button,
.public-search a,
.public-pagination a,
.public-article-actions a {
  min-width: 44px;
  min-height: 44px;
}

.journal-author-bubble,
.home-author-bubble {
  transition: border-color var(--duration-fast) ease, background-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out);
}

.journal-author-bubble:active,
.home-author-bubble:active {
  transform: scale(0.98);
}

.mobile-nav {
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.mobile-nav a {
  min-height: 52px;
}

.messages {
  z-index: 100;
}

@media (min-width: 981px) and (max-height: 780px) {
  .home-stage {
    gap: 8px;
    padding: 70px clamp(24px, 4vw, 52px) 14px;
  }

  .home-left-column {
    gap: 12px;
    padding-top: clamp(32px, 7vh, 54px);
  }

  .home-widget-grid {
    padding-top: clamp(28px, 6vh, 48px);
  }

  .home-date-line {
    font-size: clamp(24px, 2.8vw, 38px);
  }

  .home-date-line #live-weekday {
    font-size: clamp(21px, 2.2vw, 30px);
  }

  .home-time-row strong {
    font-size: clamp(72px, 8vw, 112px);
  }

  .home-time-row strong.has-seconds {
    font-size: clamp(58px, 6.6vw, 94px);
  }

  .home-today-card {
    padding: 13px 16px;
  }

  .home-widget {
    min-height: 112px;
  }

  .home-widget.wide {
    min-height: 124px;
  }

  .calendar-carousel-slide > strong,
  .home-widget strong {
    font-size: 48px;
  }

  .home-dock {
    gap: 4px;
  }

  .home-search {
    min-height: 50px;
    padding-block: 8px;
  }

  .scroll-cue {
    min-height: 32px;
  }

  .bubble-link {
    min-height: 52px;
    padding-block: 7px;
  }
}

@media (max-width: 980px) {
  .app-shell {
    width: 100%;
    margin-left: 0;
    padding: 24px 18px calc(82px + env(safe-area-inset-bottom));
  }

  .app-shell + .site-icp-footer {
    margin-left: 0;
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .mobile-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .home-page {
    min-height: 400dvh;
    background-attachment: scroll;
  }
}

@media (max-width: 720px) {
  .home-icp-footer {
    right: 14px;
    bottom: max(12px, env(safe-area-inset-bottom));
    font-size: 11px;
  }

  .home-top {
    inset: max(12px, env(safe-area-inset-top)) 14px auto;
  }

  .home-stage {
    min-height: 100dvh;
    padding-top: calc(76px + env(safe-area-inset-top));
  }

  .home-time-row strong {
    font-size: clamp(58px, 20vw, 82px);
  }

  .home-time-row strong.has-seconds {
    font-size: clamp(42px, 12.5vw, 58px);
  }

  .home-date-line {
    gap: 10px;
  }

  .home-widget-grid {
    gap: 8px;
  }

  .home-widget,
  .home-today-card {
    border-radius: 16px;
  }

  .home-search {
    min-height: 52px;
  }

  .bubble-link {
    border-radius: 999px;
  }

  .library-header,
  .topbar,
  .workspace-header,
  .page-heading-row {
    align-items: stretch;
  }

  .library-header .action-row,
  .topbar .action-row {
    width: 100%;
  }

  .library-header .action-row .button,
  .topbar .action-row .button,
  .topbar .action-row form {
    flex: 1 1 auto;
  }

  .library-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .library-stats > div {
    padding: 12px 10px;
  }

  .library-stats .library-recent {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .file-card {
    padding: 14px;
  }

  .file-card-icon {
    width: 48px;
    height: 48px;
  }

  .file-card .item-actions {
    display: grid;
    grid-template-columns: repeat(3, 44px);
    justify-content: end;
  }

  .icon-button,
  .journal-card-foot a,
  .public-search button,
  .public-search a,
  .public-pagination a,
  .public-article-actions a {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  .home-page {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .bubble-link:hover,
  .journal-card:hover,
  .file-card:hover,
  .upload-drop-card:hover {
    transform: none;
  }
}

/* Final cascade calibration: keep UX safeguards while Taste remains visual owner. */
body.is-home {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.home-shell {
  height: 100%;
  min-height: 0;
}

.home-page {
  height: 100dvh;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
}

.sidebar {
  border-right-color: var(--line);
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  box-shadow: 10px 0 38px rgba(16, 42, 37, 0.045);
}

.workspace-brand-symbol {
  border-color: color-mix(in srgb, var(--saffron) 52%, var(--line));
  background: color-mix(in srgb, var(--saffron) 13%, var(--surface));
  color: var(--accent);
}

.side-nav a {
  min-height: 44px;
}

.side-nav a.active {
  background: color-mix(in srgb, var(--primary) 9%, var(--surface-2));
  color: var(--primary-dark);
}

.side-nav a.active::before {
  background: var(--saffron);
}

.glass-chip,
.glass-icon,
.glass-panel,
.home-widget,
.home-search,
.login-glass {
  border-color: rgba(225, 243, 236, 0.26);
  background: rgba(8, 28, 27, 0.68);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(118%);
}

.glass-panel,
.home-widget,
.home-search,
.login-glass {
  border-radius: 8px;
}

.glass-chip,
.glass-icon {
  border-radius: 999px;
}

[data-theme="dark"] .glass-chip,
[data-theme="dark"] .glass-icon,
[data-theme="dark"] .glass-panel,
[data-theme="dark"] .home-widget,
[data-theme="dark"] .home-search,
[data-theme="dark"] .login-glass {
  border-color: rgba(225, 243, 236, 0.18);
  background: rgba(4, 18, 17, 0.78);
}

.home-page {
  background:
    linear-gradient(180deg, rgba(6, 20, 20, 0.08), rgba(6, 20, 20, 0.40) 48%, rgba(5, 14, 14, 0.90) 100%),
    var(--home-bg) center top / cover fixed no-repeat;
}

[data-theme="dark"] .home-page {
  background:
    linear-gradient(180deg, rgba(2, 9, 9, 0.18), rgba(2, 13, 12, 0.58) 52%, rgba(2, 9, 9, 0.96) 100%),
    var(--home-bg) center top / cover fixed no-repeat;
}

.home-today-card {
  border-left: 1px solid rgba(225, 243, 236, 0.26);
  border-radius: 8px;
}

.home-widget,
.home-widget.urgent,
.home-widget.calendar-carousel,
.home-widget-grid > .home-widget:nth-child(3),
.home-widget.wide {
  border-top-width: 1px;
  border-top-color: rgba(225, 243, 236, 0.26);
  border-radius: 8px;
}

.home-search {
  border-color: rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(216, 230, 239, 0.24), rgba(10, 28, 30, 0.32));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(22px) saturate(132%);
}

[data-theme="dark"] .home-search {
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, rgba(112, 139, 151, 0.2), rgba(3, 17, 18, 0.48));
}

/* First screen only: deep glass with a dark, translucent core. */
#home-stage .home-today-card,
#home-stage .home-widget,
#home-stage .home-search {
  border: 1px solid rgba(239, 250, 252, 0.46);
  background: linear-gradient(
    145deg,
    rgba(231, 247, 250, 0.22) 0%,
    rgba(92, 126, 135, 0.12) 13%,
    rgba(5, 17, 23, 0.7) 38%,
    rgba(2, 10, 15, 0.78) 62%,
    rgba(10, 28, 33, 0.62) 84%,
    rgba(211, 238, 243, 0.14) 100%
  );
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 1px 0 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(197, 231, 237, 0.18),
    inset -1px 0 0 rgba(197, 231, 237, 0.1);
  -webkit-backdrop-filter: blur(24px) saturate(132%);
  backdrop-filter: blur(24px) saturate(132%);
}

#home-stage .home-today-card,
#home-stage .home-widget {
  border-radius: 8px;
}

#home-stage .home-search {
  border-radius: 999px;
}

#home-stage .bubble-link {
  border: 1px solid color-mix(in srgb, var(--bubble) 72%, rgba(255, 255, 255, 0.68));
  border-radius: 999px;
  background: color-mix(in srgb, var(--bubble) 72%, rgba(13, 34, 34, 0.34));
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 color-mix(in srgb, var(--bubble) 42%, rgba(255, 255, 255, 0.18));
  -webkit-backdrop-filter: blur(18px) saturate(122%);
  backdrop-filter: blur(18px) saturate(122%);
}

#home-stage .calendar-carousel-slide.is-active {
  background: transparent;
  box-shadow: none;
}

#home-stage .home-card-head a {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#home-stage .home-card-head a::before {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(239, 250, 252, 0.4);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(231, 247, 250, 0.2), rgba(4, 15, 21, 0.58));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 8px 20px rgba(0, 0, 0, 0.18);
  content: "";
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

#home-stage .home-card-head a svg {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
}

#home-stage .home-search:focus-within {
  border-color: rgba(240, 251, 253, 0.52);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.32),
    0 0 0 3px rgba(105, 198, 196, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

#home-stage .bubble-link:hover {
  border-color: color-mix(in srgb, var(--bubble) 58%, #fff);
  background: color-mix(in srgb, var(--bubble) 78%, rgba(15, 38, 38, 0.28));
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.24),
    0 0 0 2px color-mix(in srgb, var(--bubble) 24%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.workspace-page {
  background:
    linear-gradient(135deg, rgba(5, 24, 22, 0.95), rgba(11, 34, 30, 0.84) 52%, rgba(5, 18, 18, 0.96)),
    var(--workspace-bg) center / cover fixed no-repeat;
}

.workspace-page::before {
  background: linear-gradient(180deg, rgba(94, 194, 184, 0.05), transparent 32%, rgba(0, 0, 0, 0.12));
}

.glass-button,
.quick-capture,
.workspace-panel {
  border-radius: 7px;
  background: rgba(7, 29, 26, 0.82);
  backdrop-filter: blur(14px) saturate(108%);
}

.quick-capture {
  border-color: rgba(120, 196, 180, 0.34);
  border-left: 4px solid var(--saffron);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.workspace-panel {
  border-color: rgba(200, 231, 220, 0.16);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.journal-card,
.file-card,
.storage-card,
.upload-drop-card,
.form-card,
.panel,
.empty-panel {
  border-radius: 6px;
}

.journal-card,
.file-card,
.storage-card,
.upload-drop-card,
.form-card,
.panel {
  box-shadow: none;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-chip,
  .glass-icon,
  .glass-panel,
  .home-widget,
  .home-search,
  .login-glass,
  .quick-capture,
  .workspace-panel {
    background: #102b29;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .glass-chip,
  .glass-icon,
  .glass-panel,
  .home-widget,
  .home-search,
  .login-glass,
  .quick-capture,
  .workspace-panel {
    background: #102b29;
    backdrop-filter: none;
  }
}
