body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  background: #f6f7f9;
  color: #111;
}

[hidden] {
  display: none !important;
}

.container {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 16px;
}

.header {
  position: relative;
  display: grid;
  grid-template-columns: 156px max-content 156px;
  column-gap: 18px;
  align-items: center;
  justify-content: center;
  margin: 6px 0 26px;
}

.header-left {
  grid-column: 1;
  justify-self: start;
  align-self: center;
  display: flex;
  gap: 8px;
  align-items: center;
}

.header-btn {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9ced6;
  background: #fff;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.header-btn:hover {
  background: #eef1f5;
}

.brand {
  grid-column: 2;
  justify-self: center;
}

.header-right {
  grid-column: 3;
  justify-self: end;
  align-self: center;
  position: relative;
}

.logo {
  display: block;
  height: clamp(56px, 10vw, 96px);
  width: auto;
  max-width: min(520px, 90vw);
}

.meta {
  display: none;
}

@media (max-width: 760px) {
  .header {
    grid-template-columns: 1fr;
    margin: 6px 0 18px;
  }

  .header-left {
    grid-column: 1;
    justify-self: center;
    margin-bottom: 10px;
  }

  .brand {
    grid-column: 1;
  }

  .header-right {
    position: absolute;
    right: 0;
    top: 0;
  }
}

.board-shell {
  --dash-left-w: 156px;
  --dash-right-w: 156px;
  display: grid;
  grid-template-columns: var(--dash-left-w) max-content var(--dash-right-w);
  column-gap: 18px;
  align-items: start;
  justify-content: center;
  grid-auto-flow: row;
}

.board-shell.no-left {
  --dash-left-w: 0px;
}

.board-shell.no-right {
  --dash-right-w: 0px;
}

.board-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  grid-column: 2;
  grid-row: 1;
}

.board-stage {
  position: relative;
  display: inline-block;
}

.board-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(246, 247, 249, 0.92);
  z-index: 20;
}

.board-overlay-card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.board-overlay-box {
  background: #fff;
  border: 1px solid #c9ced6;
  border-radius: 10px;
  padding: 12px 14px;
  color: #111;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

.board-overlay-msg {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.board-overlay-info-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
}

.board-overlay-info-body {
  font-size: 13px;
  line-height: 1.35;
  color: #222;
  white-space: pre-line;
  max-height: 340px;
  overflow: auto;
  padding-right: 4px;
}

.board-overlay-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.board-overlay-close {
  height: 40px;
  min-width: 120px;
  border-radius: 10px;
  font-weight: 700;
}

.board-stage.is-blocked .board-overlay {
  display: block;
}

.board-stage.is-info .board-overlay {
  display: block;
}

.board-stage.is-puzzlepicker .board-overlay {
  display: block;
}

.board-stage.is-confirm .board-overlay {
  display: block;
}

.board-stage.is-classify .board-overlay {
  display: block;
}

.classify-time-line {
  text-align: center;
  font-weight: 800;
  margin-bottom: 10px;
}

.classify-actions {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.classify-actions legend {
  font-weight: 700;
  padding: 0 4px;
}

.classify-actions label {
  display: flex;
  align-items: center;
  gap: 8px;
}

html[data-theme="dark"] .classify-actions {
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.45);
}

.classify-suggested {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 217, 102, 0.35);
  border: 1px solid rgba(255, 217, 102, 0.8);
  font-weight: 700;
}

.board-stage.is-blocked #sudoku-grid input,
.board-stage.is-blocked #sudoku-grid .cell-notes {
  visibility: hidden;
}

.board-stage.is-info #sudoku-grid input,
.board-stage.is-info #sudoku-grid .cell-notes {
  visibility: hidden;
}

.board-stage.is-puzzlepicker #sudoku-grid input,
.board-stage.is-puzzlepicker #sudoku-grid .cell-notes {
  visibility: hidden;
}

