/* Command objectives rail (task-53). Compact first-15-minutes card on the settlement command screen.
   Server-authoritative data; CSP-safe classes only. */
.objectives-host { position: fixed; left: .75rem; bottom: calc(84px + 44px + .6rem); z-index: 45; width: min(23rem, calc(100vw - 1.5rem)); pointer-events: none; }
.obj-card { position: relative; display: grid; gap: .4rem; padding: .6rem .65rem .65rem; border: 1px solid rgba(217,172,108,.45); border-radius: 4px; background: linear-gradient(160deg, rgba(12,36,44,.97), rgba(5,18,24,.98)); color: #e8ede6; box-shadow: 0 18px 46px rgba(0,0,0,.5); pointer-events: auto; max-height: min(62vh, 38rem); overflow: hidden; }
.obj-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, #d9ac6c, rgba(217,172,108,0)); }
.obj-card *, .obj-card *::before, .obj-card *::after { box-sizing: border-box; }
.obj-card p, .obj-card h2, .obj-card h3, .obj-card ul { margin: 0; }
.obj-card :focus-visible { outline: 3px solid #d9ac6c; outline-offset: 2px; }
.obj-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.obj-sr:not(:empty) { position: fixed; left: 50%; top: 3.9rem; transform: translateX(-50%); z-index: 95; width: max-content; max-width: min(32rem, calc(100vw - 1rem)); padding: .4rem .7rem; border: 1px solid rgba(153,178,174,.4); border-left: 3px solid #d9ac6c; background: #0b2229; font-size: .74rem; clip-path: none; height: auto; overflow: visible; }
[role="alert"].obj-sr:not(:empty) { border-left-color: #ff9a91; }
.obj-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .4rem; }
.obj-head__title { min-width: 0; }
.obj-kicker { color: #d9ac6c; font-size: .54rem; letter-spacing: .18em; text-transform: uppercase; }
.obj-title { font-size: .94rem; line-height: 1.15; letter-spacing: .03em; }
.obj-count { flex: none; display: inline-grid; place-items: center; min-width: 2.4rem; min-height: 2rem; padding: 0 .4rem; border: 1px solid rgba(153,178,174,.35); border-radius: 999px; color: #f0dbab; font-size: .72rem; font-variant-numeric: tabular-nums; }
.obj-head__actions { display: flex; align-items: center; gap: .3rem; }
.obj-expand { min-height: 2.75rem; padding: .25rem .55rem; border: 1px solid rgba(217,172,108,.45); border-radius: 3px; background: transparent; color: #f0dbab; font-size: .66rem; cursor: pointer; white-space: nowrap; }
.obj-expand:hover, .obj-expand:focus-visible { background: rgba(217,172,108,.12); }
.obj-next { display: grid; gap: .3rem; padding: .4rem .45rem; border: 1px solid rgba(153,178,174,.18); border-left: 2px solid #d9ac6c; border-radius: 3px; background: rgba(4,17,23,.42); }
.obj-next__head { display: flex; align-items: center; justify-content: space-between; gap: .3rem; }
.obj-next__title { font-size: .84rem; color: #f0eee5; }
.obj-next__actions { display: flex; flex-wrap: wrap; gap: .3rem; }
.obj-state-pill { display: inline-flex; align-items: center; min-height: 1.35rem; padding: 0 .4rem; border: 1px solid currentColor; border-radius: 999px; font-size: .54rem; letter-spacing: .04em; color: #efca77; }
.obj-state-pill--completed { color: #9ac998; }
.obj-state-pill--locked { color: #b8c4c9; }
.obj-branch { color: #d9ac6c; font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; }
.obj-hint { color: #a9bbb6; font-size: .66rem; line-height: 1.4; }
.obj-progress { display: grid; gap: .18rem; }
.obj-progress__native { width: 100%; height: .5rem; accent-color: #d9ac6c; }
.obj-progress__text { color: #d9cbaa; font-size: .62rem; font-variant-numeric: tabular-nums; }
.obj-rewards { display: flex; flex-wrap: wrap; gap: .25rem; }
.obj-reward { display: inline-flex; align-items: center; gap: .25rem; min-height: 1.4rem; padding: 0 .4rem; border: 1px solid rgba(217,172,108,.4); border-radius: 999px; background: rgba(217,172,108,.08); color: #dfe7e0; font-size: .58rem; }
.obj-reward strong { color: #f0dbab; font-variant-numeric: tabular-nums; }
.obj-action { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .3rem .65rem; border: 1px solid rgba(217,172,108,.45); border-radius: 3px; background: rgba(217,172,108,.1); color: #f0dbab; font-size: .68rem; text-decoration: none; cursor: pointer; }
.game-shell .obj-card a.obj-action, .game-shell .obj-card a.obj-link { color: #f0dbab; }
.obj-action--claim { border-color: #d9ac6c; background: #d9ac6c; color: #191306; font-weight: 700; }
.obj-action:disabled { opacity: .55; cursor: not-allowed; }
.obj-body { display: none; min-height: 0; }
.obj-card.obj-expanded .obj-body { display: block; overflow-y: auto; max-height: min(40vh, 24rem); scrollbar-width: thin; padding-right: .1rem; }
.obj-list { list-style: none; display: grid; gap: .3rem; padding: .1rem 0 0; margin: 0; }
.obj-item { display: grid; gap: .22rem; padding: .4rem .45rem; border: 1px solid rgba(153,178,174,.16); border-left: 2px solid rgba(153,178,174,.3); border-radius: 3px; background: rgba(4,17,23,.36); }
.obj-item--active { border-left-color: #efca77; }
.obj-item--completed { border-left-color: #9ac998; }
.obj-item--locked { opacity: .78; border-left-color: #5a6b70; }
.obj-item__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem; }
.obj-item__order { display: inline-grid; place-items: center; min-width: 1.2rem; height: 1.2rem; border-radius: 50%; background: rgba(217,172,108,.16); color: #d9ac6c; font-size: .58rem; }
.obj-item__title { flex: 1 1 auto; min-width: 0; font-size: .74rem; font-weight: 700; }
.obj-item__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.obj-link { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .2rem .4rem; color: #d9ac6c; font-size: .66rem; }
.obj-state { color: #a9bbb6; font-size: .72rem; line-height: 1.45; }
/* Daily/weekly period tabs inside the existing card (2026-11-09). Additive only: same palette
   (#d9ac6c amber, #9ac998 green, #b8c4c9 muted), same dark teal card. No new page, no redesign. */
.obj-tabs { display: flex; flex-wrap: nowrap; gap: .25rem; }
.obj-tab { flex: 1 1 0; min-width: 0; min-height: 2.75rem; padding: .25rem .3rem; border: 1px solid rgba(153,178,174,.35); border-radius: 3px; background: rgba(4,17,23,.42); color: #b8c4c9; font-size: .6rem; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.obj-tab:hover { background: rgba(217,172,108,.12); color: #f0dbab; }
.obj-tab[aria-selected="true"] { border-color: #d9ac6c; background: rgba(217,172,108,.14); color: #f0dbab; }
.obj-card [hidden] { display: none !important; }
.obj-onboarding-panel { display: grid; gap: .4rem; min-height: 0; }
.obj-panel { display: grid; gap: .3rem; min-height: 0; max-height: min(40vh, 22rem); overflow-y: auto; scrollbar-width: thin; padding-right: .1rem; }
.obj-period__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem; }
.obj-period__summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem; color: #d9cbaa; font-size: .62rem; font-variant-numeric: tabular-nums; }
.obj-period__reset { color: #a9bbb6; font-size: .6rem; font-variant-numeric: tabular-nums; }
.obj-period__key { color: #b8c4c9; font-size: .56rem; letter-spacing: .06em; }
.obj-item--bonus { border-left-color: #d9ac6c; background: rgba(217,172,108,.06); }
.obj-history { border-top: 1px solid rgba(153,178,174,.18); padding-top: .3rem; }
.obj-history__summary { display: flex; align-items: center; min-height: 2.75rem; color: #d9ac6c; font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.obj-history[open] .obj-body { display: block; max-height: min(26vh, 13rem); overflow-y: auto; scrollbar-width: thin; padding-right: .1rem; }
.obj-history .obj-list { padding-top: .2rem; }
.obj-history__key { font-variant-numeric: tabular-nums; }
.obj-item__title, .obj-hint, .obj-state, .obj-progress__text, .obj-period__summary, .obj-period__key, .obj-history__key { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .objectives-host { left: .5rem; right: .5rem; bottom: calc(64px + 44px + .5rem); width: auto; }
  .obj-card { max-height: min(58vh, 30rem); }
  .obj-panel { max-height: min(42vh, 20rem); }
}
@media (max-width: 390px) {
  .objective-host, .objectives-host { bottom: calc(64px + 44px + .35rem); }
  .obj-title { font-size: .86rem; }
  .obj-expand { font-size: .62rem; padding: .2rem .4rem; }
  .obj-next__title { font-size: .78rem; }
  .obj-tab { font-size: .54rem; letter-spacing: .03em; padding: .2rem .25rem; }
  .obj-panel { max-height: min(43vh, 18rem); }
}
@media (prefers-reduced-motion: reduce) {
  .obj-card, .obj-card * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .obj-card, .obj-next, .obj-item, .obj-expand, .obj-action, .obj-count, .obj-reward { border: 1px solid CanvasText; }
  .obj-action--claim { background: Canvas; color: CanvasText; }
  .obj-progress__native { forced-color-adjust: none; }
  .obj-tab, .obj-history__summary { border: 1px solid CanvasText; }
  .obj-tab[aria-selected="true"] { background: Highlight; color: HighlightText; }
}

.obj-mobile-close { display: none; }
@media (max-width: 768px) {
  .game-shell #settlement-view[data-mobile-section="objectives"] .rts-app,
  .game-shell #settlement-view[data-mobile-section="progress"] .rts-app {
    grid-template-rows: auto minmax(0, 1fr) 0;
  }
  #settlement-view[data-mobile-section="objectives"] .rts-main { overflow: hidden; }
  #settlement-view[data-mobile-section="objectives"] .objectives-host { height: 100%; margin: 0; padding: .4rem; }
  #settlement-view[data-mobile-section="objectives"] .obj-card {
    height: 100%; min-height: 0; max-height: none; grid-template-rows: auto auto minmax(0, 1fr);
    gap: .35rem; background: var(--rf-paper); color: var(--rf-ink); border-color: var(--rf-line);
    border-radius: .6rem; box-shadow: none;
  }
  #settlement-view[data-mobile-section="objectives"] .obj-expand { display: none; }
  #settlement-view[data-mobile-section="objectives"] .obj-mobile-close {
    display: grid; place-items: center; width: 44px; min-height: 44px; flex: none;
    border: 1px solid var(--rf-line); border-radius: .4rem;
    background: var(--rf-sage); color: var(--rf-ink); font-size: 1.4rem; cursor: pointer;
  }
  #settlement-view[data-mobile-section="objectives"] :is(.obj-panel,.obj-onboarding-panel) { max-height: none; overflow: auto; overscroll-behavior: contain; }
  .game-shell .objectives-host :is(.obj-item,.obj-next,.obj-tab,.obj-count,.obj-reward) {
    background: var(--rf-sage); color: var(--rf-ink); border-color: var(--rf-line);
  }
  .game-shell .objectives-host :is(.obj-hint,.obj-state,.obj-progress__text,.obj-period__summary,.obj-period__reset,.obj-period__key) { color: var(--rf-muted); }
  .game-shell .objectives-host :is(.obj-kicker,.obj-item__order,.obj-state-pill,.obj-category,.obj-history__summary,.obj-link) { color: var(--rf-link); }
  .game-shell .objectives-host :is(.obj-next__title,.obj-item__title,.obj-reward strong) { color: var(--rf-ink); }
  .game-shell .objectives-host .obj-tab[aria-selected="true"] { background: var(--rf-teal); color: white; }
}
