:root {
  --bg: #f4f7ef;
  --panel: #ffffff;
  --panel-2: #edf5e6;
  --text: #25332b;
  --muted: #657268;
  --line: #cbd9c4;
  --accent: #76b66b;
  --accent-2: #78a7c7;
  --danger: #ff6b6b;
  --gold: #a87315;
  --chat-dock-width: max(10vw, 260px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, select {
  font: inherit;
}

input {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--panel-2);
  padding: 8px 11px;
  cursor: pointer;
}

button:hover, button.active {
  border-color: var(--accent);
  color: #102014;
  background: var(--accent);
}

button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: #eef4ea;
  opacity: 0.65;
}

button:disabled:hover {
  border-color: var(--line);
  color: var(--muted);
  background: #eef4ea;
}

button.danger:hover {
  border-color: var(--danger);
  background: var(--danger);
}

.text-link-button {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
  text-decoration: underline;
}

.text-link-button:hover {
  background: transparent;
  color: var(--accent-2);
}

.progress-button {
  --action-progress: 0%;
  position: relative;
  overflow: hidden;
}

.progress-button::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--action-progress);
  height: 5px;
  pointer-events: none;
  background: linear-gradient(90deg, #76b66b, #ffd269, #78a7c7);
  box-shadow: 0 -3px 10px rgba(255, 210, 105, 0.35);
  transition: width 180ms linear;
  z-index: 0;
}

.progress-button.active::before {
  background: linear-gradient(90deg, #62a95d, #f0bc39, #5f98bd);
}

.progress-button.active {
  border-color: #d39a24;
  color: #173425;
  background:
    linear-gradient(180deg, rgba(255, 246, 217, 0.92), rgba(224, 244, 217, 0.78)),
    #f7e6ad;
  box-shadow: 0 0 0 2px rgba(255, 210, 105, 0.24), 0 8px 18px rgba(39, 113, 62, 0.12);
}

.progress-button > * {
  position: relative;
  z-index: 1;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--panel-2);
  padding: 8px;
}

.text-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--panel-2);
  padding: 10px 11px;
  margin-top: 10px;
}

.text-input:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.field-label {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 18px;
}

@media (min-width: 761px) {
  .app-shell.chat-open {
    width: calc(100% - var(--chat-dock-width));
    max-width: none;
    margin-left: 0;
    margin-right: var(--chat-dock-width);
  }
}

.chat-dock {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: var(--chat-dock-width);
  height: 100dvh;
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: -10px 0 24px rgba(37, 51, 43, 0.14);
}

.chat-dock.collapsed {
  top: 12px;
  right: 12px;
  display: block;
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.chat-collapsed-button {
  min-width: 92px;
  border-color: color-mix(in srgb, var(--accent), var(--line) 35%);
  background: #fffdf6;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(37, 51, 43, 0.16);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.chat-header strong {
  font-size: 16px;
}

.chat-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-toggle-button {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
}

.chat-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

.chat-tabs button {
  min-width: 0;
  padding: 7px 5px;
  font-size: 12px;
  font-weight: 800;
}

.chat-rank-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--line);
}

.chat-pinned-message {
  display: grid;
  gap: 3px;
  margin: 0 10px 8px;
  border: 1px solid color-mix(in srgb, var(--accent-2), var(--line) 35%);
  border-radius: 8px;
  padding: 8px;
  background: #f7fbfd;
}

.chat-pinned-message strong {
  color: #1e76a8;
  font-size: 11px;
  text-transform: uppercase;
}

.chat-pinned-message span {
  color: var(--text);
  font-size: 13px;
}

.chat-load-more {
  margin: 8px 10px 10px;
  padding: 7px 8px;
  font-size: 12px;
}

.chat-rank-name {
  font-weight: 900;
}

.chat-message .chat-badge {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--accent), var(--line) 35%);
  border-radius: 5px;
  padding: 1px 4px;
  background: #fff8df;
  color: #8c5d12;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-message .chat-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chat-rank-legend .chat-rank-name {
  font-size: 11px;
}