.board-stage.is-confirm #sudoku-grid input,
.board-stage.is-confirm #sudoku-grid .cell-notes {
  visibility: hidden;
}

.board-stage.is-classify #sudoku-grid input,
.board-stage.is-classify #sudoku-grid .cell-notes {
  visibility: hidden;
}

.inline-messages {
  position: relative;
  height: 0;
  max-width: 420px;
}

.inline-messages .messages {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.board-right {
  position: sticky;
  top: 16px;
  grid-column: 1;
  grid-row: 1;
}

.board-right-alt {
  position: sticky;
  top: 16px;
  grid-column: 3;
  grid-row: 1;
  width: 156px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.digitpad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 156px;
  margin: 0 0 8px;
}

.digitpad-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  color: #333;
}

@media (max-width: 760px) {
  .board-shell {
    grid-template-columns: 156px max-content;
    justify-content: center;
  }

  .board-right {
    position: static;
  }

  .board-right-alt {
    position: static;
    grid-column: 1 / span 2;
    grid-row: 2;
    margin-top: 12px;
  }
}

@media (max-width: 620px) {
  .board-shell {
    overflow-x: auto;
    justify-content: start;
  }
}

.digitpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 156px;
}

.side-actions {
  width: 156px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-actions-info {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}

.gear-btn {
  height: 26px;
  width: 26px;
  font-size: 16px;
  line-height: 1;
}

.settings-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  max-width: calc(100vw - 32px);
  padding: 10px 10px;
  border: 1px solid #c9ced6;
  border-radius: 10px;
  background: #fff;
  color: #222;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  z-index: 30;
}

.settings-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.settings-title {
  font-size: 14px;
  font-weight: 800;
  color: #111;
}

.settings-close {
  height: 24px;
  width: 24px;
  padding: 0;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
}

.settings-section {
  margin-top: 10px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #333;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px;
  border-radius: 8px;
  user-select: none;
}

.settings-item:hover {
  background: rgba(25, 118, 210, 0.06);
}

.settings-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

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

.side-actions form {
  margin: 0;
}

.side-btn {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.side-btn-primary {
  font-size: 14px;
}

.side-btn-warning {
  background: #fff3cd;
  border-color: #f0c36d;
  color: #6b4f00;
}

.side-btn-warning:hover:not(:disabled) {
  background: #ffe8ad;
}

.overlay-label {
  display: block;
  margin: 8px 0 6px;
  color: #333;
  font-size: 14px;
}

.overlay-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 420px;
}

.overlay-label-row .overlay-label {
  margin: 8px 0 6px;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
  width: 100%;
  max-width: 420px;
}

.diffbtn {
  height: 34px;
  padding: 6px 6px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
}

.diffbtn.is-active {
  outline: 3px solid #1976d2;
  outline-offset: 0;
}

.overlay-select {
  width: 100%;
  max-width: 420px;
}

.board-overlay-puzzles {
  position: relative;
}

.picker-help-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(246, 247, 249, 0.92);
  border-radius: 8px;
  z-index: 5;
}

.picker-help-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid #c9ced6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  padding: 12px 14px;
}

.picker-help-body {
  font-size: 13px;
  line-height: 1.35;
  color: #222;
  white-space: pre-line;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}

.overlay-primary {
  height: 40px;
  min-width: 120px;
  border-radius: 10px;
  font-weight: 700;
}

.digitbtn {
  height: 44px;
  min-width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  user-select: none;
}

.digitbtn .digit {
  font-weight: 700;
}

.digitbtn .count {
  font-size: 12px;
  color: #666;
}

.digitbtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.candbtn {
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #c9ced6;
  border-radius: 6px;
  background: #fff;
}

.candbtn.is-active {
  outline: 3px solid #1976d2;
  outline-offset: 0;
}

.cand-mini {
  position: relative;
  width: 32px;
  height: 32px;
  border: 1px solid #aab3c2;
  border-radius: 6px;
  background: #fff;
}

