.clock-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.clock-panel.clock-hide-advance .clock-section-label,
.clock-panel.clock-hide-advance .clock-buttons {
  display: none;
}
.clock-panel.clock-hide-advance .clock-controls {
  gap: 4px;
}
.clock-new-round-btn {
  border-color: var(--ui-accent);
  color: var(--ui-accent);
  font-size: 0.82rem;
  padding: 5px 14px;
  letter-spacing: 0.06em;
  position: relative;
}
.clock-new-round-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 1px solid var(--ui-border);
  border-radius: 3px;
  pointer-events: none;
}
.clock-new-round-btn:hover {
  background: var(--ui-bg-alt);
  box-shadow: 0 0 8px rgba(201, 162, 39, 0.15);
}
.clock-time-btn {
  color: var(--ui-fg) !important;
  border-color: var(--ui-border-strong) !important;
  opacity: 0.85;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
}
.clock-time-btn:hover {
  background: var(--ui-bg-alt);
  color: var(--ui-fg-strong) !important;
  border-color: var(--ui-accent) !important;
  opacity: 1;
  box-shadow: none;
}
.clock-world-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 7px;
  border-top: 1px solid var(--ui-border);
  padding-top: 6px;
  margin-top: 2px;
}
.clock-world-label {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--ui-fg-muted);
  opacity: 0.75;
  text-transform: uppercase;
}
.clock-world-time {
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: #e7dcc6;
  line-height: 1.35;
  white-space: normal;
}
.clock-world-time-emphasis {
  font-family: 'Uncial Antiqua', 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: #f4d878;
  text-shadow: 0 0 6px rgba(244, 216, 120, 0.28);
}
.clock-world-time-day-month {
  color: #f1a246;
}
.clock-world-time-year {
  color: #d45a5a;
}
.clock-turn-complete-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-color: rgba(79, 141, 218, 0.72);
  color: #d6e7ff;
  padding: 4px 8px;
}
.clock-turn-complete-btn.is-complete {
  border-color: rgba(142, 196, 122, 0.88);
  color: #e6ffd9;
  background: rgba(48, 92, 41, 0.25);
}
.clock-turn-complete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.clock-turn-status {
  font-family: 'Crimson Pro', serif;
  font-size: 0.76rem;
  color: var(--ui-fg-muted);
  line-height: 1.2;
}
.clock-turn-status.is-complete {
  color: #a3d58a;
}
.clock-recovery-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid var(--ui-border);
}
.clock-recovery-label {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--ui-fg-muted);
  opacity: 0.6;
  font-style: italic;
  white-space: nowrap;
}
.clock-panel.clock-gm-owned .clock-recovery-label::after {
  content: '  GM controls time';
  font-style: normal;
  letter-spacing: 0.05em;
  opacity: 0.9;
}
.clock-recovery-value {
  font-family: 'MedievalSharp', serif;
  font-size: 0.9rem;
  color: var(--ui-accent);
  opacity: 0.75;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.clock-recovery-status {
  font-family: 'MedievalSharp', serif;
  font-size: 0.9rem;
  color: var(--ui-accent);
  opacity: 0.85;
}
.clock-recovery-sub {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--ui-fg-muted);
  opacity: 0.6;
  text-transform: uppercase;
}
.clock-recovery-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-family: 'MedievalSharp', serif;
  font-size: 0.8rem;
  color: var(--ui-fg);
  opacity: 0.85;
}
.clock-player-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--ui-border);
}
.clock-player-note-label {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--ui-fg-muted);
  text-transform: uppercase;
}
.clock-player-note-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}
.clock-player-note-input {
  width: 100%;
  border: 1px solid var(--ui-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ui-fg);
  padding: 6px 8px;
  border-radius: 4px;
  font-family: 'Crimson Pro', serif;
  font-size: 0.82rem;
}
.clock-player-note-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.clock-player-note-status {
  min-height: 1.2em;
  font-family: 'Crimson Pro', serif;
  font-size: 0.72rem;
  color: var(--ui-fg-muted);
}
.clock-player-note-status.is-error {
  color: #f7b3a8;
}
@media (max-width: 600px) {
  .wound-mod-row {
    grid-template-columns: minmax(120px, 1fr) 4.2em auto;
  }
  .wound-duration-row {
    grid-template-columns: 1fr 4.2em minmax(6em, auto);
  }
  .wound-penalty-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .primary-transaction-controls {
    padding: 10px 0 2px;
  }
}
@media (max-width: 600px) {
  .clock-panel {
    gap: 12px;
  }
  .clock-face-img {
    width: 150px;
    height: 150px;
  }
  .clock-buttons {
    gap: 4px;
    width: min(170px, 100%);
  }
  .clock-player-note-row {
    grid-template-columns: 1fr;
  }
}
.sync-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 12px;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--parchment);
  background: rgba(0, 0, 0, 0.22);
  text-transform: uppercase;
}
.sync-connect-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 12, 8, 0.82);
  z-index: 2500;
  padding: 16px;
}
.sync-connect-modal.is-open {
  display: flex;
}
.sync-connect-card {
  width: min(420px, 100%);
  background: linear-gradient(180deg, rgba(45, 28, 16, 0.96), rgba(25, 14, 8, 0.96));
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  color: var(--parchment);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sync-connect-card h3 {
  margin: 0;
  color: var(--gold-shine);
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
  padding-bottom: 6px;
}
.sync-connect-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}
.sync-connect-field input {
  width: 100%;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.34);
  color: var(--parchment);
  font-family: 'MedievalSharp', serif;
  font-size: 0.95rem;
  padding: 7px 8px;
}
.sync-connect-field input:focus {
  outline: none;
  border-color: var(--gold-shine);
}
.sync-connect-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sync-connect-message {
  min-height: 1.2em;
  font-family: 'MedievalSharp', serif;
  font-size: 0.85rem;
  color: #f2dbc6;
}
.sync-connect-hint {
  font-family: 'MedievalSharp', serif;
  font-size: 0.78rem;
  color: #d7c29d;
  opacity: 0.9;
}
.gm-lock-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 8, 6, 0.66);
  z-index: 1500;
  pointer-events: none;
}
.gm-lock-overlay.is-visible {
  display: flex;
}
.gm-lock-overlay-card {
  max-width: 460px;
  border: 1px solid rgba(206, 104, 104, 0.75);
  border-radius: 10px;
  background: rgba(37, 14, 14, 0.94);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
  color: #ffe3e3;
  text-align: center;
  padding: 18px 20px;
}
.gm-lock-overlay-card h2 {
  margin: 0 0 8px 0;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffd8d8;
}
.gm-lock-overlay-card p {
  margin: 0;
  font-family: 'MedievalSharp', serif;
  font-size: 0.9rem;
  line-height: 1.35;
}
[data-sync-lock-disabled="1"]:not(.sync-lock-toggle-visible):not(.sync-lock-hidden),
.sync-lock-disabled {
  color: rgba(217, 217, 217, 0.9) !important;
  border-color: rgba(170, 170, 170, 0.58) !important;
  background: rgba(95, 95, 95, 0.2) !important;
  text-shadow: none !important;
  opacity: 0.78 !important;
}
[data-sync-lock-disabled="1"]:not(.sync-lock-toggle-visible)::placeholder,
.sync-lock-disabled::placeholder {
  color: rgba(186, 186, 186, 0.75) !important;
}
.sync-lock-hidden {
  display: none !important;
}
.sync-lock-toggle-visible:disabled {
  opacity: 1 !important;
  cursor: default !important;
}
.dashboard-sp .dashboard-input[data-sync-lock-disabled="1"] {
  background: none !important;
  animation: none !important;
  -webkit-text-fill-color: rgba(196, 196, 196, 0.9) !important;
}
#current-hp[data-sync-lock-disabled="1"],
.dashboard-hp .dashboard-input.sync-lock-disabled {
  background: var(--ui-input-bg) !important;
  color: var(--ui-danger) !important;
  -webkit-text-fill-color: var(--ui-danger) !important;
  border-bottom-color: var(--ui-accent) !important;
  opacity: 1 !important;
}
.status-btn[data-sync-lock-disabled="1"]:not(.status-active):not(.sync-lock-toggle-visible),
.status-btn.sync-lock-disabled:not(.status-active) {
  background: rgba(90, 90, 90, 0.22) !important;
  border-color: rgba(174, 174, 174, 0.48) !important;
  color: rgba(214, 214, 214, 0.9) !important;
}
.status-btn.status-active[data-sync-lock-disabled="1"]:not(.sync-lock-toggle-visible),
.status-btn.status-active.sync-lock-disabled {
  opacity: 1 !important;
}
.sync-mode-player-in-game .hp-injury-controls {
  display: none !important;
}
.sync-lock-dimmed {
  filter: none;
}
body.market-mode #pools,
body.market-mode #controls,
body.market-mode .panel,
body.market-mode #file-controls,
body.market-mode #equipment-grid {
  display: none !important;
}
body.market-mode .market-panel {
  display: block !important;
}
.market-panel {
  display: none;
  background: var(--ui-bg);
  border: 3px solid var(--ui-border-strong);
  border-top: 6px solid var(--gold);
  border-radius: 8px;
  padding: 20px;
  margin: 0 auto 20px auto;
  max-width: 1800px;
}
.market-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--rule-heavy);
}
.market-header h1 {
  font-family: 'UnifrakturMaguntia', 'Cinzel', serif;
  font-size: 2.5rem;
  color: var(--gold);
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