.rank-tier-0 { color: #55615b; }
.rank-tier-1 { color: #2b7a4b; }
.rank-tier-2 { color: #1e76a8; }
.rank-tier-3 { color: #7355b8; }
.rank-tier-4 { color: #b05a9f; }
.rank-tier-5 { color: #b86814; }
.rank-tier-6 { color: #9a3434; }
.rank-tier-7 { color: #1d8c83; }
.rank-tier-8 { color: #263a94; }

.founder-name {
  background: linear-gradient(90deg, #e84b5f, #f49b2f, #d7bf31, #41a85f, #2f8bd8, #7a55c6, #d44fa3, #e84b5f);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: founder-rainbow 4s linear infinite;
}

@keyframes founder-rainbow {
  to {
    background-position: 240% 0;
  }
}

.chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
}

.chat-message {
  display: grid;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(203, 217, 196, 0.72);
}

.chat-message div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.chat-message .chat-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.chat-message p {
  margin: 0;
  overflow-wrap: anywhere;
}

.chat-message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.chat-message-actions .text-link-button {
  font-size: 11px;
}

.chat-name-button {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  width: fit-content;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  text-align: left;
}

.chat-name-button:hover {
  background: transparent;
  text-decoration: underline;
}

.chat-moderation-panel {
  display: grid;
  gap: 7px;
  margin: 0 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fffdf6;
}

.chat-moderation-panel > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-moderation-panel .text-input {
  margin-top: 0;
}

.chat-mod-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.chat-mod-actions button {
  min-width: 0;
  padding: 7px 5px;
  font-size: 12px;
}

.chat-error {
  margin: 0;
  padding: 8px 10px 0;
  color: #9a3434;
  font-size: 12px;
  font-weight: 800;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.chat-form .text-input {
  margin-top: 0;
  min-width: 0;
}

.chat-form button {
  min-width: 58px;
  padding: 8px;
}

.inline-danger-button {
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 11px;
}

.header-control-panel, .panel, .choice-card, .item-row, .log {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.topbar {
  display: grid;
  place-items: center;
  padding: 0;
  margin-bottom: 12px;
  background: transparent;
}

.brand-title {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: 80%;
}

.header-control-panel {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(247, 251, 244, 0.92)),
    var(--panel);
  box-shadow: 0 5px 16px rgba(37, 51, 43, 0.06);
}

.panel h2, .panel h3 {
  margin: 0;
}

.game-title-image {
  display: block;
  width: 100%;
  height: auto;
}

.header-title-image {
  width: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  box-shadow: none;
}

.setup-title-image {
  width: min(100%, 980px);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(24, 58, 50, 0.18);
}

.muted {
  color: var(--muted);
}

.stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}

.header-icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 3px 10px rgba(37, 51, 43, 0.05);
}

.activity-pill {
  border-color: rgba(118, 167, 199, 0.55);
  color: #244f6a;
  background: linear-gradient(135deg, #edf8ff, #eef8e8);
  font-weight: 800;
  cursor: pointer;
}

.map-pin-button.active,
.map-pin-button:hover {
  border-color: rgba(118, 167, 199, 0.75);
  color: #102014;
  background: linear-gradient(135deg, #dff2ff, #e7f7dc);
}

.pill.sync.ok {
  border-color: #94c973;
  background: #e7f7dc;
  color: #23602f;
}

.pill.sync.pending {
  border-color: #e7c969;
  background: #fff6cf;
  color: #755c10;
}

.pill.sync.error {
  border-color: #e89b8f;
  background: #ffe7e2;
  color: #8f2f22;
}

.pill.sync.local {
  border-color: #b9c7d8;
  background: #edf3fa;
  color: #36536f;
}

.divine-error-fragments {
  border-color: #e89b8f;
  background: #fff0ed;
  color: #8f2f22;
  font-weight: 900;
}

.gold {
  font-weight: 900;
}

.quick-travel-pill {
  min-width: 38px;
  font-weight: 900;
}

.quick-travel-pill.locked {
  border-color: rgba(168, 115, 21, 0.45);
  color: #7c5310;
  background: #fff6cf;
}

.quick-travel-pill.unlocked {
  border-color: rgba(118, 167, 199, 0.65);
  color: #244f6a;
  background: linear-gradient(135deg, #edf8ff, #fff6cf);
}

.quick-travel-settings {
  display: grid;
  gap: 10px;
}

.quick-travel-setting {
  display: grid;
  grid-template-columns: minmax(90px, 0.25fr) 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

button.pill.sync {
  cursor: pointer;
  font: inherit;
}

button.pill.sync:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 51, 43, 0.1);
}

.effect-lines {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  color: #315a70;
  font-size: 13px;
}

.effect-lines div {
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--accent-2), var(--line) 55%);
  border-radius: 6px;
  padding: 3px 7px;
  background: #eef8f2;
}


.item-source-line {
  color: #315a70;
  font-size: 12px;
  margin-top: 3px;
}
.status-card {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf4;
}

.cloud-status.ok {
  border-color: #94c973;
  background: #f0faea;
}

.cloud-status.pending {
  border-color: #e7c969;
  background: #fff9dc;
}

.cloud-status.error {
  border-color: #e89b8f;
  background: #fff0ed;
}

.cloud-status.local {
  border-color: #b9c7d8;
  background: #f1f6fb;
}

.status-lines {
  display: grid;
  gap: 5px;
  font-size: 13px;
}

.debug-grid {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 8px 12px;
  align-items: start;
  font-size: 13px;
}

.debug-grid span {
  color: var(--muted);
}

.debug-grid strong {
  overflow-wrap: anywhere;
}

.event-alert-pill {
  border-color: #d74735;
  color: #7b2119;
  background: linear-gradient(135deg, #fff2d9, #ffe2dc);
  animation: event-pill-pulse 1.1s ease-in-out infinite;
}

@keyframes event-pill-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(215, 71, 53, 0.34);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(215, 71, 53, 0);
    transform: translateY(-1px);
  }
}

.offline-event-card {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(74, 122, 150, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, #f6fbef, #eaf8ff);
}

.offline-event-card.active {
  border-color: rgba(215, 71, 53, 0.36);
  background: linear-gradient(135deg, #fff2d9, #ffe9e3);
}

.offline-event-card span {
  color: var(--muted);
}

.admin-player-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.admin-player-summary span,
.admin-player-stats span,
.admin-skill-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: #f8fbf4;
}

.admin-players-dialog {
  width: min(920px, calc(100vw - 28px));
  max-height: min(82vh, 760px);
  overflow: auto;
}

.admin-player-card {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf8;
}

.admin-player-card small {
  display: block;
  color: var(--muted);
}

.admin-player-stats,
.admin-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
}

.buff-pill {
  cursor: help;
}

.divine-error-panel {
  position: relative;
  overflow: hidden;
  border: 2px solid #d74735;
  background:
    linear-gradient(135deg, rgba(255, 230, 225, 0.98), rgba(255, 250, 214, 0.94) 52%, rgba(238, 247, 255, 0.94)),
    var(--panel);
  box-shadow: 0 14px 34px rgba(143, 47, 34, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.76);
}

.divine-error-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: start;
}

.divine-error-header h2 {
  color: #8f2f22;
}

.divine-error-header p,
.divine-error-terminal {
  color: #36536f;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.divine-error-header > span {
  border: 1px solid #e89b8f;
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffe7e2;
  color: #8f2f22;
  font-weight: 900;
}

.divine-error-terminal {
  margin: 10px 0;
  padding: 10px;
  border: 1px dashed #e89b8f;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.divine-error-terminal p {
  margin: 2px 0;
}

.divine-error-terminal-warning {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid rgba(215, 71, 53, 0.62);
  border-radius: 8px;
  background: rgba(255, 231, 226, 0.78);
  color: #8f2f22;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 900;
}

.divine-error-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.divine-error-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(232, 155, 143, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.divine-error-card strong {
  color: #8f2f22;
  overflow-wrap: anywhere;
}

.divine-error-card small {
  color: #36536f;
  font-weight: 800;
}

.divine-error-card.unreadable {
  filter: saturate(1.25);
}

.support-card {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border-color: rgba(215, 181, 74, 0.65);
  background:
    linear-gradient(135deg, rgba(255, 248, 218, 0.98), rgba(255, 240, 237, 0.9)),
    var(--panel);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--gold), var(--line) 35%);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff6cf, #ffe7e2);
  color: #7c5310;
  font-weight: 900;
  text-decoration: none;
}

.coffee-link {
  white-space: nowrap;
}

.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.world-map {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 48% 45%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(135deg, #dcefd2, #eaf6df 44%, #d7edf4);
}

.world-map img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.world-map img.missing-map {
  display: none;
}

.map-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: #315a70;
}

.world-map img.missing-map + .map-fallback {
  display: grid;
}

.map-fallback strong {
  font-size: 28px;
}

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

.map-title-row h2 {
  margin: 0;
}

.admin-control {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.toggle-line {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #183a32;
  font-weight: 800;
}

.toggle-line input {
  width: auto;
}

.map-hotspot {
  position: absolute;
  z-index: 2;
  display: grid;
  align-items: end;
  justify-items: center;
  border: 0;
  border-radius: 8px;
  padding: 6px;
  background: transparent;
  color: #1d3524;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
  box-shadow: none;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.map-hotspot:hover {
  background: rgba(255, 246, 217, 0.14);
  box-shadow: inset 0 -34px 36px rgba(255, 246, 217, 0.18);
}

.map-hotspot-disabled {
  pointer-events: none;
  opacity: 0.72;
  filter: grayscale(0.25);
}

.map-hotspot b {
  width: 100%;
  padding: 3px 5px;
  border-radius: 6px;
  display: none;
  place-items: center;
  background: rgba(255, 252, 232, 0.72);
  color: #1d3524;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  text-align: center;
}

.map-hotspot span {
  display: block;
  width: 100%;
  padding: 3px 5px;
  border-radius: 6px;
  background: rgba(255, 252, 232, 0.72);
  color: #1d3524;
  font-size: clamp(10px, 1vw, 12px);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: center;
}

.map-location-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 8px auto 14px;
  max-width: 980px;
}

.map-location-list button,
.map-legend-disabled {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 142px;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid rgba(118, 167, 199, 0.38);
  border-radius: 999px;
  background: linear-gradient(135deg, #edf8ff, #f7fbf4);
  text-align: left;
}

.map-location-list button:hover {
  border-color: rgba(168, 115, 21, 0.55);
  background: linear-gradient(135deg, #fff6d9, #e7f7dc);
}

.map-location-list strong,
.map-legend-disabled strong {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: #23602f;
  color: #fff9df;
}

.map-legend-disabled {
  color: var(--muted);
  opacity: 0.74;
}

.map-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  pointer-events: none;
}

.map-grid-overlay span {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: start end;
  padding: 3px 4px;
  border-right: 1px solid rgba(255, 246, 217, 0.62);
  border-bottom: 1px solid rgba(255, 246, 217, 0.62);
  background: rgba(49, 90, 112, 0.08);
  color: #fff9df;
  font-size: clamp(9px, 0.9vw, 12px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(20, 38, 34, 0.85);
}

.game-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 18px 0 2px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.footer-support-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #a56b05;
  font-size: 12px;
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  align-items: start;
}

.settings-grid,
.admin-grid {
  grid-auto-flow: dense;
}

.admin-layout {
  display: grid;
  gap: 14px;
}

.admin-shell {
  display: grid;
  gap: 12px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-tabs button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(74, 122, 150, 0.24);
  background: rgba(255, 255, 255, 0.72);
  color: #315a70;
}

.admin-tabs button.active {
  background: #315a70;
  color: #fff;
}

.admin-tabs.compact {
  margin: 8px 0;
}

.admin-main-tabs {
  padding: 2px 0;
}

.game-layout {
  display: block;
}

.main-content {
  min-width: 0;
}

.panel {
  padding: 14px;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.setup {
  max-width: 1040px;
  margin: 0 auto;
}

.loading-panel {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.loading-panel h1 {
  margin: 0;
  color: #244f6a;
}

.setup-flow {
  display: grid;
  gap: 14px;
}

.setup-welcome-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: start;
}

.setup-welcome-column {
  display: grid;
  gap: 14px;
}

.setup-hero {
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  padding: 8px;
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 246, 217, 0.9), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(120, 167, 199, 0.34), transparent 30%),
    linear-gradient(135deg, #f7fbf4, #edf8ff 55%, #fff6d9);
  box-shadow: 0 18px 42px rgba(37, 51, 43, 0.1);
}

.setup-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--gold));
}

.setup-hero-copy {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
}

.setup-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #315a70;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.setup-hero h1,
.setup-story h1,
.setup-character-card h1 {
  margin: 0 0 12px;
  color: #183a32;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 0.98;
}

.setup-hero p,
.setup-welcome p,
.setup-story p {
  max-width: 820px;
  margin: 0 0 10px;
  color: #3b4b41;
  font-size: 15px;
}

.setup-welcome {
  background: linear-gradient(135deg, #fbfdf8, #f4f9ff);
}

.setup-error-teaser {
  border: 1px dashed rgba(215, 71, 53, 0.48);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 240, 237, 0.74);
  color: #8f2f22;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 800;
}

.setup-auth-card {
  position: sticky;
  top: 14px;
  border-color: rgba(118, 167, 199, 0.45);
  background: linear-gradient(135deg, #f7fbf4, #edf8ff);
}

.setup-auth-card .actions {
  display: grid;
}

.setup-auth-card .actions button {
  width: 100%;
}

.turnstile-block {
  display: grid;
  gap: 4px;
  justify-items: center;
  margin: 10px 0;
  width: 100%;
}

.setup-guest-link {
  margin: 12px 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.setup-guest-link button {
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #315a70;
  background: transparent;
  font-weight: 800;
  text-decoration: underline;
}

.setup-guest-link button:hover {
  color: #183a32;
  background: transparent;
}

.setup-about-link {
  margin: 10px 0 0;
  font-size: 13px;
}

.setup-about-link a,
.about-nav a {
  color: #315a70;
  font-weight: 800;
}

.setup-story {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 246, 217, 0.7), transparent 28%),
    linear-gradient(135deg, #fbfdf8, #edf8ff);
}

.about-page {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 36px;
}

.about-nav {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 12px;
}

.about-hero {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #183a32;
  box-shadow: 0 18px 42px rgba(37, 51, 43, 0.12);
}

.about-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(244, 247, 239, 0.96), rgba(244, 247, 239, 0.78) 42%, rgba(244, 247, 239, 0.08));
}

.about-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 420px;
  max-width: 520px;
  padding: 36px;
}

.about-hero h1 {
  margin: 0 0 12px;
  color: #183a32;
  font-size: 48px;
  line-height: 1;
}

.about-hero p {
  margin: 0 0 16px;
  color: #31463a;
  font-size: 17px;
}

.about-section,
.about-grid article {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.about-section h2,
.about-grid h2 {
  margin: 0 0 8px;
  color: #183a32;
}

.about-section p,
.about-grid p {
  margin: 0 0 10px;
  color: #3b4b41;
  font-size: 15px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.about-footer {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.intro-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.intro-card-topline small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}

.intro-card-topline button {
  border-color: rgba(118, 167, 199, 0.45);
  color: #315a70;
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.intro-card {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.intro-card h1 {
  text-align: center;
}

.intro-card img {
  width: min(100%, 680px);
  max-height: min(48vh, 420px);
  object-fit: cover;
  border: 1px solid rgba(203, 217, 196, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.intro-card p {
  max-width: 760px;
  margin: 0;
  color: #3b4b41;
  font-size: 16px;
  text-align: center;
}

.intro-card-text-only {
  min-height: 320px;
  align-content: center;
  padding: 28px;
  border: 1px dashed rgba(215, 71, 53, 0.52);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 240, 237, 0.82), rgba(237, 248, 255, 0.82)),
    #fbfdf8;
}

.intro-card-text-only h1 {
  color: #8f2f22;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.intro-card-text-only p {
  color: #36536f;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 800;
}

.intro-card-progress {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}

.intro-card-progress span {
  width: 30px;
  height: 6px;
  border-radius: 999px;
  background: #d9e5d2;
}

.intro-card-progress span.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.intro-card-actions {
  display: flex;
  justify-content: space-between;
}

.setup-character-card {
  background: linear-gradient(135deg, #fbfdf8, #f7fbfd);
}

.setup-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.choice-card {
  padding: 12px;
  text-align: left;
}

.choice-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.choice-card h3 {
  margin: 0 0 6px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quick-actions {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.quick-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.quick-action-row > button:first-child,
.quick-actions > button {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: space-between;
  text-align: left;
  padding: 10px 12px;
}

.quick-action-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.quick-action-settings {
  min-width: 42px;
  padding: 0 10px;
  font-size: 0;
}

.quick-action-settings::before {
  content: "⚙";
  font-size: 17px;
  line-height: 1;
}

.quick-action-modal {
  max-width: 560px;
}

.quick-choice-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: min(58vh, 520px);
  overflow: auto;
}

.quick-choice-list button {
  display: grid;
  gap: 4px;
  text-align: left;
}

.quick-choice-list small {
  color: var(--muted);
  font-size: 12px;
}

.skill-side-info {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
}

.skill-scene-image {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(118, 167, 199, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(237, 248, 255, 0.92), rgba(238, 248, 232, 0.92)),
    #f7fbf4;
  box-shadow: 0 8px 18px rgba(37, 51, 43, 0.07);
}

.skill-scene-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.skill-level-card {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(118, 167, 199, 0.38);
  border-radius: 8px;
  background: linear-gradient(135deg, #edf8ff, #eef8e8 58%, #fff6d9);
  color: #244f6a;
  box-shadow: 0 8px 18px rgba(37, 51, 43, 0.07);
}

.skill-level-main,
.skill-level-progress-text {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.skill-level-card span {
  color: #527188;
  font-size: 12px;
  font-weight: 700;
}

.skill-level-main strong {
  color: #183a32;
  font-size: 30px;
  line-height: 1;
}

.skill-level-progress {
  display: grid;
  gap: 6px;
}

.skill-level-progress-text strong {
  color: #23602f;
  font-size: 12px;
  line-height: 1.2;
  text-align: right;
}

.skill-level-progress .bar {
  height: 11px;
  margin-top: 0;
  background: rgba(203, 217, 196, 0.8);
  box-shadow: inset 0 1px 3px rgba(37, 51, 43, 0.12);
}

.skill-level-progress .bar > span {
  background: linear-gradient(90deg, #76b66b, #78a7c7, #f4b04e);
  box-shadow: 0 0 12px rgba(118, 182, 107, 0.28);
}

.stacked-panels {
  display: grid;
  gap: 14px;
}

.skill-stat-card {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf4;
}

.skill-stat-card span {
  color: var(--muted);
  font-size: 12px;
}

.skill-stat-card strong {
  overflow-wrap: anywhere;
}

.material-counts {
  margin-top: 12px;
}

.material-counts .material-summary {
  margin-top: 6px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.bar {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #dfe9da;
  margin-top: 6px;
}

.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.skill-row, .item-row, .monster-row, .quest-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.skill-row:last-child, .monster-row:last-child, .quest-row:last-child {
  border-bottom: 0;
}

.gathering-node {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
}

.skill-level-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
}

.gathering-node.locked {
  opacity: 0.72;
}

.level-badge {
  display: grid;
  place-items: center;
  align-self: start;
  width: 56px;
  min-width: 56px;
  min-height: 62px;
  border: 1px solid color-mix(in srgb, var(--accent-2), var(--line) 45%);
  border-radius: 8px;
  padding: 5px;
  background: #f3f9fb;
  color: #315a70;
  text-align: center;
}

.level-badge span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1;
}

.level-badge strong {
  font-size: 20px;
  line-height: 1.1;
}

.level-badge small {
  font-size: 10px;
  line-height: 1;
  color: #527188;
}


.item-level-badge {
  position: relative;
  overflow: hidden;
  min-height: 82px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(237, 248, 255, 0.88)),
    #f3f9fb;
}

.item-level-art {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 2px;
  place-items: center;
  border: 1px solid rgba(118, 167, 199, 0.34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 246, 217, 0.78), transparent 62%),
    linear-gradient(135deg, #edf8ff, #f7fbf4);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 88%;
  color: #315a70;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.item-level-badge > span:not(.item-level-art) {
  font-size: 10px;
}

.item-level-badge strong {
  font-size: 18px;
}

.item-level-badge small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.gathering-node.locked .level-badge {
  border-color: var(--line);
  background: #f4f4ef;
  color: var(--muted);
}

.gathering-node-body {
  min-width: 0;
}

.monster-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.item-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 8px;
  padding: 10px;
}

.item-row.locked-item {
  border-color: color-mix(in srgb, var(--accent-2), var(--line) 35%);
  background: #f7fbfd;
}

.item-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.lock-state {
  border: 1px solid color-mix(in srgb, var(--accent-2), var(--line) 45%);
  border-radius: 999px;
  padding: 2px 7px;
  color: #315a70;
  background: #eef7fb;
  font-size: 12px;
}

.lock-button {
  min-width: 72px;
}

.lock-button.active {
  border-color: var(--accent-2);
  color: #315a70;
  background: #e8f5fb;
}

.combat-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.combat-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "dungeons dungeons dungeons dungeons dungeons dungeons dungeons dungeons info info info info"
    "fight fight fight fight fight fight fight fight info info info info";
  align-items: start;
}

.combat-grid .dungeon-selector {
  grid-area: dungeons;
}

.combat-grid .quick-actions-panel {
  grid-area: info;
}

.combat-grid .combat-panel {
  grid-area: fight;
}

.combat-vitals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.combat-vitals span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  background: #f8fbf4;
}

.combat-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.combat-section:last-of-type {
  border-bottom: 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.section-heading h2 {
  margin: 0;
}

.dungeon-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 10px;
}

.dungeon-tab {
  overflow: hidden;
  min-height: 158px;
  display: grid;
  grid-template-rows: minmax(102px, 1fr) auto;
  padding: 0;
  text-align: center;
  background: #f7fbfd;
}

.dungeon-tab-art {
  display: block;
  min-height: 102px;
  background:
    linear-gradient(135deg, rgba(255, 246, 217, 0.58), rgba(120, 167, 199, 0.26)),
    linear-gradient(160deg, #dcefd2, #eef8ff 62%, #fff3c3);
  background-position: center;
  background-size: cover;
}

.dungeon-tab-banner {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border-top: 1px solid rgba(203, 217, 196, 0.9);
  background: linear-gradient(135deg, #1f3d34, #315a70);
  color: #fff9df;
}

.dungeon-tab-banner strong,
.dungeon-tab-banner small {
  overflow-wrap: anywhere;
}

.dungeon-tab-banner small {
  color: #dcedd8;
  font-size: 12px;
  font-weight: 800;
}

.dungeon-tabs button:hover .dungeon-tab-banner,
.dungeon-tabs button.active .dungeon-tab-banner {
  background: linear-gradient(135deg, #23602f, #a87315);
}

.dungeon-summary {
  display: grid;
  justify-items: center;
  gap: 5px;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--accent-2), var(--line) 45%);
  border-radius: 8px;
  background: linear-gradient(135deg, #edf8ff, #f7fbf4 58%, #fff6d9);
  text-align: center;
}

.dungeon-summary strong {
  color: #183a32;
  font-size: 16px;
}

.dungeon-summary p {
  max-width: 680px;
  margin: 0;
}

.monster-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.monster-choice-card {
  position: relative;
  overflow: hidden;
  grid-template-columns: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdf8;
  box-shadow: 0 8px 18px rgba(37, 51, 43, 0.05);
}

.monster-choice-card > * {
  position: relative;
  z-index: 1;
}

.monster-choice-card > button {
  grid-column: 1 / -1;
  width: 100%;
}

.monster-choice-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.monster-choice-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.monster-choice-stats span {
  display: grid;
  gap: 1px;
  min-width: 88px;
  padding: 6px 8px;
  border: 1px solid rgba(118, 167, 199, 0.32);
  border-radius: 8px;
  background: linear-gradient(135deg, #edf8ff, #fbfdf8);
}

.monster-choice-stats em {
  color: #315a70;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.monster-choice-stats strong {
  color: #183a32;
  font-size: 12px;
  line-height: 1.2;
}

.monster-level-tile {
  position: relative;
  overflow: hidden;
  width: 66px;
  min-height: 62px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  border: 1px solid rgba(118, 167, 199, 0.48);
  border-radius: 8px;
  background: #edf8ff;
  color: #244f6a;
  text-align: center;
  backdrop-filter: blur(3px);
}

.monster-level-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.56);
  z-index: 1;
}

.monster-level-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.monster-level-tile span,
.monster-level-tile small {
  position: relative;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.monster-level-tile strong {
  position: relative;
  z-index: 2;
  color: #183a32;
  font-size: 26px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.combat-buffs {
  display: grid;
  align-items: stretch;
  gap: 8px;
  margin-top: 12px;
}

.monster-choice-card:last-child {
  border-bottom: 1px solid var(--line);
}

.monster-choice-card.boss-row {
  background: linear-gradient(135deg, #fff8d9, #fbfdf8);
  border-color: color-mix(in srgb, var(--gold), var(--line) 55%);
}

.boss-row .monster-choice-stats span {
  border-color: rgba(168, 115, 21, 0.26);
  background: linear-gradient(135deg, #fff6d9, #fbfdf8);
}

.combat-style-panel {
  display: grid;
  align-items: stretch;
  gap: 8px;
}

.combat-style-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdf8;
}

.combat-style-panel h3,
.combat-buffs h3 {
  margin: 0;
}

.combat-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

.combat-style-grid button {
  width: 100%;
  min-height: 40px;
  padding: 8px 9px;
}

.monster-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 265px;
  border: 1px solid color-mix(in srgb, var(--accent-2), var(--line) 45%);
  border-radius: 8px;
  padding: 18px 16px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 246, 217, 0.95), transparent 32%),
    linear-gradient(135deg, #f7fbfd, #fbfdf8 60%, #fff8df);
  text-align: center;
  box-shadow: 0 12px 26px rgba(37, 51, 43, 0.08);
}

.monster-card > .level-badge,
.monster-card > span {
  justify-self: center;
}

.monster-card > span {
  grid-column: 1 / -1;
}

.monster-card-copy {
  display: grid;
  gap: 5px;
  max-width: 520px;
  position: relative;
  z-index: 1;
}

.monster-card-copy strong {
  color: #183a32;
  font-size: 22px;
  line-height: 1.1;
}

.monster-stat-lines {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.monster-stat-lines span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(203, 217, 196, 0.85);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.68);
  white-space: nowrap;
}

.monster-stat-lines strong {
  color: #244f6a;
  font-size: 13px;
}

.monster-hp-meter {
  margin-top: 12px;
  border: 1px solid rgba(255, 107, 107, 0.28);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(135deg, #fff7f2, #fffdf5);
  box-shadow: 0 10px 22px rgba(37, 51, 43, 0.07);
}

.monster-hp-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.monster-hp-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.monster-hp-header strong {
  color: #6f1d1d;
  font-size: 18px;
}

.monster-hp-bar {
  overflow: hidden;
  height: 18px;
  border-radius: 999px;
  background: #f3d9cf;
  box-shadow: inset 0 1px 3px rgba(37, 51, 43, 0.16);
}

.monster-hp-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7676, #f4b04e);
  box-shadow: 0 0 14px rgba(255, 118, 118, 0.35);
  transition: width 180ms ease-out;
}

.player-resource-meter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-top: 12px;
  border: 1px solid rgba(118, 167, 199, 0.32);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(135deg, #f1fbf1, #f4f9ff);
  box-shadow: 0 10px 22px rgba(37, 51, 43, 0.06);
}

.player-resource {
  min-width: 0;
}

.player-resource .monster-hp-header strong {
  color: #244f6a;
}

.player-resource-bar {
  overflow: hidden;
  height: 16px;
  border-radius: 999px;
  background: #dfe9da;
  box-shadow: inset 0 1px 3px rgba(37, 51, 43, 0.14);
}

.player-resource-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 180ms ease-out;
}

.player-resource-bar.hp > span {
  background: linear-gradient(90deg, #6fc772, #f4b04e);
  box-shadow: 0 0 12px rgba(111, 199, 114, 0.28);
}

.player-resource-bar.mana > span {
  background: linear-gradient(90deg, #78a7c7, #8f83d8);
  box-shadow: 0 0 12px rgba(120, 167, 199, 0.3);
}

.resource-divider {
  width: 1px;
  min-height: 54px;
  background: linear-gradient(180deg, transparent, rgba(120, 167, 199, 0.5), transparent);
}

.damage-indicators {
  pointer-events: none;
  position: absolute;
  inset: 12px;
  z-index: 4;
}

.damage-splat {
  position: absolute;
  top: calc(var(--splat-index) * 58px);
  min-width: 58px;
  max-width: 112px;
  display: grid;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(37, 51, 43, 0.12);
  animation: damage-pop 720ms ease-out;
}

.damage-splat.foe-side {
  left: 0;
}

.damage-splat.you-side {
  right: 0;
}

.damage-splat strong {
  line-height: 1;
  font-size: 18px;
}

.damage-splat em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.damage-splat small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
}

.damage-splat.player-hit strong {
  color: #2f8a43;
}

.damage-splat.player-crit strong {
  color: var(--gold);
}

.damage-splat.player-zero strong,
.damage-splat.monster-zero strong {
  color: var(--muted);
}

.damage-splat.monster-hit strong {
  color: var(--danger);
}

.damage-splat.monster-defeated {
  border-color: #d7b54a;
  background: #fff5c9;
}

.damage-splat.monster-defeated strong {
  color: #a56b05;
}

.defeat-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 245, 201, 0.98), rgba(255, 250, 225, 0.88) 42%, rgba(255, 255, 255, 0.74)),
    linear-gradient(135deg, rgba(35, 96, 47, 0.1), rgba(168, 115, 21, 0.18));
  color: #6e4a05;
  font-weight: 800;
  text-align: center;
  animation: monster-defeat 1400ms ease-out forwards;
}

.defeat-overlay img {
  width: 132px;
  height: 104px;
  object-fit: cover;
  border-radius: 8px;
  filter: grayscale(0.2);
}

.defeat-overlay strong {
  color: #a56b05;
  font-size: 44px;
  line-height: 1;
}

.defeat-overlay span {
  color: #4b3a13;
  font-size: 16px;
}

.defeat-overlay small {
  max-width: min(88%, 360px);
  border: 1px solid rgba(165, 107, 5, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #6e4a05;
  font-size: 13px;
  font-weight: 900;
}

@keyframes damage-pop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
  25% {
    opacity: 1;
    transform: translateY(-4px) scale(1.04);
  }
  100% {
    opacity: 1;
  }
}

@keyframes monster-defeat {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }
  18% {
    opacity: 1;
    transform: scale(1.02);
  }
  70% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(16px) scale(0.92);
  }
}

.monster-image {
  width: min(184px, 60%);
  height: 138px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  box-shadow: 0 10px 24px rgba(37, 51, 43, 0.12);
}

.boss-row {
  border: 1px solid color-mix(in srgb, var(--gold), var(--line) 55%);
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0 2px;
  background: #fff9e8;
  box-sizing: border-box;
}

.monster-row.boss-row:last-child {
  border-bottom: 1px solid color-mix(in srgb, var(--gold), var(--line) 55%);
}

.shop-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 6px;
  margin-top: 0;
}

.shop-actions button {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  white-space: normal;
  line-height: 1.2;
}

.shop-actions button span {
  font-size: 12px;
  color: var(--muted);
}

.combat-actions, .active-buffs, .log-header, .auto-eat-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.active-buffs.combat-buffs {
  display: grid;
  align-items: stretch;
  gap: 8px;
}

.active-buffs.combat-buffs .pill,
.active-buffs.combat-buffs .muted {
  justify-self: start;
}

.combat-info-tools {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.fight-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.combat-info-tools .combat-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
}

.combat-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 6px;
  align-items: stretch;
  width: 100%;
}

