:root {
  --bg: #ece9e2;
  --surface: #fbfaf6;
  --surface-raised: #ffffff;
  --surface-soft: #f3f1eb;
  --sidebar: #172326;
  --sidebar-soft: #213236;
  --ink: #1d292c;
  --ink-soft: #5f6b6d;
  --ink-faint: #8b9494;
  --line: #d9d5cb;
  --line-strong: #c6c0b4;
  --accent: #0e8f7b;
  --accent-dark: #08695c;
  --accent-soft: #dff3ed;
  --accent-bright: #45d3b6;
  --orange: #d46e31;
  --orange-soft: #faeadf;
  --danger: #b7453d;
  --danger-soft: #f8e7e5;
  --masked: #6c7778;
  --shadow-sm: 0 1px 2px rgba(23, 35, 38, 0.06);
  --shadow-md: 0 18px 50px rgba(23, 35, 38, 0.16);
  --radius: 8px;
  --font-ui: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-code: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 760px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

code {
  font-family: var(--font-code);
}

.icon {
  display: block;
  flex: 0 0 auto;
}

.app-shell {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 246px;
  height: 100vh;
  padding: 24px 16px 18px;
  color: #e6eeec;
  background: var(--sidebar);
  border-right: 1px solid #0d1517;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 8px;
  margin-bottom: 28px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  color: var(--sidebar);
  background: var(--accent-bright);
  border-radius: 8px;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 800;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--sidebar);
  content: "";
  opacity: 0.28;
  transform: rotate(-36deg);
}

.brand-mark::before {
  top: 8px;
  right: -5px;
}

.brand-mark::after {
  bottom: 8px;
  left: -5px;
}

.brand-mark span {
  position: relative;
  z-index: 1;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  color: #8da1a1;
  font-size: 11px;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  color: #aebcba;
  border-radius: 7px;
  transition:
    color 140ms ease,
    background-color 140ms ease;
}

.main-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
}

.main-nav a.is-active {
  color: #ffffff;
  background: var(--sidebar-soft);
}

.main-nav a.is-active::before {
  position: absolute;
  left: 0;
  width: 3px;
  height: 22px;
  background: var(--accent-bright);
  border-radius: 0 3px 3px 0;
  content: "";
}

.nav-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
}

.nav-label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}

.nav-count {
  display: grid;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  place-items: center;
  color: var(--sidebar);
  background: var(--accent-bright);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 12px;
  margin-top: auto;
  color: #b6c4c2;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
}

.sidebar-note__icon {
  color: var(--accent-bright);
}

.sidebar-note__icon svg {
  width: 18px;
  height: 18px;
}

.sidebar-note div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.sidebar-note strong {
  color: #dce5e3;
  font-size: 11px;
}

.sidebar-note span {
  font-size: 10px;
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 10px 0;
  color: #7f9290;
  font-size: 10px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--accent-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(69, 211, 182, 0.12);
}

.status-dot.is-error {
  background: #ef756d;
  box-shadow: 0 0 0 3px rgba(239, 117, 109, 0.12);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 34px;
  background: rgba(251, 250, 246, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar-search {
  display: flex;
  width: min(470px, 45vw);
  height: 40px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: 7px;
  transition:
    border-color 140ms ease,
    background-color 140ms ease;
}

.topbar-search:focus-within {
  background: #ffffff;
  border-color: var(--accent);
}

.topbar-search.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.search-icon {
  color: var(--ink-faint);
}

.search-icon svg {
  width: 17px;
  height: 17px;
}

.topbar-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  outline: none;
}

.topbar-search input::placeholder {
  color: #949c9b;
}

.topbar-search kbd {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink-faint);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-code);
  font-size: 10px;
}

.search-clear {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink-soft);
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
}

.search-clear:hover {
  color: var(--ink);
  background: rgba(29, 41, 44, 0.08);
}

.topbar-search.has-value kbd {
  display: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.local-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  white-space: nowrap;
}

.main-content {
  width: min(100%, 1500px);
  padding: 34px 34px 64px;
  margin: 0 auto;
  outline: none;
}

.loading-state {
  display: grid;
  min-height: 60vh;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: var(--ink-soft);
}