.cand-text {
  position: absolute;
  font-size: 10px;
  line-height: 1;
  color: #333;
  opacity: 0.85;
  user-select: none;
}

.cand-text-top {
  top: 3px;
  left: 3px;
}

.cand-text-mid {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.cand-text-bot {
  bottom: 3px;
  right: 3px;
}

.candpad {
  width: 156px;
}

.cand-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}

.cand-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  color: #333;
}

.cand-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.paintpad {
  width: 156px;
}

.timerpad {
  width: 156px;
}

.scorespad {
  width: 156px;
}

.scores-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
}

.scores-title {
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

.scores-meta {
  font-size: 11px;
  line-height: 1.2;
  color: #555;
  margin-bottom: 6px;
}

.scores-note {
  margin-top: 4px;
  color: #b00020;
}

.scores-list {
  margin: 0;
  padding: 0 0 0 16px;
}

.scores-item,
.scores-empty {
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.scores-item {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.score-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #111;
}

.score-player {
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 72px;
}

.dash-section.has-top-sep {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #c9ced6;
}

.paint-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}

.paint-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  color: #333;
}

.info-pop {
  position: relative;
}

.info-pop > summary {
  list-style: none;
}

.info-pop > summary::-webkit-details-marker {
  display: none;
}

.info-btn {
  height: 20px;
  width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #aab3c2;
  background: #fff;
  color: #333;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.info-pop[open] .info-btn {
  outline: 3px solid rgba(25, 118, 210, 0.35);
  outline-offset: 1px;
}

.info-card {
  position: absolute;
  top: 26px;
  right: 0;
  width: 220px;
  padding: 10px 10px;
  border: 1px solid #c9ced6;
  border-radius: 8px;
  background: #fff;
  color: #222;
  font-size: 13px;
  line-height: 1.25;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  z-index: 10;
}

.info-card-wide {
  width: 380px;
  max-width: calc(100vw - 48px);
}

.paint-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.paintbtn {
  height: 24px;
  width: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #aab3c2;
  background: var(--swatch, white);
}

.paintbtn.is-active {
  outline: 3px solid #1976d2;
  outline-offset: 0;
}

.timer-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.timer-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.timer-label {
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

.timer-value {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: #111;
}

.timer-btn {
  margin-top: 10px;
  width: 100%;
  height: 40px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
}

.timer-btn.is-ready:not(:disabled) {
  background: #c8e6c9;
  border-color: #81c784;
}

.timer-btn.is-ready:not(:disabled):hover {
  background: #a5d6a7;
}

.timer-btn.is-running:not(:disabled) {
  background: #fff9c4;
  border-color: #fbc02d;
}

.timer-btn.is-running:not(:disabled):hover {
  background: #fff59d;
}

button {
  padding: 8px 10px;
  border: 1px solid #c9ced6;
  background: white;
  border-radius: 6px;
  cursor: pointer;
}

select {
  padding: 7px 8px;
  border: 1px solid #c9ced6;
  border-radius: 6px;
  background: white;
  max-width: 520px;
}

.grid {
  border-collapse: collapse;
  background: white;
  border: 2px solid #111;
}

.grid .cell {
  width: 44px;
  height: 44px;
  border: 1px solid #aab3c2;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.grid .cell.cell-fixed {
  background: #eef1f5;
}

.grid .cell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  z-index: 0;
}

.grid .cell:focus-within {
  outline: 3px solid #1976d2;
  outline-offset: -3px;
}

.cell-selected::before {
  background: rgba(25, 118, 210, 0.16);
}

.grid tr:nth-child(3n) .cell {
  border-bottom: 2px solid #111;
}

.grid .cell:nth-child(3n) {
  border-right: 2px solid #111;
}

.grid input {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  text-align: center;
  border: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  color: #0b2a6f;
  outline: none;
  caret-color: transparent;
}

.grid .cell.cell-bg-light input {
  color: #111;
}

.grid .cell.cell-bg-dark input {
  color: #fff;
}

