/* Team panel for admins (js/ui/team.js): tabs Spieler / Monster / Items / Welt, each a column of framed boxes */
#team .team-page > :first-child { margin-top: 0; }
#team .team-box { margin-top: 4px; padding: 2px 4px 4px; background: #1d1712; box-shadow: inset 0 0 0 1px var(--bronze-d); }
#team .team-box-t { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; margin-bottom: 2px;
  color: var(--gold); font-size: 7px; line-height: 9px; white-space: nowrap; }
#team .team-box-t .dim { font-size: 6px; }
#team .team-box > input { display: block; width: 100%; }
#team .team-box > :last-child { margin-bottom: 0; }

#team .team-row { margin-top: 3px; }
#team .team-box-t + .team-row { margin-top: 0; }
#team .team-row > input, #team .team-row > .sel { flex: 1; min-width: 0; }
#team .team-row > .btn { flex: none; min-width: 44px; }
#team .btn.wide { width: 100%; }
#team .btn.team-admin { margin-top: 4px; }

/* selected player / monster / item / world boss */
#team .team-sel { margin: 0 0 3px; padding: 2px 4px; min-height: 22px; font-size: 7px; line-height: 9px;
  background: #0f0c0a; box-shadow: inset 0 0 0 1px #2e241b; }
#team .team-sel.one { min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#team .team-state { color: #ff8a6a; }
#team .team-on { color: var(--green); }

/* buttons: two or three equal columns; dropdown + button half and half */
#team .team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
#team .team-grid.three { grid-template-columns: 1fr 1fr 1fr; }
#team .team-grid > * { min-width: 0; }
#team .team-grid .btn { padding: 0 3px; }
/* a wide button in a grid takes a whole row - same gap as the rows above (Ich: "In „Team online“ zeigen") */
#team .team-grid > .wide { grid-column: 1 / -1; }
#team .team-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-top: 3px; align-items: center; }
#team .team-pair > * { min-width: 0; }
#team .team-box > input + .team-pair { margin-top: 3px; }
#team .team-btns { width: 100%; margin: 3px 0 0; }
html.touch #ui #team.win .team-chat .btn { min-height: var(--finger); height: auto; white-space: normal; }

/* lists (players, monsters, items): a fixed height of exactly 6 rows of 11 px / 5 of 18 px, they scroll - no row
   peeks in half at the bottom. The frame is an outline: rows would paint over an inset shadow */
#team .team-list { height: 66px; overflow-y: auto; margin-top: 3px; padding: 0;
  background: #0f0c0a; outline: 1px solid #2e241b; outline-offset: -1px; }
#team .team-list.items { height: 90px; }
#team .team-li { display: flex; align-items: center; gap: 3px; height: 11px; padding: 0 4px; font-size: 7px; white-space: nowrap; }
#team .team-list.items .team-li { height: 18px; }
#team .team-li:hover { background: rgba(255, 220, 160, .07); color: #fff; }
#team .team-li.picked { background: #2a2018; color: var(--gold); box-shadow: inset 0 0 0 1px var(--bronze); }
#team .team-li .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#team .team-li .lv { flex: none; width: 12px; text-align: right; margin-right: 2px; }
#team .team-li .r { flex: none; margin-left: 2px; }
#team .team-li .emp { flex: none; font-size: 6px; }
#team .team-li .slot { flex: none; }
#team .team-li .btn.small { flex: none; height: 9px; min-width: 0; padding: 0 3px; font-size: 6px; }
#team .team-li .tag { flex: none; height: 7px; line-height: 7px; padding: 0 2px; font-size: 6px; color: #9fe8e0; box-shadow: inset 0 0 0 1px #2f6f6a; }
#team .team-li .tag.boss { color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-d); }
#team .team-li .tag.aggr { color: #ff8a6a; box-shadow: inset 0 0 0 1px #8a3a2a; }
#team .team-empty { padding: 2px 4px; font-size: 7px; line-height: 9px; color: var(--dim); }
/* running events under "Event starten" (no box of their own while none runs) */
#team .team-evs:not(:empty) { margin-top: 3px; }
#team .team-evs .team-li { padding: 0; }

