:root {
  --bg: #f4f5f7;
  --card: rgba(255, 255, 255, 0.9);
  --card-strong: #ffffff;
  --line: rgba(148, 163, 184, 0.32);
  --line-strong: rgba(100, 116, 139, 0.38);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "Consolas", "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  padding: 24px;
}

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

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

button {
  cursor: pointer;
}

.theme-translate {
  --bg: linear-gradient(180deg, #0c1118, #161d28 56%, #1a2230 100%);
  --card: rgba(25, 31, 42, 0.96);
  --card-strong: #1d2430;
  --line: rgba(96, 109, 132, 0.5);
  --line-strong: rgba(123, 145, 180, 0.72);
  --text: #e5edf8;
  --muted: #94a5bd;
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, 0.18);
  --success: #4fbf8f;
  --warning: #f7b84b;
  --danger: #f87171;
  --shadow: 0 22px 60px rgba(2, 8, 23, 0.56);
}

.theme-resume {
  --bg: #ebe9df;
  --card: #ebe9df;
  --card-strong: #ffffff;
  --line: rgba(0, 0, 0, 0.16);
  --line-strong: #000000;
  --text: #111111;
  --muted: #1d4ed8;
  --accent: #1d4ed8;
  --accent-soft: rgba(29, 78, 216, 0.1);
  --success: #15803d;
  --warning: #b45309;
  --danger: #b91c1c;
  --radius: 0;
  --radius-sm: 0;
  --shadow: 6px 6px 0 0 rgba(0, 0, 0, 0.14);
}

.theme-gank {
  --bg: radial-gradient(circle at top left, rgba(255, 255, 255, 0.74), rgba(240, 245, 251, 0.92) 42%, #dfe7f0 100%);
  --card: rgba(255, 255, 255, 0.78);
  --card-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(148, 163, 184, 0.32);
  --line-strong: rgba(100, 116, 139, 0.4);
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 24px 54px rgba(15, 23, 42, 0.12);
}

.theme-town {
  --bg: linear-gradient(180deg, #e8d9bb, #efe0c4);
  --card: rgba(255, 250, 240, 0.82);
  --card-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(120, 92, 51, 0.24);
  --line-strong: rgba(120, 92, 51, 0.42);
  --text: #33220c;
  --muted: #7c5c33;
  --accent: #2d6a4f;
  --accent-soft: rgba(45, 106, 79, 0.13);
  --success: #2d6a4f;
  --warning: #c47f2c;
  --danger: #b3472a;
  --shadow: 0 20px 56px rgba(99, 72, 31, 0.16);
}

.theme-translate body,
.theme-resume body,
.theme-gank body,
.theme-town body {
  background: var(--bg);
}

.theme-resume {
  background-image:
    linear-gradient(rgba(29, 78, 216, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}

.shell {
  max-width: 1560px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.theme-translate .topbar {
  background: rgba(17, 24, 39, 0.88);
}

.theme-gank .topbar {
  background: rgba(255, 255, 255, 0.66);
}

.theme-town .topbar {
  background: rgba(255, 249, 237, 0.84);
}

.theme-resume .topbar,
.theme-resume .card,
.theme-resume .panel,
.theme-resume .hero,
.theme-resume .frame,
.theme-resume .desktop-window,
.theme-resume .app-shell,
.theme-resume .app-sidebar,
.theme-resume .app-main,
.theme-resume .app-header,
.theme-resume .k,
.theme-resume .tag,
.theme-resume .list-item,
.theme-resume .action-card,
.theme-resume .metric-card,
.theme-resume .gank-card,
.theme-resume .form-card {
  border-color: #000000;
  border-radius: 0;
  box-shadow: var(--shadow);
}

.brand-title {
  font-size: 22px;
  font-weight: 700;
}

.brand-sub,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.nav,
.inline-actions,
.toolbar,
.segmented,
.k-row,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a,
.chip,
.tag,
.k,
.segmented a,
.segmented button,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

.nav a.active,
.chip.active,
.tag.active,
.k.active,
.segmented a.active,
.segmented button.active,
.pill.active {
  color: var(--accent);
  border-color: transparent;
  background: var(--accent-soft);
}

.hero,
.card,
.frame,
.panel,
.metric-card,
.action-card,
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.theme-translate .panel,
.theme-translate .metric-card,
.theme-translate .action-card,
.theme-translate .form-card,
.theme-translate .card {
  box-shadow: none;
}

.hero,
.card,
.panel,
.metric-card,
.action-card,
.form-card {
  padding: 22px;
}

.hero {
  margin-bottom: 20px;
}

.hero h1,
.page-title {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.06;
}

.grid-2,
.grid-3,
.grid-4,
.grid-auto {
  display: grid;
  gap: 18px;
}

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

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

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

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

.list {
  display: grid;
  gap: 12px;
}

.list-item,
.queue-item,
.message-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-strong);
}

.list-item strong,
.queue-item strong,
.message-item strong {
  display: block;
  font-size: 14px;
}

.list-item span,
.queue-item span,
.message-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-strong);
  color: var(--text);
  font-weight: 600;
}

.theme-resume .btn {
  border-color: #000000;
  border-radius: 0;
  box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.2);
}

