/* Features page + player Features tab: target picker, search, group filter, one small card per feature. */

.target-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 14px 16px; margin-bottom: 16px; background: radial-gradient(500px 160px at 0 0, rgba(232, 112, 26, .08), transparent 70%), var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--lift); }
.target-bar .field { min-width: 260px; flex: 0 1 380px; }
.target-bar select { width: 100%; }
.target-note { font-size: 12.5px; padding-bottom: 7px; }

.ftools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.fsearch { width: 240px; }
.fchips { position: relative; display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); }
.fchip { position: relative; flex: none; height: 36px; padding: 0 10px; border: 0; background: transparent; color: var(--sub); font: 600 12.5px var(--sans); cursor: pointer; transition: color .15s; }
.fchip:hover { color: var(--text); }
.fchip:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 4px; }
.fchip.on { color: var(--text); }
.fchips:not(.has-ind) .fchip.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
.fcount { font-size: 12px; }

.fgroup h3 { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; font: 500 12px/1.3 var(--display); text-transform: uppercase; letter-spacing: .14em; color: var(--sub); }
.fgroup h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fgroup h3 .n { font-size: 11px; font-weight: 500; color: var(--faint); letter-spacing: .04em; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }

.feat { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--lift); transition: border-color .15s, background .15s; }
.feat:hover { border-color: var(--line-3); background: #171311; }
.feat[hidden], .fgroup[hidden], .fnone[hidden], .target-bar [hidden] { display: none; }
.feat-name { display: flex; align-items: center; gap: 6px; font: 600 13.5px/1.3 var(--sans); }
.feat-flag { margin-left: auto; font: 600 11px var(--sans); color: var(--faint); }
.feat-flag.bad { color: var(--red); }
.feat-desc { flex: 1; font-size: 12.5px; line-height: 1.4; color: var(--sub); }
.feat-args { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.feat-args label { display: block; min-width: 0; }
.feat-args label.wide { grid-column: 1 / -1; }
.feat-args label > span { display: block; margin-bottom: 3px; font-size: 11.5px; color: var(--faint); }
.feat-args label > span i { font-style: normal; opacity: .75; }
.feat-args .input, .feat-args select { width: 100%; min-width: 0; height: 28px; font-size: 12.5px; }
.feat-foot { display: flex; align-items: center; gap: 8px; }
.feat-foot .btn.run { color: var(--accent-hi); background: var(--accent-dim); border-color: rgba(232, 112, 26, .34); box-shadow: none; }
.feat-foot .btn.run:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.feat-out { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--faint); }
.feat-out.ok { color: var(--green); }
.feat-out.err { color: var(--red); }

/* Roles & Tags page: a tag's logo is the white icon tinted by its colour (the img's drop-shadow, the same trick as
   Roblox's ImageColor3), with the game's soft dark copy under it */
.rt-logo { position: relative; display: inline-block; flex: none; overflow: hidden; filter: drop-shadow(1px 1.5px 0 rgba(0, 0, 0, .45)); }
.rt-logo img { display: block; width: 100%; height: 100%; object-fit: contain; transform: translateX(calc(-1 * var(--s))); filter: drop-shadow(var(--s) 0 0 var(--c)); will-change: filter; }
.rt-logo.none { display: inline-grid; place-items: center; border-radius: 50%; background: var(--c); color: #0A0A0B; font: 700 11px var(--sans); }
.rt-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 4px 0 6px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-2); font-size: 11.5px; }
.rt-chip b { color: var(--c); font-weight: 600; letter-spacing: .02em; }
.rt-chip .x { width: 18px; height: 18px; border: 0; border-radius: 50%; background: transparent; color: var(--faint); font-size: 14px; line-height: 1; cursor: pointer; }
.rt-chip .x:hover { color: var(--red); background: var(--red-dim); }
.rt-chip i { font-size: 11px; font-style: normal; padding-right: 4px; }
.rt-add { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); }
.rt-add .input { flex: 1 1 180px; min-width: 0; }
.rt-add select { flex: 0 1 200px; width: auto; min-width: 140px; }
.rt-tags { display: grid; }
.rt-tag { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: 13px var(--sans); text-align: left; cursor: pointer; transition: background .12s; }
.rt-tag:hover { background: var(--panel-2); }
.rt-tag.on { background: var(--accent-dim); box-shadow: inset 2px 0 0 var(--accent); }
.rt-tag b { font-weight: 600; letter-spacing: .03em; }
.rt-edit:empty { display: none; }
.rt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rt-color { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--field); cursor: pointer; }
.rt-prevs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rt-sky { display: grid; place-items: center; height: 120px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: linear-gradient(#5d8fc9, #a9c9ea 70%, #c8d8c0); }
.rt-card { display: grid; justify-items: center; width: 150px; }
.rt-icons { display: flex; justify-content: center; gap: 4px; height: 32px; }
.rt-name { color: #fff; font: 700 18px/1.1 "Source Sans 3", "Source Sans Pro", var(--sans); text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.rt-user { color: #5E94EB; font: 600 13px/1.2 "Source Sans 3", "Source Sans Pro", var(--sans); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.rt-chat { padding: 7px 10px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); background: rgba(0, 0, 0, .55); color: #fff; font: 500 13px "Source Sans 3", "Source Sans Pro", var(--sans); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rt-cname { color: #d9d9d9; }
.rt-cap { margin-top: 4px; font-size: 11.5px; }

@media (max-width: 640px) {
  .rt-grid { grid-template-columns: 1fr; }
  .fsearch, .target-bar .field { width: 100%; flex-basis: 100%; min-width: 0; }
  .fgrid { grid-template-columns: 1fr; }
  .fchips { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
}