/* count, switches and who gets the item */
#team .team-opts { display: flex; align-items: center; gap: 6px; font-size: 7px; }
#team .team-opts label { display: flex; align-items: center; gap: 3px; white-space: nowrap; }
#team .team-opts .team-for { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }

#team .btn.team-watch { margin-top: 3px; }

/* watching a player (js/ui/spectate.js): a frame at the top centre where the target bar sits (none while watching) */
#spec { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); width: 224px; padding: 3px 5px 4px; }
#spec .spec-name { display: flex; align-items: baseline; gap: 3px; font-size: 8px; line-height: 10px; white-space: nowrap; }
#spec .spec-name .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#spec .spec-tag { flex: none; align-self: center; padding: 0 2px; font-size: 6px; line-height: 7px; color: #ff9a6a;
  background: rgba(10, 7, 6, .62); box-shadow: inset 0 0 0 1px #8a3a2a; }
#spec .spec-name .tidle { flex: none; align-self: center; }
#spec .spec-name .tgs { flex: none; margin-left: auto; font-size: 7px; }
#spec .spec-line { font-size: 7px; line-height: 9px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#spec .spec-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-bottom: 3px; }
#spec .spec-state { display: flex; flex-wrap: wrap; gap: 0 5px; margin-top: 2px; font-size: 7px; line-height: 9px; }
#spec .spec-state .on { color: var(--green); }
#spec .spec-state .bad { color: #ff8a6a; }
#spec .spec-btns { width: 100%; margin-top: 3px; }
/* four in a row: the labels need the whole width (tr "Burada kal", ro "Rămâi aici") */
#spec .spec-btns > .btn { padding: 0 2px; }
/* compact: the top row is full and the team panel lies where the target bar goes - right under the minimap instead of
   the own quest tracker, which does not matter while watching */