.theme-resume .btn.small {
  box-shadow: 2px 2px 0 0 rgba(0, 0, 0, 0.2);
}

.theme-resume .btn.primary {
  background: #1d4ed8;
  border-color: #000000;
}

.theme-gank .btn {
  border-radius: 999px;
  padding-inline: 13px;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn.ghost {
  background: transparent;
}

.btn.warning {
  background: #fff7ed;
  border-color: rgba(217, 119, 6, 0.3);
  color: var(--warning);
}

.btn.danger {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.3);
  color: var(--danger);
}

.btn.small {
  padding: 8px 10px;
  font-size: 12px;
}

.status-strip,
.info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 13px;
}

.app-statusbar,
.resume-statusbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--card) 84%, transparent);
}

.theme-resume .resume-statusbar,
.theme-resume .app-statusbar {
  border-top-color: #000000;
  background: #f6f5ef;
}

.desktop-window,
.app-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.theme-translate .desktop-window,
.theme-translate .app-shell {
  background:
    linear-gradient(180deg, rgba(35, 45, 62, 0.32), rgba(16, 23, 35, 0.24)),
    var(--card);
}

.desktop-window {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 820px;
}

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.window-dots {
  display: flex;
  gap: 8px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 840px;
}

.app-sidebar {
  padding: 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.theme-translate .app-sidebar {
  background:
    linear-gradient(180deg, rgba(8, 14, 24, 0.42), rgba(17, 24, 39, 0.2)),
    rgba(17, 24, 39, 0.28);
}

.app-logo {
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-strong);
}

.app-logo strong {
  display: block;
  font-size: 15px;
}

.app-nav {
  display: grid;
  gap: 8px;
}

.app-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
}

.app-nav a::after {
  content: "›";
  opacity: 0.54;
}

.app-nav a.active {
  color: var(--accent);
  border-color: transparent;
  background: var(--accent-soft);
}

.app-main {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.app-header h1 {
  margin: 0;
  font-size: 28px;
}

.app-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.toolbar-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-content {
  min-width: 0;
  padding: 20px;
}

.split-2,
.split-3,
.preview-layout {
  display: grid;
  gap: 18px;
}

.split-2 {
  grid-template-columns: 1.1fr 0.9fr;
}

.split-3 {
  grid-template-columns: 0.8fr 1.2fr 0.8fr;
}

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

.stat-grid,
.action-grid,
.metric-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.metric-card .value {
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
}

.metric-card .label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.action-card {
  display: block;
}

.action-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.toolbar + .toolbar {
  margin-top: 10px;
}

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

.field {
  display: grid;
  gap: 8px;
}

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

.field label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-strong);
  color: var(--text);
}

.theme-resume .field input,
.theme-resume .field textarea,
.theme-resume .field select {
  border-color: #000000;
  border-radius: 0;
  background: #ffffff;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.theme-translate .field input,
.theme-translate .field textarea,
.theme-translate .field select,
.theme-translate .table th,
.theme-translate .table td,
.theme-translate .queue-item,
.theme-translate .list-item,
.theme-translate .message-item,
.theme-translate .codebox,
.theme-translate .screen img,
.theme-translate .tree li,
.theme-translate .state-row,
.theme-translate .resume-card {
  background: rgba(13, 19, 30, 0.5);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-strong);
}

