@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #110c17;
  --bg-grid: #17101f;
  --panel-bg: #1a1421;
  --panel-bg-soft: #201929;
  --border: #392e46;
  --border-soft: #2a2233;
  --accent: #e0227f;
  --accent-dim: #7a1a52;
  --accent-glow: rgba(224, 34, 127, 0.35);
  --cyan: #38e6cf;
  --cyan-dim: #1c6e64;
  --text: #ece6f2;
  --text-dim: #9d8dae;
  --text-faint: #6d5f7c;
  --danger: #ff6b6b;
  --radius: 2px;
  --font-ui: 'Rajdhani', 'Segoe UI', sans-serif;
  --font-data: 'IBM Plex Mono', 'Consolas', monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  background-image: linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 34px 34px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.4;
  padding-bottom: 60px;
}

/**
 * login.css
 * ----------------------------------------------------------------------
 * Page-specific styles for login.html. Relies on character-sheet.css
 * being loaded first for design tokens (--bg, --accent, --cyan, etc.),
 * fonts, the body grid background, and the .panel / .panel-header /
 * .panel-body classes.
 * ----------------------------------------------------------------------
 */

body.login-body {
  min-height: 100vh;
  padding-bottom: 0; /* override the sheet's footer spacing */
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrap {
  width: 100%;
  max-width: 380px;
  padding: 24px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 22px;
  text-align: center;
}

.login-brand .mark {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-shadow: 0 0 18px var(--accent-glow);
}

.login-brand .sub {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.login-panel {
  width: 100%;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.login-label {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.login-input {
  width: 100%;
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--text);
  background: var(--panel-bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan);
}

.login-btn {
  margin-top: 4px;
  width: 100%;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 11px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.login-btn:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 16px var(--accent-glow);
}

.login-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.login-footnote {
  margin: 18px 0 0;
  text-align: center;
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--text-faint);
}

/* ---------------------------------------------------------------- */
/* Top menu bar (Game / Character / account)                          */
/* ---------------------------------------------------------------- */
.menu-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 16px;
  background: var(--panel-bg-soft);
  border-bottom: 1px solid var(--border);
}

.menu-bar-left,
.menu-bar-right {
  display: flex;
  align-items: center;
  height: 100%;
}

.menu-dropdown {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.menu-trigger {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.menu-dropdown:hover .menu-trigger,
.menu-dropdown:focus-within .menu-trigger {
  background: var(--panel-bg);
  color: var(--text);
}

.menu-dropdown-panel {
  position: absolute;
  top: 44px;
  left: 0;
  min-width: 180px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
}

.menu-dropdown:hover .menu-dropdown-panel,
.menu-dropdown:focus-within .menu-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-item {
  display: block;
  padding: 8px 10px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.menu-item:hover {
  background: var(--panel-bg-soft);
  color: var(--cyan);
}

/* Account icon, square box, right-aligned dropdown */
.account-dropdown {
  margin-left: 8px;
}

.account-trigger {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-dim);
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.menu-dropdown:hover .account-trigger,
.menu-dropdown:focus-within .account-trigger {
  color: var(--cyan);
  border-color: var(--cyan-dim);
  background: var(--panel-bg);
}

.account-icon {
  width: 20px;
  height: 20px;
}

.account-icon path {
  stroke: currentColor;
}

.account-panel {
  left: auto;
  right: 0; /* keep the rightmost dropdown from overflowing off-screen */
}

/* ---------------------------------------------------------------- */
/* Top bar                                                            */
/* ---------------------------------------------------------------- */
.top-bar {
  position: sticky;
  top: 44px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(17, 12, 23, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand .mark {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-shadow: 0 0 14px var(--accent-glow);
}

.brand .sub {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

#toast {
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--cyan);
  opacity: 0;
  transition: opacity 0.25s ease;
}

#toast.show {
  opacity: 1;
}

.edit-toggle-btn {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--text);
  background: var(--panel-bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.edit-toggle-btn:hover {
  border-color: var(--accent);
  color: #fff;
}

.edit-toggle-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a0a12;
}

/* ---------------------------------------------------------------- */
/* Meta strip (character / player / notes)                            */
/* ---------------------------------------------------------------- */
.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 16px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.meta-field {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1 1 220px;
}

.meta-field .label {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  text-transform: uppercase;
  white-space: nowrap;
}

.meta-field .text-field {
  flex: 1;
  border-bottom: 1px dashed var(--border-soft);
  min-height: 20px;
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--text);
}

/* ---------------------------------------------------------------- */
/* Layout grid                                                        */
/* ---------------------------------------------------------------- */
.sheet-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 24px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

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

@media (max-width: 860px) {
  .sheet-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- */
/* Panels                                                             */
/* ---------------------------------------------------------------- */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dim) 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 100%, 0 100%);
  padding: 8px 40px 8px 16px;
  margin-right: -1px;
}

.panel-header h2 {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-btn {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  padding: 4px 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}

.header-btn:hover {
  background: #fff;
  color: var(--accent-dim);
}

.panel-body {
  padding: 16px 18px 18px;
}

.panel-body.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
}

.panel-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subhead {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 14px 0 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.subhead:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* ---------------------------------------------------------------- */
/* Stat rows (attributes / defences / resources)                      */
/* ---------------------------------------------------------------- */
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row .label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------- */
/* Number field widget: [-]  3  [+]                                   */
/* ---------------------------------------------------------------- */
.number-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.num-value {
  min-width: 30px;
  text-align: center;
  font-family: var(--font-data);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel-bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px 4px;
}

.num-btn {
  display: none; /* only shown in edit mode */
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  font-family: var(--font-data);
  font-size: 14px;
  line-height: 1;
  color: var(--cyan);
  background: var(--panel-bg-soft);
  border: 1px solid var(--cyan-dim);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.num-btn:hover {
  background: var(--cyan);
  color: #071a17;
}

body.edit-mode .num-btn {
  display: inline-flex;
}

/* ---------------------------------------------------------------- */
/* Pool field widget: circles in view mode, number in edit mode       */
/* ---------------------------------------------------------------- */
.pool-field {
  display: flex;
  align-items: center;
}

.pool-circles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pool-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.pool-circle:hover {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.pool-circle.filled {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.pool-edit {
  display: none;
}

body.edit-mode .pool-circles {
  display: none;
}

body.edit-mode .pool-edit {
  display: inline-flex;
}

.edge-refresh-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.refresh-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.refresh-inline .label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Edge gets slightly larger cyan circles to read as the "hero" pool */
.edge-pool .pool-circle {
  width: 20px;
  height: 20px;
  border-color: var(--cyan);
}

.edge-pool .pool-circle.filled {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(56, 230, 207, 0.45);
}

/* ---------------------------------------------------------------- */
/* Text fields                                                        */
/* ---------------------------------------------------------------- */
.text-field {
  min-height: 20px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text);
  outline: none;
  padding: 2px 2px;
  border-radius: var(--radius);
}

.text-field:empty::before {
  content: attr(data-placeholder);
  color: var(--text-faint);
}

.text-field[contenteditable='true'] {
  background: var(--panel-bg-soft);
  box-shadow: inset 0 0 0 1px var(--border);
}

.text-field[contenteditable='true']:focus {
  box-shadow: inset 0 0 0 1px var(--cyan);
}

/* ---------------------------------------------------------------- */
/* Checkbox widget - always interactive, like pool circles            */
/* ---------------------------------------------------------------- */
.checkbox-el {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
  background-color: var(--cyan-dim);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http://www.w3.org/2000/svg%22%20color%3D%22%23000000%22%3E%3Cpath%20d%3D%22M7%204H4V7%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M4%2011V13%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M11%204H13%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M11%2020H13%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M20%2011V13%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M17%204H20V7%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M7%2020H4V17%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M17%2020H20V17%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3C/svg%3E")
    no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http://www.w3.org/2000/svg%22%20color%3D%22%23000000%22%3E%3Cpath%20d%3D%22M7%204H4V7%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M4%2011V13%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M11%204H13%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M11%2020H13%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M20%2011V13%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M17%204H20V7%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M7%2020H4V17%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3Cpath%20d%3D%22M17%2020H20V17%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3C/svg%3E")
    no-repeat center / contain;
  transition: background-color 0.12s ease;
}

.checkbox-el:hover {
  background-color: var(--cyan);
}

.checkbox-el:checked {
  background-color: var(--cyan);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http://www.w3.org/2000/svg%22%20color%3D%22%23000000%22%3E%3Cpath%20d%3D%22M3%2020.4V3.6C3%203.26863%203.26863%203%203.6%203H20.4C20.7314%203%2021%203.26863%2021%203.6V20.4C21%2020.7314%2020.7314%2021%2020.4%2021H3.6C3.26863%2021%203%2020.7314%203%2020.4Z%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%3C/path%3E%3Cpath%20d%3D%22M7%2012.5L10%2015.5L17%208.5%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http://www.w3.org/2000/svg%22%20color%3D%22%23000000%22%3E%3Cpath%20d%3D%22M3%2020.4V3.6C3%203.26863%203.26863%203%203.6%203H20.4C20.7314%203%2021%203.26863%2021%203.6V20.4C21%2020.7314%2020.7314%2021%2020.4%2021H3.6C3.26863%2021%203%2020.7314%203%2020.4Z%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%3C/path%3E%3Cpath%20d%3D%22M7%2012.5L10%2015.5L17%208.5%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/path%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- */
/* Select widget (dropdown)                                           */
/* ---------------------------------------------------------------- */
.select-el {
  width: 100%;
  font-family: var(--font-data);
  font-size: 13px;
  color: var(--text);
  background: var(--panel-bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 6px;
  outline: none;
}

.select-el:focus {
  border-color: var(--cyan);
}

.select-el:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------- */
/* Row-based list sections (shared skeleton)                          */
/* ---------------------------------------------------------------- */
.row-remove-btn {
  display: none;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--danger);
  color: var(--danger);
  background: transparent;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.row-remove-btn:hover {
  background: var(--danger);
  color: #2a0a0a;
}

body.edit-mode .row-remove-btn {
  display: inline-flex;
}

.add-row-btn {
  display: none;
  margin-top: 8px;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--cyan);
  background: transparent;
  border: 1px dashed var(--cyan-dim);
  border-radius: var(--radius);
  padding: 6px 12px;
  cursor: pointer;
}

.add-row-btn:hover {
  border-color: var(--cyan);
  background: rgba(56, 230, 207, 0.08);
}

body.edit-mode .add-row-btn {
  display: inline-block;
}

/* Complications */
.complication-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-soft);
}

.complication-row:last-of-type {
  border-bottom: none;
}

.complication-name {
  flex: 1;
  min-width: 0;
}

/* Qualities */
.quality-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
}

.quality-row:last-of-type {
  border-bottom: none;
}

.quality-name {
  flex: 2;
  min-width: 0;
}

.quality-category {
  flex: 1;
  min-width: 0;
  color: var(--text-dim);
  font-style: italic;
}

/* Tags */
.tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.tag-name {
  flex: 1;
  min-width: 0;
}

.tag-name:not(:empty)::before {
  content: '#';
  color: var(--cyan);
  margin-right: 2px;
}

/* Focuses */
.focus-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
}

.focus-row:last-of-type {
  border-bottom: none;
}

.focus-name {
  flex: 1;
  min-width: 0;
}

/* Talents */
.talent-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.7fr 2fr auto;
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
}