.cell-notes {
  position: absolute;
  left: 2px;
  right: 2px;
  z-index: 1;
  font-size: 9px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.70);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.grid .cell.cell-bg-dark .cell-notes {
  color: rgba(255, 255, 255, 0.78);
}

.grid .cell.cell-bg-light .cell-notes {
  color: rgba(0, 0, 0, 0.70);
}

.notes-top {
  top: 4px;
  text-align: left;
  font-size: 8px;
}

.notes-mid {
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-size: 12px;
  color: #111;
}

.grid .cell.cell-bg-dark .notes-mid {
  color: #fff;
}

.grid .cell.cell-bg-light .notes-mid {
  color: #111;
}

.notes-bot {
  bottom: 4px;
  text-align: right;
  font-size: 8px;
}

.cell-has-value .cell-notes {
  display: none;
}

.cell-fixed input {
  font-weight: 700;
  color: #111;
}


.cell-error {
  box-shadow: inset 0 0 0 2px #d32f2f;
}

.cell-error input {
  color: #b00020;
}

/* Keep error indication visible even when the cell is focused (blue outline draws inside). */
.cell-error:focus-within {
  box-shadow: inset 0 0 0 4px #d32f2f;
}

/* Subtle cross only when focused/selected, to avoid clutter. */
.cell-error:focus-within::after {
  content: "";
  position: absolute;
  inset: 7px;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(45deg, transparent 48%, rgba(211, 47, 47, 0.55) 49%, rgba(211, 47, 47, 0.55) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(211, 47, 47, 0.55) 49%, rgba(211, 47, 47, 0.55) 51%, transparent 52%);
}

.hint {
  color: #555;
  font-size: 14px;
}

.messages {
  margin-bottom: 12px;
}

.message {
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid #c9ced6;
}

.message-error {
  border-color: #ef9a9a;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: #0f1318;
  color: #e9edf3;
}

html[data-theme="dark"] .hint {
  color: #a6b0bf;
}

html[data-theme="dark"] button:not(.paintbtn) {
  background: #151c25;
  border-color: #334155;
  color: #e9edf3;
}

html[data-theme="dark"] .timer-btn.is-ready:not(:disabled),
html[data-theme="dark"] .timer-btn.is-running:not(:disabled) {
  color: #111;
}

html[data-theme="dark"] select {
  background: #151c25;
  border-color: #334155;
  color: #e9edf3;
}

html[data-theme="dark"] .dash-section.has-top-sep {
  border-top-color: #2b3646;
}

html[data-theme="dark"] .settings-panel,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .message,
html[data-theme="dark"] .picker-help-card {
  background: #131a23;
  border-color: #334155;
  color: #e9edf3;
}

html[data-theme="dark"] .settings-title,
html[data-theme="dark"] .cand-title,
html[data-theme="dark"] .paint-title,
html[data-theme="dark"] .timer-label,
html[data-theme="dark"] .timer-value,
html[data-theme="dark"] .scores-title,
html[data-theme="dark"] .overlay-label {
  color: #e9edf3;
}

html[data-theme="dark"] .settings-section,
html[data-theme="dark"] .scores-meta,
html[data-theme="dark"] .digitbtn .count {
  color: #a6b0bf;
}

html[data-theme="dark"] .settings-item:hover {
  background: rgba(56, 189, 248, 0.08);
}

html[data-theme="dark"] .info-btn {
  background: #151c25;
  border-color: #334155;
  color: #e9edf3;
}

html[data-theme="dark"] .candbtn,
html[data-theme="dark"] .cand-mini {
  background: #151c25;
  border-color: #334155;
}

html[data-theme="dark"] .cand-text {
  color: #cdd6e3;
}

html[data-theme="dark"] .grid {
  background: #0e141b;
  border-color: #a6b0bf;
}

html[data-theme="dark"] .grid .cell {
  background: #131a23;
  border-color: #2b3646;
}

html[data-theme="dark"] .grid tr:nth-child(3n) .cell {
  border-bottom-color: #a6b0bf;
}

