:root {
  --bg: #0f1722;
  --panel: rgba(255, 255, 255, 0.14);
  --panel-strong: rgba(255, 255, 255, 0.22);
  --text: #eef6ff;
  --muted: #b9c7da;
  --accent: #7ce0ff;
  --accent-2: #ffb36b;
  --border: rgba(255, 255, 255, 0.16);
  --border-strong: rgba(124, 224, 255, 0.30);
  --danger: #ff7b72;
  --shadow: none;
  --radius-xl: 10px;
  --radius-lg: 8px;
  --radius-md: 6px;
  --surface-soft: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.18);
  --surface-chip: rgba(124, 224, 255, 0.12);
  --surface-chip-alt: rgba(255, 179, 107, 0.14);
  --topbar-bg: transparent;
  --topbar-border: rgba(255, 255, 255, 0.10);
  --entry-active: rgba(124, 224, 255, 0.08);
  --focus-ring: rgba(124, 224, 255, 0.22);
  --primary-gradient: linear-gradient(180deg, #76dbff 0%, #3bb6da 100%);
  --primary-text: #06212a;
  --ghost-bg: rgba(255, 255, 255, 0.05);
  --detail-bg: rgba(255, 255, 255, 0.14);
  --entry-list-bg: rgba(255, 255, 255, 0.08);
  --review-bg: linear-gradient(180deg, rgba(124, 224, 255, 0.14), rgba(255, 179, 107, 0.08));
  --workspace-radius: 0px;
  --control-height: 32px;
  --control-radius: 999px;
}

body[data-theme="glass"] {
  --bg: #0f1722;
  --panel: rgba(255, 255, 255, 0.12);
  --panel-strong: rgba(255, 255, 255, 0.18);
  --text: #eef6ff;
  --muted: #b9c7da;
  --accent: #7ce0ff;
  --accent-2: #ffb36b;
  --border: rgba(255, 255, 255, 0.16);
  --border-strong: rgba(124, 224, 255, 0.30);
  --surface-soft: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.18);
  --surface-chip: rgba(124, 224, 255, 0.12);
  --surface-chip-alt: rgba(255, 179, 107, 0.14);
  --topbar-bg: transparent;
  --topbar-border: rgba(255, 255, 255, 0.18);
  --entry-active: rgba(124, 224, 255, 0.08);
  --focus-ring: rgba(124, 224, 255, 0.22);
  --primary-gradient: linear-gradient(180deg, #76dbff 0%, #3bb6da 100%);
  --primary-text: #06212a;
  --ghost-bg: rgba(255, 255, 255, 0.10);
  --detail-bg: rgba(255, 255, 255, 0.14);
  --entry-list-bg: rgba(255, 255, 255, 0.08);
  --review-bg: linear-gradient(180deg, rgba(124, 224, 255, 0.14), rgba(255, 179, 107, 0.08));
}

body[data-theme="concrete"] {
  --bg: #f4f7fa;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --text: #1e293b;
  --muted: #475569;
  --accent: #2563eb;
  --accent-2: #2563eb;
  --border: rgba(28, 100, 242, 0.08);
  --border-strong: rgba(28, 100, 242, 0.08);
  --surface-soft: rgba(244, 247, 250, 0.96);
  --surface-strong: rgba(219, 234, 254, 0.74);
  --surface-chip: rgba(29, 78, 216, 0.06);
  --surface-chip-alt: rgba(29, 78, 216, 0.06);
  --topbar-bg: rgba(244, 247, 250, 0.7);
  --topbar-border: rgba(28, 100, 242, 0.08);
  --entry-active: rgba(29, 78, 216, 0.05);
  --focus-ring: rgba(37, 99, 235, 0.16);
  --primary-gradient: linear-gradient(180deg, #2563eb 0%, #2563eb 100%);
  --primary-text: #ffffff;
  --ghost-bg: rgba(255, 255, 255, 0.92);
  --detail-bg: #ffffff;
  --entry-list-bg: #ffffff;
  --review-bg: linear-gradient(180deg, rgba(219, 234, 254, 0.42), rgba(244, 247, 250, 0.5));
  --workspace-radius: 0px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Noto Sans SC", sans-serif;
  background: var(--bg);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.7) 0.8px, transparent 0.9px);
  background-size: 8px 8px;
  mix-blend-mode: soft-light;
}

body[data-theme="glass"] {
  background:
    radial-gradient(circle at 14% 12%, rgba(124, 224, 255, 0.22), transparent 24%),
    radial-gradient(circle at 85% 16%, rgba(255, 87, 166, 0.16), transparent 18%),
    radial-gradient(circle at 62% 82%, rgba(255, 179, 107, 0.14), transparent 20%),
    linear-gradient(180deg, #0c1520 0%, #111b27 100%);
}

body[data-theme="concrete"] {
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.86), transparent 24%),
    radial-gradient(circle at 88% 8%, rgba(219, 234, 254, 0.5), transparent 22%),
    linear-gradient(180deg, #f4f7fa 0%, #edf3f9 100%);
}

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

button {
  cursor: pointer;
  border: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1.55fr) minmax(260px, 0.6fr);
  gap: 28px;
  padding: 28px;
  max-width: 1600px;
  margin: 0 auto;
  align-items: stretch;
  grid-template-rows: auto auto auto;
}

.brand-panel {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: stretch;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  grid-column: 1;
  grid-row: 2 / span 2;
  align-self: start;
  border-radius: var(--workspace-radius);
  padding: 0;
  overflow: hidden;
  min-height: 100%;
}

.brand {
  display: flex;
  flex: 1;
  align-items: center;
  min-height: 84px;
  padding: 10px 0 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}

.brand-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex: 0 0 auto;
}

.brand-kicker,
.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand h1,
.topbar h2,
.panel h2,
.dialog-header h2 {
  margin: 0;
  font-family: "Inter", "Noto Sans SC", sans-serif;
  font-weight: 800;
}

.brand h1 {
  font-size: clamp(1.75rem, 4vw, 2.15rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.brand-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.8rem;
  white-space: nowrap;
  max-width: none;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(18px);
}

.sidebar.panel {
  border-color: var(--border-strong);
}

.sidebar-section {
  padding: 24px;
}

.sidebar-section + .sidebar-section {
  border-top: 1px solid var(--border);
}

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

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  grid-column: 2 / 4;
  grid-row: 1;
  background: var(--topbar-bg);
  border: 0;
  border-bottom: 1px solid var(--topbar-border);
  border-radius: 16px;
  padding: 18px 24px;
  min-height: 84px;
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.workspace-intro {
  min-width: 0;
  display: flex;
  align-items: center;
}

.workspace-intro h2,
.workspace-intro p {
  display: none;
}

.hero-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.topbar-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  min-width: 0;
  flex-wrap: nowrap;
}

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

.account-card {
  width: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.account-card-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
}

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

.account-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  flex: 0 0 auto;
}

.account-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.account-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.auth-status,
.sync-status {
  font-size: 0.84rem;
  color: var(--muted);
}

.auth-status {
  line-height: 1.15;
  color: var(--text);
  font-weight: 600;
  text-align: left;
}