#ui.compact #spec { left: auto; right: 4px; top: 128px; transform: none; }
#ui.compact.spectating #quest-tracker { display: none; }
/* the notices of the TipBoard (notice.css) under the frame */
#ui.spectating:not(.compact) #tipboard { top: 84px; }
/* Unsichtbar / Unverwundbar: on is green with a glowing dot and "AN", off grey "AUS" (ui/team.js renderGm) */
#team .btn.gm-tog { display: flex; align-items: center; justify-content: center; gap: 3px; }
#team .btn.gm-tog .gm-dot { width: 4px; height: 4px; flex: none; background: #5a4d3c; box-shadow: inset 0 0 0 1px #2a2018; }
#team .btn.gm-tog .gm-st { font-weight: normal; color: var(--dim); text-transform: uppercase; }
#team .btn.gm-tog.on { color: #d6ffc4; background: linear-gradient(#2e4a22, #1c2f15); box-shadow: inset 0 0 0 1px #79d653, 0 0 5px #79d65399; }
#team .btn.gm-tog.on .gm-dot { background: #8dff5e; box-shadow: 0 0 4px #8dff5e; animation: gm-pulse 1.4s ease-in-out infinite; }
#team .btn.gm-tog.on .gm-st { color: #8dff5e; }
@keyframes gm-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { #team .btn.gm-tog.on .gm-dot { animation: none; } }

/* the inventory of a watched player (js/ui/specview.js): equipment and bag side by side, the pages of the bag and of the
   special inventory in one window */
#ui #spec-inv { width: max-content !important; }
#ui #spec-inv > .win-body { display: flex; gap: 8px; align-items: flex-start; overflow: hidden; }
#ui #spec-inv :is(.si-gear, .si-bag) { flex: none; width: calc(5 * var(--slot)); }
#ui #spec-inv .equip-panel { margin: 5px auto 3px; }
#ui #spec-inv .inv-gs { margin: 0 0 3px; padding: 0 4px; height: 13px; background: linear-gradient(#1c1814, #110e0c); box-shadow: inset 0 0 0 1px #47423a; }
#ui #spec-inv .inv-gs.spec-yang { justify-content: center; color: var(--gold); white-space: nowrap; }
#ui #spec-inv .sp-cats { flex-wrap: wrap; gap: 2px; margin-bottom: 2px; }
#ui #spec-inv .sp-cats .tab { flex: 1 1 28%; min-width: 0; margin: 0; padding: 0 1px; }
#ui #spec-inv .equip-panel .eq-slot.eq-hid img.ic { opacity: .38; filter: grayscale(.6); }
#ui #spec-inv .inv-item { cursor: default; }
#ui #spec-inv .spec-bb { display: grid; grid-template-columns: repeat(5, var(--slot)); grid-auto-rows: var(--slot); gap: 0; width: calc(5 * var(--slot)); max-height: calc(9 * var(--slot)); overflow-y: auto; overflow-x: hidden; background: #120f0c; box-shadow: inset 0 0 0 1px #47423a; }
#ui #spec-inv .spec-bb-cell { position: relative; display: flex; align-items: center; justify-content: center; width: var(--slot); height: var(--slot); box-shadow: inset 0 0 0 1px #2a241d; cursor: default; }
#ui #spec-inv .spec-bb-cell img { max-width: calc(var(--slot) - 2px); max-height: calc(var(--slot) - 2px); object-fit: contain; }
#ui #spec-inv .spec-bb-cell.auto::before { content: ''; position: absolute; left: 2px; top: 2px; width: 3px; height: 3px; border-radius: 50%; background: #64b5f6; }
#ui #spec-inv .spec-bb-empty { grid-column: 1 / -1; padding: 8px 4px; text-align: center; font-size: 7px; }
/* a phone: everything beside each other, so it fits the height of the screen like its own inventory (touch.css); what
   does not fit goes by the finger */
html.touch #ui #spec-inv > .win-body { display: grid; grid-template-columns: 94px 94px auto auto; grid-template-rows: auto auto 1fr; column-gap: 6px; align-items: start; overflow: hidden auto; }
html.touch #ui #spec-inv :is(.si-gear, .si-bag) { display: contents; }
html.touch #ui #spec-inv .eq-tabs { grid-column: 1; grid-row: 1; flex-wrap: nowrap; }
html.touch #ui #spec-inv .eq-tabs .tab { font-size: 6px; }
html.touch #ui #spec-inv .equip-panel { grid-column: 1; grid-row: 2; margin: 2px auto 5px; }
html.touch #ui #spec-inv .inv-gs { grid-column: 1; grid-row: 3; }
html.touch #ui #spec-inv .sp-cats { grid-column: 2; grid-row: 1 / 3; display: grid; grid-template-columns: 1fr 1fr; align-content: start; margin: 0; }
html.touch #ui #spec-inv .sp-cats .tab { width: 100%; margin: 0; }
html.touch #ui #spec-inv .sp-cats .tab[data-c="bb"] { grid-column: 1 / -1; }
html.touch #ui #spec-inv .inv-gs.spec-yang { grid-column: 2; grid-row: 3; }
html.touch #ui #spec-inv .inv-grid { grid-column: 3; grid-row: 1 / 4; }
html.touch #ui #spec-inv .spec-bb { grid-column: 3 / 5; grid-row: 1 / 4; }
html.touch #ui #spec-inv .inv-pages { grid-column: 4; grid-row: 1 / 4; flex-direction: column; flex-wrap: nowrap; gap: 2px; margin: 0; }
html.touch #ui #spec-inv .inv-pages > .tab { margin: 0; }
/* the frame of the watching on a phone: its six buttons in one row, a finger high */
html.touch #spec { width: min(380px, calc(100vw / var(--px) - 8px)); }
html.touch #spec .spec-acts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; margin-top: 3px; }
html.touch #spec .spec-btns { display: contents; }
html.touch #spec .spec-btns > .btn { width: 100%; height: auto; min-height: calc(44px / var(--px)); padding: 0 1px; white-space: normal; line-height: 9px; }
html.touch #ui.compact #spec { width: min(300px, calc(100vw / var(--px) - 8px)); }
/* (the notices under the frame, higher here) */
html.touch #ui.spectating:not(.compact) #tipboard { top: calc(62px + 44px / var(--px)); }

/* ---------- the look of shadcn/ui (Nutzer 17.11.2026: "änder die designs alle panels (auch ingame panel) auf shadcn ... um es
   einheitlich und sauber zu haben"): like the team portal - zinc, flat, quiet 1 px lines, round corners, a sans-serif. Only this
   window (#team.win: stronger than the panel pattern of imperial.css); sizes stay in art px (× --px) like the rest of the UI, a phone keeps
   the finger sizes of touch.css. A sans-serif runs wider than Jersey 10: the window is a little wider on the PC. ---------- */
#ui #team.win {
  --tz-bg: #09090b; --tz-card: #0f0f12; --tz-sec: #18181b; --tz-bd: #27272a; --tz-bd2: #3f3f46; --tz-fg: #fafafa; --tz-mu: #a1a1aa;
  --tz-green: #22c55e; --tz-red: #f87171; --tz-amber: #fbbf24;
  --gold: var(--tz-fg); --gold-d: var(--tz-bd2); --dim: var(--tz-mu); --bronze: var(--tz-bd2); --bronze-d: var(--tz-bd); --text: var(--tz-fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size-adjust: none; letter-spacing: 0;
  padding: 0; color: var(--tz-fg); background: var(--tz-bg); background-image: none; border-radius: 4px; box-shadow: 0 0 0 1px var(--tz-bd), 0 6px 18px #000a;
}
#ui #team.win::after { display: none; }
html:not(.touch) #ui #team.win { width: 204px !important; }
#ui #team.win > .win-body { background: none; }
#ui #team.win > .win-title { height: 16px; margin: 0; padding: 0 16px 0 6px; justify-content: flex-start; background: none; box-shadow: inset 0 -1px 0 var(--tz-bd);
  color: var(--tz-fg); font-size: 7px; font-weight: 600; letter-spacing: 0; text-shadow: none; }