.theme-resume .table-wrap,
.theme-resume .table th,
.theme-resume .table td,
.theme-resume .list-item,
.theme-resume .queue-item,
.theme-resume .message-item,
.theme-resume .codebox,
.theme-resume .logbox,
.theme-resume .textblock,
.theme-resume .state-row,
.theme-resume .tree li {
  border-color: #000000;
  border-radius: 0;
  background: #ffffff;
}

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

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.table th {
  color: var(--muted);
  font-weight: 600;
}

.codebox,
.logbox,
.textblock {
  padding: 14px;
  border-radius: 14px;
  background: var(--card-strong);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
  line-height: 1.6;
}

.mono {
  font-family: var(--mono);
}

.textblock {
  font-family: var(--font);
  font-size: 13px;
}

.panel-title,
.section-title {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.screen {
  overflow: hidden;
  padding: 14px;
}

.screen img,
.scene-image {
  width: 100%;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(241, 245, 249, 0.72);
}

.screen h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.screen p {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.reference-strip {
  display: grid;
  gap: 14px;
}

.reference-strip img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.is-hidden {
  display: none !important;
}

.queue-grid {
  display: grid;
  gap: 14px;
}

.queue-item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.queue-thumb {
  height: 58px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.34), rgba(226, 232, 240, 0.56));
  border: 1px solid var(--line);
}

.speech-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}

.speech-sidebar {
  padding: 14px;
  border-right: 1px solid var(--line);
}

.speech-main {
  padding: 14px;
}

.message-item {
  margin-bottom: 10px;
}

.message-item .meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.gank-wrap {
  max-width: 1180px;
  margin: 0 auto;
}

.gank-window {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(209, 213, 219, 0.72);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.16);
}

.theme-gank .gank-window {
  background: rgba(255, 255, 255, 0.72);
}

.gank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(209, 213, 219, 0.82);
}

.gank-dots {
  display: flex;
  gap: 8px;
}

.gank-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.gank-body {
  padding: 16px;
}

.gank-grid {
  display: grid;
  gap: 14px;
}

.gank-card {
  border: 1px solid rgba(209, 213, 219, 0.8);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  padding: 14px;
}

.theme-gank .gank-card {
  backdrop-filter: blur(16px);
}

.town-scene {
  position: relative;
  overflow: hidden;
}

.town-overlay {
  position: absolute;
  inset: 16px;
}

.town-badge {
  position: absolute;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(120, 92, 51, 0.2);
  box-shadow: var(--shadow);
  font-size: 12px;
}

.town-panel {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 320px;
}

.resume-grid {
  display: grid;
  gap: 1px;
  background: #000000;
  border: 1px solid #000000;
}

.resume-tile {
  min-height: 220px;
  padding: 18px;
  background: #f0f0e8;
}

.resume-tile strong {
  display: block;
  margin-bottom: 12px;
  font-size: 18px;
}

.resume-preview {
  border: 2px solid #000000;
  background: #ffffff;
  box-shadow: 6px 6px 0 0 #000000;
}

.resume-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #000000;
  font-family: var(--mono);
  text-transform: uppercase;
  color: #1d4ed8;
}

.resume-body {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  min-height: 760px;
}

.resume-editor,
.resume-pane {
  min-width: 0;
}

.resume-editor {
  padding: 18px;
  border-right: 1px solid #000000;
  background: #f0f0e8;
}

.resume-pane {
  padding: 18px;
  background: #e5e5e0;
}

.resume-card {
  padding: 14px;
  border: 1px solid #000000;
  background: #ffffff;
}

.resume-stack,
.resume-sheet-stack,
.editor-stack {
  display: grid;
  gap: 14px;
}

.editor-section {
  padding: 14px;
  border: 1px solid #000000;
  background: #ffffff;
}

.editor-section .panel-head {
  margin-bottom: 10px;
}

.resume-sheet {
  padding: 16px;
  border: 2px solid #000000;
  background: #ffffff;
  box-shadow: 6px 6px 0 0 #000000;
}

.resume-sheet.compact {
  min-height: 200px;
}

.resume-columns {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
}

.section-divider {
  height: 1px;
  background: #000000;
  margin: 14px 0;
}

