@CHARSET "UTF-8";

/* Travian 3.6 Redesign Grafikpack */
/* Version 1.05 */

/* Village-list "Villages:" header link (multivillage.tpl): make the overview link
   read as clickable — hand cursor, always underlined, green on hover. */
#vlist thead td a { cursor: pointer; text-decoration: underline; }
#vlist thead td a:hover { color: #00BC00; text-decoration: underline; }

/* Hero's mansion oasis page — gap between the owned and nearby tables (37_land.tpl) */
table.oases_nearby { margin-top: 10px; }

/* Hero's mansion point allocation (37_hero.tpl): top-right toggle badge, the
   per-attribute inputs, and the live green "resulting value" preview. */
div#build.gid37 table#distribution thead th { position: relative; }
div#build.gid37 a.dp-toggle { position: absolute; right: 8px; top: 50%; margin-top: -8px; height: 16px; box-sizing: border-box; font-weight: bold; color: #fff; background: #228B22; border-radius: 9px; padding: 0 8px; text-decoration: none; font-size: 11px; line-height: 16px; cursor: pointer; }
div#build.gid37 a.dp-toggle:hover { background: #1c7a1c; }
div#build.gid37 table#distribution input.dp { width: 36px; text-align: right; }
div#build.gid37 table#distribution .po-prev { color: #228B22; font-weight: bold; }
div#build.gid37 table#distribution .ib-bonus { color: #0000D7; font-weight: bold; font-size: 9px; }
/* Tighten the label column + keep the value (incl. item bonus) on one line. */
div#build.gid37 table#distribution tbody th { width: 16%; white-space: nowrap; }
div#build.gid37 table#distribution td.val { white-space: nowrap; }
.dp-save { margin: 6px 0 0; }
/* Hero health bar (no inline styles; fill width snapped to 10% steps) */
div#build.gid37 table#distribution .hptrack { display: inline-block; width: 200px; height: 12px; background: #e0e0e0; border: 1px solid #bbb; vertical-align: middle; line-height: 0; box-sizing: border-box; }
div#build.gid37 table#distribution .hpfill { display: block; height: 100%; background: #228B22; }
.hpfill.w0 { width: 0; } .hpfill.w10 { width: 10%; } .hpfill.w20 { width: 20%; } .hpfill.w30 { width: 30%; } .hpfill.w40 { width: 40%; } .hpfill.w50 { width: 50%; } .hpfill.w60 { width: 60%; } .hpfill.w70 { width: 70%; } .hpfill.w80 { width: 80%; } .hpfill.w90 { width: 90%; } .hpfill.w100 { width: 100%; }

/* Hero's mansion inventory panel (37_inventory.tpl). Colors/borders/header bar
   come from the game's base table styling (table thead th = c2.gif header,
   tbody = white, #C0C0C0 table bg = gridlines) so it matches #distribution. */
#heroInventory { margin-top: 12px; clear: both; }
#heroInventory .heroPanels { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
#heroInventory table.heroEquip { flex: 0 0 270px; width: 270px; }
#heroInventory table.heroBag { flex: 1 1 190px; min-width: 190px; }
#heroInventory th .count { float: right; font-weight: normal; color: #444; }
#heroInventory td.box { width: 44px; text-align: center; }
#heroInventory td.name.empty { color: #999; font-style: italic; }
/* Fixed-width name + action cells so equip/unequip never reflows the table. */
#heroInventory td.name .name-in { display: inline-block; width: 78px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
#heroInventory td.act { width: 60px; text-align: right; white-space: nowrap; font-size: 10px; }
#heroInventory td.act .act-in { display: inline-block; width: 48px; text-align: right; }
#heroInventory [data-tip], #heroInventory .itemBox { cursor: pointer; }
#heroInventory .itemBox { display: inline-block; width: 38px; height: 38px; background: #fff url(img/x.gif) no-repeat center; border: 1px solid #c0c0c0; vertical-align: middle; position: relative; }
#heroInventory .itemBox.empty { background: #fafafa; border-style: dashed; border-color: #c0c0c0; }
#heroInventory .itemBox .ico { display: block; width: 38px; height: 38px; }
#heroInventory td.empty { padding: 8px; color: #555; text-align: left; }
#heroInventory .grid { display: grid; grid-template-columns: repeat(4, 40px); gap: 5px; padding: 5px; }
#heroInventory .invItem .cell { display: inline-block; position: relative; }
#heroInventory .itemNum { position: absolute; right: 0; bottom: 0; font-size: 9px; font-weight: bold; color: #fff; background: rgba(0,0,0,.6); padding: 0 2px; line-height: 1.1; }
#heroInventory .heroBonus { font-size: 11px; margin: 8px 0; }
#heroInventory .adv-block { margin: 8px 0; padding: 6px 10px; background: #fdecec; border: 1px solid #e0a3a3; border-radius: 3px; color: #c00; font-weight: bold; max-width: 460px; }
#heroInventory .inv-msg { margin: 0 0 8px; padding: 5px; border: 1px solid #ddd; background: #f3f3f3; border-radius: 3px; max-width: 460px; }
#heroInventory .inv-msg.err { color: #c00; border-color: #c00; }
#heroInventory .inv-msg.ok { color: #2a7d2a; }

/* Hero's mansion adventures tab (37_adventures.tpl). Inherits the game's base
   table styling; only per-cell alignment is tweaked here. */
