/* Painted UI icons (img/icons/*.webp), the same gold-and-ruby art as the crests.
   They replace the old line-art SVGs, so they carry their own colour: nothing
   here tints them. Sizes mirror the SVG rules they replaced.
   Motion is CSS only - cheap, and switched off for reduced-motion below. */
img.ico { display: block; flex: none; object-fit: contain; pointer-events: none; -webkit-user-drag: none; user-select: none; }

/* Sizes, by where the icon sits. */
.tab .tab-ico img.ico { width: 46px; height: 46px; }
.mode-tile-ico img.ico { width: 100%; height: 100%; }
.mode-tile-ico { width: 56px; height: 56px; filter: none; }
.mode-icon img.ico { width: 38px; height: 38px; }
.shop-bar img.ico { width: 32px; height: 32px; }
.home-live-ico img.ico { width: 44px; height: 44px; }
#screen-menu .home-mid .chip-league img.ico { width: 40px; height: 40px; }
.friend-play-btn img.ico { width: 32px; height: 32px; }
.brand-mark img.ico { width: 100%; height: 100%; }
.chat-open img.ico, .btn-icon img.ico { width: 34px; height: 34px; }
.gift-open img.ico { width: 36px; height: 36px; }
.chat-form .btn-send img.ico { width: 32px; height: 32px; }
.notify-ask-ico img.ico { width: 72px; height: 72px; }
.result-crest img.ico { width: 100%; height: 100%; }
.game-call img.ico, .game-mute img.ico, .game-broadcast img.ico { width: 34px; height: 34px; }
.lobby-share-row img.ico, .btn-share img.ico, .rooms-nearby img.ico { width: 28px; height: 28px; display: inline-block; vertical-align: -6px; }
.game-broadcast.is-live img.ico { filter: drop-shadow(0 0 5px rgba(255, 90, 90, .8)); }

/* Selected tab: glow and lift, since the art cannot change stroke weight. */
.tab .tab-ico img.ico { filter: saturate(.75) brightness(.9); transition: transform .15s ease, filter .15s ease; }
.tab.is-on .tab-ico img.ico { filter: drop-shadow(0 0 6px rgba(255, 200, 90, .65)); transform: translateY(-1px) scale(1.1); }

@media (prefers-reduced-motion: no-preference) {
  /* Always-on, slow and small: only the icons that mean "alive". */
  .ico-live { animation: ico-pulse 2.2s ease-in-out infinite; }
  .ico-bell { transform-origin: 50% 8%; animation: ico-ring 4s ease-in-out infinite; }
  .ico-turns { animation: ico-flip 6s ease-in-out infinite; }
  .ico-shop { animation: ico-bob 4s ease-in-out infinite; }
  /* In the tab bar they play a few times and settle, not forever. */
  .tab .tab-ico img:is(.ico-live, .ico-bell, .ico-turns, .ico-shop) { animation-iteration-count: 3; }
  .ico-logo { animation: none; }
  /* The rest wake up when touched or when their tile is in focus. */
  .mode-tile:hover .ico, .mode-tile:focus-visible .ico { animation: ico-wobble .6s ease; }
  .mode-tile:active .ico, .btn:active .ico, .btn-icon:active .ico { transform: scale(.88); }
  .friend-play-btn:hover .ico, .btn:hover .ico, .btn-icon:hover .ico { animation: ico-wobble .6s ease; }
  .ico-send:active { animation: ico-fly .35s ease-out; }
  .ico-chat { transform-origin: 50% 80%; }
  .btn-icon:hover .ico-chat { animation: ico-wobble .6s ease; }
  .game-call.is-on .ico-call { animation: ico-ring 1s ease-in-out infinite; }
  .tab.is-on .tab-ico img.ico { animation: ico-pop .35s ease-out; }
  .ico-rooms, .ico-home, .ico-friends { animation: none; }
}
@keyframes ico-pulse { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 120, 90, 0)); } 50% { transform: scale(1.08); filter: drop-shadow(0 0 6px rgba(255, 120, 90, .7)); } }
@keyframes ico-ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 80% { transform: rotate(-12deg); } 85% { transform: rotate(9deg); } 90% { transform: rotate(-6deg); } 95% { transform: rotate(3deg); } }
@keyframes ico-flip { 0%, 80%, 100% { transform: rotate(0); } 90% { transform: rotate(180deg); } }
@keyframes ico-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes ico-wobble { 0% { transform: rotate(0); } 25% { transform: rotate(-9deg) scale(1.08); } 60% { transform: rotate(7deg) scale(1.08); } 100% { transform: rotate(0); } }
@keyframes ico-fly { to { transform: translate(6px, -6px) scale(.9); opacity: .6; } }
@keyframes ico-pop { 0% { transform: scale(.8); } 60% { transform: translateY(-2px) scale(1.18); } 100% { transform: translateY(-1px) scale(1.1); } }
.hud-corner-box img.ico-settings { width: 34px; height: 34px; }
.sticker-lock img.ico { width: 22px; height: 22px; }
.row-actions .btn-icon img.ico { width: 32px; height: 32px; }
@media (prefers-reduced-motion: no-preference) {
  .hud-corner:hover .ico-settings { animation: ico-spin 1.2s ease; }
}
@keyframes ico-spin { to { transform: rotate(180deg); } }

/* The home logo stays still: no float, no motion. */
.brand-mark, .brand-mark .ico-logo { animation: none !important; }

/* Boxes that held a 22-26px glyph now hold a bigger icon: let them grow with it. */
.tab { min-height: 72px; }
.tab .tab-ico { height: 48px; }
#screen-menu .home-live-ico { width: 58px; height: 58px; }
#screen-menu .home-mid .chip-league { width: 82px; }
.chat-open, .btn-icon.chat-open, .game-call, .game-mute, .game-broadcast { min-width: 46px; min-height: 46px; }
.hud-corner-box { min-width: 48px; min-height: 48px; display: grid; place-items: center; }
.shop-bar { min-height: 48px; }
.brand-mark { width: 128px; height: 128px; }

/* Glyph buttons that became painted icons. */
.chat-close img.ico, .btn-ghost img.ico-close { width: 24px; height: 24px; }
#btn-my-profile img.ico, #btn-sound img.ico { width: 30px; height: 30px; }
#btn-sound.is-off img.ico { opacity: .4; filter: grayscale(.7); }
#btn-sound.is-off::after { content: ""; position: absolute; width: 26px; height: 2px; border-radius: 2px; background: rgba(255, 224, 160, .8); transform: rotate(-45deg); }
#btn-sound { position: relative; display: grid; place-items: center; }