#ui #team.win > .win-title .win-close { top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 3px; background: none; opacity: 1; filter: none; }
#ui #team.win > .win-title .win-close::before { content: ''; position: absolute; inset: 3px; background:
  linear-gradient(45deg, transparent 45%, var(--tz-mu) 45%, var(--tz-mu) 55%, transparent 55%),
  linear-gradient(-45deg, transparent 45%, var(--tz-mu) 45%, var(--tz-mu) 55%, transparent 55%); }
#ui #team.win > .win-title .win-close:hover { background: var(--tz-sec); }
#ui #team.win > .win-body { padding: 5px 6px 6px; }
#ui #team.win * { text-shadow: none; }
#ui #team.win .tabs { gap: 1px; padding: 1px; margin-bottom: 4px; border-radius: 3px; background: var(--tz-sec); }
#ui #team.win .tab { height: 11px; line-height: 11px; border-radius: 2px; color: var(--tz-mu); background: none; box-shadow: none; font-weight: 500; }
#ui #team.win .tab:hover { color: var(--tz-fg); background: none; }
#ui #team.win .tab.on { color: var(--tz-fg); background: var(--tz-bg); box-shadow: 0 0 0 1px var(--tz-bd); }
#ui #team.win .btn { border-radius: 2px; color: var(--tz-fg); background: var(--tz-bg); box-shadow: inset 0 0 0 1px var(--tz-bd); font-weight: 500; }
#ui #team.win .btn:hover { background: var(--tz-sec); color: var(--tz-fg); box-shadow: inset 0 0 0 1px var(--tz-bd2); }
#ui #team.win .btn:active { background: var(--tz-bd); }
#ui #team.win .btn.primary { color: #18181b; background: var(--tz-fg); box-shadow: none; }
#ui #team.win .btn.primary:hover { background: #e4e4e7; }
#ui #team.win .btn.danger { color: var(--tz-red); background: var(--tz-bg); box-shadow: inset 0 0 0 1px #7f1d1d; }
#ui #team.win .btn.danger:hover { background: #2a0e0e; }
#ui #team.win .btn.on { color: var(--tz-fg); background: var(--tz-sec); box-shadow: inset 0 0 0 1px var(--tz-bd2); }
#ui #team.win :is(button, .btn, .sel):focus-visible { outline: 1px solid var(--tz-mu); outline-offset: 1px; }
#ui #team.win :is(input[type=text], input:not([type]), input[type=number], input[type=search], textarea, .sel) {
  border-radius: 2px; color: var(--tz-fg); background: transparent; box-shadow: inset 0 0 0 1px var(--tz-bd); }