.resume-kpi {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.resume-kpi .metric-card {
  padding: 12px;
  border: 1px solid #000000;
  background: #ffffff;
  box-shadow: none;
}

.tiny {
  font-size: 12px;
  color: var(--muted);
}

.resume-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #000000;
  margin-bottom: 16px;
}

.resume-tabs button,
.resume-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #000000;
  border-bottom: 0;
  background: #e5e5e0;
  color: #6b7280;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.resume-tabs button.active,
.resume-tabs a.active {
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  box-shadow: 2px -2px 0 0 rgba(0, 0, 0, 0.1);
}

.resume-page {
  width: min(100%, 520px);
  min-height: 700px;
  margin: 0 auto;
  padding: 24px;
  border: 2px solid #000000;
  background: #ffffff;
  box-shadow: 6px 6px 0 0 #000000;
}

.resume-page h2 {
  margin-top: 0;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  padding-left: 16px;
  border-left: 3px solid var(--accent);
}

.tree {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tree li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-strong);
}

.slider-row {
  display: grid;
  gap: 8px;
}

.slider-row input[type="range"] {
  width: 100%;
}

.placeholder-board,
.wire-board,
.map-board {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.placeholder-board,
.wire-board {
  padding: 16px;
}

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

.placeholder-box {
  min-height: 86px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(148, 163, 184, 0.04)),
    var(--card);
}

.placeholder-box strong {
  display: block;
  margin-bottom: 6px;
}

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

.flow-step {
  position: relative;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-strong);
}

.flow-step::after {
  content: "→";
  position: absolute;
  right: -11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 700;
}

.flow-grid .flow-step:last-child::after {
  display: none;
}

.progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, white));
}

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

.state-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-strong);
  font-size: 13px;
}

.map-board {
  position: relative;
  min-height: 640px;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    #f3ead5;
  background-size: auto, 44px 44px, 44px 44px, auto;
}

.theme-town .map-board::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.24), transparent 24%),
    radial-gradient(circle at 80% 30%, rgba(45, 106, 79, 0.08), transparent 28%);
  pointer-events: none;
}

.map-road {
  position: absolute;
  background: rgba(150, 124, 86, 0.28);
  border: 1px solid rgba(120, 92, 51, 0.18);
  border-radius: 999px;
}

.map-block {
  position: absolute;
  padding: 10px 12px;
  border: 1px solid rgba(120, 92, 51, 0.28);
  border-radius: 14px;
  background: rgba(255, 248, 236, 0.96);
  box-shadow: 0 10px 24px rgba(99, 72, 31, 0.12);
  font-size: 12px;
}

.map-agent {
  position: absolute;
  width: 90px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(45, 106, 79, 0.24);
  background: rgba(245, 255, 250, 0.95);
  box-shadow: 0 10px 20px rgba(45, 106, 79, 0.12);
  font-size: 12px;
  text-align: center;
}

.map-agent strong {
  display: block;
  margin-bottom: 4px;
}

.mini-matrix {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.mini-matrix .placeholder-box {
  min-height: 64px;
}

.notice-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent-soft) 58%, var(--card-strong));
}

.notice-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.theme-resume .notice-card {
  border: 1px solid #000000;
  border-left: 4px solid #1d4ed8;
  border-radius: 0;
  background: #f7fbff;
}

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

.entry-shell {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.entry-actions {
  display: grid;
  gap: 8px;
  padding-top: 28px;
}

.mini-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-strong);
  color: var(--text);
  font-weight: 700;
}

.theme-resume .mini-icon-btn {
  border-color: #000000;
  border-radius: 0;
  box-shadow: 2px 2px 0 0 rgba(0, 0, 0, 0.18);
}

.builder-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 92%, transparent);
}

.theme-resume .builder-footer {
  border-top-color: #000000;
  background: #f6f5ef;
}

.outline-list {
  display: grid;
  gap: 12px;
}

.outline-item {
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--card-strong);
}

.outline-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.theme-resume .outline-item {
  border-color: #1d4ed8;
  border-radius: 0;
  background: #f7fbff;
}

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

.compact-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.timeline-board {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-strong);
}

.timeline-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.timeline-ruler {
  position: relative;
  height: 116px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(148, 163, 184, 0.06)),
    var(--card);
}