.combat-control-row > button:first-child,
.combat-info-tools .combat-actions > button,
.combat-info-tools .auto-eat-box > button {
  width: 100%;
}

.gear-button {
  width: 40px;
  min-width: 40px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.auto-eat-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdf8;
  align-items: stretch;
}

.auto-eat-box h3 {
  width: 100%;
}

.auto-potion-list {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.auto-potion-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #f8fbf4;
}

.auto-potion-option small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.supplies-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.supplies-grid.single {
  grid-template-columns: 1fr;
}

.supplies-section {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdf8;
}

.supplies-section h3 {
  margin: 0;
}

.supply-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #f8fbf4;
}

.supply-option small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.supply-option strong {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: baseline;
}

.supply-option strong em {
  color: #23602f;
  font-style: normal;
}

.supply-option strong small {
  display: inline;
  color: #315a70;
  font-weight: 800;
}

.sync {
  color: #356d83;
}

.log-header {
  justify-content: space-between;
}

.log-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 8px;
}

.log-lock {
  color: var(--muted);
  font-size: 12px;
}


.inventory-item-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.inventory-item-badge {
  display: grid;
  align-self: start;
  justify-items: center;
  gap: 3px;
  width: 64px;
  min-width: 64px;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--accent-2), var(--line) 45%);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(237, 248, 255, 0.88)),
    #f3f9fb;
  color: #315a70;
  text-align: center;
}