.talent-row:last-of-type {
  border-bottom: none;
}

.talent-name {
  font-weight: 600;
}

.talent-focus,
.talent-type {
  color: var(--text-dim);
  font-family: var(--font-data);
  font-size: 13px;
}

.talent-desc {
  color: var(--text-dim);
  font-size: 13px;
}

.talents-head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.7fr 2fr auto;
  gap: 10px;
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.talents-head span {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Conditions */
.condition-row {
  display: grid;
  grid-template-columns: 2.4fr 1fr 1fr;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border-soft);
}

.condition-row:last-of-type {
  border-bottom: none;
}

.condition-type,
.condition-duration {
  font-family: var(--font-data);
  font-size: 13px;
  color: var(--text-dim);
}

.conditions-head {
  display: grid;
  grid-template-columns: 2.4fr 1fr 1fr;
  gap: 10px;
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.conditions-head span {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Equipment */
.equipment-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border-soft);
}

.equipment-row:last-of-type {
  border-bottom: none;
}

.equipment-desc {
  flex: 1;
  min-width: 0;
}

.qty-input {
  width: 48px;
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--text);
  background: var(--panel-bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 2px;
  outline: none;
}

.qty-input:focus {
  border-color: var(--cyan);
}

/* ---------------------------------------------------------------- */
/* Footer note                                                        */
/* ---------------------------------------------------------------- */
.sheet-footer {
  max-width: 1280px;
  margin: 8px auto 0;
  padding: 0 24px;
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--text-faint);
  align-self: center;
}

/* ---------------------------------------------------------------- */
/* Accessibility                                                      */
/* ---------------------------------------------------------------- */
button:focus-visible,
.text-field:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
