.balance-display {
  padding: 16px 20px;
  background: transparent;
  border-radius: 2px;
  margin-bottom: 0;
  border: 1px solid transparent;
  border-bottom: 1px solid var(--rule-color);
  cursor: pointer;
  transition: all 0.2s ease;
}
.balance-display:hover {
  background: rgba(201, 162, 39, 0.06);
  border-color: var(--rule-color);
}
.balance-display:active {
  opacity: 0.9;
}
.balance-display.compact {
  padding: 12px;
  margin-bottom: 12px;
}
.balance-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.balance-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.equiv-label-text {
  font-family: 'UnifrakturCook', 'MedievalSharp', serif;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--ink-light);
  opacity: 0.6;
}
.balance-gold-suns {
  font-family: 'UnifrakturCook', 'MedievalSharp', serif;
  font-size: 1.1rem;
  color: var(--gold-dark);
  font-weight: 600;
}
.balance-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.balance-amount {
  font-family: 'MedievalSharp', 'Cinzel', serif;
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(
    180deg,
    #a8a8a8 0%,
    #707070 25%,
    #888888 50%,
    #606060 75%,
    #999999 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3),
    0 -1px 0 rgba(0, 0, 0, 0.4),
    1px 2px 3px rgba(0, 0, 0, 0.3),
    0 0 8px rgba(136, 136, 136, 0.2);
  line-height: 1;
  letter-spacing: -0.02em;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}
.compact .balance-amount {
  font-size: 2rem;
}
.currency-label {
  font-family: 'UnifrakturCook', 'MedievalSharp', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-light);
  letter-spacing: 0.1em;
  position: relative;
}
.compact .currency-label {
  font-size: 0.85rem;
}
.coin-purse-details {
  margin-top: 12px;
}
.primary-transaction-controls {
  margin-top: 12px;
  padding: 10px 0 2px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.coin-purse-details[hidden] {
  display: none !important;
}
.currency-equivalents {
  overflow: visible;
  margin-top: 0;
  padding: 0 20px;
  margin-bottom: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  padding-top: 10px;
}
.currency-equivalents .transaction-controls {
  margin-top: 10px;
}
.equiv-single-line {
  font-family: 'MedievalSharp', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.6;
  padding: 10px 0;
  text-align: left;
}
.equiv-rates-line {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-faint);
  padding-top: 0;
}
.transaction-controls {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.transaction-controls.compact {
  gap: 8px;
  flex-direction: column;
}
.transaction-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.transaction-label {
  font-family: 'UnifrakturCook', 'MedievalSharp', serif;
  font-size: 1rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: none;
  font-weight: 400;
  font-style: italic;
}
.inline-amount-input {
  width: 70px;
  padding: 6px 8px;
  border: none;
  border-bottom: 2px solid var(--gold-dark);
  border-radius: 0;
  background: transparent;
  font-family: 'MedievalSharp', 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  transition: all 0.2s ease;
}
.inline-amount-input:focus {
  outline: none;
  border-bottom-color: var(--gold);
  box-shadow: none;
  background: rgba(201, 162, 39, 0.06);
}
.inline-reason-input {
  flex: 1;
  min-width: 120px;
  padding: 6px 8px;
  border: none;
  border-bottom: 1px solid var(--rule-heavy);
  border-radius: 0;
  background: transparent;
  font-family: 'UnifrakturCook', 'MedievalSharp', serif;
  font-size: 0.95rem;
  color: var(--ink);
  font-style: italic;
  transition: all 0.2s ease;
}
.inline-reason-input:focus {
  outline: none;
  border-bottom-color: var(--gold);
  box-shadow: none;
  background: rgba(201, 162, 39, 0.06);
  font-style: normal;
}
.inline-reason-input::placeholder {
  color: var(--ink-faint);
  opacity: 0.6;
}
.inline-btn {
  padding: 7px 14px;
  border-radius: 4px;
  font-family: 'Uncial Antiqua', 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 50px;
  line-height: 1;
  letter-spacing: 0.04em;
  background-image: none;
  width: auto;
  height: auto;
  white-space: nowrap;
  text-shadow: none;
  -webkit-text-stroke: 0;
  paint-order: normal;
}
.deposit-btn {
  background:
    linear-gradient(138deg, #6aad7a 0%, transparent 22%),
    linear-gradient(228deg, #2a5a3a 0%, transparent 22%),
    linear-gradient(175deg, #4a7d5a 0%, #2a5a3a 100%);
  color: #e8f0e6;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 0 6px rgba(90, 143, 106, 0.2);
  border: none;
}
.deposit-btn:hover {
  filter: brightness(1.15);
}
.withdraw-btn {
  background:
    linear-gradient(138deg, var(--wax-shine) 0%, transparent 22%),
    linear-gradient(228deg, #5a0000 0%, transparent 22%),
    linear-gradient(175deg, var(--accent) 0%, #5a0000 100%);
  color: #f0e0e0;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 0 6px rgba(139, 0, 0, 0.2);
  border: none;
}
.withdraw-btn:hover {
  filter: brightness(1.15);
}
.inline-btn:active {
  opacity: 0.9;
}
.btn-seal-sm {
  width: 26px;
  min-height: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, var(--wax-shine) 0%, var(--wax-light) 25%, var(--wax-mid) 55%, var(--wax-deep) 100%) !important;
  color: var(--parchment);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wax-deep);
  padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.btn.btn-seal-sm::before {
  display: none;
}
.btn-seal-sm:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.transaction-row {
  display: flex;
  gap: 12px;
  flex: 1;
  align-items: flex-end;
  flex-wrap: wrap;
}
.transaction-row.compact {
  gap: 8px;
  width: 100%;
}
.amount-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
  flex: 0 1 auto;
}
.amount-input-group.compact {
  min-width: 100px;
  flex: 0 1 auto;
}
.reason-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}
.amount-label {
  font-family: 'UnifrakturCook', 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--ink-light);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.amount-controls {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.amount-input {
  flex: 1;
  padding: 8px;
  border: none;
  border-bottom: 2px solid var(--gold-dark);
  border-radius: 0;
  background: transparent;
  font-family: 'MedievalSharp', 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  transition: all 0.2s ease;
}
.amount-input.compact {
  padding: 6px;
  font-size: 1.1rem;
}
.amount-input:focus {
  outline: none;
  border-bottom-color: var(--gold);
  box-shadow: none;
  background: rgba(201, 162, 39, 0.06);
}
.reason-input {
  padding: 8px;
  border: none;
  border-bottom: 1px solid var(--rule-heavy);
  border-radius: 0;
  background: transparent;
  font-family: 'UnifrakturCook', 'MedievalSharp', serif;
  font-size: 1rem;
  color: var(--ink);
  transition: all 0.2s ease;
  font-style: italic;
}
.reason-input.compact {
  padding: 6px;
  font-size: 0.9rem;
}
.reason-input:focus {
  outline: none;
  border-bottom-color: var(--gold);
  box-shadow: none;
  background: rgba(201, 162, 39, 0.06);
  font-style: normal;
}
.reason-input::placeholder {
  color: var(--ink-faint);
  opacity: 0.6;
}

@media (max-width: 768px) {
  .purses-grid {
    grid-template-columns: 1fr;
  }
}
.amount-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.amount-btn {
  padding: 8px 16px;
  font-size: 1.5rem;
  line-height: 1;
  border-width: 2px;
  min-width: auto;
  font-weight: 700;
}
.amount-btn.small {
  padding: 6px 12px;
  font-size: 1.2rem;
}
.transaction-btn {
  background-image: none;
  width: auto;
  height: auto;
  white-space: nowrap;
  text-shadow: none;
  -webkit-text-stroke: 0;
  paint-order: normal;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.8rem;
  border-width: 1px;
  transition: all 0.2s ease;
}
.transaction-btn .btn-icon {
  font-size: 1rem;
  display: inline;
  background: none;
  border: none;
  width: auto;
  height: auto;
  box-shadow: none;
}
.history-btn {
  background: var(--gold-dark);
  border-color: var(--ink-light);
  color: var(--parchment);
}
.history-btn:hover {
  background: var(--ink-light);
  color: var(--parchment);
}
.transfer-btn {
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  border-color: var(--rule-heavy);
}
.transfer-btn:hover {
  background: var(--ink);
  color: var(--parchment);
}
.equipment-value-section {
  margin-top: 16px;
  padding: 12px 0;
  background: transparent;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--rule-color);
}
.equipment-value-btn:hover {
  filter: brightness(1.1);
}
.equipment-value-result {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(201, 162, 39, 0.08);
  border-radius: 2px;
  border: 1px solid var(--gold-dark);
  border-left: 3px solid var(--gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-width: 0;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.value-label {
  font-family: 'UnifrakturCook', 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 600;
  min-width: 0;
}
.value-amount {
  font-family: 'MedievalSharp', 'Cinzel', serif;
  font-size: clamp(1.05rem, 3.6vw, 1.5rem);
  font-weight: 700;
  color: var(--accent);
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.shield-combat-stats .combat-stat {
  min-width: 0;
}
.shield-combat-stats .combat-stat-value {
  display: inline-block;
  min-width: 4ch;
  font-size: clamp(1rem, 3vw, 1.3rem);
}
.shield-combat-stats .shield-stat-value {
  min-width: 4ch;
}
.weapon-detail-input.shield-number-input {
  min-width: 4ch;
}
.weapon-detail-input.shield-cost-input {
  min-width: 6ch;
}
@media (max-width: 700px) {
  .equipment-value-result {
    flex-wrap: wrap;
  }
  .value-amount {
    width: 100%;
    text-align: left;
  }
}
.transaction-history {
  margin-top: 20px;
  border-top: 2px solid var(--rule-heavy);
  padding-top: 16px;
  animation: slideDown 0.4s ease;
}
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.history-header h3 {
  font-family: 'UnifrakturCook', 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0;
  letter-spacing: 0.08em;
  font-weight: 700;
  position: relative;
}
.close-history {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.close-history:hover {
  background: var(--accent);
  color: white;
}
.history-scroll {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
  background: transparent;
  border-radius: 0;
}
.history-scroll::-webkit-scrollbar {
  width: 8px;
}
.history-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.history-scroll::-webkit-scrollbar-thumb {
  background: var(--ink-faint);
  border-radius: 1px;
}
.history-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--ink-light);
}
.history-entries {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.no-history {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-light);
  font-style: italic;
  font-family: 'MedievalSharp', serif;
}
.history-entry {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule-color);
  border-left: 3px solid var(--gold-dark);
  padding: 10px 12px;
  border-radius: 0;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  transition: all 0.2s ease;
  box-shadow: none;
}
.history-entry:hover {
  background: rgba(201, 162, 39, 0.06);
  box-shadow: none;
  transform: none;
}
.history-entry.deposit {
  border-left-color: #4a7d5a;
}
.history-entry.withdraw {
  border-left-color: var(--accent);
}
.history-entry.transfer {
  border-left-color: var(--ink-faint);
}
.history-date {
  font-family: 'UnifrakturCook', 'MedievalSharp', serif;
  font-size: 0.75rem;
  color: var(--ink-light);
  white-space: nowrap;
}
.history-reason {
  font-family: 'UnifrakturCook', 'MedievalSharp', serif;
  font-size: 0.9rem;
  color: var(--ink);
}
.history-reason input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--ink-light);
  padding: 2px 4px;
  font-family: 'UnifrakturCook', 'MedievalSharp', serif;
  font-size: 0.9rem;
  color: var(--ink);
}
.history-reason input:focus {
  outline: none;
  border-bottom-color: var(--gold);
  background: rgba(201, 162, 39, 0.1);
}
.history-amount {
  font-family: 'MedievalSharp', 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}
.history-amount.positive {
  color: #22c55e;
}
.history-amount.negative {
  color: #ef4444;
}
.history-remove {
  background: transparent;
  border: 1px solid var(--rule-heavy);
  color: var(--ink-faint);
  border-radius: 2px;
  padding: 3px 6px;
  cursor: pointer;
  font-size: 0.7rem;
  transition: all 0.2s ease;
  font-family: 'Uncial Antiqua', 'Cinzel', serif;
  letter-spacing: 0.04em;
}
.history-remove:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.creature-container {
  position: fixed;
  top: 50%;
  left: -800px;
  z-index: 9999;
  pointer-events: none;
  transform: translateY(-50%);
  transition: none;
}
.creature-container.creature-hidden {
  display: none;
}
.creature {
  width: 800px;
  height: auto;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
  transform: scaleX(-1);
}
.creature-container.walking {
  animation: walkAcross 8s linear forwards;
}
.creature-container.fleeing {
  animation: flee 0.35s ease-in forwards;
}
@keyframes walkAcross {
  0% {
    left: -800px;
  }
  100% {
    left: 0;
  }
}
@keyframes flee {
  0% {
    transform: translateY(-50%) translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-50%) translateX(-800px) scale(0.9);
    opacity: 0;
  }
}
.equip-active-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  padding: 0 4px;
}
.equip-active-text {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  color: var(--parchment);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}
.equip-description {
  min-height: auto !important;
  font-size: 0.9rem !important;
  font-family: 'Crimson Pro', serif !important;
  overflow: hidden !important;
  resize: none !important;
}
.equip-modifiers-section {
  border-top: 1px solid var(--rule-heavy);
  padding-top: 10px;
  margin-top: 4px;
}
.equip-modifiers-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.equip-no-mods {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  color: var(--ui-fg-muted);
  font-size: 0.85rem;
}
.equip-mod-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.equip-mod-row .equip-mod-target {
  flex: 1;
  min-width: 100px;
  font-size: 0.85rem;
}
.equip-mod-row .equip-mod-value {
  flex-shrink: 0;
}
.equip-mod-row .remove-equip-mod-btn {
  flex-shrink: 0;
  font-size: 0.7rem;
  padding: 2px 6px;
}
.power-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.power-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
}
.power-description {
  min-height: auto;
  font-size: 0.9rem;
  font-family: 'Crimson Pro', serif;
  overflow: hidden;
  resize: none;
}
@media (max-width: 700px) {
  .power-meta-row {
    grid-template-columns: 1fr;
  }
}
.dashboard-heading {
  font-family: 'MedievalSharp', serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ui-fg);
  opacity: 0.88;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.12em;
  text-transform: none;
  border-bottom: none;
  margin: 0 0 12px;
  padding-bottom: 0;
}
.clock-panel {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ui-border);
  grid-column: 1 / -1;
}
.clock-face-wrap {
  flex-shrink: 0;
  position: relative;
  filter: drop-shadow(0 0 6px rgba(201, 162, 39, 0.15));
  transform: rotate(var(--clock-angle, 0deg));
  transform-origin: 50% 50%;
  will-change: transform;
  cursor: grab;
  touch-action: none;
}
.clock-face-wrap.clock-dragging {
  cursor: grabbing;
}
.clock-face-img {
  width: 180px;
  height: 180px;
  display: block;
  object-fit: contain;
  transition: filter 0.3s ease;
}
.clock-face-wrap:hover .clock-face-img {
  filter: brightness(1.1);
}
.clock-panel.clock-gm-owned .clock-face-wrap {
  filter: drop-shadow(0 0 10px rgba(79, 141, 218, 0.35));
}
.clock-controls {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  min-width: 0;
}
.clock-section-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--ui-accent);
  opacity: 0.75;
  text-transform: uppercase;
}