.inventory-item-art {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(118, 167, 199, 0.34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 246, 217, 0.78), transparent 62%),
    linear-gradient(135deg, #edf8ff, #f7fbf4);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 88%;
  font-size: 12px;
  font-weight: 900;
}

.inventory-item-badge strong {
  max-width: 100%;
  color: #183a32;
  font-size: 11px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.inventory-group {
  margin-top: 12px;
}

.inventory-side-panel,
.guild-rank-panel {
  align-content: start;
}

.guild-content-column {
  display: grid;
  gap: 12px;
}

.guild-rank-panel {
  display: grid;
  justify-items: center;
}

.guild-rank-image {
  margin-bottom: 12px;
}

.guild-conversation {
  display: grid;
  gap: 12px;
}

.conversation-clerk {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 7;
  margin-top: 10px;
  border: 1px solid rgba(118, 167, 199, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(237, 248, 255, 0.9), rgba(238, 248, 232, 0.92)),
    #f7fbf4;
}

.conversation-clerk img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.conversation-clerk img.missing-clerk {
  display: none;
}

.guild-conversation blockquote {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 4px solid #78a7c7;
  border-radius: 8px;
  background: rgba(237, 248, 255, 0.72);
}

.guild-conversation blockquote strong {
  color: #244f6a;
}

.guild-conversation blockquote span {
  color: var(--text);
  font-weight: 700;
}

.character-level-panel {
  border-color: rgba(118, 167, 199, 0.62);
  background:
    linear-gradient(135deg, rgba(237, 248, 255, 0.98), rgba(255, 246, 207, 0.94)),
    var(--panel);
}

.character-level-card {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.character-level-card span {
  color: #244f6a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.character-level-card strong {
  color: #102014;
  font-size: clamp(38px, 6vw, 58px);
  line-height: 0.95;
}

.character-level-card small {
  color: var(--muted);
  font-weight: 800;
}

.identity-controls {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.profile-page {
  align-items: start;
}

.profile-hero-wrap {
  display: flex;
  justify-content: center;
}

.profile-hero {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: fit-content;
  max-width: min(100%, 760px);
  padding: 20px 24px;
  border-color: rgba(118, 167, 199, 0.62);
  background:
    linear-gradient(135deg, rgba(237, 248, 255, 0.98), rgba(239, 247, 233, 0.96)),
    var(--panel);
}

.profile-hero > div:first-child {
  display: grid;
  gap: 5px;
}

.profile-hero h2 {
  margin: 0;
  color: #102014;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1;
}

.profile-hero p {
  margin: 0;
  color: #244f6a;
  font-weight: 900;
}

.profile-hero small {
  color: var(--muted);
  font-weight: 800;
}

.admin-pin-toolbar {
  display: flex;
  align-items: center;
  margin: 6px 0;
}

.admin-pin-channel-select {
  width: auto;
  min-width: 132px;
  max-width: 190px;
}

.admin-pin-actions {
  justify-content: flex-start;
}

.admin-pin-actions button {
  width: auto;
  min-height: 34px;
  padding: 7px 12px;
}

.daily-login-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.daily-login-card > div {
  display: grid;
  gap: 6px;
}

.admin-player-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.admin-player-overview span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-player-overview strong {
  color: var(--text);
  font-size: 13px;
}

.inventory-gold-card,
.guild-rank-card {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid rgba(215, 181, 74, 0.55);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 218, 0.98), rgba(239, 247, 233, 0.98)),
    #fffdf4;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.inventory-gold-card span,
.guild-rank-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inventory-gold-card strong {
  color: #a56b05;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 0.95;
}

.guild-rank-card {
  width: 100%;
  justify-items: center;
  text-align: center;
  border-color: rgba(138, 114, 82, 0.5);
  background:
    linear-gradient(135deg, rgba(241, 237, 228, 0.98), rgba(224, 214, 199, 0.96)),
    #f4efe6;
}

.guild-rank-card strong {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 2px solid rgba(84, 75, 64, 0.36);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 28%, #fff9ec, #c8b89e 58%, #7f715f);
  color: #3f362d;
  font-size: 54px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.inventory-gold-card small,
.guild-rank-card small {
  color: var(--muted);
  font-weight: 800;
}

.inventory-bulk-actions {
  align-items: stretch;
}

.inventory-lock-actions {
  margin-top: 8px;
  align-items: stretch;
}

.inventory-bulk-actions button,
.inventory-lock-actions button {
  justify-content: center;
}

.tutorial-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}

.tutorial-card {
  width: min(760px, calc(100vw - 24px));
  padding: 16px;
  border: 2px solid rgba(118, 167, 199, 0.65);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 253, 244, 0.98), rgba(238, 248, 255, 0.98)),
    var(--panel);
  box-shadow: 0 18px 45px rgba(37, 51, 43, 0.26);
  pointer-events: auto;
}