.timeline-ruler::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 59px,
      rgba(148, 163, 184, 0.18) 60px,
      rgba(148, 163, 184, 0.18) 61px
    );
  pointer-events: none;
}

.timeline-band {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 40px;
  height: 36px;
}

.timeline-segment {
  position: absolute;
  top: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid rgba(79, 140, 255, 0.55);
  border-radius: 10px;
  background: rgba(79, 140, 255, 0.26);
  font-size: 11px;
  overflow: hidden;
}

.timeline-segment.warning {
  border-color: rgba(247, 184, 75, 0.72);
  background: rgba(247, 184, 75, 0.22);
}

.timeline-playhead {
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: #f87171;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.18);
}

.timeline-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-strong);
  font-size: 12px;
}

.toggle-chip input {
  margin: 0;
}

.task-split {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
}

.job-detail {
  display: grid;
  gap: 14px;
}

.task-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.thumb-card {
  width: 128px;
}

.thumb-frame {
  position: relative;
  height: 72px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 16px;
  background:
    linear-gradient(140deg, rgba(241, 245, 249, 0.82), rgba(203, 213, 225, 0.44)),
    rgba(255, 255, 255, 0.86);
}

.thumb-frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 10px;
  border: 1px dashed rgba(100, 116, 139, 0.32);
}

.thumb-frame::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.thumb-meta {
  margin-top: 8px;
}

.thumb-meta strong {
  display: block;
  font-size: 13px;
}

.thumb-meta span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.command-dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(209, 213, 219, 0.8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.command-pill {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 74px;
}

.command-pill strong {
  font-size: 12px;
}

.command-pill span {
  font-size: 10px;
  color: var(--muted);
}

.command-divider {
  width: 1px;
  height: 30px;
  background: rgba(148, 163, 184, 0.35);
}

.command-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-family: var(--mono);
}

.settings-cloud {
  padding: 14px;
  border: 1px solid rgba(209, 213, 219, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.chat-stream {
  display: grid;
  gap: 12px;
}

.chat-row {
  display: flex;
}

.chat-row.user {
  justify-content: flex-end;
}

.chat-entry {
  max-width: 220px;
}

.chat-bubble {
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.82);
  font-size: 13px;
  line-height: 1.55;
}

.chat-row.user .chat-bubble {
  background: rgba(226, 232, 240, 0.56);
}

.chat-bubble.live {
  border-style: dashed;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.trigger-card {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.32);
}

.trigger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.response-shell {
  display: grid;
  gap: 14px;
}

.response-card {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
}

.response-card + .response-card {
  border-top-width: 3px;
  border-top-color: rgba(15, 23, 42, 0.4);
}

.drawer-section {
  padding: 12px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.switch-demo {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #2563eb;
}

.switch-demo::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 19px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
}

.counter-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.counter-stepper button {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.town-top-strip {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  z-index: 2;
}

.town-chip {
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid rgba(120, 92, 51, 0.22);
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.96);
  box-shadow: 0 10px 24px rgba(99, 72, 31, 0.14);
  font-size: 12px;
}

.town-chip strong {
  display: block;
  margin-bottom: 4px;
}

.town-sidecard {
  position: absolute;
  right: 16px;
  top: 84px;
  width: 320px;
  z-index: 2;
}

.town-feed {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: min(360px, calc(100% - 32px));
  z-index: 2;
}

.town-feed .list-item {
  background: rgba(255, 250, 240, 0.92);
}

.need-stack {
  display: grid;
  gap: 10px;
}

.need-line {
  display: grid;
  grid-template-columns: 72px 1fr 42px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.need-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(120, 92, 51, 0.14);
}

.need-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2d6a4f, #7fb77e);
}

.need-fill.warn {
  background: linear-gradient(90deg, #d97706, #f7b84b);
}

.need-fill.danger {
  background: linear-gradient(90deg, #b3472a, #ef4444);
}

@media (max-width: 1180px) {
  .desktop-window,
  .app-shell,
  .split-2,
  .split-3,
  .preview-layout,
  .resume-body,
  .speech-shell,
  .task-split,
  .matrix-pair {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 1024px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .form-grid,
  .inline-field-grid {
    grid-template-columns: 1fr;
  }

  body {
    padding: 16px;
  }

  .topbar,
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
