/* ==========================================================================
   Item Vote (module itemvote: itemvote/index.php + _vote.php (_hero.php, _item.php), _wishes.php, _staff.php, _admin.php).
   Loaded by fy_boot.php for this module only (css/pages/<module>.css). Built on the Freya components (fy-tabs, fy-filters,
   fy-btn, fy-badge, fy-alert, fy-card, fy-empty, fy-pagination, fy-stats); the hearts take Freya's petal pink.
   Catalog pictures are pixel art on a transparent ground; small ones are scaled up crisp (.iv-card__media--col/--icon).
   ========================================================================== */
.iv{--iv-rose:var(--petal-400);--iv-rose-2:var(--petal-200);--iv-rose-soft:rgba(255,130,194,.14);
  --iv-rose-gem:linear-gradient(180deg,#ffb2da 0%,#ff82c2 50%,#f35aa9 100%);
  --iv-stage:radial-gradient(70% 80% at 50% 62%,rgba(167,126,255,.2),rgba(167,126,255,0) 70%),linear-gradient(180deg,rgba(8,5,22,.15),rgba(8,5,22,.5))}

/* ---- tab bar: Freya's pill tabs; every tab is a link (aria-current marks the open one) ---- */
.iv-tabs{margin:0 0 var(--sp-8)}
.iv-tabs .fy-tab{text-decoration:none}
.iv-tabs .fy-tab .fy-i{width:1.05em;height:1.05em}
.iv-tabs .fy-tab[aria-current=page]{color:#fff;background:var(--grad-violet);box-shadow:var(--glow-violet)}
@media (max-width:639.98px){
  .iv-tabs{width:100%}
  .iv-tabs .fy-tab{flex:1 0 auto;justify-content:center;padding:0 .6rem;font-size:.9rem}
}
.iv.is-loading .iv-results{opacity:.5;pointer-events:none}
.iv-flash{max-width:760px}
.iv-alert__body{min-width:0}
.iv-alert__body>p{margin:0}
.iv-alert__body>p+p{margin-top:.3em}
.iv-alert__actions{margin-top:.7em!important}

/* ---- shared ---- */
.iv-head{margin:0 0 var(--sp-5);max-width:70ch}
.iv-head__title{margin:0 0 .35em;font-size:var(--fs-h3)}
.iv-head__lead{margin:0;color:var(--text-2)}
.iv-status{max-width:760px}

/* ---- vote tab: the line with the account's own votes, the rules ---- */
.iv-mine{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0 0 var(--sp-4);color:var(--text-2);font-size:var(--fs-sm)}
.iv-mine>.fy-i{color:var(--iv-rose)}
.iv-mine strong{color:var(--text)}
/* phones: the sentence wraps inside its own box, so the heart and "Show my votes" stay on its first line */
@media (max-width:639.98px){.iv-mine>span{flex:1 1 0;min-width:0}}
.iv-rules{margin:0 0 var(--sp-5);border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface-sunken)}
.iv-rules>summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;color:var(--text-2);font:600 var(--fs-sm)/1.2 var(--font-display);cursor:pointer;list-style:none}
.iv-rules>summary::-webkit-details-marker{display:none}
.iv-rules>summary:hover{color:#fff}
.iv-rules>summary>.fy-i:first-child{color:var(--violet-300)}
.iv-rules__chev{margin-left:auto;transition:transform var(--t-fast) var(--ease)}
.iv-rules[open] .iv-rules__chev{transform:rotate(180deg)}
.iv-rules__list{margin:0;padding:0 16px 14px 36px;color:var(--text-2);font-size:var(--fs-sm)}
.iv-rules__list li+li{margin-top:.35em}

/* ---- filters ---- */
.iv-filters .fy-field{flex:1 1 170px}
.iv-filters .iv-filters__search{flex:2 1 260px}
.iv-filters__mine{align-self:center;min-height:44px;white-space:nowrap;color:var(--text-2);font-size:var(--fs-sm);cursor:pointer}
.iv-js .iv-filters__go{display:none}
@media (max-width:479.98px){.iv-filters .fy-field{flex-basis:100%}}

/* ---- result line ---- */
.iv-results{transition:opacity var(--t-med) var(--ease);scroll-margin-top:calc(var(--header-h) + 16px)}
.iv-count{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px;margin:0 0 var(--sp-4);color:var(--text-2);font-size:var(--fs-sm)}
.iv-count strong{color:var(--text);font-variant-numeric:tabular-nums}
.iv-count__all{color:var(--text-4);font-size:var(--fs-xs)}

/* ---- the cards ---- */
.iv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:var(--sp-4);margin:0;padding:0;list-style:none}
.iv-card{position:relative;display:flex;flex-direction:column;min-width:0;margin:0;border:1px solid var(--line);border-radius:var(--r-md);background:var(--grad-card),var(--surface);box-shadow:var(--shadow-sm),var(--inner-hi);overflow:hidden;scroll-margin-top:calc(var(--header-h) + 16px);transition:border-color var(--t-med) var(--ease),box-shadow var(--t-med) var(--ease),transform var(--t-med) var(--ease)}
.iv-card:hover{border-color:var(--line-3);transform:translateY(-2px)}
.iv-card.is-mine{border-color:rgba(255,130,194,.55);box-shadow:var(--shadow-sm),0 0 0 1px rgba(255,130,194,.22),0 10px 28px -14px rgba(243,90,169,.75)}
.iv-card:target{border-color:var(--gold-300)}
/* the picture box keeps 4:3 whatever the picture's size: the picture is laid over it and fitted inside */
.iv-card__media{position:relative;aspect-ratio:4/3;overflow:hidden;background:var(--iv-stage);border-bottom:1px solid var(--line)}
.iv-card__pic{position:absolute;inset:8px;display:block;width:calc(100% - 16px);height:calc(100% - 16px);object-fit:contain}
.iv-card__media--col .iv-card__pic{image-rendering:pixelated}
.iv-card__media--icon .iv-card__pic{inset:auto;left:50%;top:50%;width:64px;height:64px;transform:translate(-50%,-50%);image-rendering:pixelated}
.iv-card__nopic{position:absolute;inset:0;display:grid;place-items:center;color:var(--text-4)}
.iv-card__nopic .fy-i{width:32px;height:32px}
.iv-card__col{position:absolute;right:6px;bottom:6px;width:30px;height:40px;padding:1px;object-fit:contain;border-radius:var(--r-xs);background:rgba(8,5,22,.72);border:1px solid var(--line-2)}
.iv-card__body{display:flex;flex:1;flex-direction:column;gap:6px;min-width:0;padding:10px 12px 12px}
.iv-card__name{display:flex;align-items:flex-start;gap:6px;margin:0;font:600 var(--fs-sm)/1.3 var(--font-display);color:var(--text);overflow-wrap:anywhere}
.iv-card__icon{flex:none;width:24px;height:24px;margin-top:-2px;image-rendering:pixelated}
.iv-card__slot{margin:0}
.iv-card__slot .fy-badge{font-size:.7rem}
.iv-card__foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:4px}
.iv-card__votes{display:inline-flex;align-items:center;gap:5px;margin:0;color:var(--text-2);font:700 var(--fs-md)/1 var(--font-display);font-variant-numeric:tabular-nums}
.iv-card__votes .fy-i{color:var(--iv-rose)}
.iv-vote-form{margin:0}