.tutorial-card h2 {
  margin-bottom: 6px;
}

.tutorial-card p {
  margin: 0;
  color: var(--text);
}

.tutorial-progress {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tutorial-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.tutorial-actions button:last-child {
  margin-left: auto;
}

.tutorial-highlight {
  position: relative;
  z-index: 85;
  outline: 2px solid rgba(255, 209, 102, 0.95);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(255, 209, 102, 0.22), 0 0 22px rgba(215, 165, 29, 0.42);
  animation: tutorial-pulse 720ms ease-in-out infinite alternate;
}

.map-hotspot.tutorial-highlight {
  background: rgba(255, 246, 180, 0.52);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.78),
    inset 0 0 24px rgba(255, 209, 102, 0.58),
    0 0 0 5px rgba(255, 209, 102, 0.28),
    0 0 22px rgba(215, 165, 29, 0.5);
  animation-name: tutorial-map-pulse;
}

.map-hotspot-disabled.tutorial-highlight {
  opacity: 1;
  filter: saturate(1.08);
}

@keyframes tutorial-pulse {
  from {
    outline-color: rgba(255, 209, 102, 0.45);
    filter: brightness(0.96);
    box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.1), 0 0 6px rgba(215, 165, 29, 0.18);
  }
  to {
    outline-color: rgba(255, 226, 112, 1);
    filter: brightness(1.12);
    box-shadow: 0 0 0 8px rgba(255, 209, 102, 0.28), 0 0 28px rgba(215, 165, 29, 0.55);
  }
}

