/* evondevKit refresh — Game Garden Portal v10
   Palette inspired by the supplied game screenshot:
   forest navy / meadow green / warm cream / lime / sunflower / coral.
   Previous blue-yellow portal palette is intentionally not reused. */
:root {
  color-scheme: light;

  --bg: #6CA685;
  --panel: #FFF8E6;
  --panel-2: #DDE8C8;
  --surface-card: #FFF8E6;
  --surface-sunken: #D2E2C3;
  --surface-sidebar: #DDE8C8;
  --surface-map: #123E4C;
  --surface-drawer: #FFF8E6;

  --line: #AFC4A4;
  --line-strong: #8FA98D;
  --text: #173A44;
  --muted: #5F7166;
  --muted-2: #7D8D7C;

  --accent: #3C8F69;
  --accent-strong: #215C4C;
  --accent-soft: #DCEAD9;
  --cyan: #5DC1B1;

  --good: #3C8F69;
  --warn: #795D12;
  --bad: #D95D45;
  --on-bad: #C74A36;
  --info: #3C8F69;
  --sky: #5DC1B1;
  --lemon: #F2D257;
  --gold: #BFD421;
  --ink: #173A44;

  --primary-container: #E6EBCB;
  --primary-selected: #DCEAD9;
  --success-container: #E2F0D5;
  --warning-container: #FFF1A8;
  --error-container: #FCE5D8;
  --topbar: #FFF8E6;
  --panel-translucent: rgba(255, 248, 230, .96);
  --overlay: rgba(23, 78, 89, .32);
  --shadow-dialog: 0 24px 64px rgba(23, 78, 89, .18);

  --radius-keycap: 7px;
  --radius-control: 8px;
  --radius-button: 9px;
  --radius-utility: 9px;
  --radius-list: 10px;
  --radius-card: 12px;
  --radius-panel: 14px;
}