.auth-email {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 16ch;
  opacity: 0.01;
  transform: translateY(-2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-card:hover .auth-email,
.account-card:focus-within .auth-email,
.account-card.is-logged-out .auth-email {
  opacity: 1;
  transform: translateY(0);
}

.sync-status {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  white-space: nowrap;
  font-size: 0.72rem;
  cursor: default;
}

.sync-status[data-state="online"] {
  color: #53d18d;
}

.sync-status[data-state="syncing"] {
  color: var(--accent);
}

.sync-status[data-state="offline"] {
  color: var(--muted);
}

.sync-status[data-state="error"] {
  color: var(--danger);
}

.auth-actions {
  display: none;
}

.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--control-height);
  padding: 2px 4px;
  background: transparent;
  border: 0;
  color: var(--text);
}

.account-menu {
  position: relative;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 148px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.10);
  z-index: 20;
}

.dropdown-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
}

.dropdown-button:hover {
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.theme-switcher {
  display: inline-flex;
  gap: 4px;
  height: var(--control-height);
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  border-radius: var(--control-radius);
  background: var(--ghost-bg);
  backdrop-filter: blur(12px);
  align-self: center;
  flex-wrap: nowrap;
}

.theme-button {
  height: calc(var(--control-height) - 6px);
  border-radius: var(--control-radius);
  border: 0;
  background: transparent;
  white-space: nowrap;
  min-width: 0;
  padding-inline: 18px;
  line-height: 1.1;
}

.theme-button.is-active {
  background: var(--surface-strong);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

.entries-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 78vh;
  overflow: auto;
  padding-right: 4px;
}

.entry-card {
  padding: 16px 0;
  border: 1px solid var(--border);
  border-width: 0 0 1px 0;
  border-radius: 0;
  background: transparent;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.entry-card:hover,
.entry-card.active {
  transform: none;
  border-color: var(--border-strong);
  background: var(--entry-active);
}

.entry-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.entry-card h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
}

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

.summary {
  margin: 10px 0 12px;
  line-height: 1.7;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--text) 84%, var(--muted) 16%);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--surface-chip);
  color: var(--accent);
  font-size: 0.78rem;
  border: 1px solid transparent;
}

.chip.library {
  background: var(--surface-chip-alt);
  color: var(--accent-2);
}

body[data-theme="concrete"] .chip,
body[data-theme="concrete"] .chip.library {
  border-color: transparent;
}

.entry-detail {
  min-height: 520px;
}

.detail-panel {
  background: var(--detail-bg);
  border-color: var(--border-strong);
  padding: 36px 40px;
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
  height: 100%;
  border-radius: var(--workspace-radius);
}

.entries-panel {
  background: var(--entry-list-bg);
  padding: 24px;
  grid-column: 3;
  grid-row: 2;
  align-self: stretch;
  height: 100%;
  border-radius: var(--workspace-radius);
}

.empty-state {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.detail-header h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.detail-section {
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.detail-section h3 {
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-section p,
.detail-section li {
  line-height: 1.7;
  font-size: 1.02rem;
  color: color-mix(in srgb, var(--text) 86%, var(--muted) 14%);
}

.detail-section pre {
  margin: 0;
  padding: 12px;
  border-radius: var(--radius-md);
  overflow: auto;
  background: #1f2828;
  color: #edf3f1;
  white-space: pre-wrap;
}

.detail-assets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.detail-assets img,
.asset-preview img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--surface-soft);
}

.asset-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--focus-ring);
  border-color: var(--border-strong);
}

.field textarea {
  resize: vertical;
}

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

.stat-card {
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
}

.review-card {
  min-height: 140px;
  padding: 16px;
  border-radius: 8px;
  background: var(--review-bg);
  border: 1px solid var(--border);
}

.review-card h3 {
  margin-top: 0;
}

.review-card p {
  line-height: 1.75;
}

.mindmap-canvas {
  overflow: auto;
  min-height: 320px;
}

.mindmap-svg {
  width: 100%;
  min-height: 320px;
}

.mind-node text {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13px;
  fill: var(--text);
}

.mind-node circle.library-node {
  fill: color-mix(in srgb, var(--accent-2) 18%, transparent);
  stroke: color-mix(in srgb, var(--accent-2) 44%, transparent);
}

.mind-node circle.entry-node {
  fill: color-mix(in srgb, var(--accent) 14%, transparent);
  stroke: color-mix(in srgb, var(--accent) 40%, transparent);
}

.mind-link {
  stroke: rgba(23, 33, 33, 0.2);
  stroke-width: 1.3;
}