@keyframes tutorial-map-pulse {
  from {
    outline-color: rgba(255, 209, 102, 0.45);
    background: rgba(255, 246, 180, 0.22);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.4),
      inset 0 0 8px rgba(255, 209, 102, 0.2),
      0 0 0 2px rgba(255, 209, 102, 0.12),
      0 0 8px rgba(215, 165, 29, 0.22);
  }
  to {
    outline-color: rgba(255, 226, 112, 1);
    background: rgba(255, 246, 180, 0.62);
    box-shadow:
      inset 0 0 0 2px rgba(255, 255, 255, 0.82),
      inset 0 0 28px rgba(255, 209, 102, 0.68),
      0 0 0 7px rgba(255, 209, 102, 0.32),
      0 0 30px rgba(215, 165, 29, 0.62);
  }
}

.qty-badge {
  border: 1px solid var(--line);
  border-radius: 7px;
  min-width: 42px;
  padding: 8px 10px;
  text-align: center;
  background: #eef4ea;
  color: var(--accent);
}

.equipment-slot, .material-count {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.gear-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.max-hit-list {
  display: grid;
  gap: 7px;
  margin: 8px 0 12px;
}

.max-hit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fbf4;
}

.max-hit-row strong {
  min-width: 34px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #e7f7dc;
  color: #23602f;
  text-align: center;
}

.max-hit-breakdown-row, .max-hit-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.max-hit-breakdown-row > div > span,
.max-hit-total span {
  font-weight: 700;
}

.max-hit-breakdown-row strong,
.max-hit-total strong {
  color: #23602f;
}

.max-hit-sources {
  display: grid;
  gap: 3px;
  margin-top: 5px;
  padding-left: 14px;
  border-left: 2px solid #d9e9d0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.max-hit-total {
  border-bottom: 0;
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #f0faea;
}

.buff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.buff-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fbfdf8;
  cursor: help;
}

.buff-card > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.buff-card p {
  margin: 8px 0 0;
}

.gear-slot {
  min-height: 96px;
  display: grid;
  gap: 5px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fbfdf8;
}

.gear-helmet, .gear-legs {
  grid-column: 2;
}

.gear-weapon {
  grid-column: 1;
}

.gear-body {
  grid-column: 2;
}

.gear-shield {
  grid-column: 3;
}

.gear-accessory {
  grid-column: 1;
}

.gear-relic {
  grid-column: 3;
}

.gear-slot-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gear-slot strong {
  font-size: 13px;
}

.gear-slot small {
  color: var(--muted);
}

.gear-slot-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 4px;
}

.gear-slot-actions button {
  padding: 6px 7px;
  font-size: 12px;
}

.craft-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fbfdf8;
}

.craft-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.recipe-row .actions {
  margin-top: 0;
}

.recipe-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 6px;
  align-self: center;
  width: max-content;
  max-width: 190px;
}

.recipe-actions button {
  height: 32px;
  min-height: 32px;
  padding: 5px 9px;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
}

.material-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.material-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  background: #fbfdf8;
}

.bulk-sell-title {
  margin-top: 22px;
}

.craft-inputs span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
}

.craft-inputs .ok {
  color: var(--accent);
}

.craft-inputs .missing {
  color: var(--danger);
}

.quest-row.done, .quest-row.locked {
  opacity: 0.82;
}

.quest-row.locked {
  color: var(--muted);
}

.reward-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  max-width: 100%;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.reward-line span {
  font-weight: 800;
  color: var(--gold);
}

.reward-line strong {
  font-weight: 700;
  color: #3d4b40;
}

.achievement-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.achievement-card:last-child {
  border-bottom: 0;
}

.achievement-card.locked {
  opacity: 0.82;
  color: var(--muted);
}

.dialog-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.achievement-dialog {
  width: min(820px, 100%);
}

.log {
  height: 280px;
  overflow: auto;
  padding: 10px;
  color: var(--muted);
  background: #fbfdf8;
}

.log p {
  margin: 0 0 7px;
}

.empty {
  color: var(--muted);
  padding: 14px 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(37, 51, 43, 0.26);
}

