/* Thousandvale play-test 1 (stream D-UI): the world map, the minimap, the quest tracker, the Journal, the Party menu.
   Colours come from client.css :root. */

/* ---- level tones (map, journal, cards) ---- */
.tone-easy { color: #a49e92 !important; } .tone-fair { color: #8fd08a !important; } .tone-hard { color: #f0a54a !important; } .tone-deadly { color: #ff6a55 !important; }
.tipbox .tip-act { color: var(--gold-hi, #f1d595); font-style: italic; }

/* ---- HUD layout: the minimap owns the top-right corner; the pills move to its left ---- */
.conn { right: 212px; }
.tv-clock { right: 212px; }
.tv-event { right: 212px; }

.minimap { position: absolute; top: 12px; right: 14px; width: 184px; height: 184px; pointer-events: auto; }
.minimap .mm-canvas { width: 184px; height: 184px; border-radius: 50%; display: block; cursor: pointer; box-shadow: 0 4px 18px rgba(0,0,0,.55); }
.minimap .mm-ring { position: absolute; inset: -3px; border-radius: 50%; border: 3px solid #6d5326; box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.6); pointer-events: none;
  background: radial-gradient(circle, transparent 66%, rgba(0,0,0,.18) 100%); }
.minimap .mm-btns { position: absolute; left: -10px; bottom: -4px; display: flex; flex-direction: column; gap: 3px; }
.minimap .mm-btns button { width: 24px; height: 24px; padding: 0; border-radius: 50%; font-size: 14px; line-height: 1; background: var(--panel-solid); border: 1px solid var(--edge); color: var(--ink); cursor: pointer; }
.minimap .mm-btns button:hover, .minimap .mm-btns button.on { border-color: var(--edge-strong); color: var(--gold-hi); }
.minimap .mm-zone { position: absolute; top: 190px; right: 0; width: 220px; text-align: right; font-size: 12.5px; color: var(--ink); text-shadow: 0 1px 2px #000, 0 0 6px #000; font-family: var(--serif); letter-spacing: .03em; }
.minimap .mm-zone b { font-family: var(--sans); font-size: 11.5px; margin-left: 4px; }
.minimap .mm-card { position: absolute; width: max-content; max-width: 220px; z-index: 5; }

/* ---- HUD quest tracker (under the minimap) ---- */
.tv-tracker { position: absolute; top: 216px; right: 14px; width: 270px; display: flex; flex-direction: column; gap: 4px; pointer-events: auto; font-size: 13px; }
.tv-tracker .tr-main { background: rgba(18, 15, 12, 0.7); border: 1px solid var(--edge); border-left: 3px solid #f2b81e; border-radius: 8px; padding: 7px 10px 8px; cursor: pointer; }
.tv-tracker .tr-main.ready { border-left-color: var(--good); }
.tv-tracker .tr-main b { display: block; font-family: var(--serif); color: var(--gold-hi); font-size: 13.5px; letter-spacing: .02em; }
.tv-tracker .tr-goal { margin: 2px 0 0; color: var(--ink); line-height: 1.3; }
.tv-tracker .tr-main.ready .tr-goal { color: var(--good); }
.tv-tracker .tr-where { margin: 3px 0 0; color: var(--ink-dim); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.tv-tracker .tr-arrow { display: inline-block; font-style: normal; color: #f2b81e; font-size: 12px; transition: transform .3s; }
.tv-tracker .tr-row { background: rgba(18, 15, 12, 0.5); border-left: 2px solid var(--edge); border-radius: 0 6px 6px 0; padding: 3px 8px; cursor: pointer; }
.tv-tracker .tr-row b { display: block; font-weight: 600; color: var(--ink); font-size: 12.5px; }
.tv-tracker .tr-row small { color: var(--ink-dim); }
.tv-tracker .tr-row.ready small { color: var(--good); }

/* ---- the world map ---- */
#panel-map { position: fixed; inset: 3vh 3vw; width: auto !important; max-width: none; display: flex; flex-direction: column; z-index: 60; }
#panel-map[hidden] { display: none !important; }
#panel-map .tvp-body { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 8px 10px 10px; gap: 8px; max-height: none; overflow: hidden; }
.map-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.map-presets { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.map-presets .chip { padding: 4px 12px; }
.map-layers { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-dim); }
.map-toggle { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.map-toggle input { accent-color: #d9b26a; }
.map-main { flex: 1; display: flex; gap: 10px; min-height: 0; }
.map-stage { position: relative; flex: 1; min-width: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--edge); background: #3c5560; }
.map-canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.map-card { position: absolute; z-index: 4; width: max-content; max-width: 300px; pointer-events: none; }
.map-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; }
.map-zoom button { width: 32px; height: 32px; padding: 0; font-size: 18px; background: var(--panel-solid); border: 1px solid var(--edge); border-radius: 6px; }
.map-legend { position: absolute; left: 10px; top: 10px; background: rgba(18,15,12,.88); border: 1px solid var(--edge); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; max-height: calc(100% - 20px); overflow: auto; }
.map-legend .lg-row { display: flex; align-items: center; gap: 6px; }
.map-side { width: 280px; flex: none; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; padding-right: 2px; }
.map-side section { background: rgba(255,255,255,.03); border: 1px solid rgba(217,178,106,.18); border-radius: 8px; padding: 8px 10px; }
.map-side h4 { margin: 0 0 4px; font-family: var(--serif); color: var(--gold); font-size: 13.5px; letter-spacing: .04em; }
.map-side p { margin: 2px 0; }
.map-side .tiny { font-size: 12px; color: var(--ink-dim); }
.map-side .row { display: flex; gap: 6px; margin-top: 4px; }
.map-ws { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.map-ws li { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; }
.map-ws small { color: var(--ink-dim); white-space: nowrap; }
.map-ev + .map-ev { margin-top: 6px; }
@media (max-width: 760px) {
  #panel-map { inset: 6px; }
  .map-main { flex-direction: column; }
  .map-side { width: auto; max-height: 34vh; }
  .map-layers { display: none; }
}

/* ---- the Journal ---- */
.journal-panel .tvp-body { max-height: min(76vh, 640px); }
.j-tabs { margin-bottom: 8px; }
.j-split { display: grid; grid-template-columns: 220px 1fr; gap: 12px; min-height: 300px; }
.j-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; max-height: 60vh; overflow-y: auto; }
.j-row { display: grid; grid-template-columns: 18px 1fr auto; gap: 6px; align-items: start; padding: 6px 7px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; }
.j-row:hover, .j-row:focus { background: rgba(255,255,255,.04); outline: none; }
.j-row.on { background: rgba(217,178,106,.12); border-color: var(--edge); }
.j-row b { display: block; font-weight: 600; font-size: 13.5px; }
.j-row small { display: block; color: var(--ink-dim); font-size: 12px; line-height: 1.25; }
.j-row.ready small { color: var(--good); }
.j-mark { color: #f2b81e; font-weight: 800; text-align: center; }
.j-lvl { font-size: 12px; font-weight: 700; }
.j-detail h3 { margin: 0; font-family: var(--serif); color: var(--gold-hi); font-size: 18px; }
.j-meta { margin: 2px 0 8px; font-size: 13px; color: var(--ink-dim); }
.j-goal { background: rgba(242,184,30,.08); border: 1px solid rgba(242,184,30,.3); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.j-goal p { margin: 2px 0; }
.j-goal .row { display: flex; gap: 6px; margin-top: 6px; }
.j-where { color: var(--ink-dim); font-size: 13px; }
.j-text { font-style: italic; color: var(--ink-dim); margin: 6px 0; }
.j-steps { margin: 4px 0 8px; padding-left: 0; list-style: none; }
.j-steps li { display: flex; gap: 6px; padding: 2px 0; }
.j-steps li.done { color: var(--ink-faint); text-decoration: line-through; }
.j-steps li.now { color: var(--ink); font-weight: 600; }
.j-steps li.later { color: var(--ink-faint); }
.j-tick { width: 14px; text-align: center; color: #f2b81e; }
.j-reward p { margin: 2px 0 8px; color: var(--gold-hi); }
.j-group { color: var(--warn); font-size: 13px; }
.j-foot { display: flex; margin-top: 8px; }
.j-done { list-style: none; padding: 0; margin: 0; columns: 2; color: var(--ink-dim); }
.j-empty p { margin: 6px 0; }
.journal-panel .label, .j-detail .label { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-top: 4px; }
@media (max-width: 760px) { .j-split { grid-template-columns: 1fr; } .j-list { max-height: 26vh; } }

/* ---- the Party menu (tabs; docked windows lose their own frame) ---- */
.hub-panel .tvp-body { padding-top: 6px; }
.hub-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--edge); margin: 0 -2px 8px; flex-wrap: wrap; }
.hub-tab { position: relative; padding: 6px 10px 7px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--ink-dim); cursor: pointer; font-size: 13.5px; }
.hub-tab[aria-selected="true"] { color: var(--gold-hi); border-bottom-color: var(--gold); }
.hub-tab b { position: relative; top: -6px; margin-left: 3px; font-size: 10.5px; color: #111; background: var(--gold); border-radius: 8px; padding: 0 5px; }
.hub-tab b:empty { display: none; }
.hub-tab.alert { color: var(--warn); }
.hub-body > .tv-panel.docked { position: static !important; width: auto !important; box-shadow: none; border: 0; background: transparent; padding: 0; z-index: auto !important; }
.hub-body > .tv-panel.docked > .tvp-head { display: none; }
.hub-body > .tv-panel.docked > .tvp-body { padding: 0; max-height: min(62vh, 560px); }
.hub-body > .party-menu.docked { position: static !important; transform: none !important; width: auto !important; box-shadow: none; border: 0; background: transparent; padding: 0; }
.hub-body > .party-menu.docked #party-close { display: none; }
.hub-members .hub-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hub-members li { display: flex; align-items: center; gap: 6px; padding: 4px 6px; background: rgba(255,255,255,.03); border-radius: 6px; }
.hub-members li.offline { opacity: .55; }
.hub-name { flex: 1; }
.hub-name small { color: var(--ink-dim); }
.hub-members .tiny { color: var(--ink-dim); font-size: 12.5px; margin: 0 0 8px; }
#party-btn.alert::after { content: ''; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 6px var(--warn); }

@media (max-width: 760px) {
  /* phone: the window buttons are a row at the top (social.css); the minimap sits under them on the right */
  .minimap { top: 112px; right: 10px; }
  .minimap, .minimap .mm-canvas { width: 112px; height: 112px; }
  .minimap .mm-btns { left: -30px; bottom: 0; }
  .minimap .mm-btns button { width: 22px; height: 22px; font-size: 12px; }
  .minimap .mm-zone { top: 116px; width: 170px; font-size: 11px; }
  .conn { right: 8px; } .tv-clock { right: 8px; } .tv-event { right: 8px; left: 8px; }
  .tv-tracker { top: 252px; width: 190px; right: 8px; font-size: 12px; }
  .tv-tracker .tr-row { display: none; }
}
