/* Travel, weather, factions, downtime, hirelings and generators (travel.js); moon icons (extras.js,
   timekeeper.js). */

.moon-ico { display: inline-block; flex: none; vertical-align: -2px; }
.clock-ico .moon-ico { vertical-align: -1px; filter: drop-shadow(0 0 3px rgba(190, 205, 255, .35)); }

/* calendar: moons, seasons */
.tk-moons { position: absolute; right: 4px; bottom: 4px; display: inline-flex; gap: 2px; }
.tk-cell.today .tk-moons { bottom: 4px; }
.tk-season { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.tk-season .tag { font-size: 7px; padding: 1px 4px; }
.tk-daymoons { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.tk-daymoon { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-2); }
.tk-daymoon b { font-weight: 600; color: #eee7d9; }
.tk-daymoon span { color: var(--dim); }
.tk-setup > .tk-setcols + .tk-setcols { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.tk-seasonrow input.grow { flex: 1 1 80px; min-width: 70px; }
.tk-seasonrow input.num.tiny { width: 46px; flex: none; }
.tk-seasonrow .tk-smonth, .tk-seasonrow .tk-sclimate { flex: 0 1 96px; min-width: 70px; }
.tk-moonrow input.grow { flex: 1 1 70px; min-width: 60px; }
.tk-moonrow input.num.tiny { width: 50px; flex: none; }
.tk-moonrow .tk-mcolor { width: 28px; height: 24px; padding: 1px; flex: none; }
.tk-mnow { font: 9px var(--mono); color: var(--dim); white-space: nowrap; }

/* travel window */
.tv-body .kicker { font: 700 8px var(--mono); letter-spacing: .26em; text-transform: uppercase; color: var(--dim); }
.tv-body .form section { gap: 9px; }
.tv-sech { display: flex; align-items: center; gap: 8px; }
.tv-now { font: 10px var(--mono); color: var(--accent); }
.tv-distrow { display: flex; gap: 6px; align-items: center; }
.tv-distrow input { flex: 1; min-width: 0; }
.tv-distrow button { white-space: nowrap; text-transform: none; letter-spacing: 0; }
.tv-paces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tv-pace { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 11px; text-align: left; }
.tv-pace b { font: 400 16px var(--serif); letter-spacing: .06em; color: #eee7d9; }
.tv-pace span { font: 10px var(--mono); color: var(--ink-2); }
.tv-pace small { font: 10.5px var(--sans); color: var(--dim); }
.tv-pace.on { border-color: var(--accent); background: linear-gradient(160deg, rgba(220, 179, 92, .16), rgba(14, 19, 29, .97)); box-shadow: inset 0 2px var(--accent); }
.tv-pace.on b { color: var(--accent); }
.tv-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; align-items: end; }
.tv-checks { align-items: end; }
.tv-grid3 input.num, .tv-grid3 select { width: 100%; }
.tv-checks > label.inline, .tv-lbl { align-self: center; padding-top: 14px; }
.tv-lbl { font-size: 12px; color: var(--ink-2); }
.tv-inl { display: inline-flex; margin-left: 4px; font-size: 11.5px; }
.tv-warn { margin: 0; padding: 8px 10px; font-size: 11.5px; color: #f2c9a0; border: 1px solid #5c3e22; border-left: 3px solid #e09040; border-radius: 3px; background: rgba(224, 144, 64, .07); }
.tv-party { display: flex; flex-wrap: wrap; gap: 5px; }
.tv-member { flex-direction: row; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border: 1px solid var(--rule-2); border-radius: 20px; font: 12px var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; background: rgba(14, 19, 29, .8); }
.tv-member input { margin: 0 0 0 3px; }
.tv-member img, .tv-member .tv-dot { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; background: var(--rule-2); }
.tv-member.off { opacity: .45; }
.tv-summary { position: sticky; bottom: -14px; z-index: 2; box-shadow: 0 -10px 24px rgba(5, 7, 11, .85); display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; border: 1px solid var(--accent-dim); border-radius: 4px; background: linear-gradient(160deg, rgb(34, 30, 22), rgb(11, 13, 19)); }
.tv-sumline b { font: 400 24px var(--serif); color: var(--accent); letter-spacing: .03em; }
.tv-sumline span { color: var(--ink-2); }
.tv-go { min-width: 150px; }

/* route measuring overlay */
.tv-measure { position: absolute; inset: 0; z-index: 60; cursor: crosshair; }
.tv-measure-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tv-measure-svg polyline { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 10 6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(0, 0, 0, .9)); }
.tv-measure-label { position: absolute; left: 0; top: 0; padding: 4px 9px; font: 700 12px var(--mono); color: #10131b; background: var(--accent); border-radius: 3px; pointer-events: none; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.tv-measure-help { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); padding: 7px 14px; font: 12px var(--sans); color: var(--ink); background: rgba(8, 11, 19, .92); border: 1px solid var(--accent-dim); border-radius: 4px; pointer-events: none; }

/* weather tab */
.tv-wxnow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--rule-2); border-radius: 4px; background: rgba(5, 8, 13, .45); }
.tv-wxnow b { font: 400 19px var(--serif); color: #eee7d9; letter-spacing: .04em; }
.tv-wxico { width: 38px; height: 38px; display: grid; place-items: center; font-size: 22px; border: 1px solid var(--rule-2); border-radius: 50%; background: rgba(20, 27, 40, .8); flex: none; }
.tv-wxico.sm { width: 22px; height: 22px; font-size: 12px; }
.tv-wxres { margin: 0; padding: 7px 10px; font-size: 12px; color: #d9cfae; border-left: 2px solid var(--accent); background: rgba(220, 179, 92, .07); }
.tv-wxtable { display: flex; flex-direction: column; }
.tv-wxrow { display: flex; align-items: center; gap: 9px; padding: 4px 2px; font-size: 12px; color: var(--ink-2); border-bottom: 1px solid rgba(37, 48, 74, .5); }
.tv-pct { font: 10px var(--mono); color: var(--dim); }

/* factions */
.tv-flist { display: flex; flex-direction: column; gap: 6px; }
.tv-faction { --c: var(--accent); border: 1px solid var(--rule); border-radius: 4px; background: linear-gradient(150deg, rgba(25, 32, 46, .75), rgba(8, 11, 18, .85)); padding: 0 0 9px; overflow: hidden; box-shadow: inset 3px 0 var(--c); }
.tv-faction.hidden { border-style: dashed; }
.tv-faction.open { border-color: var(--rule-2); }
.tv-fhead { display: flex; align-items: center; gap: 6px; padding-right: 8px; }
.tv-fpick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 8px 6px 6px 11px; text-align: left; background: transparent; border: 0; border-radius: 0; color: var(--ink); box-shadow: none !important; }
.tv-fpick:hover:not(:disabled) { background: rgba(255, 255, 255, .025); }
.tv-fimg { width: 30px; height: 30px; border-radius: 3px; object-fit: cover; flex: none; border: 1px solid color-mix(in srgb, var(--c) 60%, #000); }
.tv-fimg.blank { display: grid; place-items: center; font: 400 15px var(--serif); color: var(--c); background: color-mix(in srgb, var(--c) 14%, #0a0e16); }
.tv-fname { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font: 400 15px var(--serif); letter-spacing: .03em; color: #eee7d9; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tv-fname .tag { font-size: 7px; padding: 1px 4px; }
.tv-ftier { font: 700 8.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--c); white-space: nowrap; }
.tv-fbtns { display: inline-flex; gap: 3px; }
.tv-bar { --c: var(--accent); position: relative; height: 8px; margin: 0 12px 0 13px; border-radius: 4px; background: rgba(5, 8, 13, .8); border: 1px solid var(--rule); }
.tv-bar-fill { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, #000), var(--c)); }
.tv-bar-fill.neg { background: linear-gradient(90deg, var(--blood), color-mix(in srgb, var(--blood) 40%, #000)); }
.tv-tick { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--rule-2); transform: translateX(-.5px); }
.tv-tick.past { background: color-mix(in srgb, var(--c) 70%, #fff); opacity: .7; }
.tv-mark { position: absolute; top: 50%; width: 10px; height: 10px; transform: translate(-50%, -50%) rotate(45deg); background: #f1eadb; border: 1px solid var(--c); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 60%, transparent); }
.tv-fbody { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 0 13px; }
.tv-fbody .md { font: 13px/1.55 var(--serif); color: #e4dcc8; }
.tv-fchars { display: flex; flex-direction: column; gap: 3px; }
.tv-fchar { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.pt-av.sm { width: 20px; height: 20px; font-size: 10px; }
.tv-fed .tv-fedtop { align-items: flex-start; gap: 12px; }
.tv-fedimg { width: 84px; height: 84px; flex: none; background-size: cover; background-position: center; font: 700 8px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.tv-fed .col { gap: 8px; }
.tv-reps, .tv-tiers { display: flex; flex-direction: column; gap: 4px; }
.tv-reprow, .tv-tierrow { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.tv-reprow .tv-ftier { min-width: 80px; text-align: right; color: var(--accent); }
.tv-reprow input.num, .tv-tierrow input.num { width: 64px; }

/* downtime */
.tv-plist { display: flex; flex-direction: column; gap: 6px; }
.tv-proj { border: 1px solid var(--rule); border-radius: 4px; padding: 8px 10px; background: linear-gradient(150deg, rgba(25, 32, 46, .7), rgba(8, 11, 18, .85)); display: flex; flex-direction: column; gap: 6px; }
.tv-proj.done { opacity: .75; }
.tv-phead { display: flex; align-items: center; gap: 9px; }
.tv-pkind { width: 26px; height: 26px; flex: none; display: grid; place-items: center; font-size: 13px; color: var(--accent); border: 1px solid var(--accent-dim); border-radius: 3px; background: rgba(220, 179, 92, .06); }
.tv-ptitle { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tv-ptitle b { font: 400 14.5px var(--serif); color: #eee7d9; letter-spacing: .02em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tv-pchar { font: 9px var(--mono); letter-spacing: .06em; color: var(--dim); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tv-pprog { font: 10px var(--mono); color: var(--ink-2); white-space: nowrap; }
.tv-pbar { height: 5px; border-radius: 3px; background: rgba(5, 8, 13, .8); overflow: hidden; }
.tv-pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); transition: width .3s var(--ease); }
.tv-proj.done .tv-pbar i { background: var(--ok); }
.tv-pctl { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tv-pctl button.small { padding: 4px 9px; }
.tv-pform { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--accent-dim); border-radius: 4px; background: rgba(220, 179, 92, .04); }
.tv-pform .tv-grid3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px; }
.tv-goal { display: flex; gap: 4px; }
.tv-goal input { width: 52px; flex: none; }
.tv-goal select { flex: 1; min-width: 0; }
.tv-dtclock { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-2); padding-top: 6px; border-top: 1px solid rgba(37, 48, 74, .6); }

/* hirelings */
.tv-hlist { display: flex; flex-direction: column; gap: 5px; }
.tv-hire { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--rule); border-radius: 4px; background: rgba(10, 15, 24, .6); }
.tv-hname { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tv-hname b { font: 400 14.5px var(--serif); color: #eee7d9; }
.tv-hwage { flex-direction: row; align-items: center; gap: 4px; }
.tv-hwage input { width: 58px; }
.tv-loyal { display: inline-flex; align-items: center; gap: 4px; }
.tv-loyal b { min-width: 22px; text-align: center; font: 600 14px var(--serif); color: var(--accent); }

/* generators */
.tv-gens { display: flex; flex-direction: column; gap: 5px; }
.tv-gen { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto auto auto; align-items: center; gap: 7px; }
.tv-genname { font: 400 14px var(--serif); color: #eee7d9; }
.tv-gen label.inline { font-size: 11px; white-space: nowrap; }
.tv-results { display: flex; flex-direction: column; gap: 3px; }
.tv-result { display: flex; gap: 10px; align-items: baseline; padding: 5px 8px; font-size: 12.5px; color: var(--ink); border-left: 2px solid var(--accent); background: rgba(220, 179, 92, .05); }
.tv-rlabel { flex: none; width: 88px; font: 700 8px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.tv-coinrow { align-items: flex-end; flex-wrap: wrap; gap: 8px; }
.tv-coinrow label:not(.inline) select { width: 80px; }
.tv-coinres { align-items: center; padding: 8px 10px; border: 1px solid var(--accent-dim); border-radius: 4px; background: rgba(220, 179, 92, .06); }
.tv-coinres b { font: 400 16px var(--serif); color: var(--accent); }

@media (max-width: 640px) {
  .tv-paces, .tv-grid3, .tv-pform .tv-grid3 { grid-template-columns: minmax(0, 1fr); }
  .tv-gen { grid-template-columns: minmax(0, 1fr) auto auto; }
  .tv-gen .tv-gentable { grid-column: 1 / -1; }
}