.modal {
  width: min(760px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(37, 51, 43, 0.18);
}

.modal h2 {
  margin: 0 0 6px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.sell-dialog {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(37, 51, 43, 0.18);
}

.gear-dialog {
  width: min(760px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(37, 51, 43, 0.18);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.gear-dialog .gear-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.gear-dialog .gear-slot {
  min-height: 130px;
}

.gear-dialog .gear-slot-actions {
  margin-top: auto;
}

.guild-log-dialog .dialog-list {
  max-height: min(62vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.offline-progress-dialog {
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 246, 217, 0.8), transparent 32%),
    linear-gradient(135deg, #fbfdf8, #edf8ff);
}

.offline-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.offline-summary-grid div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.offline-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.offline-summary-grid strong {
  color: #183a32;
  font-size: 20px;
}

.offline-section {
  margin-top: 12px;
}

.sell-dialog h2 {
  margin: 0;
}

.collection-dialog {
  width: min(760px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
}

.collection-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.collection-filter-pills button {
  display: grid;
  gap: 2px;
  min-width: 92px;
  padding: 8px 11px;
  border-color: color-mix(in srgb, var(--accent), var(--line) 55%);
  background: #f7fbfd;
  text-align: left;
}

.collection-filter-pills button.active {
  background: linear-gradient(135deg, #244f6a, #315a70);
  color: #fff;
}

.collection-filter-pills strong {
  font-size: 15px;
}

.collection-list {
  display: grid;
  gap: 8px;
}

.collection-list.all-view {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.collection-entry {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(92px, auto);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdf8;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.collection-entry:hover {
  border-color: color-mix(in srgb, var(--accent), var(--line) 30%);
  background: #f7fbfd;
}

.collection-entry > div {
  display: grid;
  gap: 3px;
}

.collection-entry > div:last-child {
  justify-items: end;
  text-align: right;
}

.collection-thumb {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid color-mix(in srgb, var(--accent-2), var(--line) 50%);
  border-radius: 8px;
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 246, 217, 0.9), transparent 35%),
    linear-gradient(135deg, #edf8ff, #fbfdf8);
  background-size: cover;
  background-position: center;
  color: #315a70;
  font-weight: 900;
  object-fit: contain;
}

img.collection-thumb {
  padding: 3px;
}

.collection-thumb.large {
  width: min(240px, 100%);
  height: 220px;
  font-size: 34px;
}

.collection-detail {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdf8;
}

.collection-detail-left {
  display: grid;
  gap: 10px;
  align-content: start;
}

.collection-detail-heading {
  display: grid;
  gap: 2px;
  text-align: center;
}

.collection-detail-heading h3 {
  margin: 0;
  color: #183a32;
}

.collection-detail-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.collection-detail-art {
  display: grid;
  place-items: center;
}

.collection-detail-found {
  margin: 0;
  text-align: center;
}

.collection-detail-copy {
  display: grid;
  gap: 8px;
  align-content: start;
}

.collection-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.collection-detail-stats div,
.collection-detail-source {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.collection-detail-stats strong,
.collection-detail-source strong {
  overflow-wrap: anywhere;
}

.collection-detail-stats span,
.collection-detail-source span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.collection-detail-source {
  background: #fffaf0;
}

.town-center-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.town-center-hero h2,
.leaderboard-panel h3 {
  margin: 0;
}

.leaderboard-actions {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.leaderboard-hero {
  position: relative;
  overflow: hidden;
  border-color: rgba(168, 115, 21, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 246, 207, 0.92), rgba(237, 248, 255, 0.86)),
    var(--panel);
  box-shadow: 0 16px 34px rgba(37, 51, 43, 0.08);
}

.leaderboard-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: linear-gradient(90deg, #a87315, #76b66b, #78a7c7);
}

.leaderboard-hero h2 {
  color: #183a32;
  font-size: 28px;
}

.leaderboard-hero strong {
  display: block;
  margin-top: 3px;
  color: #7a4e00;
  font-size: 13px;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .leaderboard-actions {
    justify-items: stretch;
    text-align: left;
  }
}

.leaderboard-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  background: linear-gradient(180deg, #fffdf6, #f4fbff);
  border-color: color-mix(in srgb, var(--accent), var(--line) 55%);
  box-shadow: 0 10px 24px rgba(37, 51, 43, 0.06);
}

.leaderboard-panel h3 {
  color: #244f6a;
}

.leaderboard-list {
  display: grid;
  gap: 8px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.74);
}

.leaderboard-rank {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 7px;
  background: #e9f4f6;
  color: #244f6a;
}

.leaderboard-row.top-1 .leaderboard-rank {
  background: #fff1b8;
  color: #7a4e00;
  box-shadow: 0 0 0 2px rgba(168, 115, 21, 0.14);
}

.leaderboard-row.top-2 .leaderboard-rank {
  background: #e7edf2;
  color: #46515d;
}

.leaderboard-row.top-3 .leaderboard-rank {
  background: #f0d2b8;
  color: #68401d;
}

.leaderboard-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.leaderboard-row > div strong,
.leaderboard-row > div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-score {
  color: #183a32;
  font-size: 18px;
}

@media (max-width: 820px) {
  .town-center-hero {
    display: grid;
  }

  .leaderboard-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .leaderboard-score {
    grid-column: 2;
    justify-self: start;
  }
}

.force-save-card {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  border: 1px solid color-mix(in srgb, var(--accent-2), var(--line) 45%);
  border-radius: 8px;
  padding: 12px;
  background: #f7fbfd;
}

.sell-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.sell-options button {
  display: grid;
  gap: 3px;
  justify-items: center;
  padding: 11px 8px;
}

.sell-options span {
  color: var(--muted);
  font-size: 12px;
}

.bulk-sell-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.bulk-sell-summary span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  background: #fbfdf8;
  font-weight: 700;
}

.upgrade-cost {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.upgrade-cost span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
}

.upgrade-cost .ok {
  color: var(--accent);
}

.upgrade-cost .missing {
  color: var(--danger);
}

.upgrade-game {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.gold {
  color: var(--gold);
}

.danger-text {
  color: var(--danger);
}

.success-text {
  color: var(--accent);
}

@media (max-width: 820px) {
  .collection-detail {
    grid-template-columns: 1fr;
  }

  .collection-detail-left,
  .collection-detail-copy {
    justify-items: stretch;
  }

  .collection-detail-stats {
    grid-template-columns: 1fr;
  }

  .collection-detail-art {
    justify-items: center;
  }

  .collection-thumb.large {
    width: min(220px, 100%);
    height: 190px;
  }

  .topbar {
    padding: 0;
  }

  .brand-title {
    width: 92%;
    border-radius: 14px;
    overflow: hidden;
  }

  .header-control-panel {
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }

  .header-control-panel .stats-strip {
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-left: auto;
  }

  .header-actions button {
    flex: 0 0 auto;
  }

  .header-title-image {
    max-height: 170px;
    border-radius: 14px;
  }

  .quick-travel-setting {
    grid-template-columns: 1fr;
  }

  .support-card {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell {
    padding: 10px;
  }

  .game-layout {
    display: block;
  }

  .setup-welcome-grid {
    grid-template-columns: 1fr;
  }

  .setup-auth-card {
    position: static;
  }

  .setup-hero {
    min-height: 230px;
  }

  .combat-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "dungeons"
      "info"
      "fight";
  }

  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 {
    grid-column: span 12;
  }

  .combat-grid .dungeon-selector,
  .combat-grid .quick-actions-panel,
  .combat-grid .combat-panel {
    grid-column: 1 / -1;
    width: 100%;
  }

  .item-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .item-row > .actions {
    grid-column: 1 / -1;
  }

  .gathering-node {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .recipe-row .recipe-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: none;
    margin-top: 4px;
  }

  .recipe-actions button {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .skill-level-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .skill-level-row > span {
    grid-column: 1 / -1;
  }

  .world-map {
    min-height: 460px;
  }

  .map-location-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-hotspot {
    padding: 3px;
  }

  .map-hotspot b {
    display: grid;
  }

  .map-hotspot span {
    display: none;
  }

  .gathering-node button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .monster-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .monster-row button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .shop-actions {
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .supplies-grid {
    grid-template-columns: 1fr;
  }

  .gear-grid,
  .gear-dialog .gear-grid {
    grid-template-columns: 1fr;
  }

  .gear-helmet,
  .gear-legs,
  .gear-weapon,
  .gear-body,
  .gear-shield,
  .gear-accessory,
  .gear-relic {
    grid-column: auto;
  }

  .gear-dialog {
    width: min(520px, 100%);
  }

  .guild-log-dialog .dialog-list {
    max-height: 58vh;
  }

  .offline-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monster-card {
    min-height: 250px;
  }

  .monster-card > .level-badge {
    grid-column: auto;
  }

  .monster-card > span {
    grid-column: 1 / -1;
  }

  .monster-image {
    width: min(164px, 70%);
    height: 124px;
  }

  .player-resource-meter {
    grid-template-columns: 1fr;
  }

  .resource-divider {
    width: 100%;
    min-height: 1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(120, 167, 199, 0.5), transparent);
  }

  .fight-actions {
    grid-template-columns: 1fr;
  }

  .tutorial-overlay {
    padding: 10px;
  }

  .tutorial-card {
    padding: 12px;
  }

  .tutorial-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tutorial-actions button:last-child {
    margin-left: 0;
  }
}

@media (max-width: 460px) {
  .map-location-list {
    grid-template-columns: 1fr;
  }
}

.admin-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.admin-control-grid label {
  display: grid;
  gap: 6px;
  color: #315a70;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-search-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.admin-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: linear-gradient(135deg, #fff8dc, #e9f8ff);
  border-color: rgba(74, 122, 150, 0.28);
}

.admin-search-result small {
  grid-column: 1 / -1;
}

.admin-search-result small,
.admin-search-result span {
  overflow-wrap: anywhere;
}

.admin-search-meta {
  color: #6a7d84;
  font-size: 12px;
  font-weight: 800;
}

.admin-world-event-panel {
  border-color: rgba(182, 62, 73, 0.34);
  background: linear-gradient(135deg, rgba(255, 245, 232, 0.96), rgba(236, 250, 255, 0.96));
}

.admin-event-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.admin-event-header .icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 24px;
}

.admin-event-table {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.admin-event-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(110px, 0.8fr) minmax(145px, auto);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(74, 122, 150, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.admin-event-row span {
  min-width: 0;
}

.admin-event-row small {
  display: block;
  color: #6a7d84;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.admin-event-head {
  color: #315a70;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.admin-event-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.admin-event-row-actions button {
  min-height: 36px;
  padding: 8px 10px;
}

.admin-user-search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 12px 0;
}

.admin-player-table .admin-player-row {
  grid-template-columns: minmax(0, 1.4fr) minmax(95px, 0.8fr) minmax(105px, 0.9fr) auto;
}

.admin-player-table .admin-player-row:not(.admin-event-head) {
  cursor: pointer;
}

.admin-pagination {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  color: #315a70;
  font-size: 12px;
  font-weight: 900;
}

.admin-player-edit-dialog {
  max-width: 860px;
}

.admin-user-id-copy {
  width: 100%;
  margin: 6px 0 12px;
  text-align: left;
  overflow-wrap: anywhere;
  background: #f7fbf4;
}

.admin-tool-section {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.admin-tool-section h3 {
  margin: 0;
}

.admin-audit-list {
  display: grid;
  gap: 8px;
}

.admin-audit-row {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(74, 122, 150, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.admin-audit-row p {
  margin: 0;
  color: #315a70;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.admin-audit-row small {
  color: #6a7d84;
  font-size: 12px;
  font-weight: 800;
}

.admin-world-event-dialog {
  max-width: 720px;
}

.world-event-countdown {
  color: #315a70;
  font-weight: 900;
}

.world-event-countdown-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(74, 122, 150, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.world-event-countdown-card div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: #315a70;
  font-weight: 900;
}

.world-event-countdown-card p {
  margin: 0;
  color: #315a70;
  font-weight: 900;
}

.countdown-bar {
  height: 16px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(86, 48, 75, 0.12);
}

.countdown-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7bd389, #ffd166);
}

.world-event-reward-panel {
  align-content: start;
}

.world-event-reward-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(74, 122, 150, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: #315a70;
  font-weight: 900;
}

.world-event-reward-box strong {
  color: #183a32;
}

.world-event-inline-countdown {
  margin-top: 12px;
}

.admin-event-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.admin-event-status span {
  padding: 10px;
  border: 1px solid rgba(74, 122, 150, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: #315a70;
  font-weight: 800;
}

.admin-json-label {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.admin-json-input {
  min-height: 130px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.world-event-hero {
  border-color: rgba(182, 62, 73, 0.28);
  background: linear-gradient(135deg, rgba(255, 248, 220, 0.98), rgba(232, 247, 255, 0.98));
}

.world-event-boss-panel {
  display: grid;
  gap: 14px;
  border-color: rgba(182, 62, 73, 0.32);
}

.world-event-boss-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.world-event-boss-orb {
  width: 86px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: radial-gradient(circle at 35% 30%, #fff7c7, #e85d5d 58%, #56304b 100%);
  color: #fff9da;
  font-size: 48px;
  font-weight: 1000;
  box-shadow: 0 12px 30px rgba(86, 48, 75, 0.24);
}

.boss-hp-bar {
  height: 22px;
  background: rgba(86, 48, 75, 0.14);
}

.boss-hp-bar span {
  background: linear-gradient(90deg, #e85d5d, #ffd166);
}

.world-event-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.world-event-stats span {
  padding: 10px;
  border: 1px solid rgba(74, 122, 150, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  color: #315a70;
  font-weight: 800;
}

.world-event-stats strong {
  display: block;
  color: #183a32;
  font-size: 18px;
}

.world-event-support-panel {
  display: grid;
  gap: 10px;
  align-content: start;
}

@media (max-width: 760px) {
  .about-page {
    width: min(100% - 20px, 980px);
    padding-top: 10px;
  }

  .about-nav {
    justify-content: center;
  }

  .about-hero,
  .about-hero-copy {
    min-height: 340px;
  }

  .about-hero::after {
    background: linear-gradient(180deg, rgba(244, 247, 239, 0.96), rgba(244, 247, 239, 0.82));
  }

  .about-hero-copy {
    padding: 22px;
  }

  .about-hero h1 {
    font-size: 34px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-dock {
    width: min(86vw, 340px);
  }

  .chat-header {
    padding: 10px;
  }

  .chat-rank-legend {
    max-height: 58px;
    overflow: hidden;
  }

  .admin-world-event-panel {
    grid-column: span 12;
  }

  .admin-event-row {
    grid-template-columns: 1fr;
  }

  .admin-user-search-bar {
    grid-template-columns: 1fr;
  }

  .admin-player-table .admin-player-row {
    grid-template-columns: 1fr;
  }

  .admin-event-row-actions {
    justify-content: flex-start;
  }

  .world-event-boss-card {
    grid-template-columns: 1fr;
  }

  .world-event-boss-orb {
    width: 72px;
  }
}

.world-event-fight .monster-card {
  max-width: 560px;
  margin: 0 auto;
}

.world-event-monster-card {
  position: relative;
  overflow: hidden;
}

.world-event-boss-image {
  width: min(100%, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 14px;
  background-color: rgba(255, 248, 220, 0.62);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  color: #8f2f49;
  font-size: 82px;
  font-weight: 1000;
}

.world-event-fight-button {
  width: 100%;
  padding: 16px 18px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 1000;
  background: linear-gradient(135deg, #e85d5d, #ffd166);
  color: #183a32;
  box-shadow: 0 12px 30px rgba(86, 48, 75, 0.18);
}

.world-event-fight-button.active {
  background: linear-gradient(135deg, #7bd389, #ffd166);
}

.admin-event-actions {
  align-items: stretch;
}

.admin-event-actions button {
  min-height: 44px;
}

.world-event-monster-card {
  isolation: isolate;
}

.world-event-damage-indicators {
  inset: 18px;
  z-index: 6;
}

.world-event-damage-indicators .damage-splat {
  left: var(--x);
  right: auto;
  top: var(--y);
  transform: translateX(-50%);
}

.world-event-meta-row,
.world-event-monster-card .world-event-stats {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.event-mana-panel {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(74, 122, 150, 0.2);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.event-mana-panel .resource-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #315a70;
  font-weight: 900;
}

.world-event-support-panel .gear-button {
  min-width: 42px;
  padding-inline: 10px;
  font-size: 18px;
}