.loading-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--surface);
  background: var(--sidebar);
  border-radius: 8px;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 800;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.page-heading__copy {
  min-width: 0;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-kicker .icon {
  width: 14px;
  height: 14px;
}

.page-heading h1 {
  font-family: Georgia, "Songti SC", serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
}

.page-heading p {
  max-width: 620px;
  margin-top: 8px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.page-heading__date {
  padding-bottom: 3px;
  color: var(--ink-faint);
  font-size: 12px;
  white-space: nowrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.summary-card {
  position: relative;
  display: flex;
  min-height: 124px;
  align-items: flex-start;
  gap: 15px;
  overflow: hidden;
  padding: 20px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.summary-card::after {
  position: absolute;
  right: -24px;
  bottom: -46px;
  width: 110px;
  height: 110px;
  border: 18px solid var(--surface-soft);
  border-radius: 50%;
  content: "";
}

.summary-icon {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 7px;
}

.summary-card--price .summary-icon {
  color: #9d4d1c;
  background: var(--orange-soft);
}

.summary-card--plans .summary-icon {
  color: var(--sidebar);
  background: #e5eaec;
}

.summary-card > div {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.summary-card > div > p {
  color: var(--ink-soft);
  font-size: 11px;
}

.summary-card > div > strong {
  overflow-wrap: anywhere;
  margin: 7px 0 5px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 28px;
  line-height: 1;
}

.summary-card > div > span:last-child {
  color: var(--ink-faint);
  font-size: 10px;
}

.summary-card--price > div {
  width: 100%;
}

.summary-price-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.summary-price-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.summary-price-item em {
  color: var(--ink-faint);
  font-size: 9px;
  font-style: normal;
}

.summary-price-item strong {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-price-item--sale strong {
  color: var(--orange);
}

.today-strip {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(280px, 1.8fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 94px;
  padding: 16px 20px;
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.today-strip__heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.today-strip__heading .section-kicker {
  margin: 0;
}

.today-strip__heading strong {
  font-size: 13px;
}

.today-strip__items {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.today-mini {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.today-mini > span:nth-child(2) {
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-mini small {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-check {
  width: 8px;
  height: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}

.today-empty {
  color: var(--ink-faint);
  font-size: 11px;
}

.accounts-section {
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
  margin-bottom: 12px;
}

.section-heading__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section-heading h2 {
  font-family: Georgia, "Songti SC", serif;
  font-size: 20px;
}

.section-heading__title span {
  color: var(--ink-faint);
  font-size: 11px;
}

.section-heading__tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.view-toggle {
  display: flex;
  height: 34px;
  gap: 2px;
  padding: 3px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.view-toggle button {
  display: grid;
  width: 27px;
  height: 26px;
  place-items: center;
  color: var(--ink-faint);
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
}

.view-toggle button.is-active {
  color: var(--ink);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.select-control {
  position: relative;
  display: flex;
  height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.select-control select {
  max-width: 150px;
  padding: 0 22px 0 0;
  background: transparent;
  border: 0;
  outline: none;
  cursor: pointer;
  font-size: 11px;
}

.account-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  align-items: start;
  gap: 14px;
}

.account-list--table {
  display: block;
}

.account-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.account-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.account-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 38px;
  padding: 0 9px;
  color: var(--ink-faint);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.account-table th:nth-child(1) { width: 56px; }
.account-table th:nth-child(2) { width: 100px; }
.account-table th:nth-child(3) { width: 112px; }
.account-table th:nth-child(4),
.account-table th:nth-child(5) { width: 105px; }
.account-table th:nth-child(6) { width: 156px; }
.account-table th:nth-child(7),
.account-table th:nth-child(8),
.account-table th:nth-child(9) { width: 70px; }
.account-table th:nth-child(10) { width: 104px; }
.account-table th:nth-child(11) { width: 118px; }

.account-table td {
  height: 58px;
  padding: 5px 9px;
  overflow: hidden;
  border-bottom: 1px solid #ebe7df;
  vertical-align: middle;
}

.account-table tbody tr:last-child td {
  border-bottom: 0;
}

.account-table tbody tr:hover td {
  background: #faf9f5;
}

.account-table tbody tr.is-shared td {
  background: #fffaf4;
}

.table-cover-button {
  display: block;
  width: 48px;
  height: 38px;
  overflow: hidden;
  padding: 0;
  background: var(--surface-soft);
  border-radius: 4px;
  cursor: pointer;
}

.table-account-cover {
  width: 48px;
  height: 38px;
  min-height: 0;
  border-radius: 4px;
}

.table-account-cover.account-cover--empty span {
  font-size: 17px;
}

.table-account-cover.account-cover--empty small {
  display: none;
}

.table-account-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
}

.table-number,
.table-text-copy,
.table-secret {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
}

.table-number h3 {
  overflow: hidden;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-shared-label {
  display: block;
  margin-top: 3px;
  color: var(--orange);
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.table-text-copy > span,
.table-text-copy code,
.table-secret code {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-secret .icon-button {
  width: 22px;
  height: 22px;
}

.table-price {
  color: var(--ink) !important;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.table-price--sale {
  color: var(--orange) !important;
}

.table-note {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.table-actions .icon-button {
  width: 26px;
  height: 26px;
}

.account-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.account-row .cover-button {
  height: 84px;
  aspect-ratio: auto;
}

.account-row .account-cover {
  height: 84px;
}

.account-row .account-cover--image img {
  height: 84px;
  object-fit: cover;
}

.account-row:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px rgba(23, 35, 38, 0.07);
}

.cover-button {
  position: relative;
  align-self: start;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: #e6e8e4;
  border-radius: 0;
  cursor: pointer;
}

.cover-button--original {
  height: auto;
  aspect-ratio: auto;
}

.account-cover,
.drawer-cover {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #dfe4e1;
}

.account-cover--image {
  height: auto;
}

.account-cover img,
.drawer-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
}

.account-cover--image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.drawer-cover.account-cover--image {
  height: auto;
  aspect-ratio: auto;
}

.cover-dimensions {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 6px;
  color: #ffffff;
  background: rgba(18, 28, 30, 0.72);
  border-radius: 4px;
  font-family: var(--font-code);
  font-size: 8px;
  pointer-events: none;
}

.account-cover--empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: #435455;
  background:
    linear-gradient(135deg, transparent 0 46%, rgba(255, 255, 255, 0.42) 46% 48%, transparent 48%),
    #dce4df;
}

.account-cover--empty span {
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 700;
}

.account-cover--empty small {
  color: #718080;
  font-family: var(--font-code);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.cover-overlay {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #ffffff;
  background: rgba(23, 35, 38, 0.78);
  border-radius: 50%;
  opacity: 0;
  transform: translateY(3px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.cover-button:hover .cover-overlay,
.cover-button:focus-visible .cover-overlay {
  opacity: 1;
  transform: translateY(0);
}

.image-viewer-backdrop {
  z-index: 100;
  flex-direction: column;
  padding: 28px;
  background: rgba(12, 19, 21, 0.88);
}

.image-viewer-close {
  position: fixed;
  z-index: 2;
  top: 22px;
  right: 24px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
}

.image-viewer-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.image-viewer-shell {
  display: flex;
  width: min(1380px, calc(100vw - 56px));
  height: calc(100vh - 56px);
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  background: #0d1416;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.image-viewer-stage {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #60706d #111a1c;
  scrollbar-width: thin;
}

.image-viewer-surface {
  display: flex;
  min-width: 100%;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.image-viewer-image {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  flex: 0 0 auto;
  object-fit: contain;
  background: #101819;
  border-radius: 4px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
}

.image-viewer-stage.is-dragging .image-viewer-image {
  cursor: grabbing;
}

.image-viewer-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 16px;
  color: #eef4f2;
  background: #111b1d;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.image-viewer-caption {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.image-viewer-caption strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-viewer-caption span {
  color: #9ca9a6;
  font-size: 10px;
}

.image-viewer-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.image-control-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #c8d2d0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px;
  cursor: pointer;
}

.image-control-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.image-zoom-label {
  min-width: 48px;
  color: #c8d2d0;
  font-family: var(--font-code);
  font-size: 10px;
  text-align: center;
}

.account-main {
  display: flex;
  width: 100%;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  gap: 7px;
  padding: 13px 14px;
}

.account-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.account-row .account-heading {
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
}

.account-row .account-heading > div:first-child {
  min-width: 0;
}

.account-heading h3 {
  overflow-wrap: anywhere;
  margin-top: 1px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.account-number-line,
.meta-copy,
.drawer-title-line,
.drawer-copy-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.icon-button--inline {
  width: 23px;
  height: 23px;
  border-radius: 4px;
}

.meta-copy {
  gap: 3px;
}

.field-caption {
  display: block;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.account-price {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 2px 8px;
  text-align: right;
}

.account-row .account-price {
  justify-content: flex-start;
  text-align: left;
}

.account-price strong {
  display: inline;
  margin: 0;
  color: var(--orange);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
}

.price-mini {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.25;
}

.price-mini span {
  min-width: 18px;
}

.price-mini--sale strong {
  font-size: 14px;
}

.account-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-meta__items {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 14px;
}

.meta-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--ink-faint);
  font-size: 9px;
}

.meta-line--account code {
  max-width: 220px;
}

.meta-line > span {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.meta-line code {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linked-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
}

.secret-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.account-row .secret-grid {
  grid-template-columns: 1fr;
}

.secret-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 1px 4px 1px 7px;
  background: var(--surface-soft);
  border: 1px solid #e7e3da;
  border-radius: 6px;
}

.secret-label {
  color: var(--ink-faint);
  font-size: 8px;
  white-space: nowrap;
}

.secret-value {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secret-field.is-empty .secret-value {
  color: var(--ink-faint);
  font-family: var(--font-ui);
}

.secret-actions {
  display: flex;
  gap: 2px;
}

.secret-field .icon-button {
  width: 22px;
  height: 22px;
}

.icon-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink-soft);
  background: transparent;
  border-radius: 5px;
  cursor: pointer;
  transition:
    color 120ms ease,
    background-color 120ms ease;
}

.icon-button:hover {
  color: var(--ink);
  background: rgba(29, 41, 44, 0.07);
}

.icon-button.danger:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.account-note {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
}

.account-note p {
  display: block;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-actions {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 9px 12px;
  border-top: 1px solid var(--surface-soft);
}

.text-button,
.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transition:
    color 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease;
}

.text-button {
  color: var(--ink-soft);
  background: transparent;
}

.text-button:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.primary-button {
  min-height: 38px;
  padding: 0 15px;
  color: #ffffff;
  background: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(8, 105, 92, 0.16);
}

.primary-button:hover {
  background: #07594f;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.secondary-button {
  color: var(--ink);
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
}

.secondary-button:hover {
  background: var(--surface-soft);
}

.danger-text {
  color: var(--danger);
}

.danger-text:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.empty-state {
  display: grid;
  min-height: 310px;
  place-items: center;
  align-content: center;
  padding: 44px 24px;
  background:
    linear-gradient(var(--surface-raised), var(--surface-raised)) padding-box,
    repeating-linear-gradient(
        135deg,
        var(--line) 0,
        var(--line) 1px,
        transparent 1px,
        transparent 8px
      )
      border-box;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-align: center;
}

.empty-mark {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  margin-bottom: 16px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 8px;
}

.empty-state h3 {
  font-family: Georgia, "Songti SC", serif;
  font-size: 19px;
}

.empty-state p {
  max-width: 380px;
  margin: 8px 0 18px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.modal-backdrop,
.drawer-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background: rgba(18, 28, 30, 0.52);
  backdrop-filter: blur(3px);
  animation: fade-in 140ms ease-out;
}

.modal {
  width: min(690px, 100%);
  max-height: calc(100vh - 52px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  animation: modal-in 170ms ease-out;
}

.modal--small {
  width: min(440px, 100%);
}

.modal--collaboration {
  width: min(760px, 100%);
}

.modal-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 24px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin-top: 3px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 23px;
}

.modal-header p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.modal-close {
  margin: -4px -5px 0 0;
}

.account-form {
  padding: 22px 24px 0;
}

.form-image-row {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-bottom: 17px;
  margin-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.form-image-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  align-content: center;
  gap: 5px;
  overflow: hidden;
  color: var(--ink-faint);
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  transition:
    border-color 120ms ease,
    background-color 120ms ease,
    box-shadow 120ms ease;
}

.form-image-preview.has-image {
  position: relative;
  border-style: solid;
}

.form-image-preview.is-dragover {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 143, 123, 0.12);
}

.form-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.form-image-preview.has-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.form-image-size {
  position: absolute;
  z-index: 1;
  right: 6px;
  bottom: 6px;
  padding: 2px 5px;
  color: #ffffff;
  background: rgba(18, 28, 30, 0.72);
  border-radius: 4px;
  font-family: var(--font-code);
  font-size: 8px;
  pointer-events: none;
}

.form-image-preview small {
  font-size: 9px;
}

.form-image-controls p {
  margin: 6px 0 11px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.form-image-controls kbd {
  display: inline-grid;
  min-width: 20px;
  height: 19px;
  padding: 0 4px;
  place-items: center;
  color: var(--ink-soft);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-code);
  font-size: 9px;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.form-field--wide {
  grid-column: 1 / -1;
}

.form-field > span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.form-field > span b {
  color: var(--orange);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  outline: none;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.form-field textarea {
  min-height: 84px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 143, 123, 0.1);
}

.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.form-permission-note {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  color: #7d4b24;
  background: var(--orange-soft);
  border: 1px solid #efd3bf;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.6;
}

.form-permission-note .icon {
  flex: 0 0 auto;
  margin-top: 1px;
}

.field-error {
  min-height: 14px;
  color: var(--danger) !important;
  font-size: 10px;
  font-weight: 500 !important;
}

.form-hint {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}

.form-error {
  display: block;
  margin-top: 12px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px 24px 22px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.modal-footer-spacer {
  flex: 1;
}

.confirm-copy {
  padding: 22px 24px 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.confirm-copy strong {
  color: var(--ink);
}

.confirm-warning {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  margin-top: 14px;
  color: #7e441f;
  background: var(--orange-soft);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.6;
}

.confirm-warning .icon {
  margin-top: 2px;
}

.drawer-backdrop {
  justify-content: flex-end;
  padding: 0;
}

.drawer {
  width: min(430px, 100%);
  height: 100%;
  overflow: auto;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(23, 35, 38, 0.17);
  animation: drawer-in 190ms ease-out;
}

.drawer-header {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(251, 250, 246, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.drawer-account {
  padding: 20px;
}

.drawer-cover {
  aspect-ratio: 16 / 8;
  min-height: 0;
  margin-bottom: 19px;
  border-radius: 7px;
}

.drawer-heading {
  padding-bottom: 19px;
  border-bottom: 1px solid var(--line);
}

.drawer-heading h2 {
  overflow-wrap: anywhere;
  margin: 3px 0 6px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 25px;
}

.drawer-title-line {
  margin: 3px 0 6px;
}

.drawer-title-line h2 {
  margin: 0;
}

.drawer-heading > strong {
  color: var(--orange);
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 600;
}

.drawer-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.drawer-prices > span {
  display: flex;
  min-width: 92px;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px solid #e7e3da;
  border-radius: 5px;
}

.drawer-prices em {
  color: var(--ink-faint);
  font-size: 9px;
  font-style: normal;
}

.drawer-prices strong {
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
}

.drawer-prices .is-sale strong {
  color: var(--orange);
}

.drawer-section {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.drawer-id {
  display: block;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.drawer-copy-line {
  margin-top: 7px;
}

.secret-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.drawer-notes {
  margin-top: 7px;
  color: var(--ink-soft);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.drawer-meta {
  padding-top: 14px;
  color: var(--ink-faint);
  font-size: 10px;
}

.drawer-account .modal-footer {
  justify-content: space-between;
  padding: 18px 0 2px;
}

.drawer-copy-all {
  width: 100%;
  margin-top: 16px;
}

.toast-stack {
  position: fixed;
  z-index: 140;
  right: 24px;
  bottom: 24px;
  display: flex;
  width: min(360px, calc(100vw - 48px));
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  color: #ffffff;
  background: var(--sidebar);
  border-radius: 7px;
  box-shadow: 0 12px 34px rgba(23, 35, 38, 0.22);
  font-size: 12px;
  line-height: 1.55;
  animation: toast-in 170ms ease-out;
  pointer-events: auto;
}

.toast .icon {
  margin-top: 1px;
  color: var(--accent-bright);
}

.toast.is-error .icon {
  color: #ff938a;
}

.toast-button {
  margin-left: auto;
  color: #b9c7c4;
  background: transparent;
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.auth-mode .app-shell {
  display: none;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  padding: 28px;
  place-items: center;
  background: var(--bg);
}

.auth-card {
  width: min(470px, 100%);
  padding: 26px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(23, 35, 38, 0.14);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-brand > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auth-brand strong {
  font-size: 13px;
  letter-spacing: 0.06em;
}

.auth-brand small {
  color: var(--ink-faint);
  font-size: 10px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  background: var(--surface-soft);
  border-radius: 7px;
}

.auth-tabs button {
  min-height: 34px;
  color: var(--ink-soft);
  background: transparent;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.auth-tabs button.is-active {
  color: var(--ink);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.auth-heading {
  margin-bottom: 20px;
}

.auth-heading h1 {
  font-family: Georgia, "Songti SC", serif;
  font-size: 27px;
}

.auth-heading p {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.auth-field input,
.auth-field select {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  outline: none;
}

.auth-field input:focus,
.auth-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 143, 123, 0.1);
}

.auth-submit {
  width: 100%;
  margin-top: 3px;
}

.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 10px;
  margin-bottom: 13px;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.5;
}

.auth-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding-top: 15px;
  margin-top: 19px;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.55;
}

.auth-modal-body {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 20px 22px;
}

.auth-logout {
  margin-left: auto;
}

.cloud-user-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cloud-user-name {
  max-width: 120px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  color: #805022;
  background: var(--orange-soft);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
}

.collaboration-list {
  padding: 0 22px 20px;
}

.collaboration-list__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 10px;
  border-top: 1px solid var(--line);
}

.collaboration-list__heading strong {
  font-size: 12px;
}

.collaboration-list__heading span {
  color: var(--ink-faint);
  font-size: 10px;
}

.collaboration-item {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.collaboration-item + .collaboration-item {
  margin-top: 8px;
}

.collaboration-item > div:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.collaboration-item strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collaboration-item small {
  color: var(--ink-faint);
  font-size: 9px;
}

.collaboration-item__actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.collaboration-item__actions select {
  width: min(210px, 100%);
  height: 34px;
  padding: 0 8px;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 10px;
}

.collaboration-empty {
  padding: 20px 12px;
  color: var(--ink-faint);
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  font-size: 10px;
  text-align: center;
}

.user-access-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
}

.user-access-summary {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 16px 22px 0;
}

.user-access-summary strong {
  color: var(--accent-dark);
  font-family: Georgia, "Songti SC", serif;
  font-size: 28px;
}

.user-access-summary span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.user-access-summary small {
  margin-left: auto;
  color: var(--ink-faint);
  font-size: 9px;
}

.user-access-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 13px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.user-access-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.user-access-copy strong {
  font-size: 11px;
}

.user-access-copy span,
.user-access-copy em {
  color: var(--ink-faint);
  font-size: 9px;
  font-style: normal;
}

.user-access-copy em {
  width: fit-content;
  padding: 2px 6px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 4px;
  font-weight: 700;
}

.user-access-copy em.is-expired {
  color: var(--danger);
  background: var(--danger-soft);
}

.user-access-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.user-access-actions select {
  height: 34px;
  padding: 0 8px;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 10px;
}

.audit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
}

.audit-item {
  padding: 12px 13px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.audit-item__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.audit-item__top strong {
  font-size: 11px;
}

.audit-item__top time,
.audit-item small {
  color: var(--ink-faint);
  font-size: 9px;
}

.audit-item p {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 10px;
}

.audit-item small {
  display: block;
  margin-top: 6px;
  line-height: 1.55;
}

.audit-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.audit-fields span {
  padding: 3px 6px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
}

.placeholder-page {
  display: grid;
  min-height: 58vh;
  place-items: center;
  align-content: center;
  padding: 40px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.placeholder-page h2 {
  margin: 14px 0 7px;
  color: var(--ink);
  font-family: Georgia, "Songti SC", serif;
  font-size: 24px;
}

.placeholder-page p {
  max-width: 430px;
  line-height: 1.7;
}

.plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.plan-board,
.plan-composer {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.plan-board {
  min-height: 480px;
  overflow: hidden;
}

.plan-board__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.plan-board__header .section-kicker {
  margin-bottom: 4px;
}

.plan-board__header h2,
.plan-composer h2 {
  font-family: Georgia, "Songti SC", serif;
  font-size: 21px;
}

.plan-progress {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--ink-faint);
  white-space: nowrap;
}

.plan-progress strong {
  color: var(--accent-dark);
  font-family: Georgia, serif;
  font-size: 24px;
}

.plan-progress span {
  font-size: 10px;
}

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.plan-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 11px;
  min-height: 64px;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid #e6e1d8;
  border-radius: 6px;
  transition:
    border-color 120ms ease,
    background-color 120ms ease;
}

.plan-item:hover {
  border-color: var(--line-strong);
}

.plan-check {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: #ffffff;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  cursor: pointer;
}

.plan-item.is-complete {
  background: #f2f6f3;
  border-color: #d9e6df;
}

.plan-item.is-complete .plan-check {
  background: var(--accent);
  border-color: var(--accent);
}

.plan-content {
  min-width: 0;
}

.plan-content p {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.plan-content span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10px;
}

.plan-item.is-complete .plan-content p {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.plan-empty {
  display: grid;
  min-height: 330px;
  place-items: center;
  align-content: center;
  color: var(--ink-faint);
  text-align: center;
}

.plan-empty > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 12px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 8px;
}

.plan-empty h3 {
  color: var(--ink);
  font-family: Georgia, "Songti SC", serif;
  font-size: 18px;
}

.plan-empty p {
  margin-top: 7px;
  font-size: 11px;
}

.plan-composer {
  position: sticky;
  top: 94px;
  padding: 21px;
}

.plan-composer h2 {
  margin-bottom: 5px;
}

.plan-composer__hint {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.plan-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.plan-form select {
  width: 100%;
  height: 40px;
  padding: 0 9px;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  outline: none;
}

.plan-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 143, 123, 0.1);
}

.plan-form .primary-button {
  width: 100%;
  margin-top: 2px;
}

.plan-composer__note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding-top: 16px;
  margin-top: 18px;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.55;
}

.plan-composer__note .icon {
  margin-top: 1px;
}

.backup-status-grid {
  display: grid;
  grid-template-columns: 0.7fr 0.7fr 1.6fr;
  gap: 12px;
  margin-bottom: 16px;
}

.backup-status-card {
  display: flex;
  min-height: 90px;
  align-items: center;
  gap: 13px;
  padding: 17px 18px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.backup-status-card > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.backup-status-card strong {
  overflow: hidden;
  font-family: Georgia, "Songti SC", serif;
  font-size: 23px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-status-card span:last-child {
  color: var(--ink-faint);
  font-size: 10px;
}

.backup-status-card--time strong {
  font-family: var(--font-ui);
  font-size: 13px;
}

.backup-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.backup-panel {
  display: flex;
  min-height: 340px;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.backup-panel h2 {
  font-family: Georgia, "Songti SC", serif;
  font-size: 22px;
}

.backup-panel > p {
  max-width: 560px;
  margin: 8px 0 18px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.75;
}

.backup-file-preview {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 13px;
  margin-bottom: 18px;
  background: var(--surface-soft);
  border: 1px solid #e5e0d7;
  border-radius: 6px;
}

.backup-file-preview > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 6px;
}

.backup-file-preview > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.backup-file-preview strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-file-preview small {
  color: var(--ink-faint);
  font-size: 9px;
}

.backup-panel > .primary-button,
.backup-panel > .secondary-button {
  margin-top: auto;
}

.backup-choose-button {
  width: 100%;
  min-height: 64px;
  margin-top: 2px;
  border-style: dashed;
}

.backup-restore-steps {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 3px 0;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.backup-restore-steps span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-faint);
  font-size: 9px;
  white-space: nowrap;
}

.backup-restore-steps b {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 50%;
  font-size: 8px;
}

.backup-warning {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px 18px;
  margin-top: 16px;
  color: #79431f;
  background: var(--orange-soft);
  border: 1px solid #efd3bf;
  border-radius: var(--radius);
}

.backup-warning > span:first-child {
  margin-top: 2px;
}

.backup-warning > div {
  min-width: 0;
  flex: 1;
}

.backup-warning strong {
  font-size: 12px;
}

.backup-warning p {
  margin-top: 4px;
  color: #855638;
  font-size: 10px;
  line-height: 1.65;
}

.backup-count-note {
  flex: 0 0 auto;
  padding-top: 2px;
  font-size: 9px;
  white-space: nowrap;
}

.noscript-message {
  position: fixed;
  z-index: 999;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--sidebar);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.992);
  }
}

@keyframes drawer-in {
  from {
    transform: translateX(24px);
    opacity: 0.5;
  }
}

@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

@media (max-width: 1180px) {
  .cover-button,
  .account-cover {
    min-height: 0;
  }

  .cover-button {
    height: auto;
  }

  .secret-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  body {
    min-width: 700px;
  }

  .app-shell {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .sidebar {
    width: 84px;
    align-items: center;
    padding-inline: 10px;
  }

  .brand {
    padding: 0;
  }

  .brand-copy,
  .nav-label,
  .sidebar-note,
  .nav-count {
    display: none;
  }

  .main-nav {
    width: 100%;
  }

  .main-nav a {
    justify-content: center;
    padding: 0;
  }

  .main-nav a.is-active::before {
    left: -10px;
  }

  .sidebar-status {
    justify-content: center;
    padding-inline: 0;
  }

  .sidebar-status span:last-child {
    display: none;
  }

  .main-content,
  .topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-card {
    min-height: 96px;
  }

  .today-strip {
    grid-template-columns: 1fr auto;
  }

  .today-strip__items {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .account-actions {
    padding: 9px 12px;
  }

  .plan-layout {
    grid-template-columns: 1fr;
  }

  .plan-composer {
    position: static;
  }

  .backup-status-grid,
  .backup-layout {
    grid-template-columns: 1fr;
  }

  .backup-panel {
    min-height: 300px;
  }
}

@media (max-width: 700px) {
  body {
    min-width: 0;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 45;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 66px;
    flex-direction: row;
    align-items: stretch;
    padding: 0 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 0;
  }

  .brand,
  .sidebar-note,
  .sidebar-status {
    display: none;
  }

  .main-nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
  }

  .main-nav a {
    min-height: 58px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 0 2px;
  }

  .main-nav a.is-active::before {
    top: 0;
    left: 50%;
    width: 22px;
    height: 2px;
    border-radius: 0 0 3px 3px;
    transform: translateX(-50%);
  }

  .nav-label {
    display: block;
    flex: 0 0 auto;
    font-size: 10px;
  }

  .nav-count {
    position: absolute;
    top: 7px;
    left: calc(50% + 8px);
    display: grid;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 8px;
  }

  .workspace {
    padding-bottom: 66px;
  }

  .topbar {
    height: 62px;
    gap: 8px;
    padding: 0 12px;
  }

  .topbar-search {
    width: auto;
    min-width: 0;
    flex: 1;
  }

  .topbar-search kbd {
    display: none;
  }

  .topbar-actions {
    gap: 0;
  }

  .cloud-user-name,
  .cloud-user-actions #cloud-invite-button,
  .cloud-user-actions #cloud-user-admin-button {
    display: none;
  }

  #cloud-collaboration-button {
    width: 36px;
    min-width: 36px;
    padding: 0;
    font-size: 0;
  }

  #cloud-collaboration-button .icon {
    margin: 0;
  }

  .topbar-actions .local-badge {
    display: none;
  }

  .topbar-actions .primary-button {
    min-height: 38px;
    padding: 0 11px;
    font-size: 10px;
  }

  .main-content {
    padding: 20px 14px 92px;
  }

  .page-heading {
    display: block;
    margin-bottom: 20px;
  }

  .page-heading h1 {
    font-size: 28px;
  }

  .page-heading p {
    font-size: 12px;
  }

  .page-heading__date {
    display: none;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .summary-card {
    min-height: 94px;
    gap: 10px;
    padding: 13px;
  }

  .summary-card--price {
    grid-column: 1 / -1;
  }

  .summary-icon {
    width: 34px;
    height: 34px;
  }

  .summary-card > div > strong {
    font-size: 23px;
  }

  .summary-price-list {
    gap: 6px;
  }

  .summary-price-item strong {
    font-size: 12px;
  }

  .today-strip {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 15px;
    margin-bottom: 22px;
  }

  .today-strip__items {
    grid-column: auto;
    grid-row: auto;
  }

  .section-heading {
    align-items: flex-start;
    margin-bottom: 10px;
  }

  .section-heading__title {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .section-heading__tools {
    align-self: flex-start;
  }

  .select-control {
    max-width: 145px;
  }

  .account-list {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .account-row {
    width: 100%;
  }

  .account-row .cover-button {
    height: 112px;
  }

  .account-row .account-cover {
    height: 112px;
  }

  .account-row .account-cover--image img {
    height: 112px;
  }

  .account-main {
    padding: 12px;
  }

  .account-heading h3 {
    font-size: 18px;
  }

  .account-meta__items {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .meta-line--account code {
    max-width: 220px;
  }

  .account-actions {
    justify-content: space-around;
    padding: 7px 10px;
  }

  .modal-backdrop {
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border-radius: 0;
  }

  .modal-header {
    padding: 18px 16px 14px;
  }

  .account-form {
    padding: 18px 16px 0;
  }

  .form-image-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .form-field--wide {
    grid-column: auto;
  }

  .collaboration-list {
    padding: 0 16px 16px;
  }

  .collaboration-item {
    grid-template-columns: 1fr;
  }

  .collaboration-item__actions {
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .collaboration-item__actions select {
    flex: 1 1 180px;
  }

  .user-access-list {
    padding: 16px;
  }

  .user-access-summary {
    padding: 14px 16px 0;
  }

  .user-access-item {
    grid-template-columns: 1fr;
  }

  .user-access-actions {
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .user-access-actions select {
    flex: 1 1 140px;
  }

  .audit-list {
    padding: 16px;
  }

  .audit-item__top {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .modal-footer {
    position: sticky;
    bottom: 0;
    padding: 14px 16px;
    margin-top: 16px;
    background: var(--surface);
    border-top: 1px solid var(--line);
  }

  .drawer {
    width: 100%;
  }

  .plan-layout {
    grid-template-columns: 1fr;
  }

  .backup-status-grid,
  .backup-layout {
    grid-template-columns: 1fr;
  }

  .image-viewer-backdrop {
    padding: 8px;
  }

  .image-viewer-shell {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
  }

  .image-viewer-toolbar {
    padding: 9px 10px;
  }

  .image-viewer-caption span {
    display: none;
  }
}
