/* Kartensterne (ui/mapstars.js): the window #mstar (goals of a map left, all maps right; panels .fp of imperial.css), the
   badge .kst-badge on the minimap and the button .kst-at in the head of the big map (#atlas). Phones: a finger per row that
   does something, the window as high as the screen. */
#ui #mstar { width: 300px; }
#mstar .win-body { padding: 4px 5px 5px; }
#mstar .kst-tic { flex: none; width: 10px; height: 10px; margin-right: 3px; image-rendering: auto; }
#mstar .kst-main { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 4px; height: 236px; }
#mstar .kst-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 0; }
#mstar .kst-left > .fp + .kst-goals { margin-top: 0; }
#mstar .kst-head .fp-h > img { width: 11px; height: 11px; }
#mstar .kst-sum { display: flex; align-items: center; gap: 4px; min-height: 12px; }
#mstar .kst-stars { display: flex; flex-wrap: wrap; gap: 1px; min-width: 0; }
#mstar .kst-stars img { width: 10px; height: 10px; image-rendering: auto; }
#mstar .kst-count { flex: none; margin-left: auto; font-size: 9px; line-height: 10px; color: var(--gold); text-shadow: var(--ol); }
/* the bonus of the map: two tiles side by side, the value big (green once a star is there), a bar to the bonus with all
   stars and that bonus under it (ui/mapstars.js bonusTile) */
#ui #mstar .kst-bonus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; margin-top: 3px; }
#ui #mstar .kst-bnote { grid-column: 1 / -1; font-size: 7px; line-height: 8px; color: var(--dim); overflow-wrap: anywhere; }
#ui #mstar .kst-bt { min-width: 0; padding: 2px 3px 2px; background: linear-gradient(#26211b, #15120e); box-shadow: inset 0 0 0 1px #47423a; }
#ui #mstar .kst-bt.on { box-shadow: inset 0 0 0 1px #6f8f4a; }
#ui #mstar .kst-bt-h { display: flex; align-items: baseline; justify-content: space-between; gap: 3px; height: 10px; }
#ui #mstar .kst-bt-n { min-width: 0; font-size: 7px; line-height: 10px; color: #d6c39a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ui #mstar .kst-bt-v { flex: none; font-size: 9px; line-height: 10px; color: var(--dim); text-shadow: var(--ol); }
#ui #mstar .kst-bt.on .kst-bt-v { color: var(--green); }
#ui #mstar .kst-bt-bar { flex: none; height: 4px; margin: 2px 0 1px; }
#ui #mstar .kst-bt.loot .kst-bt-bar > i { background: linear-gradient(#bfe9ff 0 1px, #6fb7e6 1px, #3a7cb0); }
#ui #mstar .kst-bt-max { font-size: 6px; line-height: 7px; color: var(--dim); white-space: normal; overflow-wrap: anywhere; }
#mstar .kst-goals { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 1px; }
#mstar .kst-goals > .fp + .fp { margin-top: 0; }
#mstar .kst-sec .fp-h > img { width: 10px; height: 10px; }
#mstar .kst-sec .fp-x.gold { color: var(--gold); }
#mstar .kst-row { --fp-row: 15px; font-size: 7px; line-height: 8px; }
#mstar .kst-row .kst-ic { flex: none; width: 10px; height: 10px; object-fit: contain; image-rendering: auto; }
#mstar .kst-row .kst-st { flex: none; width: 9px; height: 9px; image-rendering: auto; }
#mstar .kst-row .kst-sub { flex: none; color: var(--dim); white-space: nowrap; }
#mstar .kst-row.done .fp-e { color: #eee3c8; }
#mstar .kst-row:not(.done) .fp-e { color: #a39780; }
#mstar .kst-row.walk { cursor: pointer; }
#mstar .kst-open { height: auto; min-height: var(--fp-row); padding-top: 2px; padding-bottom: 2px; }
#mstar .kst-open .fp-t { color: #a39780; max-height: none; -webkit-line-clamp: 4; }
#mstar .kst-help { font-size: 6px; line-height: 7px; }
#mstar .kst-right { display: flex; flex-direction: column; min-height: 0; }
#mstar .kst-maps { flex: 1; min-height: 0; overflow-y: auto; }
#ui #mstar .kst-map { --fp-row: 15px; gap: 2px; font-size: 7px; line-height: 8px; cursor: pointer; height: auto; min-height: var(--fp-row); padding-top: 1px; padding-bottom: 1px; }
/* (long names in two lines, never cut off) */
#ui #mstar .kst-map .fp-e { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
#mstar .kst-map .kst-st { flex: none; width: 8px; height: 8px; image-rendering: auto; }
#mstar .kst-map .kst-n { flex: none; min-width: 16px; text-align: right; color: var(--dim); }
#mstar .kst-map.full .kst-n { color: var(--gold); }

/* the badge on the minimap: bottom left over the picture */
#minimap .kst-badge { position: absolute; left: 1px; bottom: 1px; display: flex; align-items: center; gap: 1px; height: 9px; padding: 0 2px 0 1px;
  font-size: 7px; line-height: 9px; color: #e8d6a8; text-shadow: var(--ol); background: rgba(10, 7, 6, .72); box-shadow: inset 0 0 0 1px #5a4a32; cursor: pointer; z-index: 1; }
#minimap .kst-badge img { width: 7px; height: 7px; image-rendering: auto; pointer-events: none; }
#minimap .kst-badge:hover { color: #fff; box-shadow: inset 0 0 0 1px #c6ac72; }
#minimap .kst-badge.full { color: var(--gold); }
#minimap .kst-badge.pop { animation: kst-pop .9s ease-out; }
@keyframes kst-pop { 0% { transform: scale(1); filter: brightness(1); } 25% { transform: scale(1.5); filter: brightness(1.8); } 100% { transform: scale(1); filter: brightness(1); } }

/* the button in the head of the big map */
#ui #atlas .kst-at { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; height: 11px; padding: 0 3px; font: inherit; font-size: 7px; line-height: 9px;
  color: #e8d6a8; background: #1c1814; border: 0; box-shadow: inset 0 0 0 1px #6d5a3a; cursor: pointer; white-space: nowrap; }
#ui #atlas .kst-at img { width: 8px; height: 8px; image-rendering: auto; pointer-events: none; }
#ui #atlas .kst-at:hover { color: #fff; box-shadow: inset 0 0 0 1px #c6ac72; }

/* ---------- phones (ui/touch.js): as high as the screen, a finger per row that does something ---------- */
html.touch #ui #mstar { width: min(380px, calc((100% - 8px) / var(--wz))); }
html.touch #ui #mstar .kst-main { height: calc((100vh / var(--px) - 40px) / var(--wz)); grid-template-columns: minmax(0, 1fr) 120px; }
html.touch #ui #mstar .kst-map, html.touch #ui #mstar .kst-row.walk { --fp-row: var(--finger); }
html.touch #ui #mstar .kst-row { --fp-row: 18px; }
html.touch #ui #mstar .kst-help { font-size: 6px; }
html.touch #minimap .kst-badge { pointer-events: none; }
html.touch #ui #atlas .kst-at { height: var(--finger); min-height: var(--finger); padding: 0 6px; }
