* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-width: 320px; min-height: 100%; background: #e8e8e8; color: #000; font-family: Arial, Helvetica, sans-serif; }
body { padding-left: 62px; font-size: 18px; line-height: 1.25; }
button, input, select { color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 18px; border-radius: 0; }
button { min-height: 44px; background: #fff; border: 2px solid #000; font-weight: bold; cursor: pointer; }
button:active { background: #000; color: #fff; }
button:disabled { color: #aaa; border-color: #ccc; cursor: default; }
input, select { width: 100%; min-height: 46px; padding: 6px 9px; background: #fff; border: 2px solid #000; }
.shell { width: 1216px; max-width: calc(100% - 32px); min-height: calc(100vh - 32px); margin: 16px auto; padding: 24px 28px 18px; background: #fff; border: 1px solid #bbb; }
.hidden { display: none !important; }
.scroll-controls { position: fixed; left: 16px; top: 50%; z-index: 20; margin-top: -49px; }
.scroll-controls button { display: block; width: 46px; min-width: 46px; height: 46px; min-height: 46px; padding: 0; background: #fff; font-size: 20px; }
.scroll-controls button + button { border-top: 0; }
.hero, .settings-header { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 18px; border-bottom: 2px solid #000; }
.hero-copy { min-width: 0; }
.eyebrow { margin: 0 0 5px; font-family: monospace; font-size: 12px; font-weight: bold; letter-spacing: 2px; }
h1 { margin: 0 0 4px; font-size: 34px; line-height: 1.05; }
h2 { margin: 0; font-size: 19px; }
.level { margin: 0; color: #555; font-size: 16px; }
.header-actions, .history-controls { display: flex; }
.header-actions { margin-left: 15px; }
.header-actions button, .icon-button { width: 46px; min-width: 46px; height: 46px; padding: 0; font-size: 23px; }
.history-controls button + button { border-left: 0; }
.icon-button { margin-left: 8px; }
.dashboard { display: flex; flex-wrap: wrap; margin-top: 16px; border-left: 2px solid #000; border-top: 2px solid #000; }
.card { width: 100%; padding: 18px 20px; border-right: 2px solid #000; border-bottom: 2px solid #000; }
.card-title { display: flex; align-items: center; margin-bottom: 15px; }
.card-icon { display: inline-block; width: 36px; height: 36px; margin-right: 10px; padding-top: 6px; background: #eee; text-align: center; font-weight: bold; }
.card-title p { margin: 0 0 2px; color: #555; font-family: monospace; font-size: 12px; letter-spacing: 1px; }
.inline-metric { margin-left: auto; padding-left: 12px; white-space: nowrap; }
.inline-metric strong { font-size: 34px; line-height: 1; }
.inline-metric span { margin-left: 5px; color: #555; font-family: monospace; font-size: 16px; }
.metric { text-align: center; margin: 2px 0 8px; }
.metric strong { font-size: 48px; line-height: 1; }
.metric span { margin-left: 8px; color: #555; font-family: monospace; font-size: 18px; }
.metric.compact strong { font-size: 44px; }
.track { width: 100%; height: 8px; background: #ddd; overflow: hidden; }
.track span { display: block; width: 0; height: 100%; background: #000; }
.temp-hp { display: flex; justify-content: space-between; margin: 8px 0 12px; color: #555; font-size: 15px; }
.temp-hp strong { color: #000; }
.stepper { display: flex; }
.stepper button { width: 25%; margin-left: 6px; }
.stepper button:first-child { margin-left: 0; }
.top-gap { margin-top: 12px; }
.direct-form { display: flex; margin-top: 7px; }
.direct-form input { min-width: 0; border-right: 0; }
.direct-form button { min-width: 96px; background: #000; color: #fff; }
.wide-action { width: 100%; margin-top: 7px; padding: 6px; }
.spell-row { display: flex; align-items: center; justify-content: space-between; min-height: 58px; border-top: 1px solid #999; }
.spell-row:last-child { border-bottom: 1px solid #999; }
.spell-label { min-width: 80px; }
.spell-label b, .spell-label small { display: block; }
.spell-label small { margin-top: 3px; color: #555; font-family: monospace; font-size: 12px; }
.spell-control { display: flex; align-items: center; margin-left: 10px; }
.spell-slots { display: flex; flex-wrap: wrap; justify-content: flex-end; margin: 0 5px; }
.spell-pip, .slot-adjust { width: 40px; height: 40px; min-height: 40px; margin: 3px; text-align: center; }
.spell-pip { display: inline-block; padding-top: 9px; border: 2px solid #000; font-size: 17px; }
.spell-pip.available { background: #000; color: #fff; }
.spell-pip.used { color: #aaa; border-color: #aaa; }
.slot-adjust { padding: 0; }
.hint { margin: 16px 0 0; color: #555; font-family: monospace; font-size: 12px; }
.hint span { display: inline-block; width: 10px; height: 10px; margin-right: 7px; background: #000; }
.resource-item { padding: 13px 0; border-top: 1px solid #999; }
.resource-item:first-child { padding-top: 0; border-top: 0; }
.resource-meta { display: flex; align-items: center; justify-content: space-between; }
.resource-meta b, .resource-meta small { display: block; }
.resource-meta small { margin-top: 3px; color: #555; font-family: monospace; font-size: 12px; }
.resource-controls { display: flex; align-items: center; margin-left: 12px; }
.resource-controls button { width: 42px; min-width: 42px; min-height: 42px; padding: 0; font-size: 23px; }
.resource-count { min-width: 78px; text-align: center; font-family: monospace; font-size: 20px; }
.empty { color: #555; }
.rest-panel { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 18px 20px; background: #eee; }
.rest-actions { display: flex; margin-left: 20px; }
.rest-actions button { min-width: 220px; margin-left: 8px; padding: 10px 18px; text-align: left; }
.rest-actions b, .rest-actions small { display: block; }
.rest-actions small { margin-top: 3px; color: #555; font-weight: normal; }
button.primary, .primary { background: #000; color: #fff; }
.primary small { color: #ccc; }
footer { padding-top: 14px; color: #555; text-align: center; font-family: monospace; font-size: 11px; }
.settings-header { justify-content: flex-start; align-items: center; }
.settings-header .icon-button { margin: 0 16px 0 0; }
.settings-header h1 { margin: 0; font-size: 34px; }
.settings-section { padding: 20px 0; border-bottom: 1px solid #999; }
.section-heading { display: flex; align-items: baseline; margin-bottom: 14px; }
.section-heading span { margin-right: 14px; font-family: monospace; font-size: 13px; }
.form-grid { display: flex; flex-wrap: wrap; margin: -6px; }
.field { display: block; width: 25%; padding: 6px; color: #555; font-family: monospace; font-size: 13px; font-weight: bold; }
.field-wide { width: 50%; }
.field input { margin-top: 7px; color: #000; font-family: Arial, Helvetica, sans-serif; }
.slot-fields { display: flex; flex-wrap: wrap; margin: -6px; }
.slot-fields .field { width: 20%; }
.resource-editor { margin-bottom: 12px; padding: 16px; border: 2px solid #000; }
.resource-editor-top { display: flex; align-items: flex-end; }
.resource-name { width: auto; flex: 1; }
.resource-max { width: 130px; }
.delete-resource { width: 52px; min-width: 52px; margin: 0 0 6px 8px; }
.reset-options { display: flex; margin-top: 10px; }
.reset-options button { min-height: 44px; padding: 5px 12px; border-width: 1px; }
.reset-options button + button { border-left: 0; }
.reset-options button.active { background: #000; color: #fff; }
.settings-actions { display: flex; justify-content: space-between; padding-top: 18px; }
.settings-actions button { min-width: 190px; padding: 8px 20px; }

@media (max-width: 760px) {
  .scroll-controls { left: 8px; }
  .shell { width: 100%; max-width: none; min-height: 100vh; margin: 0; padding: 14px 10px 20px; border: 0; }
  .hero { padding-bottom: 13px; }
  h1 { font-size: 27px; }
  .hero-copy { max-width: 52%; }
  .header-actions button, .icon-button { width: 48px; min-width: 48px; height: 48px; min-height: 48px; }
  .dashboard { display: block; margin-top: 12px; }
  .card { width: 100%; padding: 15px 12px; }
  .direct-form input, .field input { font-size: 18px; }
  .rest-panel { display: block; padding: 15px 12px; }
  .rest-actions { display: block; margin: 10px 0 0; }
  .rest-actions button { width: 100%; margin: 8px 0 0; }
  .field, .field-wide { width: 50%; }
  .slot-fields .field { width: 33.333%; }
}

@media (max-width: 430px) {
  .hero-copy { max-width: 45%; }
  .header-actions { margin-left: 6px; }
  .header-actions button, .icon-button { width: 44px; min-width: 44px; }
  .card { padding-left: 10px; padding-right: 10px; }
  .spell-row { align-items: flex-start; padding: 7px 0; }
  .spell-label { min-width: 66px; }
  .spell-pip, .slot-adjust { width: 34px; height: 38px; min-height: 38px; margin: 2px; }
  .resource-editor-top { flex-wrap: wrap; }
  .resource-name { width: 100%; flex: none; }
  .resource-max { width: calc(100% - 60px); }
  .settings-actions { display: block; }
  .settings-actions button { width: 100%; margin-top: 8px; }
}