html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}
::selection { color: var(--text); background: #E6EBCB; }

:is(button, input, select, summary, a):focus-visible {
  outline-color: #AFC4A4;
  outline-offset: 2px;
}

/* Typography: readable and quiet, without tiny all-caps labels. */
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .035em;
  text-transform: none;
}
.entity-heading,
th { text-transform: none; letter-spacing: .025em; }
.field-label { color: #5F7166; font-size: 14px; font-weight: 650; }
.field-optional { color: var(--muted-2); font-size: 11px; text-transform: none; letter-spacing: 0; }

/* Shell */
.topbar {
  min-height: 74px;
  padding: 13px clamp(16px, 3vw, 40px);
  border-color: var(--line);
  background: var(--topbar);
  box-shadow: none;
  backdrop-filter: none;
}
.topbar h1 { color: var(--text); font-size: clamp(20px, 2vw, 25px); letter-spacing: -.02em; }
.web-identity { color: var(--muted); }
.layout { width: min(1500px, 100%); padding-top: 18px; }
.guest-layout { margin-top: 18px; }
.workspace { grid-template-columns: 310px minmax(0, 1fr); gap: 18px; }
.accounts-panel { top: 92px; background: var(--surface-sidebar); }
.detail { background: var(--panel); }
.panel {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: none;
}

/* Inputs and buttons */
.guest-search-form input,
.auth-form input,
.compact-form input,
.portal-tool select,
.profile-turn-input,
.reward-item-controls input,
.admin-accounts-toolbar input,
.account-profile-toolbar select,
.reward-search-input {
  min-height: 42px;
  padding: 9px 11px;
  color: var(--text);
  background: var(--surface-card);
  border-color: var(--line-strong);
}
input::placeholder { color: #5F7166; }
:is(.guest-search-form input, .auth-form input, .compact-form input, .portal-tool select, .profile-turn-input, .reward-item-controls input, .admin-accounts-toolbar input, .account-profile-toolbar select, .reward-search-input):hover:not(:disabled) {
  border-color: #7D8D7C;
}
:is(.guest-search-form input, .auth-form input, .compact-form input, .portal-tool select, .profile-turn-input, .reward-item-controls input, .admin-accounts-toolbar input, .account-profile-toolbar select, .reward-search-input):focus {
  border-color: #AFC4A4;
  outline: none;
  box-shadow: 0 0 0 3px rgba(60, 143, 105, .14);
}

.auth-button,
.auth-form button,
.guest-search-form button,
.compact-form button,
.portal-tool button,
.guest-result,
.test-room-button,
.hot-spring-button,
.mining-button,
.school-button,
.profile-turn-toolbar button,
.admin-close-button,
.admin-accounts-toolbar button,
.admin-login-button {
  min-height: 40px;
  padding: 8px 13px;
  border-color: var(--line-strong);
  color: #173A44;
  background: var(--surface-card);
  box-shadow: none;
}
.auth-button.primary,
.auth-form button,
.guest-search-form button,
.compact-form button,
.profile-save-button,
.admin-login-button {
  border-color: var(--accent);
  color: #FFF8E6;
  background: var(--accent);
}
:is(.auth-button, .auth-form button, .guest-search-form button, .compact-form button, .portal-tool button, .guest-result, .test-room-button, .hot-spring-button, .mining-button, .school-button, .profile-turn-toolbar button, .admin-close-button, .admin-accounts-toolbar button):hover:not(:disabled) {
  border-color: #AFC4A4;
  color: var(--accent-strong);
  background: #E6EBCB;
}
:is(.auth-button.primary, .auth-form button, .guest-search-form button, .compact-form button, .profile-save-button, .admin-login-button):hover:not(:disabled) {
  border-color: var(--accent-strong);
  color: #FFF8E6;
  background: var(--accent-strong);
}

.connection,
.chip {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #E6EBCB;
  font-size: 12px;
}
.connection.pending { color: #795D12; background: var(--warning-container); }
.connection.online { color: #3C8F69; background: var(--success-container); }
.connection.offline { color: #D95D45; background: var(--error-container); }
.connection.online::before,
.binding-status.good { box-shadow: none; }

/* Sidebar: one soft slate surface instead of dark header + bright body. */
.accounts-panel > .panel-heading,
.worker-panel-heading {
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-sidebar) !important;
  backdrop-filter: none !important;
}
.worker-panel-heading h2 { font-size: 20px; }
.worker-panel-heading .summary {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #E6EBCB;
}
.worker-panel-heading .metric {
  min-width: 0;
  min-height: 50px;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 3px;
  padding: 7px 9px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.worker-panel-heading .metric:nth-child(3) { border-right: 0; }
.worker-panel-heading .metric span { color: var(--muted); font-size: 11px; font-weight: 650; }
.worker-panel-heading .metric strong { color: var(--text); font-size: 16px; }
.worker-panel-heading .metric-updated {
  grid-column: 1 / -1;
  min-height: auto;
  display: flex;
  justify-content: space-between;
  padding: 5px 1px 0;
  border: 0;
  background: transparent;
}
.worker-panel-heading .metric-updated span,
.worker-panel-heading .metric-updated strong { display: inline; color: var(--muted); font-size: 11px; font-weight: 600; }

.account-list { padding: 8px 10px 10px; background: var(--surface-sidebar); }
.account-row { min-height: 58px; gap: 7px; margin-bottom: 7px; }
.account-row .account-button {
  min-height: 58px;
  gap: 5px;
  padding: 9px 11px;
  border-radius: 10px;
  background: transparent;
}
.account-row .account-button strong { color: var(--text); font-size: 14px; line-height: 1.25; }
.account-row .account-row-meta { color: var(--muted); font-size: 12px; line-height: 1.25; }
.account-row .account-button:hover { background: #E6EBCB; }
.account-row .account-button.selected {
  border-color: #AFC4A4;
  background: #E6EBCB;
  box-shadow: inset 3px 0 0 var(--accent);
}
.account-row .account-exit-button {
  min-width: 56px;
  min-height: 58px;
  border-color: #FCE5D8;
  color: var(--bad);
  background: #FCE5D8;
  font-size: 12px;
}
.account-exit-button:hover:not(:disabled),
.account-stop-button:hover:not(:disabled) { border-color: #D95D45; color: #D95D45; background: #FCE5D8; }

.portal-tool {
  margin: 8px 10px 12px;
  border: 1px solid var(--line);
  background: #E6EBCB;
}
details.portal-tool > summary { min-height: 42px; padding: 8px 10px; font-size: 13px; font-weight: 700; }

/* Account header */
.detail-header.account-control-card { display: block; padding: 20px; background: var(--panel); }
.account-overview {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.account-identity { gap: 7px; }
.account-title-row { gap: 8px 12px; }
.detail-header .account-title { color: var(--text); font-size: clamp(22px, 2vw, 27px); line-height: 1.15; }
.account-role-name { color: var(--info); font-size: 13px; }
.account-title-row .currency-badges { gap: 8px; }
.account-title-row .currency-badge {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #E6EBCB;
  color: var(--muted);
  font-size: 12px;
}
.account-title-row .currency-badge strong { color: var(--text); font-size: 14px; }
.account-title-row .money-badge { border-color: #E6EBCB; background: #E6EBCB; }
.account-title-row .money-badge strong { color: #5F7166; }
.account-actions { display: flex; gap: 8px; align-items: flex-start; }
.reward-menu-toggle {
  min-height: 42px;
  padding: 7px 11px;
  border-color: #AFC4A4;
  background: #E6EBCB;
  color: #3C8F69;
}
.reward-menu-toggle:hover,
.reward-menu-toggle[aria-expanded="true"] { border-color: #AFC4A4; color: #3C8F69; background: #E6EBCB; }
.reward-menu-toggle > span,
.reward-menu-toggle > strong { font-size: 13px; }
.reward-menu-toggle > small { color: var(--muted); }

/* Profile toolbar in account header */
.account-control-card .account-actions .account-profile-toolbar select { min-height: 34px; background: #E6EBCB; }
.account-control-card .account-actions .profile-management-actions button {
  min-height: 34px;
  border-color: var(--line-strong);
  background: #E6EBCB;
}
.account-control-card .account-actions .profile-edit-open-button::before { font-size: 10px; }

/* Activity area: same card language for every feature. */
.activity-section { padding-top: 18px; }
.activity-section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 12px; }
.activity-section-heading h3 { margin: 1px 0 0; font-size: 18px; }
.activity-section-heading > span { max-width: 520px; color: var(--muted); font-size: 13px; text-align: right; }
.activity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.activity-card,
.account-control-card .hot-spring-toolbar,
.account-control-card .mining-toolbar,
.account-control-card .school-toolbar,
.activity-grid > .school-toolbar,
.account-control-card .test-room-toolbar,
.account-control-card .revive-toolbar {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-card);
  box-shadow: none;
}
.activity-grid > .test-room-toolbar { grid-column: 1 / -1; }
.activity-card-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}
.activity-card-title strong { color: var(--muted); font-size: 12px; font-weight: 650; }
.activity-card .revive-toggle { min-height: 40px; justify-content: space-between; color: #173A44; font-size: 14px; }
.account-title-row .revive-toggle-track,
.revive-toggle-track { background: #AFC4A4; }
.revive-toggle input:checked + .revive-toggle-track { background: var(--good); }
.revive-meta,
.revive-feedback,
.test-room-state,
.test-room-feedback,
.reward-state,
.reward-feedback,
.form-feedback,
.hot-spring-feedback,
.mining-feedback,
.school-feedback { color: var(--muted); font-size: 12px; line-height: 1.45; }
.school-summary,
.mining-overview,
.hot-spring-room,
.test-room-lobby { color: var(--muted); font-size: 13px; }
.mining-energy-track { background: #E6EBCB; }
.mining-energy-fill { background: var(--good); }
.mining-button.start,
.school-button { border: 1px solid #AFC4A4; color: #5F7166; background: #E6EBCB; }
.mining-button.stop,
.test-room-button.leave,
.hot-spring-button.cancel,
.hot-spring-button.leave { border-color: #FCE5D8; color: var(--bad); background: var(--error-container); }
.test-room-button.challenge { border-color: #E6EBCB; background: #FFF1A8; }
.test-room-button.free,
.hot-spring-button.confirm { border-color: #E2F0D5; background: var(--success-container); }
.hot-spring-button.enter { border-color: #AFC4A4; background: #E6EBCB; }
.hot-spring-stats > span,
.test-room-member { border-color: var(--line); background: #E6EBCB; }
.binding-status.good,
.binding-status.bad { box-shadow: none; }

/* Navigation: flat tabs, not a row of pills. */
.detail-jump-nav {
  display: flex;
  position: sticky;
  top: 74px;
  gap: 0;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 248, 230, .96);
  backdrop-filter: none;
}
.detail-jump-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
}
.detail-jump-nav a:hover { color: var(--text); border-bottom-color: #AFC4A4; background: transparent; }

/* Main content surfaces */
.entity-grid { gap: 14px; padding: 18px; }
.entity-card,
.battle-map-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-card);
  box-shadow: none;
}
.entity-card dl div { border-color: #E6EBCB; }
.entity-heading { color: var(--muted); font-size: 12px; }
.hp-track { background: #DDE8C8; }

.section-block {
  margin: 0 18px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-card);
  overflow: hidden;
}
.section-heading { padding: 15px 17px; border-bottom: 1px solid var(--line); background: #E6EBCB; }
.section-heading h3 { font-size: 17px; }
.binding-summary,
.plan-summary,
.turn-summary { color: var(--muted); }

/* Advanced buff area: one section card, rows inside it — no card-inside-card visual noise. */
.binding-groups { gap: 0; padding-top: 0; }
.binding-group {
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid #E6EBCB;
  border-radius: 0;
  background: transparent;
}
.binding-group:last-child { border-bottom: 0; }
.binding-group-heading strong { font-size: 13px; }
.binding-group-heading div > span,
.binding-group-count { color: var(--muted); font-size: 11px; }
.binding-items { gap: 0; border: 1px solid #E6EBCB; border-radius: 9px; overflow: hidden; background: #E6EBCB; }
.binding-item {
  min-height: 48px;
  padding: 7px 8px;
  border: 0;
  border-right: 1px solid #E6EBCB;
  border-bottom: 1px solid #E6EBCB;
  border-radius: 0;
  background: transparent;
}
.binding-item.ready,
.binding-item.missing { border-color: #E6EBCB; }
.binding-item-content strong { color: var(--text); font-size: 11px; }
.binding-item-content span { color: var(--muted); font-size: 10px; }
.keycap,
.turn-plan-keycap {
  color: #173A44;
  background: #E6EBCB;
  border-color: #AFC4A4;
  box-shadow: none;
}
.binding-status.good { background: var(--good); }
.binding-status.bad { background: var(--bad); }

.turn-plan-list { gap: 0; }
.turn-plan-row {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #E6EBCB;
  border-radius: 0;
  background: transparent;
}
.turn-plan-row:last-child { border-bottom: 0; }
.turn-card {
  border-color: #E6EBCB;
  border-radius: 10px;
  background: #E6EBCB;
}
.turn-head { background: #E6EBCB; }
.buff-chip { border-color: #E6EBCB; background: #FFF8E6; }
.buff-chip.sent { border-color: #E2F0D5; }
.buff-chip.skipped,
.buff-chip.failed { border-color: #FCE5D8; }

/* Battle visualization stays darker for readability, using medium slate instead of navy-black. */
.battle-map-stage {
  background:
    radial-gradient(circle at center, rgba(23, 78, 89, .08), transparent 58%),
    #123E4C;
}
.battle-map-stage,
.battle-map-stage * { --text: #E6EBCB; --muted: #7D8D7C; }
.battle-map-grid { opacity: .55; }
.battle-map-label { color: #E6EBCB; background: rgba(18, 62, 76, .94); }
.battle-map-legend { color: var(--muted); font-size: 12px; }
.battle-map-marker.enemy .battle-map-dot,
.legend-dot.enemy { background: #795D12; box-shadow: none; }
.battle-map-marker.ally .battle-map-dot,
.legend-dot.ally { background: #5F7166; box-shadow: none; }
.battle-map-marker.dead .battle-map-label { background: rgba(18, 62, 76, .80); }

/* Drawer / dialogs */
.reward-toolbar.reward-drawer,
.auth-dialog,
.profile-create-dialog,
.admin-accounts-dialog {
  color: var(--text);
  background: var(--panel);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-dialog);
}
.reward-drawer-heading,
.reward-toolbar.reward-drawer .reward-feedback { background: var(--panel); }
.reward-item { border-color: var(--line); background: #E6EBCB; }
.reward-item-controls button { border-color: #AFC4A4; color: #3C8F69; background: #E6EBCB; }
.reward-item-controls .reward-max-button { background: var(--accent-soft); }
.reward-search-input { background: var(--surface-card); }
.auth-dialog::backdrop,
.profile-create-dialog::backdrop,
.admin-accounts-dialog::backdrop { background: var(--overlay); backdrop-filter: blur(2px); }
.auth-tabs button { color: var(--muted); background: transparent; }
.auth-tabs button.selected { color: var(--text); border-color: #AFC4A4; background: var(--accent-soft); }
.profile-key-guide { background: #E6EBCB; }
.profile-turn-remove { color: var(--bad); background: var(--error-container); }

/* Admin follows the same slate system. */
.admin-account-row { border-color: var(--line); background: #E6EBCB; }
.admin-account-identity span,
.admin-account-meta span,
.admin-account-state small { color: var(--muted); }
.admin-state-badge { color: var(--muted); background: #E6EBCB; }
.admin-state-badge.active { color: #3C8F69; background: var(--success-container); }
.admin-state-badge.error { color: #D95D45; background: var(--error-container); }
.admin-account-empty { color: var(--muted); border-color: var(--line-strong); }

/* Guest portal */
.guest-search { padding: clamp(20px, 4vw, 36px); }
.guest-search h2 { font-size: clamp(22px, 3vw, 29px); }
.guest-search p { color: var(--muted); font-size: 15px; }
.guest-result { background: var(--surface-card); }

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .accounts-panel { position: static; }
  .worker-panel-heading { grid-template-columns: 1fr; align-items: stretch; }
  .worker-panel-heading .summary { max-width: none; justify-self: stretch; }
  .activity-grid { grid-template-columns: 1fr; }
  .activity-grid > .test-room-toolbar { grid-column: auto; }
  .detail-jump-nav { top: 74px; }
}

@media (max-width: 760px) {
  .binding-group { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar { min-height: 66px; padding: 10px 13px; }
  .topbar .eyebrow { display: none; }
  .topbar-actions { gap: 6px; }
  .layout,
  .guest-layout { width: 100%; padding-inline: 10px; }
  .detail-header.account-control-card { padding: 14px; }
  .account-overview { display: grid; }
  .account-actions { width: 100%; }
  .reward-menu-toggle { width: 100%; }
  .activity-section-heading { display: grid; align-items: start; }
  .activity-section-heading > span { text-align: left; }
  .detail-jump-nav { top: 66px; margin-inline: -1px; padding-inline: 10px; }
  .entity-grid { padding: 12px; }
  .section-block { margin: 0 12px 12px; }
  .binding-groups,
  .turn-plan-list,
  .turn-list { padding-left: 12px; padding-right: 12px; }
  input,
  select,
  textarea { font-size: 16px !important; }
  button { min-height: 44px; }
}

@media (max-width: 430px) {
  .worker-panel-heading .metric span { font-size: 11px; }
  .worker-panel-heading .metric strong { font-size: 16px; }
  .account-title-row .currency-badges { width: 100%; }
  .account-title-row .currency-badge { flex: 1 1 0; justify-content: space-between; }
  .detail-header .account-title { font-size: 22px; }
  .account-row .account-button strong { font-size: 14px; }
  .account-row .account-row-meta { font-size: 12px; }
}


/* Layout refinements: clearer hierarchy and denser mobile layout. */
.topbar h1 { font-weight: 760; }
.topbar-actions .auth-button,
.topbar-actions .connection { white-space: nowrap; }

.accounts-panel,
.detail,
.entity-card,
.battle-map-card,
.section-block,
.activity-card,
.account-control-card .hot-spring-toolbar,
.account-control-card .mining-toolbar,
.account-control-card .school-toolbar,
.activity-grid > .school-toolbar,
.account-control-card .test-room-toolbar,
.account-control-card .revive-toolbar {
  box-shadow: 0 1px 0 rgba(23, 78, 89, .04);
}

/* Keep accents inside the blue family. */
.account-row .account-button.selected { box-shadow: inset 3px 0 0 var(--accent); }
.reward-menu-toggle,
.test-room-button.challenge,
.mining-button.start,
.school-button {
  border-color: #AFC4A4;
  color: #3C8F69;
  background: #E6EBCB;
}
.reward-menu-toggle:hover,
.reward-menu-toggle[aria-expanded="true"],
.mining-button.start:hover:not(:disabled),
.school-button:hover:not(:disabled) {
  border-color: #AFC4A4;
  color: #3C8F69;
  background: #E6EBCB;
}
.account-title-row .money-badge {
  border-color: #E6EBCB;
  background: #E6EBCB;
}
.account-title-row .money-badge strong { color: #5F7166; }

/* Battle canvas uses the darkest palette color for functional contrast. */
.battle-map-stage {
  background:
    radial-gradient(circle at center, rgba(23, 78, 89, .09), transparent 58%),
    #123E4C;
}
.battle-map-label { background: rgba(18, 62, 76, .94); }
.battle-map-marker.dead .battle-map-label { background: rgba(18, 62, 76, .82); }

@media (max-width: 640px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px;
  }
  .topbar h1 { font-size: 21px; line-height: 1.18; }
  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 7px;
  }
  .web-identity {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
  }
  .topbar-actions .auth-button { min-height: 38px; padding: 7px 10px; font-size: 13px; }
  .topbar-actions .connection { min-height: 34px; padding-inline: 10px; font-size: 12px; }

  .layout,
  .guest-layout { padding-inline: 8px; padding-top: 10px; }
  .workspace { gap: 12px; }
  .panel { border-radius: 13px; }

  .accounts-panel > .panel-heading,
  .worker-panel-heading { padding: 12px; gap: 9px; }
  .worker-panel-heading .eyebrow { display: none; }
  .worker-panel-heading h2 { margin: 0; font-size: 18px; }
  .worker-panel-heading .summary { border-radius: 9px; }
  .worker-panel-heading .metric { min-height: 46px; padding: 6px 8px; }
  .worker-panel-heading .metric span { font-size: 10px; }
  .worker-panel-heading .metric strong { font-size: 15px; }
  .worker-panel-heading .metric-updated { padding-top: 4px; }
  .worker-panel-heading .metric-updated span,
  .worker-panel-heading .metric-updated strong { font-size: 10px; }

  .account-list { padding: 7px 9px 8px; }
  .account-row { min-height: 52px; margin-bottom: 6px; }
  .account-row .account-button { min-height: 52px; padding: 8px 10px; }
  .account-row .account-exit-button { min-width: 58px; min-height: 52px; padding-inline: 10px; }
  .portal-tool { margin: 6px 9px 10px; }
  details.portal-tool > summary { min-height: 40px; }

  .detail-header.account-control-card { padding: 15px 14px; }
  .account-overview { gap: 12px; padding-bottom: 14px; }
  .detail-header .account-title { font-size: 21px; overflow-wrap: anywhere; }
  .account-title-row { gap: 6px 10px; }
  .account-title-row .currency-badges { gap: 6px; }
  .account-title-row .currency-badge { min-height: 30px; padding: 5px 8px; }
  .account-actions { gap: 7px; }
  .reward-menu-toggle { min-height: 40px; }

  .activity-section { padding-top: 14px; }
  .activity-section-heading { gap: 4px; margin-bottom: 9px; }
  .activity-section-heading h3 { font-size: 17px; }
  .activity-section-heading > span { font-size: 12px; }
  .activity-grid { gap: 9px; }
  .activity-card,
  .account-control-card .hot-spring-toolbar,
  .account-control-card .mining-toolbar,
  .account-control-card .school-toolbar,
  .activity-grid > .school-toolbar,
  .account-control-card .test-room-toolbar,
  .account-control-card .revive-toolbar { padding: 12px; gap: 8px; }

  .detail-jump-nav {
    position: static;
    overflow-x: auto;
    scrollbar-width: none;
    padding-inline: 8px;
  }
  .detail-jump-nav::-webkit-scrollbar { display: none; }
  .detail-jump-nav a { min-height: 40px; padding: 7px 11px; white-space: nowrap; }

  .entity-grid { gap: 10px; padding: 10px; }
  .section-block { margin: 0 10px 10px; }
  .section-heading { padding: 12px 14px; }
}

@media (max-width: 430px) {
  .topbar-actions { grid-template-columns: minmax(0, 1fr) auto; }
  .topbar-actions .connection { grid-column: 1 / -1; justify-self: start; }
  .account-role-name { font-size: 12px; }
  .activity-section-heading > span { display: none; }
}


/* Light Blue visual hierarchy. */
body {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.004em;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 248, 230, .96);
  box-shadow: 0 1px 0 rgba(23, 78, 89, .03);
}
.topbar-brand { gap: 2px; }
.topbar .eyebrow { color: #5F7166; font-size: 10px; font-weight: 700; letter-spacing: .055em; }
.topbar h1 { font-weight: 760; color: #173A44; }

.panel,
.entity-card,
.battle-map-card,
.section-block,
.activity-card,
.account-control-card .hot-spring-toolbar,
.account-control-card .mining-toolbar,
.account-control-card .school-toolbar,
.activity-grid > .school-toolbar,
.account-control-card .test-room-toolbar,
.account-control-card .revive-toolbar {
  border-color: #E6EBCB;
  background: #FFF8E6;
  box-shadow: 0 1px 2px rgba(23, 78, 89, .035), 0 8px 24px rgba(23, 78, 89, .025);
}

.accounts-panel {
  border-color: #E6EBCB;
  background: #E6EBCB;
}
.accounts-panel > .panel-heading,
.worker-panel-heading,
.account-list {
  background: #E6EBCB !important;
}
.worker-panel-heading .summary {
  border-color: #E6EBCB;
  background: #FFF8E6;
  box-shadow: 0 1px 2px rgba(23, 78, 89, .03);
}
.worker-panel-heading .metric { border-right-color: #E6EBCB; }
.worker-panel-heading .metric span { color: #5F7166; }
.worker-panel-heading .metric strong { color: #173A44; }

.account-row .account-button {
  border: 1px solid transparent;
  color: #173A44;
}
.account-row .account-button:hover {
  border-color: #E6EBCB;
  background: #FFF8E6;
}
.account-row .account-button.selected {
  border-color: #E6EBCB;
  background: #E6EBCB;
  box-shadow: inset 3px 0 0 var(--accent), 0 1px 2px rgba(23, 78, 89, .04);
}
.account-row .account-button strong { color: #173A44; }
.account-row .account-row-meta { color: #5F7166; }

.portal-tool {
  border-color: #E6EBCB;
  background: #FFF8E6;
  box-shadow: 0 1px 2px rgba(23, 78, 89, .03);
}

.detail { background: #E6EBCB; }
.detail-header.account-control-card {
  border-bottom-color: #E6EBCB;
  background: #FFF8E6;
}
.account-overview { border-bottom-color: #E6EBCB; }
.detail-header .account-title { color: #173A44; font-weight: 780; }
.account-role-name { color: #3C8F69; font-weight: 700; }
.account-title-row .currency-badge {
  border-color: #E6EBCB;
  background: #E6EBCB;
  color: #5F7166;
}
.account-title-row .currency-badge strong { color: #173A44; }

.reward-menu-toggle,
.mining-button.start,
.school-button,
.test-room-button.challenge {
  border-color: #E6EBCB;
  color: #3C8F69;
  background: #E6EBCB;
}
.reward-menu-toggle:hover,
.reward-menu-toggle[aria-expanded="true"],
.mining-button.start:hover:not(:disabled),
.school-button:hover:not(:disabled),
.test-room-button.challenge:hover:not(:disabled) {
  border-color: #AFC4A4;
  color: #3C8F69;
  background: #E6EBCB;
}

.activity-section-heading h3,
.section-heading h3 { color: #173A44; font-weight: 740; }
.activity-section-heading > span,
.revive-meta,
.revive-feedback,
.test-room-state,
.test-room-feedback,
.reward-state,
.reward-feedback,
.form-feedback,
.hot-spring-feedback,
.mining-feedback,
.school-feedback,
.school-summary,
.mining-overview,
.hot-spring-room,
.test-room-lobby { color: #5F7166; }

.activity-card,
.account-control-card .hot-spring-toolbar,
.account-control-card .mining-toolbar,
.account-control-card .school-toolbar,
.activity-grid > .school-toolbar,
.account-control-card .test-room-toolbar,
.account-control-card .revive-toolbar {
  min-height: 104px;
  border-radius: 14px;
}

.detail-jump-nav {
  border-bottom-color: #E6EBCB;
  background: rgba(255, 248, 230, .96);
}
.detail-jump-nav a {
  color: #5F7166;
  font-weight: 650;
}
.detail-jump-nav a:hover,
.detail-jump-nav a:focus-visible {
  color: #3C8F69;
  border-bottom-color: #3C8F69;
}

.section-heading {
  border-bottom-color: #E6EBCB;
  background: #E6EBCB;
}
.entity-heading { color: #5F7166; }
.entity-card dl div { border-color: #E6EBCB; }

/* Compact advanced controls: less nested-card noise. */
.binding-group { border-bottom-color: #E6EBCB; }
.binding-items {
  border-color: #E6EBCB;
  background: #E6EBCB;
}
.binding-item {
  border-right-color: #E6EBCB;
  border-bottom-color: #E6EBCB;
}
.keycap,
.turn-plan-keycap {
  border-color: #E6EBCB;
  color: #5F7166;
  background: #E6EBCB;
}
.turn-card { border-color: #E6EBCB; background: #E6EBCB; }
.turn-head { background: #E6EBCB; }

/* Clear semantic states, without neon colors. */
.connection,
.chip { border-color: #E6EBCB; background: #E6EBCB; color: #5F7166; }
.connection.online { border-color: #E2F0D5; background: #E2F0D5; color: #3C8F69; }
.connection.pending { border-color: #FFF1A8; background: #FFF1A8; color: #795D12; }
.connection.offline { border-color: #FCE5D8; background: #FCE5D8; color: #D95D45; }

.auth-button.primary,
.auth-form button,
.guest-search-form button,
.compact-form button,
.profile-save-button,
.admin-login-button {
  border-color: #3C8F69;
  background: #3C8F69;
  color: #FFF8E6;
  box-shadow: 0 1px 2px rgba(60, 143, 105, .16);
}
:is(.auth-button.primary, .auth-form button, .guest-search-form button, .compact-form button, .profile-save-button, .admin-login-button):hover:not(:disabled) {
  border-color: #3C8F69;
  background: #3C8F69;
}

/* Battle is deliberately dark for trajectory and marker readability. */
.battle-map-stage {
  background:
    radial-gradient(circle at 50% 40%, rgba(60, 143, 105, .09), transparent 58%),
    #123E4C;
}
.battle-map-label { background: rgba(18, 62, 76, .94); }
.battle-map-marker.dead .battle-map-label { background: rgba(18, 62, 76, .82); }

@media (max-width: 640px) {
  .topbar {
    gap: 8px;
    padding: 10px 12px;
  }
  .topbar h1 { font-size: 20px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .auth-button { min-height: 36px; padding: 6px 10px; }
  .topbar-actions .connection { min-height: 32px; }

  .layout,
  .guest-layout { padding: 8px; }
  .workspace { gap: 10px; }
  .accounts-panel > .panel-heading,
  .worker-panel-heading { padding: 11px; }
  .worker-panel-heading h2 { font-size: 18px; }
  .worker-panel-heading .summary { border-radius: 10px; }
  .account-list { padding: 7px 8px 8px; }
  .portal-tool { margin: 6px 8px 9px; }

  .detail-header.account-control-card { padding: 14px 12px; }
  .account-overview { gap: 10px; }
  .detail-header .account-title { font-size: 20px; }
  .account-title-row .currency-badge { min-height: 32px; }
  .activity-grid { gap: 8px; }
  .activity-card,
  .account-control-card .hot-spring-toolbar,
  .account-control-card .mining-toolbar,
  .account-control-card .school-toolbar,
  .activity-grid > .school-toolbar,
  .account-control-card .test-room-toolbar,
  .account-control-card .revive-toolbar {
    min-height: auto;
    padding: 12px;
    border-radius: 12px;
  }

  .detail-jump-nav a { min-height: 42px; padding-inline: 10px; }
  .entity-grid { padding: 9px; }
  .section-block { margin: 0 9px 9px; }
  .section-heading { padding: 12px; }
}

@media (max-width: 430px) {
  .topbar { padding: 9px 10px; }
  .topbar h1 { font-size: 19px; }
  .topbar-actions .web-identity { font-size: 12px; }
  .worker-panel-heading .metric { min-height: 44px; }
  .account-row .account-button,
  .account-row .account-exit-button { min-height: 50px; }
  .detail-header .account-title { font-size: 19px; }
  .activity-section-heading h3 { font-size: 16px; }
}


/* ========================================================================


/* Palette v8 final layer: sky + yellow, with neutral derived surfaces. */
:root {
  --bg: #6CA685;
  --panel: #FFF8E6;
  --panel-2: #DDE8C8;
  --surface-card: #FFF8E6;
  --surface-sunken: #D2E2C3;
  --surface-sidebar: #E8EED8;
  --surface-map: #123E4C;
  --surface-drawer: #FFF8E6;
  --line: #AFC4A4;
  --line-strong: #8FA98D;
  --text: #173A44;
  --muted: #5F7166;
  --muted-2: #7D8D7C;
  --accent: #3C8F69;
  --accent-strong: #215C4C;
  --accent-soft: #DCEAD9;
  --sky: #5DC1B1;
  --lemon: #F2D257;
  --gold: #BFD421;
  --good: #3C8F69;
  --warn: #795D12;
  --bad: #D95D45;
  --info: #3C8F69;
  --primary-container: #DCEAD9;
  --primary-selected: #CCE3D5;
  --success-container: #E2F0D5;
  --warning-container: #FFF1A8;
  --error-container: #FCE5D8;
  --topbar: #FFF8E6;
  --panel-translucent: rgba(255,248,230,.96);
  --overlay: rgba(18,62,76,.28);
  --shadow-dialog: 0 24px 64px rgba(23,78,89,.16);
}

html, body { background: #6CA685; color: #173A44; }
::selection { background: #F2D257; color: #173A44; }
:is(button, input, select, summary, a):focus-visible { outline-color: #5DC1B1; }

.topbar {
  background: rgba(255,248,230,.97);
  border-bottom-color: #AFC4A4;
  box-shadow: 0 1px 0 rgba(60,143,105,.06);
}
.topbar .eyebrow { color: #3C8F69; }
.topbar h1 { color: #173A44; }
.web-identity { color: #5F7166; }

.accounts-panel,
.accounts-panel > .panel-heading,
.worker-panel-heading,
.account-list { background: #E8EED8 !important; }
.worker-panel-heading .summary { background: #FFF8E6; border-color: #AFC4A4; }
.account-row .account-button.selected {
  background: #DCEAD9;
  border-color: #8FA98D;
  box-shadow: inset 3px 0 0 #3C8F69, 0 1px 2px rgba(60,143,105,.06);
}
.account-row .account-button:hover { background: #FFF8E6; border-color: #8FA98D; }

.detail { background: #6CA685; }
.detail-header.account-control-card,
.panel,
.entity-card,
.battle-map-card,
.section-block,
.activity-card,
.account-control-card .hot-spring-toolbar,
.account-control-card .mining-toolbar,
.account-control-card .school-toolbar,
.activity-grid > .school-toolbar,
.account-control-card .test-room-toolbar,
.account-control-card .revive-toolbar {
  border-color: #AFC4A4;
  background: #FFF8E6;
  box-shadow: 0 1px 2px rgba(60,143,105,.04), 0 10px 28px rgba(60,143,105,.035);
}

/* Supplied sky blue is for selection/info; yellow is for reward/attention, not large surfaces. */
.connection,
.chip,
.account-title-row .currency-badge,
.hot-spring-stats > span,
.test-room-member,
.binding-items,
.turn-card,
.turn-head,
.profile-key-guide { background: #D2E2C3; border-color: #AFC4A4; }

.auth-button.primary,
.auth-form button,
.guest-search-form button,
.compact-form button,
.profile-save-button,
.admin-login-button {
  border-color: #3C8F69;
  background: #3C8F69;
  color: #FFF8E6;
  box-shadow: 0 2px 6px rgba(60,143,105,.18);
}
:is(.auth-button.primary, .auth-form button, .guest-search-form button, .compact-form button, .profile-save-button, .admin-login-button):hover:not(:disabled) {
  border-color: #215C4C;
  background: #215C4C;
  color: #FFF8E6;
}

.detail-jump-nav a:hover,
.detail-jump-nav a:focus-visible { color: #3C8F69; border-bottom-color: #3C8F69; }
.account-role-name { color: #3C8F69; }

.reward-menu-toggle {
  border-color: #E9C64F;
  color: #6F5511;
  background: #FFF0A0;
}
.reward-menu-toggle:hover,
.reward-menu-toggle[aria-expanded="true"] {
  border-color: #BFD421;
  color: #684F10;
  background: #F2D257;
}

.mining-button.start,
.school-button,
.test-room-button.challenge {
  border-color: #E9C64F;
  color: #684F10;
  background: #FFF0A0;
}
:is(.mining-button.start, .school-button, .test-room-button.challenge):hover:not(:disabled) {
  border-color: #BFD421;
  color: #5C450E;
  background: #F2D257;
}

.hot-spring-button.enter,
.test-room-button.free {
  border-color: #5DC1B1;
  color: #347F65;
  background: #DDEBD9;
}
.hot-spring-button.enter:hover:not(:disabled),
.test-room-button.free:hover:not(:disabled) {
  border-color: #3C8F69;
  background: #D1E5D4;
}

.activity-grid > :is(.activity-card, .hot-spring-toolbar, .mining-toolbar, .school-toolbar, .test-room-toolbar, .revive-toolbar) {
  position: relative;
  overflow: hidden;
}
.activity-grid > :is(.activity-card, .hot-spring-toolbar, .revive-toolbar)::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #5DC1B1;
}
.activity-grid > :is(.mining-toolbar, .school-toolbar)::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #BFD421;
}
.activity-grid > .test-room-toolbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #3C8F69;
}

.mining-energy-track { background: #D2E2C3; }
.mining-energy-fill { background: linear-gradient(90deg, #5DC1B1, #3C8F69); }

.connection.online { background: #E2F0D5; color: #3C8F69; border-color: #B9D6B5; }
.connection.pending { background: #FFF1A8; color: #795D12; border-color: #F2D257; }
.connection.offline { background: #FCE5D8; color: #D95D45; border-color: #EFC4B4; }

.section-heading { background: #DDE8C8; border-bottom-color: #AFC4A4; }
.detail-jump-nav { background: rgba(255,248,230,.97); border-bottom-color: #AFC4A4; }

.battle-map-stage {
  background:
    radial-gradient(circle at 50% 40%, rgba(93,193,177,.10), transparent 58%),
    #123E4C;
}
.battle-map-label { background: rgba(18,62,76,.94); }
.battle-map-marker.dead .battle-map-label { background: rgba(18,62,76,.82); }

@media (max-width: 640px) {
  .topbar { background: #FFF8E6; }
  .accounts-panel { background: #E8EED8 !important; }
  .detail-header.account-control-card { background: #FFF8E6; }
}

/* evondevKit balance pass — Sky Yellow Portal v9
   Goal: more blue-tinted structure, less empty white, restrained yellow accents. */
:root {
  --bg: #6CA685;
  --panel: #FFFDF4;
  --panel-2: #E8EED8;
  --surface-card: #FFF8E6;
  --surface-sunken: #D2E2C3;
  --surface-sidebar: #D2E2C3;
  --surface-drawer: #FFF8E6;

  --line: #C8D6B6;
  --line-strong: #8FA98D;
  --text: #173A44;
  --muted: #526B61;
  --muted-2: #748579;

  --accent: #3C8F69;
  --accent-strong: #2C745A;
  --accent-soft: #DCEAD9;
  --cyan: #5DC1B1;
  --lemon: #F2D257;
  --gold: #BFD421;

  --good: #3C8F69;
  --warn: #795D12;
  --bad: #D95D45;
  --primary-container: #DCEAD9;
  --primary-selected: #DCEAD9;
  --success-container: #E2F0D5;
  --warning-container: #FFF1A8;
  --error-container: #FCE5D8;
  --topbar: #FFF8E6;
  --panel-translucent: rgba(255, 248, 230, .97);
  --shadow-dialog: 0 24px 64px rgba(18, 62, 76, .16);
}

html,
body { background: #6CA685; color: #173A44; }
::selection { background: #DCEAD9; color: #173A44; }

/* Shell: blue-tinted canvas around crisp white content. */
.topbar {
  background: #FFF8E6;
  border-bottom-color: #C8D6B6;
  box-shadow: 0 1px 0 rgba(60, 143, 105, .045);
}
.topbar h1 { color: #173A44; }
.web-identity,
.topbar .eyebrow { color: #526B61; }

.layout,
.guest-layout { background: transparent; }
.workspace { align-items: start; }
.accounts-panel {
  background: #D2E2C3 !important;
  border-color: #C8D6B6;
  box-shadow: 0 8px 26px rgba(60, 143, 105, .055);
}
.accounts-panel > .panel-heading,
.worker-panel-heading,
.account-list { background: #D2E2C3 !important; }
.worker-panel-heading .summary {
  background: #FFF8E6;
  border-color: #C8D6B6;
}
.worker-panel-heading .metric { border-right-color: #C8D6B6; }
.worker-panel-heading .metric span,
.worker-panel-heading .metric-updated span,
.worker-panel-heading .metric-updated strong { color: #526B61; }
.worker-panel-heading .metric strong { color: #173A44; }

.account-row .account-button { color: #173A44; }
.account-row .account-button:hover {
  border-color: #8FA98D;
  background: #FFFDF4;
}
.account-row .account-button.selected {
  border-color: #5DC1B1;
  background: #DCEAD9;
  box-shadow: inset 3px 0 0 #3C8F69;
}
.account-row .account-button strong { color: #173A44; }
.account-row .account-row-meta { color: #526B61; }

.portal-tool {
  background: #FFF8E6;
  border-color: #C8D6B6;
}

/* Main area: tinted page, white modules. */
.detail {
  background: #6CA685;
  border-color: #C8D6B6;
}
.detail-header.account-control-card {
  background: #FFF8E6;
  border-bottom-color: #C8D6B6;
}
.account-overview { border-bottom-color: #C8D6B6; }
.detail-header .account-title,
.activity-section-heading h3,
.section-heading h3 { color: #173A44; }
.account-role-name { color: #3C8F69; }

.account-title-row .currency-badge {
  border-color: #C8D6B6;
  background: #E8EED8;
  color: #526B61;
}
.account-title-row .currency-badge strong { color: #173A44; }

/* Inputs and neutral controls use the blue family, not yellow. */
.guest-search-form input,
.auth-form input,
.compact-form input,
.portal-tool select,
.profile-turn-input,
.reward-item-controls input,
.admin-accounts-toolbar input,
.account-profile-toolbar select,
.reward-search-input {
  color: #173A44;
  background: #FFF8E6;
  border-color: #8FA98D;
}
input::placeholder { color: #748579; }
:is(.guest-search-form input, .auth-form input, .compact-form input, .portal-tool select, .profile-turn-input, .reward-item-controls input, .admin-accounts-toolbar input, .account-profile-toolbar select, .reward-search-input):hover:not(:disabled) {
  border-color: #5DC1B1;
}
:is(.guest-search-form input, .auth-form input, .compact-form input, .portal-tool select, .profile-turn-input, .reward-item-controls input, .admin-accounts-toolbar input, .account-profile-toolbar select, .reward-search-input):focus {
  border-color: #3C8F69;
  box-shadow: 0 0 0 3px rgba(93, 193, 177, .34);
}

.auth-button,
.portal-tool button,
.guest-result,
.test-room-button,
.hot-spring-button,
.mining-button,
.school-button,
.profile-turn-toolbar button,
.admin-close-button,
.admin-accounts-toolbar button {
  color: #173A44;
  background: #FFFDF4;
  border-color: #8FA98D;
}
:is(.auth-button, .portal-tool button, .guest-result, .test-room-button, .hot-spring-button, .mining-button, .school-button, .profile-turn-toolbar button, .admin-close-button, .admin-accounts-toolbar button):hover:not(:disabled) {
  color: #2C745A;
  background: #DCEAD9;
  border-color: #5DC1B1;
}

.auth-button.primary,
.auth-form button,
.guest-search-form button,
.compact-form button,
.profile-save-button,
.admin-login-button {
  color: #FFF8E6;
  background: #3C8F69;
  border-color: #3C8F69;
}
:is(.auth-button.primary, .auth-form button, .guest-search-form button, .compact-form button, .profile-save-button, .admin-login-button):hover:not(:disabled) {
  color: #FFF8E6;
  background: #2C745A;
  border-color: #2C745A;
}

/* Activities: one clean language. Yellow is reserved for true emphasis. */
.activity-card,
.account-control-card .hot-spring-toolbar,
.account-control-card .mining-toolbar,
.account-control-card .school-toolbar,
.activity-grid > .school-toolbar,
.account-control-card .test-room-toolbar,
.account-control-card .revive-toolbar {
  background: #FFF8E6;
  border-color: #C8D6B6;
  box-shadow: 0 2px 8px rgba(60, 143, 105, .035);
}
.activity-grid > :is(.revive-toolbar, .hot-spring-toolbar)::before { background: #5DC1B1; }
.activity-grid > .mining-toolbar::before { background: #BFD421; }
.activity-grid > .school-toolbar::before { background: #5DC1B1; }
.activity-grid > .test-room-toolbar::before { background: #3C8F69; }

.activity-card-title,
.activity-card .revive-toggle { color: #173A44; }
.activity-card-title strong,
.activity-section-heading > span,
.revive-meta,
.revive-feedback,
.test-room-state,
.test-room-feedback,
.reward-state,
.reward-feedback,
.form-feedback,
.hot-spring-feedback,
.mining-feedback,
.school-feedback,
.school-summary,
.mining-overview,
.hot-spring-room,
.test-room-lobby { color: #526B61; }

.mining-energy-track { background: #D2E2C3; }
.mining-energy-fill { background: linear-gradient(90deg, #5DC1B1, #3C8F69); }

/* Mining start becomes blue; yellow stays as a small emphasis/status color. */
.mining-button.start,
.school-button,
.hot-spring-button.enter {
  color: #2C745A;
  background: #DCEAD9;
  border-color: #5DC1B1;
}
.mining-button.start:hover:not(:disabled),
.school-button:hover:not(:disabled),
.hot-spring-button.enter:hover:not(:disabled) {
  color: #FFF8E6;
  background: #3C8F69;
  border-color: #3C8F69;
}
.test-room-button.challenge {
  color: #6F5511;
  background: #FFF1A8;
  border-color: #F2D257;
}
.test-room-button.free,
.hot-spring-button.confirm {
  color: #327B5B;
  background: #E2F0D5;
  border-color: #B7D1B1;
}

/* Reward keeps the palette's yellow accent, but in a softer container. */
.reward-menu-toggle {
  color: #684F10;
  background: #FFF1A8;
  border-color: #E9C64F;
}
.reward-menu-toggle:hover,
.reward-menu-toggle[aria-expanded="true"] {
  color: #684F10;
  background: #FFF0A0;
  border-color: #BFD421;
}

/* Tabs and section headers stay blue-tinted to reduce the white-page effect. */
.detail-jump-nav {
  background: rgba(108, 166, 133, .97);
  border-bottom-color: #C8D6B6;
}
.detail-jump-nav a { color: #526B61; }
.detail-jump-nav a:hover,
.detail-jump-nav a:focus-visible {
  color: #3C8F69;
  border-bottom-color: #3C8F69;
}

.entity-grid { background: #6CA685; }
.entity-card,
.battle-map-card,
.section-block {
  background: #FFF8E6;
  border-color: #C8D6B6;
  box-shadow: 0 2px 10px rgba(60, 143, 105, .03);
}
.section-heading {
  background: #E8EED8;
  border-bottom-color: #C8D6B6;
}
.entity-card dl div,
.binding-group,
.turn-plan-row { border-color: #D8E1C7; }
.entity-heading,
.binding-summary,
.plan-summary,
.turn-summary { color: #526B61; }

/* Advanced controls: soft blue surfaces, not saturated blocks. */
.binding-items,
.turn-card,
.turn-head,
.keycap,
.turn-plan-keycap,
.profile-key-guide,
.reward-item {
  background: #F1F1D9;
  border-color: #C8D6B6;
}
.binding-item { border-color: #D8E1C7; }
.keycap,
.turn-plan-keycap { color: #526B61; }
.buff-chip { background: #FFF8E6; border-color: #C8D6B6; }

/* Semantic status colors, kept quieter than the brand colors. */
.connection,
.chip { background: #E8EED8; color: #526B61; border-color: #C8D6B6; }
.connection.online { background: #E2F0D5; color: #3C8F69; border-color: #B7D1B1; }
.connection.pending { background: #FFF1A8; color: #795D12; border-color: #F2D257; }
.connection.offline { background: #FCE5D8; color: #D95D45; border-color: #EFBFAE; }
.account-exit-button,
.account-stop-button { background: #FDEDE4; color: #C94E39; border-color: #EFBFAE; }

/* Battle remains dark by function, tied to the same blue family. */
.battle-map-stage {
  background:
    radial-gradient(circle at 50% 40%, rgba(93, 193, 177, .12), transparent 58%),
    #123E4C;
}
.battle-map-label { background: rgba(18, 62, 76, .94); }
.battle-map-marker.dead .battle-map-label { background: rgba(18, 62, 76, .82); }

@media (max-width: 640px) {
  .topbar { background: #FFF8E6; }
  .accounts-panel { background: #D2E2C3 !important; }
  .detail { background: #6CA685; }
  .detail-header.account-control-card { background: #FFF8E6; }
}


/* =========================================================
   GAME GARDEN V10 — authoritative palette layer
   ========================================================= */
:root {
  --bg: #6CA685;
  --panel: #FFF8E6;
  --panel-2: #F1EFD5;
  --surface-card: #FFFDF4;
  --surface-sunken: #D2E2C3;
  --surface-sidebar: #DDE8C8;
  --surface-map: #123E4C;
  --surface-drawer: #FFF8E6;
  --line: #B5C6A6;
  --line-strong: #8FA98D;
  --text: #173A44;
  --muted: #5F7166;
  --muted-2: #7D8D7C;
  --accent: #3C8F69;
  --accent-strong: #2C745A;
  --accent-soft: #DCEAD9;
  --cyan: #5DC1B1;
  --good: #3C8F69;
  --warn: #795D12;
  --bad: #D95D45;
  --on-bad: #C74A36;
  --info: #2D8290;
  --sky: #5DC1F2;
  --lemon: #F2D257;
  --gold: #BFD421;
  --ink: #173A44;
  --primary-container: #DCEAD9;
  --primary-selected: #CEE3D2;
  --success-container: #E2F0D5;
  --warning-container: #FFF1A8;
  --error-container: #FCE5D8;
  --topbar: #123E4C;
  --panel-translucent: rgba(255, 248, 230, .96);
  --overlay: rgba(18, 62, 76, .38);
  --shadow-dialog: 0 24px 64px rgba(18, 62, 76, .20);
}

html, body { background: #6CA685; color: #173A44; }
body {
  background:
    radial-gradient(circle at 8% 8%, rgba(93, 193, 177, .16), transparent 28%),
    linear-gradient(180deg, #78AE91 0, #6CA685 260px, #67A17F 100%);
}
::selection { color: #173A44; background: #F2D257; }

.topbar {
  background: #123E4C;
  border-color: #245762;
  box-shadow: 0 2px 0 rgba(18, 62, 76, .18);
}
.topbar h1 { color: #FFF8E6; }
.topbar .eyebrow { color: #F2D257; }
.topbar .web-identity { color: #DCEAD9; }
.topbar .auth-button {
  color: #173A44;
  border-color: #E8DFC2;
  background: #FFF8E6;
}
.topbar .auth-button:hover:not(:disabled) { color: #173A44; border-color: #F2D257; background: #FFF1A8; }
.topbar .auth-button.primary {
  color: #173A44;
  border-color: #9AAF17;
  background: #BFD421;
}
.topbar .auth-button.primary:hover:not(:disabled) { color: #173A44; border-color: #879B13; background: #ACC322; }
.topbar .connection { border-color: #6E8F80; background: #DCEAD9; color: #2C745A; }
.topbar .connection.online { border-color: #87B490; background: #E2F0D5; color: #327B5B; }
.topbar .connection.pending { border-color: #E3C84B; background: #FFF1A8; color: #795D12; }
.topbar .connection.offline { border-color: #E8A28A; background: #FCE5D8; color: #C74A36; }

.layout, .guest-layout { color: #173A44; }
.panel, .detail, .guest-search, .guest-battle { background: #FFF8E6; border-color: #B5C6A6; }
.accounts-panel { background: #DDE8C8 !important; border-color: #8FA98D; }
.accounts-panel > .panel-heading, .worker-panel-heading { background: #DDE8C8 !important; border-color: #B5C6A6; }
.worker-panel-heading .summary { background: #F1EFD5; border-color: #B5C6A6; }
.worker-panel-heading .metric { border-color: #C8D1AE; }
.account-list { background: #DDE8C8; }
.account-row .account-button:hover { background: #F1EFD5; }
.account-row .account-button.selected {
  color: #173A44;
  border-color: #7E9C7C;
  background: #FFF8E6;
  box-shadow: inset 4px 0 0 #3C8F69;
}
.account-row .account-exit-button, .account-stop-button {
  border-color: #E8A28A;
  color: #C74A36;
  background: #FCE5D8;
}
.portal-tool { border-color: #B5C6A6; background: #F1EFD5; }
.portal-tool[open] { background: #FFF8E6; }

.detail-header.account-control-card,
.account-control-card,
.battle-map-panel,
.entity-card,
.profile-section,
.turn-history-section,
.turn-plan-section,
.reward-item,
.admin-accounts-shell,
.profile-create-form { background: #FFF8E6; border-color: #B5C6A6; }

input, select, textarea,
.guest-search-form input,
.auth-form input,
.compact-form input,
.portal-tool select,
.profile-turn-input,
.reward-item-controls input,
.admin-accounts-toolbar input,
.account-profile-toolbar select,
.reward-search-input {
  color: #173A44;
  background: #FFFDF4;
  border-color: #AFC1A1;
}
input::placeholder, textarea::placeholder { color: #7D8D7C; }
:is(input, select, textarea):focus { border-color: #3C8F69; box-shadow: 0 0 0 3px rgba(60, 143, 105, .18); }

.auth-form button,
.guest-search-form button,
.compact-form button,
.profile-save-button,
.admin-login-button {
  color: #173A44;
  border-color: #9AAF17;
  background: #BFD421;
  box-shadow: 0 2px 0 rgba(23, 58, 68, .16);
}
:is(.auth-form button, .guest-search-form button, .compact-form button, .profile-save-button, .admin-login-button):hover:not(:disabled) {
  color: #173A44;
  border-color: #879B13;
  background: #ACC322;
}

/* Activity cards borrow the game's meadow/toolbar accents without saturating the content. */
.activity-card,
.account-control-card .hot-spring-toolbar,
.account-control-card .mining-toolbar,
.account-control-card .school-toolbar,
.activity-grid > .school-toolbar,
.account-control-card .test-room-toolbar,
.account-control-card .revive-toolbar {
  position: relative;
  overflow: hidden;
  background: #FFFDF4;
  border-color: #B5C6A6;
  box-shadow: 0 2px 0 rgba(23, 58, 68, .07);
}
.activity-grid > :is(.activity-card, .hot-spring-toolbar, .mining-toolbar, .school-toolbar, .test-room-toolbar, .revive-toolbar)::before {
  width: 5px;
  background: #3C8F69;
}
.activity-grid > .hot-spring-toolbar::before { background: #5DC1B1; }
.activity-grid > .mining-toolbar::before { background: #BFD421; }
.activity-grid > .school-toolbar::before { background: #F2D257; }
.activity-grid > .test-room-toolbar::before { background: #E77D43; }
.activity-card-title, .activity-card .revive-toggle { color: #173A44; }
.activity-card-title strong,
.activity-section-heading > span,
.revive-meta, .revive-feedback, .test-room-state, .test-room-feedback,
.reward-state, .reward-feedback, .hot-spring-feedback, .mining-feedback, .school-feedback,
.school-summary, .mining-overview, .hot-spring-room, .test-room-lobby { color: #5F7166; }
.revive-toggle-track { background: #C7D5B8; }
.revive-toggle input:checked + .revive-toggle-track { background: #3C8F69; }
.mining-energy-track { background: #E6EBCB; }
.mining-energy-fill { background: linear-gradient(90deg, #5DC1B1, #3C8F69); }

.mining-button.start,
.school-button,
.test-room-button.challenge {
  color: #173A44;
  border-color: #D6B938;
  background: #F2D257;
  box-shadow: 0 2px 0 rgba(121, 93, 18, .14);
}
:is(.mining-button.start, .school-button, .test-room-button.challenge):hover:not(:disabled) {
  color: #173A44;
  border-color: #C7A92C;
  background: #E9C64F;
}
.hot-spring-button.enter,
.test-room-button.free {
  color: #173A44;
  border-color: #55A89B;
  background: #BDE7D8;
}
:is(.hot-spring-button.enter, .test-room-button.free):hover:not(:disabled) { background: #A8DDCC; border-color: #3C8F69; }
.test-room-button.leave,
.hot-spring-button.cancel,
.hot-spring-button.leave,
.mining-button.stop { color: #C74A36; border-color: #E8A28A; background: #FCE5D8; }

/* Rewards use the sunflower/lime family from the reference image. */
.reward-menu-toggle {
  color: #173A44;
  border-color: #D6B938;
  background: #FFF1A8;
}
.reward-menu-toggle:hover,
.reward-menu-toggle[aria-expanded="true"] { color: #173A44; border-color: #B6A022; background: #F2D257; }
.reward-menu-toggle > small { color: #795D12; }
.reward-item { background: #FFF8E6; border-color: #C8D1AE; }
.reward-item-controls button { color: #173A44; border-color: #9AAF17; background: #DCEB77; }
.reward-item-controls button:hover:not(:disabled) { background: #BFD421; }

/* Navigation stays calm; lime is reserved for actions. */
.detail-tabs { background: #F1EFD5; border-color: #B5C6A6; }
.detail-tab { color: #5F7166; }
.detail-tab:hover { color: #173A44; background: #E6EBCB; }
.detail-tab.active, .detail-tab[aria-current="page"] { color: #173A44; background: #FFF8E6; box-shadow: inset 0 -3px 0 #3C8F69; }

.connection, .chip { color: #5F7166; background: #E6EBCB; border-color: #B5C6A6; }
.connection.online { color: #327B5B; background: #E2F0D5; border-color: #9CC59D; }
.connection.pending { color: #795D12; background: #FFF1A8; border-color: #E3C84B; }
.connection.offline { color: #C74A36; background: #FCE5D8; border-color: #E8A28A; }

/* Advanced/buff controls: warm tiles like the inventory slots in the reference. */
.binding-items, .turn-card, .turn-head, .keycap, .turn-plan-keycap, .profile-key-guide, .buff-chip {
  background: #F7F1D8;
  border-color: #C8D1AE;
}
.keycap, .turn-plan-keycap { color: #526B61; }
.binding-item { border-color: #D5D9B8; }
.binding-status.good { color: #327B5B; }

/* Functional battle canvas keeps the forest-night portion of the reference palette. */
.battle-map-stage {
  background:
    radial-gradient(circle at 50% 38%, rgba(93, 193, 177, .13), transparent 56%),
    linear-gradient(180deg, #17495A 0%, #123E4C 52%, #183F39 100%);
  border-color: #315E57;
}
.battle-map-stage, .battle-map-stage * { --text: #FFF8E6; --muted: #BBD0BE; }
.battle-map-label { background: rgba(18, 62, 76, .94); }
.battle-map-marker.dead .battle-map-label { background: rgba(18, 62, 76, .82); }

/* Drawers/dialogs */
.reward-toolbar.reward-drawer,
.profile-create-dialog,
.admin-accounts-dialog { background: #FFF8E6; color: #173A44; }

@media (max-width: 640px) {
  body { background: #6CA685; }
  .topbar { background: #123E4C; }
  .accounts-panel { background: #DDE8C8 !important; }
  .detail { background: #FFF8E6; }
  .detail-header.account-control-card { background: #FFF8E6; }
}