html[data-theme="dark"] .grid .cell:nth-child(3n) {
  border-right-color: #a6b0bf;
}

html[data-theme="dark"] .grid .cell.cell-fixed {
  background: #1a2330;
}

html[data-theme="dark"] .grid input {
  color: #cfe1ff;
}

html[data-theme="dark"] .cell-fixed input {
  color: #e9edf3;
}

html[data-theme="dark"] .cell-notes {
  color: rgba(233, 237, 243, 0.75);
}

html[data-theme="dark"] .notes-mid {
  color: #e9edf3;
}

html[data-theme="dark"] .scores-note {
  color: #ff6b7a;
}

html[data-theme="dark"] .score-time {
  color: #e9edf3;
}

html[data-theme="dark"] .score-player {
  color: #a6b0bf;
}

html[data-theme="dark"] .board-overlay {
  background: rgba(15, 19, 24, 0.82);
}

html[data-theme="dark"] .board-overlay-box {
  background: #131a23;
  border-color: #334155;
  color: #e9edf3;
}

html[data-theme="dark"] .board-overlay-info-body {
  color: #cdd6e3;
}

html[data-theme="dark"] .side-btn-warning {
  background: #3a2c0e;
  border-color: #8b6f2f;
  color: #f7e6bd;
}

html[data-theme="dark"] .picker-help-overlay {
  background: rgba(15, 19, 24, 0.92);
}

html[data-theme="dark"] .picker-help-body {
  color: #e9edf3;
}

/* Developer page (minimal; avoid redesigning the app). */
.dev-section {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] .dev-section {
  background: rgba(19, 26, 35, 0.7);
  border-color: rgba(148, 163, 184, 0.25);
}

.dev-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dev-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dev-row-between {
  align-items: center;
  justify-content: space-between;
}

.dev-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 280px;
}

.dev-input,
.dev-field input,
.dev-field textarea,
.dev-field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: white;
  color: inherit;
}

html[data-theme="dark"] .dev-input,
html[data-theme="dark"] .dev-field input,
html[data-theme="dark"] .dev-field textarea,
html[data-theme="dark"] .dev-field select {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.25);
}

.dev-primary {
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: #2563eb;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.dev-primary:hover {
  background: #1d4ed8;
}

.dev-danger {
  display: inline-block;
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: #dc2626;
  color: white;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.dev-danger:hover {
  background: #b91c1c;
}

.dev-actions {
  white-space: nowrap;
  text-align: right;
}

.dev-note {
  margin: 10px 0 0;
  opacity: 0.8;
  font-size: 0.95rem;
}

.dev-overview-caption {
  margin: 6px 0 10px;
  opacity: 0.85;
}

.dev-overview-table th:nth-child(2),
.dev-overview-table th:nth-child(3),
.dev-overview-table td:nth-child(2),
.dev-overview-table td:nth-child(3) {
  width: 160px;
  text-align: center;
}

.dev-overview-total td {
  font-weight: 700;
}

.dev-group-title {
  margin-top: 16px;
}

.dev-empty {
  opacity: 0.75;
  padding: 10px 0;
}

.dev-table-wrap {
  overflow-x: auto;
}

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

.dev-table th,
.dev-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  vertical-align: top;
}

html[data-theme="dark"] .dev-table th,
html[data-theme="dark"] .dev-table td {
  border-bottom-color: rgba(148, 163, 184, 0.22);
}

.dev-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

html[data-theme="dark"] .dev-link {
  color: #60a5fa;
}

.dev-best {
  white-space: nowrap;
  opacity: 0.9;
}

.dev-waiting-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.dev-chip {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: inherit;
  font-weight: 700;
  cursor: pointer;
}

html[data-theme="dark"] .dev-chip {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.25);
}

.dev-chip:hover {
  background: rgba(37, 99, 235, 0.1);
}

.dev-chip-active {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.35);
}

.dev-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
