/* Clearer item cards (switch IRP_ITEM_CARDS_VERSION, public/item-cards.js). Every rule is scoped to classes that exist only while the switch is on
   (.ic-*), so with the switch off nothing here matches. Colours and type come from UI kit v1 (public/ui-kit.css). */

/* Header: tier and level as two chips; the tier chip carries a "?" and a tooltip that says what the tier means. */
.ic-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 0}
.ic-chip{min-height:28px;padding:2px 10px;font-size:.78rem;color:var(--uk-ivory,#efe4cc)}
button.ic-chip{cursor:help;font-family:inherit}
button.ic-chip:focus-visible{outline:3px solid var(--uk-focus,#f2ce85);outline-offset:2px}
.ic-q{display:inline-grid;place-items:center;width:16px;height:16px;margin-left:4px;border-radius:50%;background:var(--uk-gold,#c9a35b);color:#141210;font-size:.68rem;font-weight:800}
.ic-chip-low{border-color:#b5584a;color:#f3b4a6}
.ic-chip-worn{border-color:#4fae8b;color:#9fe6c9}
.ic-card .item-detail-title .item-model-name{display:none}

/* The Unique power: first thing under the name, framed in gold, in readable type. */
.ic-power{position:relative;margin:4px 0 14px;padding:12px 14px 12px 16px;border:1px solid #b69a6099;border-left:4px solid var(--uk-gold,#c9a35b);border-radius:8px;
 background:linear-gradient(90deg,#3a2a1299,#16130f 70%);box-shadow:inset 0 0 0 1px #0007}
.ic-power-kicker{margin:0 0 4px;font:700 .72rem/1.2 var(--uk-sans,system-ui);letter-spacing:.08em;text-transform:uppercase;color:var(--uk-gold-text,#f2ce85)}
.ic-power-text{margin:0;font:1.05rem/1.45 var(--uk-serif,Georgia,serif);color:var(--uk-ivory,#efe4cc)}
/* Unique rules (IRP_UNIQUE_RULES_VERSION): the new rule on its own line under the old power, with a small New rule label like the kicker (0.75.0 UI QA). */
.ic-power-text.unique-new-rule,.unique-power.unique-new-rule{margin-top:8px;padding-top:8px;border-top:1px solid #b69a6055}
.unique-new-rule>strong{display:block;margin:0 0 2px;font:700 .72rem/1.2 var(--uk-sans,system-ui);letter-spacing:.08em;text-transform:uppercase;color:var(--uk-gold-text,#f2ce85)}
.ic-power-skills{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:8px 0 0;font-size:.82rem;color:var(--uk-ivory-dim,#cdbf9f)}
.ic-power-skills>span:first-child{font-weight:700;text-transform:uppercase;letter-spacing:.06em;font-size:.7rem;color:var(--uk-gold-text,#f2ce85)}
.ic-power .unique-growth{margin:8px 0 0;font-size:.8rem;color:var(--uk-ivory-dim,#cdbf9f)}
.ic-power+.ic-power{margin-top:-6px}

/* Stats: the base property, then each modifier with its Affix Tier and where its roll sits in the range. Two columns where there is room. */
.ic-rolls{margin:0 0 14px;padding:10px 12px;border:1px solid #3d382e;border-radius:8px;background:#101416}
.ic-base{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 10px;margin:0 0 8px;padding:0 0 8px;border-bottom:1px solid #2a2722}
.ic-base-label{font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--uk-ivory-dim,#cdbf9f)}
.ic-base strong{font-size:1.02rem;color:var(--uk-ivory,#efe4cc)}
.ic-affixes{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:2px 18px;margin:0;padding:0;list-style:none}
.ic-affixes>li{display:block;margin:0;padding:6px 0;border-bottom:1px solid #2a2722}
.ic-affixes>li>.am-kind{margin-left:8px;min-height:20px;padding:0 8px;font-size:.66rem;vertical-align:2px}
.ic-affixes>li>small{display:block;margin-top:2px}
.ic-affixes>li>meter{display:block;margin-top:4px}
.ic-affixes>li>strong{font-size:.98rem;color:#cfe9b4}
.ic-affixes>li>small{font-size:.76rem;color:var(--uk-ivory-dim,#cdbf9f)}
.ic-affixes meter{width:100%;max-width:180px;height:5px}
/* What a stat turns into (Endurance: the Armor it gives), under the stat line, on every item card. */
.affix-hint,.ic-affixes>li>small.affix-hint{display:block;margin-top:2px;font-size:.8rem;line-height:1.35;color:var(--uk-ivory,#eedbb5)}
.ic-rolls .small-note{margin:8px 0 0}

/* One comparison, every changed stat. */
.ic-compare{margin:0 0 12px}
.ic-compare-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:0 0 6px}
.ic-compare-head h3{margin:0;font-size:.95rem;color:var(--uk-gold-text,#f2ce85)}
.ic-compare-head .item-verdict{margin:0;padding:0;border:0;background:none}

/* Pinned action dock under the card: Equip, then painted buttons with a one-word caption. Tooltips (public/ui-hints.js) give the full sentence. */
.inventory-dialog .item-inspector .inventory-primary-actions.ic-dock{display:block;padding:10px 14px calc(10px + env(safe-area-inset-bottom,0px))}
.ic-dock-row{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px 12px}
.ic-equip-row{display:flex;flex:1 1 240px;gap:8px}
.modal-backdrop.inventory-dialog .ic-equip-row>button{flex:1 1 0;min-height:48px;min-width:0;margin:0;font-weight:700;border-color:#b69b61;color:#f2dca7}
.modal-backdrop.inventory-dialog .ic-equip-row>button:not(:disabled){background:linear-gradient(#bca16d,#957340);color:#10151e}
/* One row on a PC: with every button shown (Favorite, Sell, Enhance and Enchant too) they narrow a little rather than leave one alone on a second row. */
.ic-acts{display:flex;flex:10 1 auto;min-width:0;flex-wrap:nowrap;justify-content:flex-end;gap:6px}
.modal-backdrop.inventory-dialog .ic-acts>.ic-act{display:inline-flex;flex:0 1 58px;flex-direction:column;align-items:center;justify-content:center;gap:1px;width:58px;min-width:46px;min-height:52px;margin:0;padding:3px 2px;
 border:1px solid #6d5a3a;border-radius:8px;background:linear-gradient(#1d2a35,#121a21);color:var(--uk-ivory,#efe4cc);cursor:pointer}
.ic-act>.uk-ico,.ic-act>.uk-art,.ic-act>.ic-ico{width:32px;height:32px}
/* ChatGPT art 31 (20 Oct): Link in chat and Party bag, transparent 256 px paintings shown whole. */
.ic-ico{display:inline-block;background:center/contain no-repeat}
.ic-ico-link{background-image:url('/art/ui/item-link-chat-1.webp')}
.ic-ico-party{background-image:url('/art/ui/item-party-bag-1.webp')}
/* ChatGPT art (20 Oct, Pat): Enhance, a golden anvil, hammer and spark, painted for this row. */
.ic-ico-enhance{background-image:url('/art/ui/item-enhance-1.webp')}
.ic-cap{font-size:.66rem;line-height:1.1;color:var(--uk-ivory-dim,#cdbf9f);white-space:nowrap}
.modal-backdrop.inventory-dialog .ic-acts>.ic-act:hover:not(:disabled){border-color:var(--uk-gold,#c9a35b);background:linear-gradient(#273746,#16212a)}
.modal-backdrop.inventory-dialog .ic-acts>.ic-act:focus-visible{outline:3px solid var(--uk-focus,#f2ce85);outline-offset:2px}
.modal-backdrop.inventory-dialog .ic-acts>.ic-act[aria-pressed="true"],.modal-backdrop.inventory-dialog .ic-acts>.ic-act[aria-controls][aria-expanded="true"]{border-color:var(--uk-gold,#c9a35b);background:linear-gradient(#4a3a1d,#2a2112)}
.modal-backdrop.inventory-dialog .ic-acts>.ic-act[aria-pressed="true"] .ic-cap,.modal-backdrop.inventory-dialog .ic-acts>.ic-act[aria-controls][aria-expanded="true"] .ic-cap{color:var(--uk-gold-text,#f2ce85)}
.modal-backdrop.inventory-dialog .ic-acts>.ic-act-danger{border-color:#8a4a3a}
.modal-backdrop.inventory-dialog .ic-acts>.ic-act-danger .ic-cap{color:#f1c3b4}
.modal-backdrop.inventory-dialog .ic-acts>.ic-act:disabled{opacity:.42;cursor:not-allowed}
.modal-backdrop.inventory-dialog .ic-acts>.ic-act:disabled>span:first-child{filter:grayscale(1)}

/* The Help button opens one tip naming every button (a phone cannot hover). */
.ic-help-mark{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--uk-gold,#c9a35b);color:#141210;font:800 .95rem/1 var(--uk-sans,system-ui)}
/* Gems sit with the rolls; each gem's name and stat stay together. */
.ic-rolls .gem-lines-head{margin:10px 0 4px;font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--uk-ivory-dim,#cdbf9f)}
.ic-rolls .gem-lines{margin:0;padding:0;list-style:none}
.ic-rolls .gem-lines>li{display:block;padding:3px 0;font-size:.86rem;color:var(--uk-ivory,#efe4cc)}
.ic-rolls .gem-lines>li>:first-child{display:inline-block;vertical-align:middle;margin-right:4px}
.ic-rolls .gem-stat{color:#cfe9b4}
.ic-rolls .ic-gem-name{white-space:nowrap}
/* Guide picture of the dock: the same painted buttons, not clickable, in two even rows of four. */
.gp-ic-acts{display:grid;grid-template-columns:repeat(4,56px);justify-content:center;gap:6px}
.gp-ic-acts>.ic-act{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;width:56px;min-height:50px;padding:3px 2px;border:1px solid #6d5a3a;border-radius:8px;background:linear-gradient(#1d2a35,#121a21)}
.gp-ic-acts>.ic-act-danger{border-color:#8a4a3a}

/* Help list (public/ui-hints.js data-ui-list): one line per button, its name in bold. */
.ui-tooltip.ui-tooltip-list .ui-tooltip-row{display:block;margin:0 0 6px}
.ui-tooltip.ui-tooltip-list .ui-tooltip-row:last-child{margin:0}
.ui-tooltip.ui-tooltip-list .ui-tooltip-row>strong{display:inline;margin:0;color:var(--uk-gold-text,#f2ce85)}

/* Hover card: the same blocks, tighter. */
.ic-hover{max-width:400px}
.ic-hover .ic-power{margin:6px 0 10px;padding:9px 11px 9px 13px}
.ic-hover .ic-power-text{font-size:.95rem}
.ic-hover .ic-chips{margin-top:6px}
.ic-hover .ic-rolls{padding:8px 10px}
.ic-hover .iv-compare-table{font-size:.8rem}
.ic-hover .iv-compare-table th,.ic-hover .iv-compare-table td{padding:4px 4px}
.ic-hover .iv-compare-table thead th:first-child,.ic-hover .iv-compare-table tbody th{width:40%}
.ic-hover .ic-compare-head h3{font-size:.85rem}
.ic-hover .iv-compare-table th small{font-size:.72rem}
.ic-hover .iv-compare-notes{margin:6px 0 0}

/* Character sheet: the level line under the name shows again with compact headers on. */
:root.uk-compact-heads .shell .painted-page-heading.ic-level-head>.eyebrow{display:block}

/* Chat options: the one-time notes moved into "?" tips; the row holds the button and the tips. */
.ic-chat-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0 0 10px}
.ic-chat-tools .ic-chat-tip{display:inline-flex;margin:0;align-items:center;gap:6px;width:auto;min-width:44px;min-height:44px;padding:0 10px 0 6px;border:1px solid #6d5a3a;border-radius:22px;background:var(--uk-navy-0,#0d1620);color:var(--uk-ivory,#efe4cc);font:600 .8rem var(--uk-sans,system-ui)}
.ic-chat-tools .ic-chat-tip .ui-help-mark{position:static;display:inline-grid;place-items:center;width:20px;height:20px;margin:0;border-radius:50%;background:var(--uk-gold,#c9a35b);color:#141210;font-size:.72rem;font-weight:800}

/* While the card is open, a toast (Protected, Favorite, Equip…) shows under the card's Back row instead of at the bottom over the pinned buttons (release QA, 20 Oct). */
body:has(.inventory-dialog .ic-dock) #toast{top:88px;bottom:auto}
/* Auction House (Feal, 20 Oct): the Sell button opens the price form above the pinned buttons, so the sale never hides low in the card. */
.ic-dock .ic-sell{margin:0 0 10px;padding:0 0 10px;border-bottom:1px solid #6d5a3a66}
.ic-dock .ic-sell[hidden]{display:none}
.ic-dock .ic-sell>h3{margin:0 0 6px;color:var(--uk-gold-text,#f2ce85);font:700 .82rem/1.3 var(--uk-sans,system-ui);letter-spacing:.06em;text-transform:uppercase}
.ic-dock .ic-sell .az-inline-form{margin:0;padding:0;border:0;gap:8px 10px}
.ic-dock .ic-sell .az-inline-form label{flex:1 1 10rem;color:var(--uk-ivory,#efe4cc)}
.ic-dock .ic-sell .az-inline-form input{margin-top:4px}
.ic-dock .ic-sell .az-inline-form button{min-height:44px}
/* A linked item in chat: a readable link that opens the bag's item card (no card squeezed into the chat log). */
.community-chat .chat-item-link{display:inline;margin:0 0 0 5px;padding:0;border:0;background:none;color:#dabe7d;font:inherit;font-weight:600;text-align:left;text-decoration:underline;text-underline-offset:3px;cursor:pointer;overflow-wrap:anywhere}
.community-chat .chat-item-link.chat-item-charm{color:#7fe0d0}.community-chat .chat-item-link.chat-item-rune{color:#a9c0e0}
.community-chat .chat-item-link:hover{color:var(--uk-gold-text,#f2ce85)}
.community-chat .chat-item-link:focus-visible{outline:3px solid var(--uk-focus,#f2ce85);outline-offset:2px;border-radius:2px}
@media(pointer:coarse){.community-chat .chat-item-link{padding:12px 0;margin-block:-12px}}
.item-inspector .ic-linked-from{margin:0 0 10px;padding:8px 12px;border:1px solid #6d5a3a;border-radius:8px;background:var(--uk-navy-0,#0d1620);color:var(--uk-ivory,#efe4cc);font:.86rem/1.45 var(--uk-sans,system-ui)}

@media(max-width:600px){
 .ic-equip-row{flex-basis:100%}
 .ic-acts{display:grid;grid-template-columns:repeat(var(--ic-cols,5),minmax(0,1fr));gap:4px}
 .modal-backdrop.inventory-dialog .ic-acts>.ic-act{width:auto;min-width:44px}
 .ic-affixes{grid-template-columns:minmax(0,1fr)}
 .ic-power-text{font-size:1rem}
 /* The stat-change toast after Equip moves up while the card is open, under the Back to bag row (y19–63 at 390), so it covers neither Back nor the pinned buttons (release QA, 20 Oct). */
 body:has(.inventory-dialog .ic-dock) #toast{top:calc(max(12px,env(safe-area-inset-top)) + 60px);bottom:auto}
}
/* Legendary weapons on the card (Pat, 23 Oct): the three effects in the power box, numbered. On the hover the fiery frame is thinner, so the comparison keeps its columns. */
.ic-legendary-effects{margin:4px 0 6px;padding-left:1.4em}
.ic-legendary-effects li{margin:2px 0}
.item-hover:has(.ic-hover.legendary-item){width:min(460px,calc(100vw - 20px));padding:8px}
.item-details.ic-hover.legendary-item.legendary-item.legendary-item{max-width:none;padding:8px 8px;border-width:14px;border-image-width:40px}
.ic-hover .ic-power.is-legendary{margin:4px 0 6px;padding:7px 10px}
.ic-hover .ic-legendary-effects{font-size:.88rem}
/* Implicit line in the header (Pat, 30 Oct): the base stats and the ward stat sit under the item kind, beside the space the chips leave. */
.ic-implicit{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin:4px 0 6px}
.ic-implicit strong{font-size:1rem;color:var(--uk-ivory,#efe4cc)}
.ic-implicit small{color:var(--uk-ivory-dim,#cdbf9f);font-size:.8125rem}
/* Switched-off effects (public/inactive-effects.js): item and skill cards name what does nothing with the hero's gear and picks, and why. */
.inactive-effects{margin:10px 0 0;padding:8px 10px;border-left:3px solid var(--uk-red,#c0533a);background:rgba(192,83,58,.10);border-radius:4px}
.inactive-effects .inactive-effects-kicker{margin:0 0 4px;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--uk-ivory-dim,#cdbf9f)}
.inactive-effects ul{margin:0;padding:0;list-style:none;display:grid;gap:4px}
.inactive-effects li{font-size:.84rem;line-height:1.35;color:var(--uk-ivory,#e7dcc7);overflow-wrap:anywhere}
.inactive-effects li.is-off::before{content:'Off · ';font-weight:700;color:#ef8a6f}
/* the item that switches another off */
.inactive-effects li.is-switches::before{content:'Switches off · ';font-weight:700;color:#ef8a6f}
.inactive-effects li.is-note::before{content:'Note · ';font-weight:700;color:var(--uk-gold,#d8b26a)}