#ui #team.win :is(input[type=text], input:not([type]), input[type=number], input[type=search], textarea):focus { box-shadow: inset 0 0 0 1px var(--tz-mu), 0 0 0 1px #52525b66; }
#ui #team.win :is(input, textarea)::placeholder { color: #71717a; }
#ui #team.win .sel::after { border-top-color: var(--tz-mu); }
#ui #team.win .sel:hover, #ui #team.win .sel.open { box-shadow: inset 0 0 0 1px var(--tz-bd2); }
#ui #team.win .sel-list { border-radius: 3px; background: var(--tz-card); box-shadow: 0 0 0 1px var(--tz-bd), 0 4px 12px #000a; }
#ui #team.win .sel-opt { border-radius: 2px; color: var(--tz-fg); }
#ui #team.win .sel-opt:hover { background: var(--tz-sec); color: var(--tz-fg); }
#ui #team.win .sel-opt.on { color: var(--tz-fg); font-weight: 600; }
#ui #team.win input[type=checkbox] { border-radius: 2px; background: transparent; box-shadow: inset 0 0 0 1px var(--tz-bd2); }
#ui #team.win input[type=checkbox]:checked { background: var(--tz-fg); box-shadow: none; }
#ui #team.win input[type=checkbox]:checked::after { left: 3px; top: 1px; width: 2px; height: 4px; background: none; border: solid #18181b; border-width: 0 1px 1px 0; transform: rotate(45deg); }
#ui #team.win .team-box { margin: 5px 0 0; padding: 4px 5px 5px; border-radius: 3px; background: var(--tz-card); box-shadow: inset 0 0 0 1px var(--tz-bd); }
#ui #team.win .team-page > .team-box:first-child { margin-top: 0; }
#ui #team.win .team-box-t { height: auto; margin: 0 0 3px; padding: 0; line-height: 10px; background: none; box-shadow: none; color: var(--tz-fg); font-weight: 600; }
#ui #team.win .team-box-t .dim { color: var(--tz-mu); font-weight: 400; }
#ui #team.win .team-sel { border-radius: 2px; background: var(--tz-sec); box-shadow: none; color: var(--tz-fg); }
#ui #team.win .team-state { color: var(--tz-red); }
#ui #team.win .team-on { color: var(--tz-green); }
#ui #team.win .team-list { border-radius: 2px; background: var(--tz-bg); outline-color: var(--tz-bd); }
#ui #team.win .team-li:hover { background: var(--tz-sec); color: var(--tz-fg); }
#ui #team.win .team-li.picked { background: var(--tz-bd); color: var(--tz-fg); box-shadow: inset 1px 0 0 var(--tz-fg); }
#ui #team.win .team-li .tag { border-radius: 2px; color: #67e8f9; box-shadow: inset 0 0 0 1px #155e75; }
#ui #team.win .team-li .tag.boss { color: var(--tz-amber); box-shadow: inset 0 0 0 1px #78350f; }
#ui #team.win .team-li .tag.aggr { color: var(--tz-red); box-shadow: inset 0 0 0 1px #7f1d1d; }
#ui #team.win .team-empty { color: var(--tz-mu); }
#ui #team.win .btn.gm-tog .gm-dot { border-radius: 50%; background: var(--tz-bd2); box-shadow: none; }
#ui #team.win .btn.gm-tog .gm-st { color: var(--tz-mu); }
#ui #team.win .btn.gm-tog.on { color: #bbf7d0; background: #052e16; box-shadow: inset 0 0 0 1px #15803d; }
#ui #team.win .btn.gm-tog.on .gm-dot { background: var(--tz-green); box-shadow: none; }
#ui #team.win .btn.gm-tog.on .gm-st { color: var(--tz-green); }
#ui #team.win ::-webkit-scrollbar-track { background: transparent; }
#ui #team.win ::-webkit-scrollbar-thumb { background: var(--tz-bd2); border-radius: 2px; }