.entry-dialog {
  width: min(920px, calc(100vw - 24px));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  background: var(--panel-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}

.entry-dialog::backdrop {
  background: rgba(23, 33, 33, 0.28);
  backdrop-filter: blur(6px);
}

.entry-form {
  padding: 20px;
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-mode-switch {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-feedback {
  min-height: 24px;
  margin: 14px 0 0;
}

.dialog-header {
  justify-content: space-between;
  margin-bottom: 18px;
}

.dialog-actions {
  margin-top: 18px;
}

.spacer {
  flex: 1;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: var(--control-height);
  padding: 0 14px;
  border-radius: var(--control-radius);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.icon-button:hover {
  transform: none;
}

.primary-button {
  background: var(--primary-gradient);
  color: var(--primary-text);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.ghost-button,
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ghost-bg);
  color: var(--text);
  border: 1px solid rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}

.ghost-button:hover,
.upload-button:hover {
  border-color: rgba(0, 0, 0, 0.16);
  background: color-mix(in srgb, var(--ghost-bg) 72%, white 28%);
}

.action-button,
.upload-button {
  gap: 8px;
  flex-wrap: nowrap;
  min-height: var(--control-height);
  padding-inline: 14px;
}

.icon-only-button {
  width: var(--control-height);
  min-width: var(--control-height);
  height: var(--control-height);
  padding: 0;
  border-radius: var(--control-radius);
  font-size: 1rem;
  border-color: transparent;
  background: transparent;
}

.icon-only-button:hover {
  border-color: rgba(0, 0, 0, 0.08);
}

.action-button span,
.upload-button span {
  font-size: 0.92rem;
  opacity: 0.8;
  flex: 0 0 auto;
}

.danger-button {
  background: rgba(180, 76, 58, 0.10);
  color: var(--danger);
}

.tiny-button,
.icon-button {
  padding: 7px 10px;
}

.icon-button {
  font-size: 1.4rem;
  line-height: 1;
  background: transparent;
}

.upload-button input {
  display: none;
}

.linked-entry {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
}

.source-list,
.backlink-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.source-item,
.backlink-item {
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.compact-panel {
  padding-top: 16px;
}

.visual-panel {
  grid-column: 2 / 4;
  grid-row: 3;
  align-self: start;
  border-radius: var(--workspace-radius);
}

.sidebar .panel,
.sidebar .compact-panel,
.entries-panel {
  border-color: var(--border);
  box-shadow: none;
}

.sidebar .compact-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  padding-top: 16px;
  padding-bottom: 16px;
}

.sidebar .panel-header {
  margin-bottom: 14px;
}

.compact-summary {
  cursor: pointer;
  list-style: none;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

body[data-theme="glass"] .panel {
  backdrop-filter: blur(22px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}

body[data-theme="glass"] .brand h1,
body[data-theme="glass"] .detail-header h2 {
  text-shadow: 0 0 24px rgba(124, 224, 255, 0.16);
}

body[data-theme="glass"] .detail-panel {
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

body[data-theme="glass"] .brand-mark,
body[data-theme="glass"] .account-mark {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12),
    0 0 26px rgba(124, 224, 255, 0.24);
}

body[data-theme="glass"] .brand-mark,
body[data-theme="glass"] .account-mark {
  box-shadow: 0 0 24px rgba(124, 224, 255, 0.18);
}

body[data-theme="glass"] .detail-panel,
body[data-theme="glass"] .sidebar,
body[data-theme="glass"] .entries-panel,
body[data-theme="glass"] .visual-panel {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

body[data-theme="concrete"] .panel {
  backdrop-filter: blur(12px) saturate(118%);
  -webkit-backdrop-filter: blur(12px) saturate(118%);
  border-radius: 16px;
  border-color: var(--border);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.02), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
}

body[data-theme="concrete"]::before {
  opacity: 0.045;
}

body[data-theme="concrete"] .brand h1,
body[data-theme="concrete"] .topbar h2,
body[data-theme="concrete"] .panel h2 {
  letter-spacing: -0.02em;
  font-weight: 800;
}

body[data-theme="concrete"] .brand-mark {
  box-shadow: inset 0 1px 1px rgba(30, 41, 59, 0.08);
}

body[data-theme="concrete"] .detail-panel {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.02), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
}

body[data-theme="concrete"] .detail-panel,
body[data-theme="concrete"] .sidebar,
body[data-theme="concrete"] .entries-panel,
body[data-theme="concrete"] .visual-panel {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

body[data-theme="concrete"] .entry-card {
  border-bottom-color: var(--border);
}

body[data-theme="concrete"] .theme-button.is-active {
  background: #2d3748;
  color: #ffffff;
  border-color: #2d3748;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.2);
}

body[data-theme="concrete"] .account-card {
  backdrop-filter: none;
}

body[data-theme="concrete"] .theme-switcher {
  border-color: var(--border);
  background: rgba(255,255,255,0.78);
}

body[data-theme="concrete"] .ghost-button,
body[data-theme="concrete"] .upload-button {
  background: rgba(255,255,255,0.92);
  border-color: var(--border);
}

body[data-theme="concrete"] .account-dropdown {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body[data-theme="concrete"] .chip,
body[data-theme="concrete"] .chip.library {
  background: rgba(29, 78, 216, 0.06);
  box-shadow: none;
  color: #2563eb;
}

body[data-theme="concrete"] .summary,
body[data-theme="concrete"] .detail-section p,
body[data-theme="concrete"] .detail-section li,
body[data-theme="concrete"] .translation,
body[data-theme="concrete"] .muted,
body[data-theme="concrete"] small,
body[data-theme="concrete"] .auth-email {
  color: #475569;
}

body[data-theme="concrete"] .brand-kicker,
body[data-theme="concrete"] .eyebrow,
body[data-theme="concrete"] .linked-entry {
  color: #2563eb;
}

body[data-theme="concrete"] .primary-button {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

body[data-theme="concrete"] .sidebar-section + .sidebar-section,
body[data-theme="concrete"] .brand,
body[data-theme="concrete"] .topbar {
  border-color: var(--border);
}

body[data-theme="concrete"] .sidebar .compact-panel {
  padding-top: 20px;
  padding-bottom: 20px;
}

.compact-summary::-webkit-details-marker {
  display: none;
}

.compact-summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}

.compact-panel[open] .compact-summary::after {
  content: "-";
}

.compact-panel .panel-header {
  margin-top: 14px;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .topbar,
  .detail-panel,
  .entries-panel,
  .visual-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .entries-list {
    max-height: none;
  }

  .topbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-intro {
    padding-left: 0;
  }

  .topbar-tools {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions,
  .auth-actions {
    flex-wrap: wrap;
  }

  .account-strip {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 14px;
  }

  .panel,
  .entry-form {
    padding: 16px;
  }

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

body[data-theme="concrete"] {
  --bg: #f7f8f6;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #039855;
  --accent-2: #027a48;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --surface-soft: #f3f5f4;
  --surface-strong: #ffffff;
  --surface-chip: #f3f5f4;
  --surface-chip-alt: #ecfdf3;
  --topbar-bg: rgba(247, 248, 246, 0.86);
  --topbar-border: #e5e7eb;
  --entry-active: #ecfdf3;
  --focus-ring: #d1fadf;
  --primary-gradient: linear-gradient(180deg, #039855 0%, #039855 100%);
  --primary-text: #ffffff;
  --ghost-bg: #ffffff;
  --detail-bg: #ffffff;
  --entry-list-bg: #ffffff;
  --review-bg: linear-gradient(180deg, rgba(236, 253, 243, 0.9), rgba(243, 245, 244, 0.85));
  --radius-xl: 20px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --control-height: 36px;
  background: linear-gradient(180deg, #fafbf9 0%, #f4f6f3 100%);
}

body[data-theme="concrete"]::before {
  opacity: 0;
}

body[data-theme="concrete"] .app-shell {
  grid-template-columns: 280px minmax(720px, 1fr) 320px;
  gap: 24px;
  padding: 24px 32px 32px;
  max-width: 1600px;
}

body[data-theme="concrete"] .brand {
  min-height: 72px;
  padding: 0;
  border-bottom: 0;
}

body[data-theme="concrete"] .brand-header {
  align-items: center;
  gap: 14px;
}

body[data-theme="concrete"] .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: none;
}

body[data-theme="concrete"] .brand h1 {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

body[data-theme="concrete"] .brand-copy {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
}

body[data-theme="concrete"] .panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
}

body[data-theme="concrete"] .sidebar {
  background: transparent;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  padding: 0;
}

body[data-theme="concrete"] .sidebar-section {
  padding: 0 0 24px;
}

body[data-theme="concrete"] .sidebar-section + .sidebar-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

body[data-theme="concrete"] .sidebar .panel-header {
  margin-bottom: 16px;
}

body[data-theme="concrete"] .filter-group {
  display: grid;
  gap: 16px;
}

body[data-theme="concrete"] .field span {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

body[data-theme="concrete"] .field input,
body[data-theme="concrete"] .field select,
body[data-theme="concrete"] .field textarea {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: #1f2937;
}

body[data-theme="concrete"] .field input:focus,
body[data-theme="concrete"] .field select:focus,
body[data-theme="concrete"] .field textarea:focus {
  outline: none;
  border-color: #12b76a;
  box-shadow: 0 0 0 4px #d1fadf;
}

body[data-theme="concrete"] .text-button {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0;
  background: transparent;
  color: #6b7280;
  border: 0;
  min-height: auto;
}

body[data-theme="concrete"] .text-button:hover {
  color: #1f2937;
}

body[data-theme="concrete"] .topbar {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: none;
}

body[data-theme="concrete"] .workspace-intro {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

body[data-theme="concrete"] .workspace-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
}

body[data-theme="concrete"] .workspace-intro h2 {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
}

body[data-theme="concrete"] .workspace-intro p {
  display: block;
  margin: 0;
  font-size: 12px;
  color: #6b7280;
}

body[data-theme="concrete"] .header-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

body[data-theme="concrete"] .header-search input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  color: #1f2937;
}

body[data-theme="concrete"] .header-search-icon {
  color: #9ca3af;
  font-size: 14px;
}

body[data-theme="concrete"] .topbar-tools {
  gap: 12px;
}

body[data-theme="concrete"] .theme-switcher {
  height: 36px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f3f5f4;
}

body[data-theme="concrete"] .theme-button {
  height: 30px;
  padding-inline: 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

body[data-theme="concrete"] .theme-button.is-active {
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

body[data-theme="concrete"] #concreteThemeBtn.is-active {
  box-shadow: 0 0 0 1px rgba(18, 183, 106, 0.06), 0 0 12px rgba(18, 183, 106, 0.18);
}

body[data-theme="concrete"] .primary-button,
body[data-theme="concrete"] .ghost-button,
body[data-theme="concrete"] .upload-button {
  min-height: 36px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}

body[data-theme="concrete"] .primary-button {
  background: #039855;
  border-color: #039855;
  box-shadow: none;
}

body[data-theme="concrete"] .primary-button:hover {
  background: #027a48;
}

body[data-theme="concrete"] .ghost-button,
body[data-theme="concrete"] .upload-button {
  background: #ffffff;
  border-color: var(--border);
}

body[data-theme="concrete"] .account-card {
  border-radius: 10px;
}

body[data-theme="concrete"] .detail-panel {
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
}

body[data-theme="concrete"] .entries-panel {
  border-radius: 18px;
  padding: 16px;
  box-shadow: none;
}

body[data-theme="concrete"] .entries-panel .panel-header {
  margin-bottom: 12px;
}

body[data-theme="concrete"] .entries-list {
  gap: 10px;
  max-height: 76vh;
  padding-right: 2px;
}

body[data-theme="concrete"] .entries-list::-webkit-scrollbar {
  width: 8px;
}

body[data-theme="concrete"] .entries-list::-webkit-scrollbar-track {
  background: transparent;
}

body[data-theme="concrete"] .entries-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 999px;
}

body[data-theme="concrete"] .entries-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

body[data-theme="concrete"] .entry-card {
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
}

body[data-theme="concrete"] .entry-card:hover {
  background: #f9fafb;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

body[data-theme="concrete"] .entry-card.active {
  background: #ecfdf3;
  border-color: #d1fadf;
}

body[data-theme="concrete"] .entry-card-top {
  align-items: flex-start;
}

body[data-theme="concrete"] .entry-card-copy {
  min-width: 0;
}

body[data-theme="concrete"] .entry-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

body[data-theme="concrete"] .translation {
  margin: 6px 0 0;
  font-size: 13px;
  color: #6b7280;
}

body[data-theme="concrete"] .summary {
  display: -webkit-box;
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

body[data-theme="concrete"] .entry-card-edit {
  opacity: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  transition: opacity 150ms ease, background 150ms ease;
}

body[data-theme="concrete"] .entry-card:hover .entry-card-edit,
body[data-theme="concrete"] .entry-card.active .entry-card-edit {
  opacity: 1;
}

body[data-theme="concrete"] .entry-card-edit:hover {
  background: #f3f5f4;
}

body[data-theme="concrete"] .chip-row {
  gap: 8px;
  margin-top: 8px;
}

body[data-theme="concrete"] .chip {
  padding: 0 10px;
  min-height: 28px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: #f3f5f4;
  color: #4b5563;
}

body[data-theme="concrete"] .chip.library {
  background: #ecfdf3;
  color: #027a48;
}

body[data-theme="concrete"] .muted-chip {
  color: #6b7280;
}

body[data-theme="concrete"] .detail-header,
body[data-theme="concrete"] .detail-heading {
  display: block;
}

body[data-theme="concrete"] .detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

body[data-theme="concrete"] .detail-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #027a48;
  font-size: 12px;
  font-weight: 600;
}

body[data-theme="concrete"] .detail-title-group {
  margin-top: 18px;
}

body[data-theme="concrete"] .detail-header h2 {
  font-size: 32px;
  line-height: 1.15;
  color: #1f2937;
}

body[data-theme="concrete"] .detail-subtitle {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 500;
  color: #6b7280;
}

body[data-theme="concrete"] .detail-meta {
  margin: 12px 0 0;
  font-size: 13px;
  color: #6b7280;
}

body[data-theme="concrete"] .detail-summary {
  max-width: 720px;
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: #4b5563;
}

body[data-theme="concrete"] .detail-tag-groups {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

body[data-theme="concrete"] .detail-section {
  margin-top: 28px;
  padding-top: 0;
  border-top: 0;
}

body[data-theme="concrete"] .detail-section h3 {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 0;
  text-transform: none;
}

body[data-theme="concrete"] .detail-section p,
body[data-theme="concrete"] .detail-section li {
  font-size: 15px;
  line-height: 1.8;
  color: #4b5563;
}

body[data-theme="concrete"] .meaning-card {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f3f5f4;
}

body[data-theme="concrete"] .source-list {
  gap: 12px;
}

body[data-theme="concrete"] .source-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
}

body[data-theme="concrete"] .source-item:hover {
  border-color: var(--border-strong);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

body[data-theme="concrete"] .source-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-theme="concrete"] .source-item strong {
  color: #1f2937;
}

body[data-theme="concrete"] .source-item:hover strong {
  color: #027a48;
}

body[data-theme="concrete"] .source-meta,
body[data-theme="concrete"] .source-url {
  font-size: 13px;
  color: #6b7280;
}

body[data-theme="concrete"] .source-external {
  color: #9ca3af;
}

body[data-theme="concrete"] .stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

body[data-theme="concrete"] .stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
}

body[data-theme="concrete"] .stat-row:last-child {
  border-bottom: 0;
}

body[data-theme="concrete"] .stat-row strong {
  font-size: 20px;
  color: #1f2937;
}

body[data-theme="concrete"] .review-card {
  padding: 18px;
  border-radius: 16px;
  background: var(--review-bg);
}

@media (max-width: 1360px) {
  body[data-theme="concrete"] .app-shell {
    grid-template-columns: 260px minmax(0, 1fr) 300px;
  }
}

body[data-theme="concrete"] {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

body[data-theme="concrete"] * {
  transition: all 0.15s ease;
}

body[data-theme="concrete"] ::selection {
  background: #a7f3d0;
}

body[data-theme="concrete"] .entry-header {
  position: relative;
  overflow: hidden;
  padding: 20px 24px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
}

body[data-theme="concrete"] .entry-header::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent);
  pointer-events: none;
}

body[data-theme="concrete"] .entry-header > * {
  position: relative;
  z-index: 1;
}

body[data-theme="concrete"] .title-cn {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  color: #6b7280;
  background: none;
  -webkit-text-fill-color: initial;
}

body[data-theme="concrete"] .title-en {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  background: linear-gradient(135deg, #111827, #374151);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body[data-theme="concrete"] .entry-card:hover {
  transform: translateY(-2px);
}

body[data-theme="concrete"] .entry-card.active {
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  border-left: 3px solid #10b981;
}

body[data-theme="concrete"] .primary-button {
  background: linear-gradient(135deg, #10b981, #059669);
}

body[data-theme="concrete"] .primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.25);
}

body[data-theme="concrete"] .ghost-button:hover,
body[data-theme="concrete"] .upload-button:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

body[data-theme="concrete"] .field input:focus,
body[data-theme="concrete"] .field select:focus,
body[data-theme="concrete"] .field textarea:focus,
body[data-theme="concrete"] .header-search:focus-within {
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

body[data-theme="concrete"] .chip.library,
body[data-theme="concrete"] .tag-primary {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #ffffff;
}

body[data-theme="concrete"] .tag-blue {
  background: #eff6ff;
  color: #2563eb;
}

body[data-theme="concrete"] .tag-purple {
  background: #f5f3ff;
  color: #7c3aed;
}

body[data-theme="concrete"] .tag-green {
  background: #ecfdf5;
  color: #059669;
}

body[data-theme="concrete"] .tag-amber {
  background: #fffbeb;
  color: #d97706;
}

body[data-theme="concrete"] .chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

body[data-theme="concrete"] .source-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

body[data-theme="glass"] {
  --panel: rgba(17, 27, 39, 0.52);
  --panel-strong: rgba(20, 32, 47, 0.68);
  --border: rgba(124, 224, 255, 0.16);
  --border-strong: rgba(124, 224, 255, 0.26);
  --surface-soft: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.16);
  --ghost-bg: rgba(255, 255, 255, 0.08);
  --detail-bg: rgba(18, 29, 43, 0.62);
  --entry-list-bg: rgba(14, 24, 37, 0.52);
  --entry-active: rgba(124, 224, 255, 0.1);
}

body[data-theme="glass"] * {
  transition: all 0.15s ease;
}

body[data-theme="glass"] ::selection {
  background: rgba(124, 224, 255, 0.28);
}

body[data-theme="glass"] .app-shell {
  grid-template-columns: 280px minmax(720px, 1fr) 320px;
  gap: 24px;
  padding: 24px 32px 32px;
}

body[data-theme="glass"] .brand {
  min-height: 72px;
  padding: 0;
}

body[data-theme="glass"] .brand-header {
  align-items: center;
  gap: 14px;
}

body[data-theme="glass"] .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

body[data-theme="glass"] .brand h1 {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

body[data-theme="glass"] .brand-copy {
  margin-top: 2px;
  font-size: 12px;
  color: #9fb2c9;
}

body[data-theme="glass"] .topbar {
  min-height: 72px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px 20px;
  border: 1px solid rgba(124, 224, 255, 0.14);
  border-radius: 18px;
  background: rgba(14, 24, 37, 0.46);
  box-shadow: 0 18px 40px rgba(2, 8, 20, 0.22);
}

body[data-theme="glass"] .workspace-intro {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

body[data-theme="glass"] .workspace-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
}

body[data-theme="glass"] .workspace-intro h2 {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #eef6ff;
}

body[data-theme="glass"] .workspace-intro p {
  display: block;
  margin: 0;
  font-size: 12px;
  color: #9fb2c9;
}

body[data-theme="glass"] .header-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(124, 224, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

body[data-theme="glass"] .header-search input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  color: #eef6ff;
}

body[data-theme="glass"] .header-search-icon {
  color: #9fb2c9;
  font-size: 14px;
}

body[data-theme="glass"] .theme-switcher {
  height: 36px;
  padding: 3px;
  border-radius: 10px;
  border-color: rgba(124, 224, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="glass"] .theme-button {
  height: 30px;
  padding-inline: 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

body[data-theme="glass"] .theme-button.is-active {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 18px rgba(124, 224, 255, 0.14);
}

body[data-theme="glass"] .primary-button,
body[data-theme="glass"] .ghost-button,
body[data-theme="glass"] .upload-button {
  min-height: 36px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}

body[data-theme="glass"] .primary-button {
  background: linear-gradient(135deg, #7ce0ff, #3bb6da);
  color: #06212a;
  box-shadow: 0 8px 18px rgba(59, 182, 218, 0.22);
}

body[data-theme="glass"] .primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(59, 182, 218, 0.26);
}

body[data-theme="glass"] .ghost-button:hover,
body[data-theme="glass"] .upload-button:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

body[data-theme="glass"] .field input:focus,
body[data-theme="glass"] .field select:focus,
body[data-theme="glass"] .field textarea:focus,
body[data-theme="glass"] .header-search:focus-within {
  border-color: rgba(124, 224, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(124, 224, 255, 0.12);
}

body[data-theme="glass"] .sidebar {
  background: transparent;
  border: 0;
  box-shadow: none;
}

body[data-theme="glass"] .sidebar-section {
  padding: 0 0 24px;
}

body[data-theme="glass"] .sidebar-section + .sidebar-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(124, 224, 255, 0.14);
}

body[data-theme="glass"] .filter-group {
  display: grid;
  gap: 16px;
}

body[data-theme="glass"] .field span {
  font-size: 12px;
  font-weight: 500;
  color: #9fb2c9;
}

body[data-theme="glass"] .field input,
body[data-theme="glass"] .field select,
body[data-theme="glass"] .field textarea {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

body[data-theme="glass"] .text-button {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0;
  background: transparent;
  color: #9fb2c9;
  border: 0;
  min-height: auto;
}

body[data-theme="glass"] .text-button:hover {
  color: #eef6ff;
}

body[data-theme="glass"] .detail-panel {
  padding: 32px;
  border-radius: 20px;
  box-shadow: 0 22px 54px rgba(2, 8, 20, 0.28);
}

body[data-theme="glass"] .entries-panel {
  padding: 16px;
  border-radius: 18px;
  background: rgba(14, 24, 37, 0.44);
}

body[data-theme="glass"] .entries-list {
  gap: 10px;
  max-height: 76vh;
  padding-right: 2px;
}

body[data-theme="glass"] .entries-list::-webkit-scrollbar {
  width: 8px;
}

body[data-theme="glass"] .entries-list::-webkit-scrollbar-track {
  background: transparent;
}

body[data-theme="glass"] .entries-list::-webkit-scrollbar-thumb {
  background: rgba(185, 199, 218, 0.35);
  border-radius: 999px;
}

body[data-theme="glass"] .entries-list::-webkit-scrollbar-thumb:hover {
  background: rgba(185, 199, 218, 0.56);
}

body[data-theme="glass"] .entry-card {
  position: relative;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
}

body[data-theme="glass"] .entry-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(2, 8, 20, 0.18);
}

body[data-theme="glass"] .entry-card.active {
  background: linear-gradient(135deg, rgba(124, 224, 255, 0.14), rgba(255, 179, 107, 0.1));
  border-left: 3px solid #7ce0ff;
  border-color: rgba(124, 224, 255, 0.18);
}

body[data-theme="glass"] .entry-card-top {
  align-items: flex-start;
}

body[data-theme="glass"] .entry-card-copy {
  min-width: 0;
}

body[data-theme="glass"] .entry-card h3 {
  font-size: 16px;
  font-weight: 600;
}

body[data-theme="glass"] .translation {
  margin: 6px 0 0;
  font-size: 13px;
  color: #9fb2c9;
}

body[data-theme="glass"] .summary {
  display: -webkit-box;
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #d2deed;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

body[data-theme="glass"] .entry-card-edit {
  opacity: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b9c7da;
}

body[data-theme="glass"] .entry-card:hover .entry-card-edit,
body[data-theme="glass"] .entry-card.active .entry-card-edit {
  opacity: 1;
}

body[data-theme="glass"] .entry-card-edit:hover {
  background: rgba(255, 255, 255, 0.1);
}

body[data-theme="glass"] .chip-row {
  gap: 8px;
  margin-top: 8px;
}

body[data-theme="glass"] .chip {
  padding: 0 10px;
  min-height: 28px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

body[data-theme="glass"] .chip.library,
body[data-theme="glass"] .tag-primary {
  background: linear-gradient(135deg, #7ce0ff, #46c7eb);
  color: #06212a;
}

body[data-theme="glass"] .tag-blue {
  background: rgba(59, 182, 218, 0.14);
  color: #8be9ff;
}

body[data-theme="glass"] .tag-purple {
  background: rgba(167, 139, 250, 0.14);
  color: #d7c2ff;
}

body[data-theme="glass"] .tag-green {
  background: rgba(52, 211, 153, 0.14);
  color: #9df6cb;
}

body[data-theme="glass"] .tag-amber {
  background: rgba(251, 191, 36, 0.14);
  color: #ffd78f;
}

body[data-theme="glass"] .chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 8, 20, 0.18);
}

body[data-theme="glass"] .entry-header {
  position: relative;
  overflow: hidden;
  padding: 20px 24px;
  border: 1px solid rgba(124, 224, 255, 0.18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124, 224, 255, 0.14), rgba(255, 179, 107, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-theme="glass"] .entry-header::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  top: -120px;
  right: -100px;
  background: radial-gradient(circle, rgba(124, 224, 255, 0.16), transparent 70%);
  pointer-events: none;
}

body[data-theme="glass"] .entry-header > * {
  position: relative;
  z-index: 1;
}

body[data-theme="glass"] .detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

body[data-theme="glass"] .detail-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #eef6ff;
  font-size: 12px;
  font-weight: 600;
}

body[data-theme="glass"] .detail-title-group {
  margin-top: 18px;
}

body[data-theme="glass"] .title-cn {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  color: #9fb2c9;
  background: none;
  -webkit-text-fill-color: initial;
}

body[data-theme="glass"] .title-en {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  background: linear-gradient(135deg, #eef6ff, #9ee8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body[data-theme="glass"] .detail-meta {
  margin: 12px 0 0;
  font-size: 13px;
  color: #9fb2c9;
}

body[data-theme="glass"] .detail-summary {
  max-width: 720px;
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: #d2deed;
}

body[data-theme="glass"] .detail-tag-groups {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

body[data-theme="glass"] .detail-section {
  margin-top: 28px;
  padding-top: 0;
  border-top: 0;
}

body[data-theme="glass"] .detail-section h3 {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #eef6ff;
  letter-spacing: 0;
  text-transform: none;
}

body[data-theme="glass"] .detail-section p,
body[data-theme="glass"] .detail-section li {
  font-size: 15px;
  line-height: 1.8;
  color: #d2deed;
}

body[data-theme="glass"] .meaning-card {
  padding: 20px 22px;
  border: 1px solid rgba(124, 224, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

body[data-theme="glass"] .source-list {
  gap: 12px;
}

body[data-theme="glass"] .source-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(124, 224, 255, 0.12);
}

body[data-theme="glass"] .source-item:hover {
  border-color: rgba(124, 224, 255, 0.24);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(2, 8, 20, 0.22);
}

body[data-theme="glass"] .source-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-theme="glass"] .source-item strong {
  color: #eef6ff;
}

body[data-theme="glass"] .source-item:hover strong {
  color: #9ee8ff;
}

body[data-theme="glass"] .source-meta,
body[data-theme="glass"] .source-url,
body[data-theme="glass"] .muted,
body[data-theme="glass"] small,
body[data-theme="glass"] .auth-email {
  color: #9fb2c9;
}

body[data-theme="glass"] .source-external {
  color: #9fb2c9;
}

body[data-theme="glass"] .stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

body[data-theme="glass"] .stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border-bottom: 1px solid rgba(124, 224, 255, 0.12);
}

body[data-theme="glass"] .stat-row:last-child {
  border-bottom: 0;
}

body[data-theme="glass"] .stat-row strong {
  font-size: 20px;
  color: #eef6ff;
}

body[data-theme="glass"] .review-card {
  padding: 18px;
  border-radius: 16px;
}

@media (max-width: 1360px) {
  body[data-theme="glass"] .app-shell {
    grid-template-columns: 260px minmax(0, 1fr) 300px;
  }
}

body[data-theme="paper"] {
  --bg: #f4f7fa;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-2: #12b76a;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --surface-soft: #f3f5f4;
  --surface-strong: #ffffff;
  --surface-chip: #f3f5f4;
  --surface-chip-alt: #ecfdf3;
  --topbar-bg: rgba(244, 247, 250, 0.86);
  --topbar-border: #e5e7eb;
  --entry-active: #ecfdf3;
  --focus-ring: #d1fadf;
  --primary-gradient: linear-gradient(135deg, #10b981, #059669);
  --primary-text: #ffffff;
  --ghost-bg: #ffffff;
  --detail-bg: #ffffff;
  --entry-list-bg: #ffffff;
  --review-bg: linear-gradient(180deg, rgba(236, 253, 243, 0.9), rgba(243, 245, 244, 0.85));
  --radius-xl: 20px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --control-height: 36px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

body[data-theme="paper"]::before {
  opacity: 0;
}

body[data-theme="paper"] * {
  transition: all 0.15s ease;
}

body[data-theme="paper"] ::selection {
  background: #a7f3d0;
}

body[data-theme="paper"] .app-shell {
  grid-template-columns: 280px minmax(720px, 1fr) 320px;
  gap: 24px;
  padding: 24px 32px 32px;
}

body[data-theme="paper"] .brand {
  min-height: 72px;
  padding: 0;
  border-bottom: 0;
}

body[data-theme="paper"] .brand-header {
  align-items: center;
  gap: 14px;
}

body[data-theme="paper"] .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: none;
}

body[data-theme="paper"] .brand h1,
body[data-theme="paper"] .workspace-intro h2,
body[data-theme="paper"] .entry-card h3,
body[data-theme="paper"] .detail-section h3,
body[data-theme="paper"] .source-item strong {
  color: #1f2937;
}

body[data-theme="paper"] .brand h1 {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

body[data-theme="paper"] .brand-copy,
body[data-theme="paper"] .workspace-intro p,
body[data-theme="paper"] .field span,
body[data-theme="paper"] .translation,
body[data-theme="paper"] .detail-meta,
body[data-theme="paper"] .source-meta,
body[data-theme="paper"] .source-url,
body[data-theme="paper"] .muted,
body[data-theme="paper"] small,
body[data-theme="paper"] .auth-email {
  color: #6b7280;
}

body[data-theme="paper"] .panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
}

body[data-theme="paper"] .sidebar {
  background: transparent;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  padding: 0;
}

body[data-theme="paper"] .sidebar-section {
  padding: 0 0 24px;
}

body[data-theme="paper"] .sidebar-section + .sidebar-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

body[data-theme="paper"] .filter-group {
  display: grid;
  gap: 16px;
}

body[data-theme="paper"] .field input,
body[data-theme="paper"] .field select,
body[data-theme="paper"] .field textarea,
body[data-theme="paper"] .header-search,
body[data-theme="paper"] .ghost-button,
body[data-theme="paper"] .upload-button {
  background: #ffffff;
  border-color: var(--border);
  color: #1f2937;
}

body[data-theme="paper"] .field input,
body[data-theme="paper"] .field select,
body[data-theme="paper"] .field textarea {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 10px;
}

body[data-theme="paper"] .field select,
body[data-theme="paper"] .field select option {
  color: #1f2937;
  background: #ffffff;
}

body[data-theme="paper"] .field input:focus,
body[data-theme="paper"] .field select:focus,
body[data-theme="paper"] .field textarea:focus,
body[data-theme="paper"] .header-search:focus-within {
  border-color: #12b76a;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

body[data-theme="paper"] .text-button {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0;
  background: transparent;
  color: #6b7280;
  border: 0;
  min-height: auto;
}

body[data-theme="paper"] .text-button:hover {
  color: #1f2937;
}

body[data-theme="paper"] .topbar {
  min-height: 72px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(244, 247, 250, 0.86);
  box-shadow: none;
}

body[data-theme="paper"] .workspace-intro {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

body[data-theme="paper"] .workspace-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
}

body[data-theme="paper"] .header-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
}

body[data-theme="paper"] .header-search input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  color: #1f2937;
}

body[data-theme="paper"] .header-search-icon {
  color: #9ca3af;
}

body[data-theme="paper"] .theme-switcher {
  height: 36px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f3f5f4;
}

body[data-theme="paper"] .theme-button {
  height: 30px;
  padding-inline: 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

body[data-theme="paper"] .theme-button.is-active {
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

body[data-theme="paper"] #paperThemeBtn.is-active {
  box-shadow: 0 0 0 1px rgba(18, 183, 106, 0.06), 0 0 12px rgba(18, 183, 106, 0.18);
}

body[data-theme="paper"] .primary-button,
body[data-theme="paper"] .ghost-button,
body[data-theme="paper"] .upload-button {
  min-height: 36px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}

body[data-theme="paper"] .primary-button {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.18);
}

body[data-theme="paper"] .primary-button:hover,
body[data-theme="paper"] .ghost-button:hover,
body[data-theme="paper"] .upload-button:hover {
  transform: translateY(-1px);
}

body[data-theme="paper"] .ghost-button:hover,
body[data-theme="paper"] .upload-button:hover {
  background: #f3f4f6;
}

body[data-theme="paper"] .detail-panel {
  border-radius: 20px;
  padding: 32px;
}

body[data-theme="paper"] .entries-panel {
  border-radius: 18px;
  padding: 16px;
  box-shadow: none;
}

body[data-theme="paper"] .entries-list {
  gap: 10px;
  max-height: 76vh;
  padding-right: 2px;
}

body[data-theme="paper"] .entries-list::-webkit-scrollbar {
  width: 8px;
}

body[data-theme="paper"] .entries-list::-webkit-scrollbar-track {
  background: transparent;
}

body[data-theme="paper"] .entries-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 999px;
}

body[data-theme="paper"] .entries-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

body[data-theme="paper"] .entry-card {
  position: relative;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
}

body[data-theme="paper"] .entry-card:hover {
  background: #f9fafb;
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

body[data-theme="paper"] .entry-card.active {
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  border-left: 3px solid #10b981;
  border-color: #d1fadf;
}

body[data-theme="paper"] .entry-card-top {
  align-items: flex-start;
}

body[data-theme="paper"] .entry-card-copy {
  min-width: 0;
}

body[data-theme="paper"] .summary,
body[data-theme="paper"] .detail-summary,
body[data-theme="paper"] .detail-section p,
body[data-theme="paper"] .detail-section li {
  color: #4b5563;
}

body[data-theme="paper"] .summary {
  display: -webkit-box;
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

body[data-theme="paper"] .entry-card-edit {
  opacity: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
}

body[data-theme="paper"] .entry-card:hover .entry-card-edit,
body[data-theme="paper"] .entry-card.active .entry-card-edit {
  opacity: 1;
}

body[data-theme="paper"] .entry-card-edit:hover {
  background: #f3f5f4;
}

body[data-theme="paper"] .chip-row {
  gap: 8px;
  margin-top: 8px;
}

body[data-theme="paper"] .chip {
  padding: 0 10px;
  min-height: 28px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: #f3f5f4;
  color: #4b5563;
}

body[data-theme="paper"] .chip.library,
body[data-theme="paper"] .tag-primary {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #ffffff;
}

body[data-theme="paper"] .tag-blue {
  background: #eff6ff;
  color: #2563eb;
}

body[data-theme="paper"] .tag-purple {
  background: #f5f3ff;
  color: #7c3aed;
}

body[data-theme="paper"] .tag-green {
  background: #ecfdf5;
  color: #059669;
}

body[data-theme="paper"] .tag-amber {
  background: #fffbeb;
  color: #d97706;
}

body[data-theme="paper"] .chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

body[data-theme="paper"] .entry-header {
  position: relative;
  overflow: hidden;
  padding: 20px 24px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
}

body[data-theme="paper"] .entry-header::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent);
  pointer-events: none;
}

body[data-theme="paper"] .entry-header > * {
  position: relative;
  z-index: 1;
}

body[data-theme="paper"] .detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

body[data-theme="paper"] .detail-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #027a48;
  font-size: 12px;
  font-weight: 600;
}

body[data-theme="paper"] .detail-title-group {
  margin-top: 18px;
}

body[data-theme="paper"] .title-en {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  background: linear-gradient(135deg, #111827, #374151);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body[data-theme="paper"] .title-cn {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  color: #6b7280;
}

body[data-theme="paper"] .detail-tag-groups {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

body[data-theme="paper"] .detail-section {
  margin-top: 28px;
  padding-top: 0;
  border-top: 0;
}

body[data-theme="paper"] .detail-section h3 {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

body[data-theme="paper"] .meaning-card {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f3f5f4;
}

body[data-theme="paper"] .source-list {
  gap: 12px;
}

body[data-theme="paper"] .source-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
}

body[data-theme="paper"] .source-item:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

body[data-theme="paper"] .source-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-theme="paper"] .source-item:hover strong {
  color: #059669;
}

body[data-theme="paper"] .stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

body[data-theme="paper"] .stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
}

body[data-theme="paper"] .stat-row:last-child {
  border-bottom: 0;
}

body[data-theme="paper"] .stat-row strong {
  font-size: 20px;
  color: #1f2937;
}

body[data-theme="paper"] .review-card {
  padding: 18px;
  border-radius: 16px;
  background: var(--review-bg);
}

@media (max-width: 1360px) {
  body[data-theme="paper"] .app-shell {
    grid-template-columns: 260px minmax(0, 1fr) 300px;
  }
}

body[data-theme="concrete"] {
  --bg: #0a0a0a;
  --panel: rgba(18, 18, 18, 0.92);
  --panel-strong: rgba(24, 24, 24, 0.96);
  --text: #f5e7bf;
  --muted: #b9a47a;
  --accent: #d4af5f;
  --accent-2: #f0d899;
  --border: rgba(212, 175, 95, 0.16);
  --border-strong: rgba(212, 175, 95, 0.24);
  --surface-soft: rgba(255, 255, 255, 0.03);
  --surface-strong: rgba(212, 175, 95, 0.1);
  --surface-chip: rgba(212, 175, 95, 0.08);
  --surface-chip-alt: rgba(240, 216, 153, 0.12);
  --topbar-bg: rgba(17, 17, 17, 0.86);
  --topbar-border: rgba(212, 175, 95, 0.12);
  --entry-active: rgba(212, 175, 95, 0.08);
  --focus-ring: rgba(212, 175, 95, 0.18);
  --primary-gradient: linear-gradient(135deg, #e7c77b, #8f6a2a);
  --primary-text: #15120c;
  --ghost-bg: rgba(255, 255, 255, 0.03);
  --detail-bg: rgba(18, 18, 18, 0.92);
  --entry-list-bg: rgba(14, 14, 14, 0.9);
  --review-bg: linear-gradient(180deg, rgba(212, 175, 95, 0.12), rgba(212, 175, 95, 0.03));
  background:
    radial-gradient(circle at 18% 0%, rgba(212, 175, 95, 0.08), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(255, 228, 160, 0.08), transparent 18%),
    linear-gradient(180deg, #090909 0%, #12100d 100%);
}

body[data-theme="concrete"]::before {
  opacity: 0.02;
}

body[data-theme="concrete"] ::selection {
  background: rgba(212, 175, 95, 0.28);
}

body[data-theme="concrete"] .brand-copy,
body[data-theme="concrete"] .workspace-intro p,
body[data-theme="concrete"] .field span,
body[data-theme="concrete"] .translation,
body[data-theme="concrete"] .detail-meta,
body[data-theme="concrete"] .source-meta,
body[data-theme="concrete"] .source-url,
body[data-theme="concrete"] .muted,
body[data-theme="concrete"] small,
body[data-theme="concrete"] .auth-email {
  color: #b9a47a;
}

body[data-theme="concrete"] .panel {
  background: linear-gradient(180deg, rgba(22, 22, 22, 0.94), rgba(12, 12, 12, 0.96));
  border-color: rgba(212, 175, 95, 0.14);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
}

body[data-theme="concrete"] .topbar,
body[data-theme="concrete"] .header-search,
body[data-theme="concrete"] .field input,
body[data-theme="concrete"] .field select,
body[data-theme="concrete"] .field textarea,
body[data-theme="concrete"] .ghost-button,
body[data-theme="concrete"] .upload-button {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(212, 175, 95, 0.14);
  color: #f5e7bf;
}

body[data-theme="concrete"] .theme-switcher {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(212, 175, 95, 0.16);
}

body[data-theme="concrete"] .theme-button.is-active {
  background: linear-gradient(135deg, rgba(231, 199, 123, 0.22), rgba(143, 106, 42, 0.2));
  color: #f8edd0;
  box-shadow: 0 0 18px rgba(212, 175, 95, 0.14);
}

body[data-theme="concrete"] #concreteThemeBtn.is-active {
  box-shadow: 0 0 20px rgba(212, 175, 95, 0.22);
}

body[data-theme="concrete"] .primary-button {
  background: linear-gradient(135deg, #f0d899, #9a7232);
  color: #16120a;
  box-shadow: 0 10px 20px rgba(143, 106, 42, 0.24);
}

body[data-theme="concrete"] .primary-button:hover {
  box-shadow: 0 12px 24px rgba(143, 106, 42, 0.32);
}

body[data-theme="concrete"] .ghost-button:hover,
body[data-theme="concrete"] .upload-button:hover {
  background: rgba(212, 175, 95, 0.08);
}

body[data-theme="concrete"] .field input:focus,
body[data-theme="concrete"] .field select:focus,
body[data-theme="concrete"] .field textarea:focus,
body[data-theme="concrete"] .header-search:focus-within {
  border-color: rgba(240, 216, 153, 0.52);
  box-shadow: 0 0 0 4px rgba(212, 175, 95, 0.14);
}

body[data-theme="concrete"] .entries-panel {
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.96), rgba(10, 10, 10, 0.96));
}

body[data-theme="concrete"] .entry-card:hover {
  background: rgba(212, 175, 95, 0.06);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
}

body[data-theme="concrete"] .entry-card.active {
  background: linear-gradient(135deg, rgba(212, 175, 95, 0.12), rgba(255, 228, 160, 0.06));
  border-color: rgba(212, 175, 95, 0.18);
  border-left: 3px solid #d4af5f;
}

body[data-theme="concrete"] .entry-card h3,
body[data-theme="concrete"] .workspace-intro h2,
body[data-theme="concrete"] .brand h1,
body[data-theme="concrete"] .detail-section h3,
body[data-theme="concrete"] .source-item strong {
  color: #f8edd0;
}

body[data-theme="concrete"] .summary,
body[data-theme="concrete"] .detail-summary,
body[data-theme="concrete"] .detail-section p,
body[data-theme="concrete"] .detail-section li {
  color: #d7c6a4;
}

body[data-theme="concrete"] .chip {
  background: rgba(255, 255, 255, 0.04);
  color: #d9c48f;
  box-shadow: inset 0 0 0 1px rgba(212, 175, 95, 0.08);
}

body[data-theme="concrete"] .chip.library,
body[data-theme="concrete"] .tag-primary {
  background: linear-gradient(135deg, #f0d899, #9a7232);
  color: #18130b;
}

body[data-theme="concrete"] .tag-blue {
  background: rgba(184, 153, 87, 0.1);
  color: #f0d899;
}

body[data-theme="concrete"] .tag-purple {
  background: rgba(116, 90, 42, 0.16);
  color: #d8b976;
}

body[data-theme="concrete"] .tag-green {
  background: rgba(82, 63, 24, 0.18);
  color: #f5dda0;
}

body[data-theme="concrete"] .tag-amber {
  background: rgba(240, 216, 153, 0.12);
  color: #f5dda0;
}

body[data-theme="concrete"] .entry-header {
  border-color: rgba(212, 175, 95, 0.16);
  background: linear-gradient(135deg, rgba(47, 37, 17, 0.88), rgba(17, 17, 17, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 244, 211, 0.06);
}

body[data-theme="concrete"] .entry-header::before {
  background: radial-gradient(circle, rgba(240, 216, 153, 0.16), transparent 70%);
}

body[data-theme="concrete"] .title-en {
  background: linear-gradient(135deg, #fff2c8, #c89a44);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body[data-theme="concrete"] .title-cn {
  color: #c6b287;
}

body[data-theme="concrete"] .detail-badge {
  background: rgba(240, 216, 153, 0.12);
  color: #f6e2aa;
}

body[data-theme="concrete"] .meaning-card,
body[data-theme="concrete"] .source-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(212, 175, 95, 0.12);
}

body[data-theme="concrete"] .source-item:hover {
  border-color: rgba(212, 175, 95, 0.24);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
}

body[data-theme="concrete"] .source-item:hover strong {
  color: #f0d899;
}

body[data-theme="concrete"] .entries-list::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 95, 0.24);
}

body[data-theme="concrete"] .entries-list::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 95, 0.4);
}

body[data-theme="concrete"] .field select,
body[data-theme="concrete"] .field select option {
  color: #f5e7bf;
  background: #141414;
}

body[data-theme="glass"] .field select,
body[data-theme="glass"] .field select option {
  color: #eef6ff;
  background: #162433;
}