/* the vote button: a heart; voted = filled petal pink */
.iv-vote-btn{padding:0 .8rem;gap:6px;text-decoration:none}
.iv-vote-btn .fy-i{color:var(--iv-rose)}
.iv-vote-btn.is-on,.iv-vote-btn[aria-pressed=true]{border-color:transparent;background:var(--iv-rose-gem);color:#3a0622;box-shadow:0 12px 26px -14px rgba(243,90,169,.85)}
.iv-vote-btn.is-on .fy-i,.iv-vote-btn[aria-pressed=true] .fy-i{color:#3a0622;fill:currentColor}
.iv-vote-btn.is-on:hover,.iv-vote-btn[aria-pressed=true]:hover{color:#3a0622;filter:brightness(1.06)}
.iv-vote-btn.is-busy{opacity:.6;pointer-events:none}
@keyframes iv-pop{0%{transform:scale(1)}40%{transform:scale(1.12)}100%{transform:scale(1)}}
.iv-vote-btn.is-pop{animation:iv-pop .32s var(--ease)}
@media (prefers-reduced-motion:reduce){.iv-vote-btn.is-pop{animation:none}.iv-card,.iv-card:hover{transform:none;transition:none}}

/* phones: two columns, a little tighter */
@media (max-width:639.98px){
  .iv-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .iv-card__body{padding:8px 9px 10px;gap:5px}
  .iv-card__name{font-size:.8125rem}
  .iv-card__icon{width:20px;height:20px}
  .iv-card__foot{flex-wrap:wrap}
  .iv-vote-btn{flex:1 1 auto;padding:0 .6rem}
  .iv-card__votes{font-size:var(--fs-sm)}
}

/* ---- paging: the pager without the script, "Load more" with it ---- */
.iv-pager{margin-top:var(--sp-8)}
.iv-pager__gap{border:0!important;background:none!important;min-width:20px!important;padding:0!important}
@media (max-width:639.98px){.iv-pager__word{display:none}}
.iv-more{display:flex;flex-direction:column;align-items:center;gap:8px;margin:var(--sp-8) 0 0}
.iv-more__note{margin:0;color:var(--text-4);font-size:var(--fs-xs)}
.iv-none{max-width:640px;margin-inline:auto}

/* ---- wishes tab ---- */
.iv-wishes__grid{display:grid;gap:var(--sp-6) var(--sp-10);align-items:start}
@media (min-width:900px){.iv-wishes__grid{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr)}}
.iv-wishes__rules{display:grid;gap:8px;margin:0;padding:0;list-style:none;color:var(--text-2);font-size:var(--fs-sm)}
.iv-wishes__rules li{display:flex;align-items:flex-start;gap:8px}
.iv-wishes__rules .fy-i{flex:none;margin-top:3px;color:var(--mint-400)}
.iv-wish{scroll-margin-top:calc(var(--header-h) + 16px)}
.iv-wish__label{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.iv-wish__count{color:var(--text-4);font:400 var(--fs-xs)/1.3 var(--font-body);font-variant-numeric:tabular-nums;text-transform:none;letter-spacing:0}
.iv-wish__count.is-near{color:var(--amber-400)}
.iv-wish__text{width:100%;min-height:150px}
.iv-wish__foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-top:var(--sp-4)}
.iv-wish__left{margin:0;color:var(--text-2);font-size:var(--fs-sm)}
@media (max-width:479.98px){.iv-wish__send{width:100%}}

/* ---- staff tab ---- */
.iv-staff__stats{margin-bottom:var(--sp-8)}
.iv-staff__cols{display:grid;gap:var(--sp-10);align-items:start}
@media (min-width:1100px){.iv-staff__cols{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}}
.iv-wishlist{display:grid;gap:10px;margin:0;padding:0;list-style:none}
.iv-wishrow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;align-items:start;margin:0;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface);scroll-margin-top:calc(var(--header-h) + 16px)}
.iv-wishrow.is-hidden{border-style:dashed;background:var(--surface-sunken)}
.iv-wishrow.is-hidden .iv-wishrow__text{color:var(--text-4)}
.iv-wishrow__meta{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;color:var(--text-4);font-size:var(--fs-xs)}
.iv-wishrow__who{display:inline-flex;align-items:center;gap:5px;color:var(--text);font-weight:700}
.iv-wishrow__pc{font-variant-numeric:tabular-nums}
.iv-wishrow__flag[hidden]{display:none}
.iv-wishrow__text{margin:0;color:var(--text);font-size:var(--fs-sm);overflow-wrap:anywhere}
.iv-hide-form{margin:0}
.iv-hide-btn>span:not(.fy-sr){display:inline-flex;align-items:center;gap:6px}
.iv-wishrow.is-hidden .iv-hide-btn__hide,.iv-wishrow:not(.is-hidden) .iv-hide-btn__show{display:none}
.iv-top{display:grid;gap:2px;margin:0;padding:0;list-style:none}
.iv-top__row{display:grid;grid-template-columns:28px 24px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:44px;margin:0;padding:6px 10px;border-radius:var(--r-xs)}
.iv-top__row:nth-child(odd){background:rgba(200,182,255,.05)}
.iv-top__rank{color:var(--text-4);font:700 var(--fs-sm)/1 var(--font-display);text-align:right;font-variant-numeric:tabular-nums}
.iv-top__row:nth-child(-n+3) .iv-top__rank{color:var(--gold-300)}
.iv-top__icon{width:24px;height:24px;image-rendering:pixelated}
.iv-top__name{display:flex;flex-direction:column;min-width:0;color:var(--text);font-size:var(--fs-sm);font-weight:700;line-height:1.3}
.iv-top__slot{color:var(--text-4);font-size:var(--fs-xs);font-weight:400}
.iv-top__votes{display:inline-flex;align-items:center;gap:5px;color:var(--text);font:700 var(--fs-sm)/1 var(--font-display);font-variant-numeric:tabular-nums}
.iv-top__votes .fy-i{color:var(--iv-rose)}