table#adventures { margin-top: 8px; }
table#adventures td.nam a { font-weight: bold; }
table#adventures td.dif, table#adventures td.dur, table#adventures td.go { text-align: center; }
a.adv-send { font-weight: bold; }
.adv-result { margin: 8px 0; padding: 6px 10px; background: #eef7e6; border: 1px solid #aacb8a; border-radius: 4px; }
.adv-result.dead { background: #f7e6e6; border-color: #cb8a8a; }
.adv-result .adv-dead { color: #a12; font-weight: bold; margin: 0; }
.adv-busy { color: #000; }
.adv-busy span { color: #228B22; font-weight: bold; }
.adv-empty { font-size: 11px; color: #777; font-style: italic; }

/* Hero adventure rows in the Troop Movements box (movement.tpl): blue label +
   a dedicated icon. Drop the 16x16 icon at gpack/travian_default/img/a/adventure.png */
img.adv-mov { background-image: url("img/a/adventure.png"); background-repeat: no-repeat; background-size: 16px 16px; height: 16px; width: 16px; }
div.village1 table#movements .a-adv { color: #0000D7; }

/* Hero adventure count button in the top nav bar (#mtop): reuses the Plus
   button's beige gradient background, sized/aligned with the Plus button */
#mtop a#adv_count { float: left; display: flex; align-items: center; gap: 4px; height: 24px; margin-top: 18px; margin-left: 15px; padding: 0 9px; box-sizing: border-box; background: #e6e6e6; border: 1px solid #b3b3b3; border-radius: 12px; text-decoration: none; }
#mtop a#adv_count img.adv-icon { display: block; width: 16px; height: 16px; }
#mtop a#adv_count .adv-num { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 3px; box-sizing: border-box; background: #5cb800; border-radius: 8px; color: #fff; font-weight: bold; font-size: 11px; line-height: 1; }

/* Top 10 medal-reset header bar (player_top10.tpl / ally_top10.tpl) */
.medal-reset-timer { text-align: center; padding: 3px 8px; margin-bottom: 8px; background: #f5f5f5; border: 1px solid #ddd; }
.medal-reset-timer .medal-week { margin-right: 15px; }

/* Global tooltip — add data-tip (and optional data-tip2) to any element;
   also absorbs native title="" attributes game-wide (see tooltip.js).
   Dark style matches the in-game merchant exchange badge. */
#g-tip { position: absolute; z-index: 999; background: #333; border: 0; border-radius: 3px; padding: 3px 8px; font-size: 11px; color: #fff; line-height: 15px;white-space: nowrap; }
#g-tip b { color: #fff; }

/* Combat simulator expandable breakdown (warsim.php) */
.battle-details { margin: 10px 0; padding: 6px 10px; border: 1px solid #ddd; background: #f5f5f5; font-size: 11px; color: #333; }
.battle-details summary { cursor: pointer; font-weight: bold; color: #000; }
.battle-details .detail-section { margin-top: 8px; }
.battle-details .detail-section strong { display: block; border-bottom: 1px solid #ddd; margin-bottom: 4px; color: #000; }
.battle-details .detail-row { display: flex; justify-content: space-between; }
.battle-details .detail-row.total { font-weight: bold; border-top: 1px solid #ddd; margin-top: 2px; color: #000; }
.battle-details .combat-result { text-align: center; }

/* Farm-list raid-slot popup (farmlist.js) — standard GRAY UI palette (see CLAUDE.md) */
#fl-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.55); z-index: 10000; }
#fl-overlay.fl-open { display: block; }
#fl-box { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); max-height: 90%; overflow: auto; background: #fff; border: 1px solid #bbb; border-radius: 4px; box-shadow: 0 4px 18px rgba(0,0,0,0.55); padding: 10px 14px 14px; min-width: 340px; color: #333; }
#fl-close { position: absolute; top: 3px; right: 9px; font-size: 20px; font-weight: bold; color: #666; text-decoration: none; line-height: 1; }
#fl-close:hover { color: #a12; }
#fl-box #raidListSlot h4 { margin: -10px -14px 10px; padding: 6px 14px; border-bottom: 1px solid #ddd; background: linear-gradient(#ededed, #dcdcdc); color: #333; font-size: 13px; border-radius: 4px 4px 0 0; }
#fl-box .fl-error { color: #c00; font-weight: bold; min-height: 14px; margin-bottom: 4px; }
#fl-box .fl-loading { padding: 24px; text-align: center; color: #666; }
#fl-box .trav_buttons { margin-top: 8px; }
.fl-note { font-size: 10px; color: #777; font-style: italic; }
@keyframes rt-spin { to { transform: rotate(360deg); } }
/* Farm-list per-list lazy row loading (farmlist_ui.js): placeholder row shown in
   a list's <tbody> while its targets are fetched on expand. (Rally Point tab
   switching itself shows no spinner — the partials are tiny, so the swap is
   instant.) */
.fl-rows-loading td, .fl-rows-error td { text-align: center; padding: 18px; color: #666; }
.fl-spin { display: inline-block; width: 18px; height: 18px; border: 3px solid #ddd; border-top-color: #888; border-radius: 50%; animation: rt-spin 0.7s linear infinite; vertical-align: middle; }
/* Hero adventure tile marker on the world map (mapview / mapviewlarge) — the tile
   carries an `adv-tile` class (folded into m_c.ad's image field so it survives the
   client-side arrow navigation, which re-renders tiles from that field), and this
   ::after overlays adv.png centered on it. No `position` on .adv-tile itself: the
   map tile already anchors its child markers. */
.adv-tile::after { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: url(img/a/adv.png) no-repeat center; pointer-events: none; z-index: 5; }
/* Compact, borderless form so the popup doesn't inherit the page's full-width
   bordered table look (the slot form + trooplist render inside #fl-box). */
#fl-box .fl-body { padding: 2px 0 8px; }
#fl-box table.transparent { width: auto; border-collapse: collapse; background: transparent; margin: 0 0 6px; }
#fl-box table.transparent th, #fl-box table.transparent td { border: 0; background: transparent; padding: 4px 8px; text-align: left; vertical-align: middle; }
#fl-box #raidListSlot th { color: #333; font-weight: normal; white-space: nowrap; }
#fl-box select { max-width: 220px; }
#fl-box .coordinatesInput .coordinates { width: 60px; }
#fl-box .coordinatesInput .xCoord, #fl-box .coordinatesInput .yCoord { margin-bottom: 4px; }
#fl-box #raidList td > input.text { width: 46px; text-align: center; }
#fl-box #bulkpopup_troops td > input.text { width: 46px; text-align: center; }
#fl-box .fl-field { margin-bottom: 10px; }
#fl-box .fl-field label { display: inline-block; min-width: 90px; }
#fl-box .fl-warn { color: #c00; font-size: 11px; margin: 0 0 10px; }

/* Farm-list list view (Templates/goldClub/farmlist.tpl) — GRAY UI palette (CLAUDE.md).
   Collapsible per-list header bar + sortable target table, styled to match the
   in-game gray windows rather than the old green Travian skin. */
/* Header bar matches the alliance-projects card header (Top 10 table-header
   texture: c2.gif strip, bordered toggle cell on the left, level/actions right). */
div#build.gid16 .flHeader { display: flex; align-items: stretch; margin-top: 12px; padding: 0; line-height: 20px; background: #ededed url(img/a/c2.gif) repeat-x left bottom; background-size: auto 100%; border: 1px solid #bbb; color: #000; font-size: 13px; font-weight: bold; cursor: pointer; user-select: none; }
div#build.gid16 .flHeader .flArrow { display: flex; align-items: center; width: 13px; padding: 0 7px; border-right: 1px solid #bbb; background: url(img/a/opened.gif) no-repeat center; mix-blend-mode: multiply; }
div#build.gid16 .flHeader.fl-collapsed .flArrow { background-image: url(img/a/closed.gif); }
div#build.gid16 .flHeader .flTitle { display: flex; align-items: center; padding: 0 8px; color: #000; }
div#build.gid16 .flHeader .fl_target_count { display: flex; align-items: center; color: #888; font-weight: normal; font-size: 11px; }
div#build.gid16 .flHeader .flPausedBadge { display: flex; align-items: center; padding: 0 4px; color: #c00; font-weight: normal; font-size: 11px; }
div#build.gid16 .flHeader.fl-list-paused .flTitle { color: #888; }
div#build.gid16 .flHeader .flHeaderActions { margin-left: auto; display: flex; align-items: center; border-left: 1px solid #bbb; }
div#build.gid16 .flHeader .flHeaderActions .flAct { display: flex; align-items: center; min-width: 20px; justify-content: center; padding: 0 4px; color: #555; font-size: 16px; text-decoration: none; }
div#build.gid16 .flHeader .flHeaderActions .flAct:hover { color: #000; }
div#build.gid16 .flHeader .flHeaderActions a:last-child { padding-right: 7px; }
div#build.gid16 .flHeader .flHeaderActions img.del { vertical-align: middle; }
/* Per-list select checkbox + the to-be-sent highlight (visible while collapsed). */
div#build.gid16 .flHeader .flSelectWrap { display: flex; align-items: center; padding: 0 6px; border-right: 1px solid #bbb; cursor: default; }
div#build.gid16 .flHeader .fl-list-select { margin: 0; cursor: pointer; }
div#build.gid16 .flHeader.fl-selected { border-color: #888; background-image: url(img/a/c2.gif), linear-gradient(#dcdcdc, #cfcfcf); box-shadow: inset 4px 0 0 #888; }
div#build.gid16 .flHeader.fl-selected .flArrow { padding-left: 3px; }
/* the ⚙ "send this list" icon while its single send is in flight */
div#build.gid16 .flHeader .flHeaderActions .flAct.is-sending { color: #888; }

div#build.gid16 .listContent { border: 1px solid #bbb; border-top: 0; }
div#build.gid16 table.farmlist { width: 100%; border-collapse: collapse; margin: 0; }
div#build.gid16 table.farmlist thead th { background: #e6e6e6; border: 1px solid #ddd; padding: 3px 5px; text-align: center; font-weight: bold; color: #333; white-space: nowrap; }
div#build.gid16 table.farmlist thead th.fl_sortable { cursor: pointer; user-select: none; }
div#build.gid16 table.farmlist thead th .fl_sort_arrow { font-size: 9px; margin-left: 3px; color: #888; }
div#build.gid16 table.farmlist thead th .fl_sort_arrow.fl_sort_active { color: #000; }
div#build.gid16 table.farmlist tbody td { border: 1px solid #eee; padding: 3px 5px; text-align: center; vertical-align: middle; font-size: 11px; }
div#build.gid16 table.farmlist tbody td.village { text-align: left; max-width: 120px; font-size: 11px; }
div#build.gid16 table.farmlist tbody td.village a.fl-target-link,
div#build.gid16 table.farmlist tbody td.village a.fl-target-link span { text-decoration: none; color: #00BC00; }
div#build.gid16 table.farmlist tbody td.village a.fl-target-link:hover,
div#build.gid16 table.farmlist tbody td.village a.fl-target-link:hover span { text-decoration: underline; }
div#build.gid16 table.farmlist tbody td.village .coordinates,
div#build.gid16 table.farmlist tbody td.village .coordText { white-space: normal; word-break: break-word; }
div#build.gid16 table.farmlist tbody td.village .coordinatesWrapper { white-space: nowrap; }
div#build.gid16 table.farmlist tbody td.lastRaid { font-size: 11px; }
div#build.gid16 table.farmlist tbody td.lastRaid a { font-size: 10px; }
div#build.gid16 table.farmlist tbody td.troops { white-space: nowrap; }
div#build.gid16 table.farmlist tbody tr:nth-child(odd) td { background: #fff; }
div#build.gid16 table.farmlist tbody tr:nth-child(even) td { background: #f7f7f7; }
div#build.gid16 table.farmlist tbody tr:hover td { background: #f0f0f0; }
div#build.gid16 table.farmlist tbody tr.fl-paused td { opacity: .5; }
div#build.gid16 table.farmlist td.fl-col-check { width: 1%; }
div#build.gid16 table.farmlist td.fl-col-actions { width: 1%; white-space: nowrap; }
div#build.gid16 table.farmlist td.action a { text-decoration: none; color: #555; padding: 0 2px; }
div#build.gid16 table.farmlist td.action a:hover { color: #000; }
div#build.gid16 table.farmlist .troopIcon { display: inline-block; margin: 0 2px; }
div#build.gid16 table.farmlist .troopIcon img.unit { width: 18px; height: 18px; vertical-align: middle; }
div#build.gid16 table.farmlist img.carry.carryFull { outline: 1px solid #5b0; }

div#build.gid16 .fl_send_controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 8px 2px; }
div#build.gid16 .fl_send_controls .fl_action_group { display: flex; gap: 6px; }
/* Send button: blocked + "k of N" + small spinner on the right while sending. */
div#build.gid16 #fl_send_btn { display: inline-flex; align-items: center; }
div#build.gid16 #fl_send_btn[disabled] { opacity: 0.6; cursor: default; }
div#build.gid16 #fl_send_btn.is-sending { opacity: 1; cursor: progress; }
/* Spinner is hidden until a send is in flight (only shown with .is-sending) — a
   bare display:inline-block here would override the [hidden] attribute and spin
   forever on the idle button. */
div#build.gid16 #fl_send_btn .fl-btn-spin { display: none; width: 12px; height: 12px; margin-left: 6px; border: 2px solid #ccc; border-top-color: #555; border-radius: 50%; vertical-align: middle; }
div#build.gid16 #fl_send_btn.is-sending .fl-btn-spin { display: inline-block; animation: rt-spin 0.7s linear infinite; }

/* Reusable in-game popup (popup.js / TravPopup) — standard GRAY UI palette:
   bg #f5f5f5, panel #e6e6e6, borders #bbb/#ddd, text #333 (see CLAUDE.md). */
#tpop-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.55); z-index: 10001; }
#tpop-overlay.tpop-open { display: block; }
#tpop-box { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); max-height: 90%; overflow: auto; min-width: 300px; background: #fff; border: 1px solid #bbb; border-radius: 4px; box-shadow: 0 4px 18px rgba(0,0,0,0.55); padding: 0 0 14px; color: #333; }
#tpop-title { margin: 0 0 10px; padding: 6px 32px 6px 14px; border-bottom: 1px solid #ddd; background: linear-gradient(#ededed, #dcdcdc); color: #333; font-size: 13px; font-weight: bold; border-radius: 4px 4px 0 0; }
#tpop-content { padding: 0 14px; }
#tpop-close { position: absolute; top: 4px; right: 10px; font-size: 20px; font-weight: bold; color: #666; text-decoration: none; line-height: 1; }
#tpop-close:hover { color: #a12; }
#tpop-box .tpop-loading { padding: 24px; text-align: center; color: #666; }
#tpop-box .tpop-error { color: #c00; font-weight: bold; padding: 8px 0; }
.tpop-prompt { padding: 6px 0; }
.tpop-prompt .tpop-label { display: block; margin-bottom: 6px; color: #333; }
.tpop-prompt .tpop-input { width: 90px; text-align: center; }
.tpop-prompt .tpop-actions { margin-top: 12px; text-align: right; }
.tpop-prompt .tpop-actions .trav_buttons { margin-left: 6px; }

/* Mobile chrome injected by mobile.js exists on every page that loads it.
   Hide it by default here (always-loaded sheet); mobile.css (media <=768px)
   reveals it via higher-specificity .is-mobile / .open rules. This keeps the
   desktop layout untouched. */
/* Static mobile chrome — hidden on desktop; mobile.css (.is-mobile) reveals it.
   .m-tab uses CLASS specificity so the JS availability hide (inline display:none)
   and the mobile reveal both work without !important fights. */
#m-menu-toggle, #m-backdrop { display: none; }
.m-tab { display: none; }

/* Troops list: hide the unit-name column on both desktop and mobile. */
#troops td.un { display: none; }
/* dorf1 troops list (name column hidden): flex each row so the icon + count sit
   together, pushed to the RIGHT edge (no stretched gap, no all-left bunching).
   Scoped to #map_details so a2b.php's send-troops table is unaffected. */
#map_details #troops { display: block; width: auto; }
#map_details #troops thead, #map_details #troops tbody { display: block; }
#map_details #troops tbody tr { display: flex; align-items: center; gap: 6px; padding: 1px 0; }
#map_details #troops td { padding: 0 !important; border: none; }
#map_details #troops td.un { display: none !important; }
#map_details #troops td.ico { display: flex; align-items: center; }
#map_details #troops td.num { font-weight: bold; white-space: nowrap; }

/* Push-notification opt-in (profile preference screen). Gray Travian palette:
   white control on a gray gradient, matching the popup/tooltip styling. */
button.push-btn {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid #bbb;
  border-radius: 3px;
  background: linear-gradient(#ededed, #dcdcdc);
  color: #333;
  font-weight: bold;
  cursor: pointer;
}
button.push-btn:hover { background: linear-gradient(#f5f5f5, #e6e6e6); }
button.push-btn[disabled] { color: #999; cursor: default; opacity: 0.7; }
span.push-status { color: #333; font-size: 0.9em; }
span.push-status.push-on { color: #2a7d2a; font-weight: bold; }

/* PWA install link in the side menu: hidden until mobile.js decides the app is
   installable. Global (not media-gated) so it stays hidden on desktop too. */
.pwa-hidden { display: none !important; }

/* ===== Alliance Projects (allianz.php?s=7) ===== */
.ap-intro { color: #333; margin: 6px 0 10px; }
.ap-ok { color: #2e7d32; }
.ap-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.ap-card {
    flex: 1 1 300px;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 3px;
    padding: 0 10px 10px;
}
.ap-card h3 {
    display: flex;
    align-items: stretch;
    margin: 0 -10px 8px;
    padding: 0;
    line-height: 20px; /* match the Top 10 thead row height (~20px total) */
    /* Authentic Travian table-header texture (same as Top 10 'table thead th'). */
    background: #ededed url("img/a/c2.gif") repeat-x left bottom;
    background-size: auto 100%;
    border-bottom: 1px solid #bbb;
    color: #000;
    font-size: 13px;
}
/* The "?" sits in its own bordered cell on the left, like the Top 10 header. */
.ap-card h3 .ap-q { display: flex; align-items: center; padding: 0 8px; border-right: 1px solid #bbb; cursor: help; }
.ap-card h3 .ap-q img.help { display: block; }
/* Project name centered in the remaining space (like "PvP of the week"). */
.ap-card h3 .ap-name { flex: 1; text-align: center; padding: 0 8px; font-weight: bold; }
.ap-card h3 .ap-lvl { padding: 0 8px; color: #333; font-weight: normal; }
/* Expand/collapse toggle cell, right after the "?" cell. Uses the game's
   closed.gif (collapsed) / opened.gif (expanded) green arrow icons. */
.ap-card h3 .ap-toggle { display: flex; align-items: center; padding: 0 7px; border-right: 1px solid #bbb; cursor: pointer; }
.ap-card h3 .ap-toggle .ap-tgl-ico { display: block; width: 13px; height: 13px; background: url("img/a/closed.gif") no-repeat 0 0; mix-blend-mode: multiply; }
.ap-card h3 .ap-toggle.open .ap-tgl-ico { background-image: url("img/a/opened.gif"); }
.ap-eff { color: #333; margin: 4px 0; }
.ap-max { color: #2e7d32; }
.ap-progress { margin: 6px 0; }
.ap-bar { width: 100%; height: 14px; vertical-align: middle; }
.ap-bar::-webkit-progress-bar { background: #e6e6e6; border: 1px solid #ddd; }
.ap-bar::-webkit-progress-value { background: #8a8a8a; }
.ap-bar::-moz-progress-bar { background: #8a8a8a; }
.ap-prog-txt { display: block; font-size: 11px; color: #333; margin-top: 2px; }
.ap-upgrading { color: #333; font-style: italic; }
.ap-form { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.ap-res { display: flex; align-items: center; flex: 1 1 56px; min-width: 0; }
.ap-res img { flex: 0 0 auto; margin-right: 2px; }
.ap-res input { width: 100%; min-width: 0; box-sizing: border-box; }
.ap-form .trav_buttons { flex: 1 1 100%; margin-top: 4px; min-height: 30px; padding-top: 5px; padding-bottom: 5px; }
.ap-bonus { color: #2e7d32; }
/* Training time affected by the alliance Drill project: blue + hoverable. */
.ap-time { color: #2e6fdb; cursor: help; white-space: nowrap; }
.ap-time .clock { vertical-align: middle; }
.ap-remain { color: #333; margin: 4px 0; font-size: 11px; }
/* Top contributors: hidden until the header toggle opens them, then the two
   Top-10-style tables (all-time / this week) sit side by side. */
.ap-boards { display: none; }
.ap-boards.open { display: flex; gap: 8px; margin-top: 8px; }
.ap-board { flex: 1 1 0; min-width: 0; }
.ap-ctbl { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #bbb; font-size: 11px; }
/* Full grid: a border on every cell (column + per-row lines), like Top 10. */
.ap-ctbl td, .ap-ctbl th { border: 1px solid #ccc; padding: 1px 5px; }
/* Title bar — same c2.gif header texture as the Top 10 table. */
.ap-ctbl thead th { line-height: 16px; text-align: center; color: #000; font-size: 12px; background: #ededed url("img/a/c2.gif") repeat-x left bottom; background-size: auto 100%; }
/* Column-label row — light gray like the Top 10 "No./Player/Points". */
.ap-ctbl thead td.ap-c-h { color: #333; background: #f3f3f3; font-size: 10px; text-align: center; }
.ap-ctbl thead td.ap-c-h:last-child { text-align: right; }
/* No. (rank) column — narrow, right-aligned. */
.ap-ctbl .ap-c-no, .ap-ctbl .ap-c-hno { width: 1%; white-space: nowrap; text-align: right; color: #333; }
/* Player cell takes the remaining width and ellipsises long names. */
.ap-ctbl td.ap-c-name { color: #333; width: 100%; max-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Player name in the game's link green + bold, like the Top 10 table. */
.ap-ctbl td.ap-c-name .ap-pl { color: #71D000; font-weight: bold; }
/* Value cell sizes to its content and right-aligns, like Top 10 td.val. */
.ap-ctbl td.ap-c-amt { color: #000; font-weight: normal; text-align: right; white-space: nowrap; }
.ap-ctbl td.ap-c-none { color: #888; font-style: italic; text-align: center; }
.ap-evfilter { margin: 6px 0; color: #333; }
.ap-pager { margin: 8px 0; text-align: center; color: #333; }
.ap-pager a { padding: 1px 6px; border: 1px solid #bbb; background: #f5f5f5; text-decoration: none; margin: 0 2px; }
.ap-pager span { margin: 0 6px; }
/* Manual help pages (manual.php) shown inside the mobile help-popup iframe have
   fixed-width content (406px tables) that overflows a narrow phone iframe, so the
   popup looks "half open". Let the content reflow to fit. manual.php now sends a
   width=device-width viewport, so the iframe's viewport == its own width here. */
@media (max-width: 480px) {
    body.manual { min-width: 0; margin: 0; padding: 4px 6px; box-sizing: border-box; }
    body.manual table#examples,
    body.manual table#troop_info,
    body.manual table#troop_details { width: 100%; max-width: 100%; }
    body.manual table { max-width: 100%; }
    /* The nav arrows are absolutely pinned at top:420px for the short desktop
       popup; on taller reflowed mobile content that overlaps the text, so let
       them flow to the end instead. */
    body.manual img.navi { position: static; left: auto; top: auto; display: block; margin: 10px auto 4px; max-width: 100%; height: auto; }
    body.manual ul { padding-left: 18px; }
}

/* ===== Hero's-Mansion Merchant (NPC shop) — matched to the Nexian merchant. docs/hero-merchant ===== */
.npc-shop { padding: 10px 0; max-width: 480px; margin: 0 auto; color: #333; }
.npc-msg { text-align: center; padding: 5px; margin: 0 0 8px; border: 1px solid #ddd; background: #f3f3f3; border-radius: 3px; }
.npc-msg.err { color: #c00; border-color: #c00; }
.npc-msg.ok { color: #000; }
/* silver coin + gold icons */
.npc-coin { display: inline-block; width: 10px; height: 14px; overflow: hidden; background-image: url(img/a/silver-ltr.gif); background-position: 0 0; vertical-align: middle; margin-right: 2px; }
.npc-goldico { width: 12px; height: 12px; vertical-align: middle; }
/* header: balances + exchange */
.npc-shop-header { padding: 8px 12px; margin-bottom: 10px; background: #f3f3f3; border: 1px solid #ccc; border-radius: 3px; }
.npc-shop-balances { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 6px; }
.npc-shop-balance { display: inline-flex; align-items: center; gap: 4px; font-weight: bold; font-size: 14px; }
.npc-exchange-row { display: flex; justify-content: center; align-items: center; gap: 16px; }
.npc-exchange-group { display: inline-flex; align-items: center; gap: 4px; position: relative; margin: 0; }
.npc-exchange-input { width: 50px; height: 22px; border: 1px solid #bbb; border-radius: 2px; text-align: center; font-size: 11px; background: #fff; }
.npc-exchange-input::-webkit-outer-spin-button, .npc-exchange-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.npc-exchange-btn { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; height: 24px; border: 1px solid #bbb; border-radius: 2px; background: #e8e8e8; cursor: pointer; font-size: 11px; }
.npc-exchange-btn:hover { background: #d8d8d8; }
.npc-exchange-btn:active { background: #c8c8c8; }
.npc-exchange-rate { font-size: 10px; color: #999; }
.npc-exchange-tooltip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 4px; padding: 3px 8px; background: #333; color: #fff; font-size: 10px; white-space: nowrap; border-radius: 3px; z-index: 100; pointer-events: none; }
.npc-exchange-group:hover .npc-exchange-tooltip { display: block; }
/* merchant dialogue + framed portrait (cards overlap the bottom of the frame) */
.npc-merchant-dialogue { text-align: center; margin-bottom: 6px; font-style: italic; font-size: 12px; color: #666; }
.npc-merchant-dialogue p { margin: 0; }
.npc-merchant-area { text-align: center; margin-bottom: 0; }
.npc-merchant-frame { position: relative; display: inline-block; width: 240px; height: 240px; overflow: hidden; background: #fff; }
.npc-merchant-img { width: 100%; display: block; margin-top: -30px; }
.npc-merchant-frame.tribe-gaul { height: 270px; }
/* ware cards */
.npc-shop-cards { display: flex; justify-content: center; align-items: stretch; gap: 6px; margin-top: -35px; margin-bottom: 16px; flex-wrap: nowrap; position: relative; z-index: 1; }
.npc-shop-card { position: relative; width: 144px; border: 1px solid #ccc; border-radius: 4px; background: #f3f3f3; padding: 8px 6px; text-align: center; box-sizing: border-box; display: flex; flex-direction: column; transition: box-shadow .2s; }
.npc-shop-card:hover:not(.card-sold) { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.npc-shop-card.card-equipment { border-color: #b8860b; background: #f8f5ec; }
.npc-shop-card.card-sold { opacity: .5; filter: grayscale(40%); }
.npc-card-header { display: flex; justify-content: center; align-items: center; gap: 6px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #ddd; }
.npc-card-header-label { font-size: 11px; font-weight: bold; text-transform: uppercase; color: #888; letter-spacing: .5px; }
.npc-card-equip-badge { font-size: 10px; background: #b8860b; color: #fff; padding: 1px 6px; border-radius: 3px; font-weight: bold; }
.npc-card-icon-wrap { margin: 8px 0; text-align: center; }
.npc-card-item-img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(1px 1px 2px rgba(0,0,0,.25)); }
.npc-card-name { font-weight: bold; font-size: 11px; margin-bottom: 4px; color: #333; }
.npc-card-price { font-size: 12px; font-weight: bold; color: #555; margin-bottom: 4px; }
.npc-card-price-per { font-size: 11px; font-weight: normal; color: #888; }
.npc-card-stock { font-size: 11px; color: #888; margin-bottom: 8px; min-height: 16px; }
.npc-card-timer { font-size: 11px; font-style: italic; color: #888; margin-top: 6px; }
.npc-card-sold-stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-15deg); font-size: 26px; font-weight: bold; color: rgba(180,40,40,.6); letter-spacing: 3px; pointer-events: none; }
.npc-card-buy-section { margin-top: auto; padding-top: 8px; }
.npc-qty-selector { display: inline-flex; align-items: center; margin-bottom: 6px; border: 1px solid #bbb; border-radius: 3px; overflow: hidden; }
.npc-qty-btn { width: 28px; height: 28px; border: none; background: #e8e8e8; cursor: pointer; font-size: 16px; font-weight: bold; color: #555; line-height: 28px; padding: 0; }
.npc-qty-btn:hover { background: #d8d8d8; }
.npc-qty-btn:active { background: #c8c8c8; }
.npc-qty-input { width: 44px; height: 28px; border: none; border-left: 1px solid #c5b899; border-right: 1px solid #c5b899; text-align: center; font-size: 13px; font-weight: bold; background: #fff; }
.npc-qty-input::-webkit-outer-spin-button, .npc-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.npc-card-total { font-size: 12px; color: #555; margin-bottom: 6px; }
.npc-buy-btn { display: inline-block; padding: 4px 16px; background: #e0edda; color: #333; border: 1px solid #6a9a50; border-radius: 3px; font-size: 12px; font-weight: bold; cursor: pointer; transition: background .15s; }
.npc-buy-btn:hover { background: #d0e0c8; }
.npc-buy-btn:active { background: #b8d0ae; }
/* reroll + pity */
.npc-shop-reroll { text-align: center; padding: 12px; margin-top: 8px; border-top: 1px solid #ddd; }
.npc-reroll-btn { display: inline-block; padding: 6px 20px; background: linear-gradient(#f0c040, #d4a020); color: #4a3000; border: 1px solid #b8960c; border-radius: 4px; font-size: 13px; font-weight: bold; cursor: pointer; text-decoration: none; transition: background .2s; }
.npc-reroll-btn:hover { background: linear-gradient(#f5cc55, #daa830); }
.npc-reroll-info { display: block; margin-top: 6px; font-size: 12px; color: #888; }
.npc-shop-pity { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 12px; margin-top: 6px; font-size: 12px; color: #555; }
.npc-shop-pity-dots { display: inline-flex; gap: 4px; }
.npc-shop-pity-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #999; background: #ddd; }
.npc-shop-pity-dot.filled { background: #f0c040; border-color: #b8960c; }
.npc-shop-pity-text { font-size: 11px; color: #888; }
/* Merchant on narrow screens (cards shrink to fit 3-across), mirroring Nexian's mobile rules */
@media (max-width: 520px) {
  .npc-shop { max-width: 100%; }
  .npc-shop-header { padding: 6px 8px; }
  .npc-shop-balances { gap: 12px; margin-bottom: 4px; }
  .npc-shop-balance { font-size: 13px; }
  .npc-exchange-row { flex-direction: column; gap: 6px; }
  .npc-exchange-input { width: 42px; height: 20px; font-size: 11px; }
  .npc-exchange-btn { padding: 2px 6px; height: 22px; font-size: 10px; }
  .npc-merchant-frame { width: 200px; height: 200px; }
  .npc-merchant-frame.tribe-gaul { height: 220px; }
  .npc-shop-cards { gap: 3px; margin-top: -25px; padding: 0 2px; }
  .npc-shop-card { width: 0; min-width: 0; flex: 1 1 0; padding: 6px 4px; }
  .npc-card-header-label { font-size: 9px; letter-spacing: 0; }
  .npc-card-name { font-size: 10px; }
  .npc-card-item-img { width: 40px; height: 40px; }
  .npc-card-price { font-size: 11px; }
  .npc-card-price-per, .npc-card-stock { font-size: 9px; }
  .npc-qty-btn { width: 18px; height: 18px; font-size: 12px; line-height: 18px; }
  .npc-qty-input { width: 24px; height: 18px; font-size: 10px; }
  .npc-card-total { font-size: 9px; margin-bottom: 3px; }
  .npc-buy-btn { padding: 2px 8px; font-size: 9px; }
  .npc-card-timer { font-size: 9px; }
  .npc-card-sold-stamp { font-size: 20px; letter-spacing: 2px; }
}




/* ── Player Tools (docs/tools/) ───────────────────────────────────────────── */
#content.tools { padding: 43px 25px 0; width: 502px; }
#content.tools h1 { margin-bottom: 6px; }
.tools-intro { color: #555; margin: 0 0 14px; }
.tools-back { margin: 0 0 12px; }
.tools-hidden { display: none !important; }

.tools-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.tools-card {
	display: block; width: 230px; padding: 12px 14px; text-decoration: none;
	background: #fff; border: 1px solid #bbb; border-radius: 4px; color: #333;
}
.tools-card:hover { border-color: #888; background: #fafafa; }
.tools-card h3 {
	margin: 0 0 6px; padding: 4px 8px; color: #000; font-size: 13px;
	background: linear-gradient(#ededed, #dcdcdc); border: 1px solid #ddd; border-radius: 3px;
}
.tools-card span { display: block; color: #555; font-size: 11px; line-height: 1.4; }

.tools-form {
	background: #fff; border: 1px solid #bbb; border-radius: 4px;
	padding: 10px 14px; max-width: 460px;
}
.tools-form fieldset { border: 1px solid #ddd; border-radius: 3px; margin: 0 0 10px; padding: 8px 10px; }
.tools-form legend { color: #333; font-weight: bold; padding: 0 4px; }
.tools-form label { display: inline-block; margin: 2px 10px 2px 0; color: #333; }
.tools-form input[type="number"] { width: 60px; }
.tools-form select { max-width: 220px; }
.tools-form .btn { margin: 4px 0 0; }
.tools-btn {
	background: linear-gradient(#ededed, #dcdcdc); border: 1px solid #bbb; border-radius: 3px;
	color: #333; padding: 4px 16px; cursor: pointer; font-weight: bold;
}
.tools-btn:hover { border-color: #888; }

.tools-result {
	margin: 12px 0 0; max-width: 460px; background: #fff;
	border: 1px solid #bbb; border-radius: 4px; padding: 8px 12px;
}
.tools-result-tbl { width: 100%; border-collapse: collapse; }
.tools-result-tbl th { text-align: left; color: #555; font-weight: normal; padding: 3px 8px 3px 0; width: 120px; }
.tools-result-tbl td { color: #000; font-weight: bold; padding: 3px 0; }
.tools-err { color: #c00; margin: 0; }

/* Production Overview tabs (dorf3 #textmenu style) + tables.
   Links inherit the global green a{} color; only the active-tab accent is set here. */
.tools-tabs { margin: 14px 0; }
.tools-tabs a { text-decoration: none; }
.tools-tabs a.active { font-weight: bold; border-bottom: 1px dashed #c0c0c0; }
.tools-prod h3 { margin: 12px 0 4px; color: #333; font-size: 12px; }
.tools-prod-tbl { border-collapse: collapse; max-width: 460px; width: 100%; margin: 0 0 6px; }
.tools-prod-tbl th { text-align: left; color: #555; font-weight: normal; background: linear-gradient(#ededed,#dcdcdc); border: 1px solid #ddd; padding: 3px 8px; }
.tools-prod-tbl td { border: 1px solid #eee; padding: 3px 8px; color: #333; }
.tools-prod-tbl thead th { color: #333; }
.tools-prod-tbl td:last-child, .tools-prod-tbl th:last-child { text-align: right; }
.tools-prod-sum td, .tools-prod-total td, .tools-prod-total th { font-weight: bold; color: #000; background: #f5f5f5; }
.tools-muted { color: #999; }
/* dorf3-overview table chrome (title bar + column-label row + green sum highlight) */
.tools-ov-tbl thead th.tools-ov-title { text-align: center; background: #fff url("img/a/c2.gif") repeat-x; color: #000; font-weight: bold; border: 1px solid #c0c0c0; }
.tools-ov-tbl thead tr.tools-ov-cols th { background: #f3f3f3; color: #000; font-weight: normal; }
.tools-ov-tbl td, .tools-ov-tbl th { border-color: #c0c0c0; }
.tools-ov-tbl tr.tools-prod-sum td, .tools-ov-tbl tr.tools-prod-total td { background: #f0fff0; border-top: 1px solid #71d000; border-bottom: 1px solid #71d000; }
.tools-ov-tbl tr.tools-prod-sum td:first-child, .tools-ov-tbl tr.tools-prod-total td:first-child { border-left: 1px solid #71d000; }
.tools-ov-tbl tr.tools-prod-sum td:last-child, .tools-ov-tbl tr.tools-prod-total td:last-child { border-right: 1px solid #71d000; }

/* dorf1 production-overview entry-point: the "Production:" heading is the link */
.prod-overview-link:link, .prod-overview-link:visited { color: inherit; text-decoration: underline; }
.prod-overview-link:hover { color: #00BC00; }

/* Training result: wide per-building tables scroll within the fixed content width */
#train-result { overflow-x: auto; }
.tools-train-bld { margin: 0 0 8px; }
.tools-train .tools-prod-tbl td, .tools-train .tools-prod-tbl th { white-space: nowrap; }
#train-result .tools-prod-tbl td, #train-result .tools-prod-tbl th { white-space: nowrap; padding: 3px 6px; }

/* Village groups — interactive widget (docs/tools/05-village-groups.md) */
/* Create (folder-plus) button in the list header: inline + vertically centred
   with the title, with a little breathing room on its left. */
.vgroup-add { display: inline-block; vertical-align: middle; margin-left: 6px; text-decoration: none; line-height: 1; }
.vgroup-add-ico { display: inline-block; width: 13px; height: 13px; vertical-align: middle; background: url("img/a/plus.gif") no-repeat 0 0; mix-blend-mode: multiply; }

/* Group header row: gray by default, full-width colour tint per group colour */
tr.vgroup-head td { background: #ededed; color: #333; font-weight: bold; padding: 2px 4px; border-top: 1px solid #ddd; }
tr.vgroup-head.vgroup-red td { background: #f6d9d5; }
tr.vgroup-head.vgroup-blue td { background: #d6e6f2; }
tr.vgroup-head.vgroup-green td { background: #d4f0e0; }
tr.vgroup-head.vgroup-orange td { background: #fbe5d2; }
tr.vgroup-head.vgroup-purple td { background: #e8dcf1; }
tr.vgroup-head.vgroup-teal td { background: #d2efe9; }
tr.vgroup-head.vgroup-gray td { background: #e2e5e5; }

/* Header line: flex so the pencil sits flush-right and is never clipped. */
.vgroup-head-main { display: flex; align-items: center; gap: 3px; }
.vgroup-handle { flex: 0 0 auto; cursor: move; color: #999; letter-spacing: -2px; }
.vgroup-tgl { flex: 0 0 auto; cursor: pointer; display: inline-block; }
.vgroup-tgl-ico { display: inline-block; width: 13px; height: 13px; vertical-align: middle; background: url("img/a/closed.gif") no-repeat 0 0; mix-blend-mode: multiply; }
tr.vgroup-head.open .vgroup-tgl-ico { background-image: url("img/a/opened.gif"); }
.vgroup-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vgroup-pencil { flex: 0 0 auto; cursor: pointer; color: #666; padding: 0 2px; }
.vgroup-pencil:hover { color: #000; }

/* Inline edit state: replace the header line with the editor — name input +
   colour button + save + delete on one flex line; the colour picker opens as a
   grid below. (The render must NOT add .tools-hidden to .vgroup-edit — its
   display:none !important would beat the .editing rule.) */
.vgroup-edit { display: none; }
tr.vgroup-head.editing .vgroup-head-main { display: none; }
tr.vgroup-head.editing .vgroup-edit { display: block; margin: 2px 0; }
.vgroup-edit-line { display: flex; align-items: center; gap: 5px; padding-right: 8px; }
.vgroup-name-input { flex: 1 1 auto; min-width: 0; box-sizing: border-box; }
.vgroup-pick { flex: 0 0 auto; cursor: pointer; border: 1px solid #bbb; background: #fff; border-radius: 3px; padding: 2px; line-height: 0; }
.vgroup-pick .vgroup-sw { width: 16px; height: 16px; margin: 0; cursor: pointer; }
.vgroup-save { flex: 0 0 auto; cursor: pointer; border: 1px solid #bbb; background: #f5f5f5; color: #2a7d2a; border-radius: 3px; line-height: 1; padding: 2px 6px; font-weight: bold; }
.vgroup-save:hover { background: #eaeaea; }
.vgroup-del { flex: 0 0 auto; cursor: pointer; text-decoration: none; line-height: 1; padding: 0 2px; }
.vgroup-del-ico { display: inline-block; width: 12px; height: 12px; vertical-align: middle; background: url("img/a/del.gif") no-repeat center; }

/* Colour picker grid (popup; hidden until the colour button is clicked) */
.vgroup-palette { display: none; }
.vgroup-palette.open { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 5px 0 2px; padding: 5px; background: #fff; border: 1px solid #bbb; border-radius: 3px; }
.vgroup-sw { display: inline-block; width: 100%; height: 20px; box-sizing: border-box; border: 1px solid #bbb; background: #fff; cursor: pointer; }
.vgroup-sw.sel { outline: 2px solid #333; outline-offset: -2px; }
.vgroup-sw.vgroup-red { background: #c0392b; } .vgroup-sw.vgroup-blue { background: #2980b9; }
.vgroup-sw.vgroup-green { background: #27ae60; } .vgroup-sw.vgroup-orange { background: #e67e22; }
.vgroup-sw.vgroup-purple { background: #8e44ad; } .vgroup-sw.vgroup-teal { background: #16a085; }
.vgroup-sw.vgroup-gray { background: #7f8c8d; }

/* Draggable village rows + drag feedback */
tr.vgroup-vill { cursor: move; }
tr.vgroup-collapsed { display: none; }
.vgroup-dragging { opacity: 0.4; }
.vgroup-drag-over td { box-shadow: inset 0 0 0 2px #f90; }
/* Ungroup dropzone: collapsed until a drag is in progress, then a drop strip. */
tr.vgroup-dropzone td { height: 0; padding: 0; border: 0; line-height: 0; }
#vgroup-widget.vg-dragging tr.vgroup-dropzone td { height: 16px; background: #f0f0f0; border-top: 1px dashed #bbb; }

/* Distance Calculator — icon pickers (tribe / unit / hero) */
.tools-cols { display: flex; gap: 10px; flex-wrap: wrap; }
.tools-cols fieldset { flex: 1; min-width: 180px; }
.tools-subhead { font-weight: bold; color: #555; margin: 8px 0 4px; font-size: 11px; }
.tools-pickrow { display: flex; flex-wrap: wrap; gap: 5px; }
.tools-pick {
	display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; cursor: pointer;
	background: #f5f5f5; border: 1px solid #ccc; border-radius: 4px; color: #333; font-size: 11px;
}
.tools-pick:hover { border-color: #999; }
.tools-pick.sel { background: linear-gradient(#8bc34a, #7cb342); border-color: #689f38; color: #fff; }
.tools-pick.sel .spd { color: #eaffea; }
.tools-pick b { font-weight: bold; }
.tools-pick .spd { color: #999; }
.tools-pick img.unit { width: 18px; height: 18px; }
.tools-items .tools-item {
	width: 40px; height: 40px; padding: 0; cursor: pointer; background: #fff;
	border: 1px solid #ccc; border-radius: 4px; color: #999; font-size: 16px; line-height: 38px; text-align: center;
}
.tools-items .tools-item:hover { border-color: #999; }
.tools-items .tools-item.sel { border-color: #689f38; box-shadow: 0 0 0 2px #8bc34a inset; }
.tools-items .tools-item img { width: 36px; height: 36px; vertical-align: middle; }

/* Distance Calculator — distance-gated modifiers (no effect under threshold) */
.tools-item.tools-disabled { opacity: .35; cursor: not-allowed; filter: grayscale(1); }
.tools-hint { color: #c00; font-size: 10px; margin-left: 6px; }

/* Report-filter explanatory note (preferences) */
.fl_filter_note { color: #666; font-size: 11px; font-style: italic; }

/* Combat Simulator — Extended (warsim) */
/* Width matches #content.tools (502px) so #side_info (the village list) still fits
   beside the form inside #mid instead of wrapping to the bottom. */
#content.warsim2 { width: 502px; }
.ws-form fieldset { margin: 0; border: 0; padding: 0; }

/* Army / group cards: white body, gray border, colored header bar (red=attack, blue=defence) */
.ws-card, .ws-group { background: #fff; border: 1px solid #bbb; border-radius: 4px; margin: 0 0 12px; overflow: hidden; }
.ws-cardhead, .ws-grphead { display: flex; align-items: center; gap: 8px; padding: 5px 10px; color: #fff; font-weight: bold; }
.ws-cardhead { font-size: 13px; }
.ws-grphead { background: linear-gradient(#5b8db8, #3f74a0); }
.ws-grptitle { font-weight: bold; font-size: 12px; }
.ws-head-att { background: linear-gradient(#b6483c, #9c3a30); }
/* off.gif/def.gif are 30x63 vertical sprites (top = default frame); crop to the top
   frame instead of squashing the whole strip into the box. */
.ws-headico { width: 18px; height: 18px; object-fit: cover; object-position: top; vertical-align: middle; }
.ws-cardbody, .ws-grpbody { padding: 8px 10px; }
.ws-del { margin-left: auto; border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.15); color: #fff; cursor: pointer; border-radius: 3px; line-height: 1; padding: 1px 7px; }
/* Hide the remove button when there's only one defender group. */
#ws-groups > .ws-group:only-child .ws-del { display: none; }

/* "Load from village" picker — pre-fills an army from one of the player's villages.
   Sits in the colored card/group header bar, pushed to the right. */
/* .ws-form prefix raises specificity above `.tools-form label` (which sets
   inline-block + a fixed margin and would otherwise kill the margin-left:auto). */
.ws-form .ws-loadvil { display: flex; align-items: center; margin: 0 0 0 auto; padding: 0; background: none; border: 0; font-weight: normal; }
.ws-form .ws-loadvil-sel { max-width: 160px; font-size: 11px; }
/* Picker comes before the × in the defender header — keep × at the far right. */
.ws-grphead .ws-del { margin-left: 6px; }

/* Tribe-avatar selector strip (tribe emblems s/v1-3.gif, portrait) */
.ws-tribestrip { display: flex; gap: 5px; margin: 0 0 8px; }
.ws-tribe { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; width: 52px; padding: 3px 2px; background: #f5f5f5; border: 1px solid #ccc; border-radius: 4px; cursor: pointer; color: #888; font-size: 10px; }
/* s/*.gif are 30x63 two-figure sprites — crop to the top figure (object-position: top) */
.ws-tribe img { width: 26px; height: 26px; object-fit: cover; object-position: top; filter: grayscale(1); opacity: .5; }
.ws-tribe:hover { border-color: #999; }
.ws-tribe.sel { background: #eef6e6; border-color: #689f38; color: #333; font-weight: bold; }
.ws-tribe.sel img { filter: none; opacity: 1; }

/* Option / village field icons (attacker = offense, defender = defence; building icons where they apply) */
.ws-opts label, .ws-village label { display: inline-flex; align-items: center; gap: 3px; }
.ws-oico { width: 14px; height: 15px; object-fit: cover; object-position: top; vertical-align: middle; } /* off/def: top figure only */
.ws-uico { width: 16px; height: 16px; vertical-align: middle; }
.ws-bico { height: 20px; width: auto; max-width: 16px; object-fit: contain; vertical-align: middle; }

/* Troop matrix: three aligned rows (icons / counts / smithy) */
.ws-troops { margin: 4px 0; }
.ws-trow { display: flex; align-items: center; gap: 3px; margin: 2px 0; }
.ws-rlabel { flex: 0 0 18px; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.ws-rlabel img { max-width: 16px; max-height: 16px; }
.ws-tcell { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
/* Chief/Settler columns (off 9-10): fixed-narrow so the other 8 units get the slack. */
.ws-tcell-sm { flex: 0 0 24px; }
.ws-tcell img.unit { width: 18px; height: 18px; }
.ws-tcell input { width: 100%; min-width: 0; box-sizing: border-box; padding: 2px 1px; text-align: center; }
.ws-smy { background: #f6f6f6; color: #555; }
.ws-smy-empty { display: block; }

/* Options + hero rows */
.ws-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 0; padding-top: 6px; border-top: 1px solid #eee; }
.ws-opts label { color: #333; font-size: 11px; }
.ws-opts input { width: 48px; }
.ws-hero { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid #eee; }
.ws-herochk { font-weight: bold; color: #555; }
.ws-herobody { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0; padding: 6px; background: #f5f5f5; border: 1px solid #ddd; border-radius: 3px; }
.ws-herobody label { color: #333; font-size: 11px; }
.ws-herobody input { width: 46px; }
.ws-herobody select { font-size: 11px; }

/* Shared defending-village panel */
.ws-village { background: #f5f5f5; border: 1px solid #ddd; border-radius: 4px; padding: 6px 10px; margin: 0 0 12px; }
.ws-vlbl { display: inline-flex; align-items: center; gap: 4px; font-weight: bold; color: #555; font-size: 11px; }
.ws-village label { color: #333; font-size: 11px; margin: 3px 10px 3px 0; }
.ws-village input { width: 46px; }

/* Add-reinforcement tribe strip (small tribe-emblem chips) */
.ws-addstrip { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 6px 10px; background: #f5f5f5; border: 1px dashed #bbb; border-radius: 4px; }
.ws-addlbl { font-size: 11px; color: #555; font-weight: bold; }
.ws-addtribe { width: 32px; height: 32px; padding: 1px; background: #fff; border: 1px solid #ccc; border-radius: 4px; cursor: pointer; overflow: hidden; }
.ws-addtribe img { width: 28px; height: 28px; object-fit: cover; object-position: top; } /* v*.gif top figure only */
.ws-addtribe:hover { border-color: #689f38; box-shadow: 0 0 0 2px #cfe6b8; }
.ws-calc { font-size: 14px; padding: 6px 24px; }
.ws-res-head { padding: 8px 12px; border-radius: 4px; margin: 0 0 10px; color: #fff; }
.ws-res-head span { display: block; font-size: 11px; margin-top: 2px; }
.ws-win-att { background: linear-gradient(#c0392b,#a5342a); }
.ws-win-def { background: linear-gradient(#2980b9,#236aa0); }
.ws-res-tbl td:not(:first-child), .ws-res-tbl th:not(:first-child) { text-align: right; }
.ws-res-tbl img.unit { width: 16px; height: 16px; vertical-align: middle; }
.ws-lost { color: #c00; }
.ws-res-tbl tfoot .ws-total td { font-weight: bold; color: #000; border-top: 2px solid #bbb; background: #f0f0f0; }

/* Result casualty matrix — fixed-layout table: all unit columns (zeros included), equal
   width, with icons + Qty / Lost(red) / Left(green) rows that align vertically per column. */
.ws-castbl { width: 100%; table-layout: fixed; border-collapse: collapse; }
.ws-castbl td { text-align: center; font-size: 10px; color: #333; padding: 1px 1px; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.ws-castbl .ws-cast-lbl { width: 28px; text-align: right; font-size: 9px; color: #888; padding-right: 5px; }
.ws-castbl .ws-cast-icons td { height: 20px; }
.ws-castbl img.unit { width: 18px; height: 18px; vertical-align: middle; }
.ws-castbl tr.lost td { color: #c00; }
.ws-castbl tr.surv td { color: #2a7d2a; }
.ws-castbl td.ws-cast-heroc { background: #fdf6e3; border-left: 1px solid #e0cda0; }
.ws-castbl tr.lost td.ws-cast-heroc, .ws-castbl tr.surv td.ws-cast-heroc { background: #fdf6e3; }
.ws-herohp { margin: 4px 0 0; font-size: 11px; color: #555; }
.ws-herohp .ws-herohp-lost { color: #c00; }
.ws-herohp.dead { color: #c00; font-weight: bold; }

/* Retrain-estimate bar (play-as toggle + village dropdown) + result note */
.ws-rtbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; padding: 6px 10px; background: #f5f5f5; border: 1px solid #ddd; border-radius: 4px; font-size: 11px; color: #555; }
.ws-rt-lbl { font-weight: bold; }
.ws-rt-toggle { display: inline-flex; border: 1px solid #bbb; border-radius: 3px; overflow: hidden; }
.ws-rt-opt { border: 0; background: #fff; color: #555; cursor: pointer; padding: 3px 10px; font-size: 11px; }
.ws-rt-opt + .ws-rt-opt { border-left: 1px solid #bbb; }
.ws-rt-opt.sel { background: #689f38; color: #fff; font-weight: bold; }
.ws-rt-vil select { font-size: 11px; }
.ws-rt-time { margin: 0; color: #333; font-size: 12px; }
.ws-rt-note { margin: 4px 0 0; color: #888; font-size: 11px; font-style: italic; }

/* Result army/stats cards (T4-style banners in our palette) */
.ws-rescard { margin: 0 0 10px; }
.ws-rescard .ws-cardhead { font-size: 13px; }
.ws-rescard-ico { width: 18px; height: 18px; object-fit: cover; object-position: top; vertical-align: middle; }
.ws-cardhead .ws-cas-sub { color: rgba(255,255,255,.85); font-weight: normal; font-size: 11px; margin-left: 4px; }
.ws-cardhead.ws-head-stat { background: linear-gradient(#ededed,#dcdcdc); color: #333; }
.ws-stat-tbl { width: 100%; border-collapse: collapse; font-size: 11px; margin: 0 0 6px; }
.ws-stat-tbl th, .ws-stat-tbl td { padding: 3px 8px; border-bottom: 1px solid #eee; text-align: right; }
.ws-stat-tbl th:first-child, .ws-stat-tbl td:first-child { text-align: left; color: #555; }
.ws-stat-tbl thead th { background: #f5f5f5; font-weight: bold; color: #333; }
.ws-stat-extra { margin: 0; }

/* Combat Simulator — hero equipment slots + picker */
.ws-eq { display: flex; align-items: center; gap: 4px; margin: 2px 0; }
.ws-eq .ws-lbl { color: #888; font-size: 10px; margin-right: 4px; }
.ws-eqslot { width: 34px; height: 34px; padding: 0; cursor: pointer; background: #fff; border: 1px solid #bbb; border-radius: 4px; }
.ws-eqslot:hover { border-color: #888; }
.ws-eqslot.equipped { border-color: #689f38; box-shadow: 0 0 0 1px #8bc34a inset; }
.ws-eqthumb { display: block; width: 100%; height: 100%; }
.ws-eqthumb img { width: 30px; height: 30px; vertical-align: top; }
.ws-eqpicker { position: absolute; z-index: 9999; max-height: 280px; overflow-y: auto; min-width: 300px; max-width: 360px; background: #fff; border: 1px solid #888; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.25); font-size: 11px; }
.ws-eqopt { display: flex; align-items: center; gap: 6px; padding: 3px 8px; cursor: pointer; color: #333; }
.ws-eqopt:hover { background: #eef6e6; }
.ws-eqopt img { width: 22px; height: 22px; }
.ws-eqpow { margin-left: auto; color: #689f38; font-weight: bold; }
.ws-eqnone { color: #c00; }

/* equipment picker rows: name + full effects */
.ws-eqopt .ws-eqname { font-weight: bold; }
.ws-eqopt .ws-eqeff { margin-left: auto; color: #689f38; font-size: 10px; white-space: nowrap; }

/* ---- Rally Point: movement filters & pagination (rally_filter.js) ---- */
#build.gid16 #rpFilterBox { border:1px solid #bbb; background:#f5f5f5; margin:8px 0; font-family:Verdana,Arial,sans-serif; }
/* Filter-panel header — matches the farm-list header bar (.flHeader): c2.gif
   texture strip, bordered arrow cell on the left (closed.gif collapsed /
   opened.gif expanded), title, freeze toggle on the right. */
#build.gid16 .rpHeader { display:flex; align-items:stretch; line-height:24px; cursor:pointer; font-size:13px; font-weight:bold; color:#000; background:#ededed url(img/a/c2.gif) repeat-x left bottom; background-size:auto 100%; border-bottom:1px solid #bbb; }
#build.gid16 .rpArrow { display:flex; align-items:center; width:13px; padding:0 7px; border-right:1px solid #bbb; background:url(img/a/closed.gif) no-repeat center; mix-blend-mode:multiply; }
#build.gid16 .rpArrow.rpOpen { background-image:url(img/a/opened.gif); }
#build.gid16 .rpTitle { display:flex; align-items:center; padding:0 8px; color:#000; }
#build.gid16 .rpFreeze { display:flex; align-items:center; margin-left:auto; padding:0 7px; border-left:1px solid #bbb; cursor:pointer; opacity:.55; }
#build.gid16 .rpFreeze:hover { opacity:.85; }
#build.gid16 .rpFreeze.rpFrozen { opacity:1; }
#build.gid16 .rpFreezeIcon { display:inline-block; width:18px; height:18px; line-height:18px; text-align:center; }
#build.gid16 .rpFreezeIcon::before { content:"\275A\275A"; font-size:13px; color:#888; }
#build.gid16 .rpFreezeIcon.active::before { content:"\2744"; color:#4a90d9; font-size:16px; }
#build.gid16 .rpBody { background:#fff; }
#build.gid16 table.rpTabs { width:100%; table-layout:fixed; border-collapse:collapse; }
#build.gid16 table.rpTabs td.rpTab { padding:5px 0; text-align:center; font-size:11px; color:#888; background:#e6e6e6; border-bottom:3px solid #bbb; cursor:pointer; }
#build.gid16 table.rpTabs td.rpTabActive { background:#fff; border-bottom-color:#689f38; font-weight:bold; color:#000; }
#build.gid16 .rpPane { padding:5px 8px 4px; }
#build.gid16 table.rpGrid { width:100%; table-layout:fixed; border-collapse:collapse; }
#build.gid16 table.rpGrid td { padding:2px 0; vertical-align:middle; }
#build.gid16 label.rpFlt { display:block; padding:2px 4px; cursor:pointer; font-size:11px; white-space:nowrap; }
#build.gid16 label.rpFlt:hover { background:#f0f0f0; }
#build.gid16 label.rpFlt input[type=checkbox] { vertical-align:middle; margin:0 3px 0 0; }
#build.gid16 label.rpFlt img { vertical-align:middle; margin:0 2px 0 0; width:14px; height:14px; }
#build.gid16 label.rpFlt .rpL { vertical-align:middle; color:#333; }
#build.gid16 label.rpFlt .rpC { vertical-align:middle; font-size:9px; font-weight:bold; color:#689f38; margin-left:2px; }
#build.gid16 label.rpFlt.off .rpL { color:#aaa; text-decoration:line-through; }
#build.gid16 label.rpFlt.off img { opacity:.4; }
#build.gid16 .rpEmptyMsg { padding:8px; text-align:center; color:#888; font-size:11px; font-style:italic; }
#build.gid16 .rpPageActions { display:flex; gap:6px; margin:4px 0 10px; }
#build.gid16 .rpLoadMore { flex:1 1 auto; text-align:center; padding:8px 6px; cursor:pointer; color:#444; background:#f3f3f3; border:1px solid #b9b9b9; font-size:11px; user-select:none; }
#build.gid16 .rpLoadMore:hover { background:#e8e8e8; color:#000; }
#build.gid16 .rpJumpLast { flex:0 0 auto; text-align:center; padding:8px 12px; cursor:pointer; color:#444; background:#f3f3f3; border:1px solid #b9b9b9; font-size:11px; user-select:none; white-space:nowrap; }
#build.gid16 .rpJumpLast:hover { background:#e8e8e8; color:#000; }
#build.gid16 .rpShowingBanner { text-align:center; font-size:11px; color:#555; padding:4px 0; }
#build.gid16 .rpLoadMoreError { margin:4px 0; padding:6px 8px; background:#fdecea; border:1px solid #c99; color:#733; font-size:11px; text-align:center; }

/* Rally Point section header — plain title + pager on the right. */
#build.gid16 .rpSecHead { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-top:10px; margin-bottom: 10px; }
#build.gid16 .rpSecHead h4 { margin:0 0 4px; }
#build.gid16 .rpPager { display:flex; gap:2px; flex-wrap:wrap; align-items:center; }
#build.gid16 .rpPagerBottom { margin:6px 0 14px; justify-content:flex-end; }
#build.gid16 a.rpPg { display:inline-block; min-width:14px; padding:2px 6px; border:1px solid #bbb; background:#f5f5f5; color:#333; text-decoration:none; font-size:11px; text-align:center; }
#build.gid16 a.rpPg:hover { background:#e8e8e8; color:#000; }
#build.gid16 a.rpPg.rpPgCur { background:#689f38; color:#fff; border-color:#689f38; font-weight:bold; cursor:default; }
#build.gid16 a.rpPg.rpPgDis { color:#bbb; background:#f0f0f0; cursor:default; }

/* Admin-only performance debug footer (Layer 2 — Templates/footer.tpl). Gray palette. */
.perf-debug { clear:both; margin:8px auto; max-width:760px; padding:4px 10px; border:1px solid #bbb; background:#f5f5f5; color:#333; font-size:11px; font-family:monospace; text-align:center; border-radius:3px; }
.perf-debug b { color:#000; }
.perf-debug .perf-sql { display:block; margin-top:2px; color:#666; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ------------------------------------------------------------------ *
 * Top-down world map (karte.php + map.js). Gray Travian palette.
 * ------------------------------------------------------------------ */
#tdmapView { float:left; width:552px; padding-top:43px; position:relative; }
#tdmapView .tdmapForm { position:relative; z-index:20; margin:0 0 8px; text-align:left; font-size:12px; color:#333; }
#tdmapView .tdmapForm input[type=text] { width:46px; text-align:center; }
#tdmapView .tdmapForm .td-cropfinder { margin-left:8px; }
#tdmap { position:relative; width:540px; height:540px; margin:0 auto; overflow:hidden; border:1px solid #bbb; background:#e6e6e6; cursor:pointer; -webkit-user-select:none; -moz-user-select:none; user-select:none; }
#tdmap.td-dragging { cursor:pointer; }
#tdmap.td-large { width:660px; height:660px; }
#tdmap-surface { position:absolute; left:0; top:0; width:100%; height:100%; will-change:transform; }
#tdmap-blocks { position:absolute; left:0; top:0; width:100%; height:100%; z-index:0; }
#tdmap .td-block { position:absolute; width:600px; height:600px; z-index:0; pointer-events:none; }
/* tiles are now transparent hit-targets over the baked block images; the inset
   grid line stays for the classic look, the per-tile art moved into .td-block. */
#tdmap .td-tile { position:absolute; width:60px; height:60px; box-shadow:inset 0 0 0 1px rgba(80,80,80,0.18); }
#tdmap .td-tile, #tdmap-surface img { image-rendering:-webkit-optimize-contrast; image-rendering:crisp-edges; image-rendering:pixelated; }
#tdmap .td-feat { position:absolute; left:0; top:0; width:60px; height:60px; pointer-events:none; }
#tdmap .td-border { position:absolute; left:0; top:0; width:60px; height:60px; box-sizing:border-box; border:2px dashed transparent; pointer-events:none; z-index:3; }
#tdmap .td-rel1 { border-color:#f1c40f; }
#tdmap .td-rel2 { border-color:#33aa33; }
#tdmap .td-rel3 { border-color:#3a8fd0; }
#tdmap .td-rel4 { border-color:#e22020; }
#tdmap .td-rel5 { border-color:#999; }
#tdmap .td-mark { position:absolute; left:1px; bottom:1px; width:18px; height:18px; pointer-events:auto; cursor:pointer; z-index:4; }
#tdmap .td-adv { position:absolute; left:1px; top:1px; width:18px; height:18px; pointer-events:auto; cursor:pointer; z-index:4; }
#tdmap-fallback { text-align:center; color:#666; font-size:11px; margin:6px 0; }

#td-pop { position:absolute; z-index:1000; background:#fff; border:1px solid #bbb; border-radius:3px; font-size:11px; color:#333; min-width:170px; max-width:280px; box-shadow:0 2px 8px rgba(0,0,0,0.35); pointer-events:none; }
#td-pop .td-pop-h { background:linear-gradient(#ededed,#dcdcdc); color:#000; font-weight:bold; padding:3px 6px; border-bottom:1px solid #ddd; border-radius:3px 3px 0 0; }
#td-pop .td-pop-b { padding:4px 6px; }
#td-pop table { width:100%; border-collapse:collapse; }
#td-pop th { text-align:left; font-weight:normal; color:#333; padding:1px 6px 1px 0; vertical-align:top; white-space:nowrap; }
#td-pop td { text-align:left; color:#000; padding:1px 0; }
#td-pop .td-animal { display:inline-block; margin:0 4px 2px 0; white-space:nowrap; }
#td-atk-pop { position:absolute; z-index:1001; background:#fff; border:1px solid #c00; border-radius:3px; font-size:11px; color:#333; box-shadow:0 2px 8px rgba(0,0,0,0.4); pointer-events:none; }
#td-atk-pop .td-atk-h { background:linear-gradient(#e74c3c,#c0392b); color:#fff; font-weight:bold; padding:3px 8px; border-bottom:1px solid #a5281b; border-radius:3px 3px 0 0; }
#td-atk-pop .td-atk-b { padding:4px 8px; white-space:nowrap; font-weight:bold; }
#td-atk-pop .td-atk-eta { color:#c00; margin-left:8px; font-weight:normal; }
#td-atk-pop .td-atk-cd { font-weight:bold; }
#td-adv-pop { position:absolute; z-index:1001; background:#fff; border:1px solid #2e7d32; border-radius:3px; font-size:11px; color:#333; box-shadow:0 2px 8px rgba(0,0,0,0.4); pointer-events:none; }
#td-adv-pop .td-adv-h { background:linear-gradient(#43a047,#2e7d32); color:#fff; font-weight:bold; padding:3px 8px; border-bottom:1px solid #1b5e20; border-radius:3px 3px 0 0; }
#td-adv-pop .td-adv-b { padding:4px 8px; white-space:nowrap; font-weight:bold; }
#td-pop .td-animal img.unit { width:18px; height:18px; vertical-align:middle; margin-right:1px; }