/* ---- vote tab: the Black Friday hero (_hero.php) in Freya's gold storybook frame ----
   Wide: the story and the catalog size on the left, the three steps and the wish list question on the right. Phones:
   the key lines only (title, the catalog size, the steps still to do, the question); the story waits in a closed fold. */
.iv-hero{--card-pad:clamp(1.25rem,.9rem + 1.8vw,2.25rem);display:grid;gap:var(--sp-5) var(--sp-8);margin:0 0 var(--sp-6);background:radial-gradient(90% 60% at 0 0,rgba(255,196,63,.1),rgba(255,196,63,0) 60%),radial-gradient(70% 70% at 100% 100%,rgba(243,90,169,.1),rgba(243,90,169,0) 65%),var(--grad-card),var(--surface)}
@media (min-width:900px){.iv-hero{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);align-items:start}}
.iv-hero__main,.iv-hero__side{position:relative;min-width:0}
.iv-hero__eyebrow{margin-bottom:var(--sp-2)}
.iv-hero__title{margin:0 0 .5em;font-size:clamp(1.5rem,1.1rem + 1.6vw,2.25rem);line-height:1.12;color:#fff;text-wrap:balance}
.iv-hero__story p{margin:0 0 .7em;color:var(--text-2);max-width:62ch}
.iv-hero__sign{font:600 var(--fs-sm)/1.2 var(--font-display);color:var(--gold-300)!important}
.iv-hero__sign::before{content:"\2014\00a0"}
.iv-hero__count{display:flex;align-items:flex-start;gap:10px;margin:var(--sp-4) 0 0;padding:12px 14px;border:1px solid rgba(255,196,63,.32);border-radius:var(--r-md);background:linear-gradient(90deg,rgba(255,196,63,.12),rgba(255,196,63,.03));color:var(--text);font-size:var(--fs-sm)}
.iv-hero__count>.fy-i{flex:none;margin-top:2px;color:var(--gold-300)}
.iv-hero__count strong{color:#fff;font-variant-numeric:tabular-nums}
.iv-hero__more{display:none;margin-top:var(--sp-3);border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface-sunken)}
.iv-hero__more>summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;color:var(--text-2);font:600 var(--fs-sm)/1.2 var(--font-display);cursor:pointer;list-style:none}
.iv-hero__more>summary::-webkit-details-marker{display:none}
.iv-hero__more>summary>.fy-i:first-child{color:var(--violet-300)}
.iv-hero__chev{margin-left:auto;transition:transform var(--t-fast) var(--ease)}
.iv-hero__more[open] .iv-hero__chev{transform:rotate(180deg)}
.iv-hero__more>p{margin:0;padding:0 14px 12px;color:var(--text-2);font-size:var(--fs-sm)}
.iv-hero__h{margin:0 0 var(--sp-3);color:var(--text-3);font:800 .74rem/1.2 var(--font-body);letter-spacing:.12em;text-transform:uppercase}
.iv-steps{display:grid;gap:8px;margin:0 0 var(--sp-5);padding:0;list-style:none}
.iv-steps__step{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0;color:var(--text-2);font-size:var(--fs-sm)}
.iv-steps__step strong{color:#fff}
.iv-steps__text a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.iv-steps__n{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;border:1px solid rgba(255,196,63,.55);background:rgba(255,196,63,.1);color:var(--gold-300);font:700 var(--fs-sm)/1 var(--font-display)}
.iv-steps__step.is-done .iv-steps__n{border-color:transparent;background:var(--iv-rose-gem);color:#3a0622}
.iv-steps__n .fy-i{width:15px;height:15px}
.iv-steps__text{flex:1 1 220px;min-width:0}
.iv-steps__act{margin-left:42px;text-decoration:none}
.iv-hero__ask{padding:14px 16px;border:1px solid rgba(255,130,194,.35);border-radius:var(--r-md);background:linear-gradient(135deg,rgba(243,90,169,.13),rgba(243,90,169,.03))}
.iv-hero__q{display:flex;align-items:center;gap:8px;margin:0 0 .35em;font:600 var(--fs-lg)/1.25 var(--font-display);color:#fff}
.iv-hero__q .fy-i{color:var(--iv-rose);fill:currentColor}
.iv-hero__a{margin:0 0 .8em;color:var(--text-2);font-size:var(--fs-sm)}
.iv-hero__other{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0;color:var(--text-3);font-size:var(--fs-xs)}
.iv-hero__other .fy-btn{text-decoration:none}
@media (max-width:639.98px){
  .iv-hero{--card-pad:14px;gap:var(--sp-3);margin-bottom:var(--sp-5)}
  .iv-hero__eyebrow{display:none}
  /* only the steps still to do; none once all three are done */
  .iv-steps__step.is-done,.iv-steps.is-all-done{display:none}
  .iv-hero__title{margin-bottom:.3em;font-size:1.375rem}
  .iv-hero__story{display:none}
  .iv-hero__more{display:block;margin-top:8px}
  .iv-hero__more>summary{min-height:40px}
  .iv-hero__count{margin-top:8px;padding:8px 10px;font-size:var(--fs-xs)}
  .iv-hero__h{display:none}
  .iv-steps{gap:6px;margin-bottom:var(--sp-3)}
  .iv-steps__step{flex-wrap:nowrap;gap:10px;font-size:var(--fs-xs);line-height:1.35}
  .iv-steps__n{width:24px;height:24px;font-size:var(--fs-xs)}
  .iv-steps__n .fy-i{width:13px;height:13px}
  .iv-steps__text{flex:1 1 auto}
  .iv-steps__act{display:none}
  .iv-hero__ask{padding:10px 12px}
  .iv-hero__q{font-size:var(--fs-md)}
  .iv-hero__a{margin-bottom:.5em;font-size:var(--fs-xs)}
  .iv-hero__other{flex-wrap:nowrap;justify-content:space-between}
}

/* ---- the wish list on a card: a marker on the picture once one is written, the link to write or edit it ---- */
.iv-card__noted{position:absolute;left:6px;top:6px;display:none;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:var(--r-pill);background:rgba(58,6,34,.85);border:1px solid rgba(255,130,194,.6);color:var(--petal-200);font:800 .68rem/1 var(--font-body);letter-spacing:.03em}
.iv-card__noted .fy-i{width:12px;height:12px}
.iv-card.has-note .iv-card__noted{display:inline-flex}
.iv-note-btn{display:none;align-items:center;gap:6px;min-height:32px;margin:2px 0 0;color:var(--petal-200);font:800 var(--fs-xs)/1.2 var(--font-body);text-decoration:none}
.iv-note-btn:hover{color:#fff;text-decoration:underline}
.iv-card.is-mine .iv-note-btn{display:inline-flex}
.iv-note-btn__edit,.iv-card.has-note .iv-note-btn__add{display:none}
.iv-card.has-note .iv-note-btn__edit{display:inline}
@media (max-width:639.98px){.iv-note-btn{min-height:40px}}

/* ---- one costume opened above the list (?item=<key>, _item.php) ---- */
.iv-item{margin:0 0 var(--sp-6);scroll-margin-top:calc(var(--header-h) + 16px)}
.iv-item.is-mine{border-color:rgba(255,130,194,.5)}
.iv-item__back{margin:0 0 var(--sp-3);font-size:var(--fs-sm)}
.iv-item__back a{display:inline-flex;align-items:center;gap:4px}
.iv-item__grid{display:grid;gap:var(--sp-5) var(--sp-8);align-items:start}
@media (min-width:760px){.iv-item__grid{grid-template-columns:minmax(220px,320px) minmax(0,1fr)}}
.iv-item__media{border:1px solid var(--line);border-radius:var(--r-md)}
.iv-item__body{display:flex;flex-direction:column;gap:10px;min-width:0}
.iv-item__name{display:flex;align-items:center;gap:8px;margin:0;font-size:var(--fs-h3);color:#fff;overflow-wrap:anywhere}
.iv-item__vote{justify-content:flex-start;gap:16px;margin:0;padding:0}
.iv-item__vote .iv-vote-btn{text-decoration:none}
.iv-item__note{display:none;margin-top:var(--sp-2)}
.iv-item.is-mine .iv-item__note{display:block}
.iv-item.is-mine .iv-item__first:not(.is-guest){display:none}
.iv-item__first{display:flex;align-items:flex-start;gap:8px;margin:0;color:var(--text-2);font-size:var(--fs-sm)}
.iv-item__first .fy-i{flex:none;margin-top:3px;color:var(--violet-300)}
.iv-item__actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:var(--sp-3)}
.iv-item:not(.has-note) .iv-note-del{display:none}
.iv-note__label{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.iv-note__count{color:var(--text-4);font:400 var(--fs-xs)/1.3 var(--font-body);font-variant-numeric:tabular-nums;text-transform:none;letter-spacing:0}
.iv-note__count.is-near{color:var(--amber-400)}
.iv-note__text{width:100%;min-height:120px}
.iv-note__hint{margin:6px 0 0;color:var(--text-4);font-size:var(--fs-xs)}
@media (max-width:479.98px){.iv-item__actions .fy-btn{flex:1 1 auto}}

/* the same form in a dialog (js/itemvote.js, from #iv-note-tpl): Freya's dialog box with a form layout */
.iv-dialog{width:min(600px,calc(100vw - 2rem));max-height:min(88vh,760px);overflow:auto}
.iv-dialog__frame{display:flex;flex-direction:column;margin:0}
.iv-dialog__head{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);padding:var(--sp-5) var(--sp-5) 0}
.iv-dialog__title{margin:0;color:#fff;font-size:var(--fs-h4)}
.iv-dialog__body{padding:var(--sp-4) var(--sp-5);text-align:left}
.iv-dialog__foot{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--sp-3);padding:0 var(--sp-5) var(--sp-5)}
.iv-dialog__item{display:flex;align-items:center;gap:12px;margin:0 0 var(--sp-4)}
.iv-dialog__pic{flex:none;display:grid;place-items:center;width:64px;height:64px;border-radius:var(--r-md);background:var(--iv-stage);border:1px solid var(--line);overflow:hidden}
.iv-dialog__pic img{max-width:56px;max-height:56px;object-fit:contain}
.iv-dialog__name{display:flex;flex-direction:column;gap:2px;min-width:0;color:var(--text-4);font-size:var(--fs-xs)}
.iv-dialog__name strong{color:#fff;font:600 var(--fs-md)/1.25 var(--font-display);overflow-wrap:anywhere}
.iv-dialog.is-new .iv-note-del{display:none}
@media (max-width:479.98px){.iv-dialog__foot .fy-btn{flex:1 1 auto}}
/* Freya's dialog pop (fy-pop) keeps its last frame (fill "both"): an identity transform, which makes the dialog the box
   of the script's notice (.iv-toast below), so the notice covered Save and Delete. The last frame is the dialog's own
   look, so letting it go changes nothing on screen; the notice is then at the bottom of the screen. */
.iv-dialog.fy-dialog[open]{animation-fill-mode:backwards}

/* the script's own notice (js/itemvote.js): bottom centre, for a page without the theme's toast (fyToast), and inside the
   open wish list dialog for every message there (fyToast would lie under the dialog's backdrop) */
.iv-toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:calc(var(--z-toast, 90) + 1);width:max-content;max-width:min(560px,calc(100vw - 32px));padding:12px 16px;border:1px solid color-mix(in srgb,var(--mint-400) 45%,transparent);border-radius:var(--r-md);background:var(--surface-2);color:var(--text);font-size:var(--fs-sm);line-height:1.45;box-shadow:var(--shadow-lg);opacity:0;pointer-events:none;transform:translate(-50%,12px);transition:opacity .2s var(--ease),transform .2s var(--ease)}
.iv-toast.is-warn{border-color:color-mix(in srgb,var(--gold-400) 55%,transparent)}
.iv-toast.is-on{opacity:1;pointer-events:auto;cursor:pointer;transform:translate(-50%,0)}

/* ---- admin tab (_admin.php) ---- */
.iv-adm__head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:var(--sp-4);max-width:none}
.iv-adm__head>div:first-child{max-width:70ch}
.iv-adm__exports{display:flex;flex-wrap:wrap;gap:8px}
.iv-export-form{margin:0}
.iv-adm__views{margin-bottom:var(--sp-6)}
.iv-adm__views .fy-tab{text-decoration:none}
.iv-adm__views .fy-tab .fy-i{width:1.05em;height:1.05em}
.iv-adm__views .fy-tab[aria-current=page]{color:#fff;background:var(--grad-violet);box-shadow:var(--glow-violet)}
.iv-adm__sub{margin:var(--sp-6) 0 var(--sp-3);color:var(--text-3);font:800 .74rem/1.2 var(--font-body);letter-spacing:.12em;text-transform:uppercase}
.iv-adm__stats{margin-bottom:var(--sp-4)}
.iv-adm__stats .fy-stat.is-gold .fy-stat__value{color:var(--gold-300)}
.iv-adm__stats .fy-stat.is-pink .fy-stat__value{color:var(--petal-200)}
.iv-adm__row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--sp-3);margin:var(--sp-6) 0 var(--sp-4)}
.iv-adm__h{margin:0;font-size:var(--fs-h4)}
.iv-adm__note{display:flex;align-items:flex-start;gap:6px;margin:0 0 var(--sp-4);color:var(--text-2);font-size:var(--fs-sm)}
.iv-adm__note>.fy-i{flex:none;margin-top:3px;color:var(--violet-300)}
.iv-adm__pic{flex:none;display:inline-grid;place-items:center;width:40px;height:40px;border-radius:var(--r-sm);background:var(--iv-stage);border:1px solid var(--line);overflow:hidden;color:var(--text-4)}
.iv-adm__pic img{max-width:36px;max-height:36px;object-fit:contain}
.iv-adm__pic.is-icon img{image-rendering:pixelated}
.iv-adm__item{display:inline-flex;align-items:center;gap:10px;min-width:0;color:var(--text)!important;font-weight:700;text-decoration:none}
.iv-adm__item:hover span{text-decoration:underline}
.iv-wishrow__meta .iv-adm__item .iv-adm__pic{width:30px;height:30px}
.iv-wishrow__meta .iv-adm__item .iv-adm__pic img{max-width:26px;max-height:26px}
.iv-adm__rank{color:var(--text-4)}
.iv-adm__table td strong{color:#fff}
.iv-adm__who{display:inline-flex;align-items:center;gap:5px;color:var(--text);font-weight:700;text-decoration:none}
.iv-adm__who:hover{text-decoration:underline}
.iv-adm__id{color:var(--text-4);font-weight:400;font-variant-numeric:tabular-nums}
.iv-adm__char{color:var(--gold-300)}
.iv-adm__text{margin:0;color:var(--text);font-size:var(--fs-sm);overflow-wrap:anywhere}
.iv-wishrow__body{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
.iv-wishrow.is-hidden .iv-adm__text{color:var(--text-4)}
.iv-wishrow.is-plain{padding-block:9px;background:var(--surface-sunken)}
.iv-adm__none{margin:0;color:var(--text-4);font-size:var(--fs-xs)}
.iv-adm__itemhead{display:flex;align-items:center;gap:var(--sp-4);margin-bottom:var(--sp-5)}
.iv-adm__itemhead>.iv-adm__pic{width:72px;height:72px}
.iv-adm__itemhead>.iv-adm__pic img{max-width:64px;max-height:64px}
.iv-adm__itemname{margin:0 0 6px;color:#fff;font-size:var(--fs-h4);overflow-wrap:anywhere}
.iv-adm__itemmeta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;margin:0;color:var(--text-2);font-size:var(--fs-sm)}
.iv-adm__itemmeta>span{display:inline-flex;align-items:center;gap:5px}
.iv-adm__itemmeta .fy-i{color:var(--iv-rose)}
.iv-adm__search{margin-bottom:var(--sp-4)}
.iv-adm__search .iv-adm__searchfield{flex:0 1 420px}
.iv-adm__matches{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 var(--sp-5);padding:0;list-style:none}
.iv-adm__match{min-height:36px;padding:0 .8rem;font-size:.8rem;text-decoration:none}
.iv-adm__player{margin-bottom:var(--sp-4)}
.iv-adm__pname{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0 0 8px;font-size:var(--fs-md)}
.iv-adm__pname strong{color:#fff}
.iv-adm__empty{margin-bottom:var(--sp-5)}
@media (max-width:639.98px){
  .iv-adm__exports{width:100%}
  .iv-adm__exports .iv-export-form{flex:1 1 auto}
  .iv-adm__exports .fy-btn{width:100%}
  .iv-adm__table th:nth-child(3),.iv-adm__table td:nth-child(3){display:none}
  /* the ranking table fits a phone of 320 px and up: narrower cells, headers that wrap ("Visible comments" was cut off at
     390 px), the number columns as narrow as their numbers, a long costume name may break */
  .iv-adm__table.fy-table th,.iv-adm__table.fy-table td{padding-inline:8px}
  .iv-adm__table.fy-table th{white-space:normal;letter-spacing:.06em}
  .iv-adm__table .is-num{width:1%}
  .iv-adm__table .iv-adm__item span{overflow-wrap:anywhere}
  .iv-adm__itemhead{align-items:flex-start}
}
/* phones under 390 px: the costume's picture above its name, so the name has the column's whole width. From 340 px a name
   keeps whole words (the catalog's longest are 13 letters); at 320 px a word of 11 letters or more may still break. */
@media (max-width:389.98px){.iv-adm__table .iv-adm__item{flex-direction:column;align-items:flex-start;gap:6px}}
