@font-face {
  font-family: Fredoka;
  src: url("../fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
:is(.iy-button,.iygl-button) {
  --top: #ffffff;
  --base: #dfeaff;
  --shade: #b6c9e8;
  --text: #13263f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  min-width: 44px;
  padding: 8px 18px;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(150deg,var(--top),var(--base));
  box-shadow: inset 1px 2px 3px var(--rim, #ffffffdf), inset -1px -2px 3px var(--shade),
    4px 5px 9px var(--cast, #6683a978),-4px -4px 9px var(--bounce, #ffffffdc);
  color: var(--text);
  font: 510 18px/1.2 Fredoka,system-ui,sans-serif;
  cursor: pointer;
}
/* The words and artwork share the native button's pointer target. */
:is(.iy-button,.iygl-button) > :is(span,svg,img) { pointer-events: none; }
.iy-button img { width: 27px; height: 27px; }
:is(.iy-button.go,.iygl-button-primary) { --top: #2964da; --base: #225bda; --shade: #1846ac; --text: #ffffff; }
.iy-button.go img { filter: brightness(0) invert(1); }
:is(.iy-button.primary,.iygl-button-outline) { --top: #ebf3ff; --base: #c4d9ff; --shade: #99b6e4; --text: #193c78; }
.iy-button.danger { --top: #fff9f5; --base: #ffdcd5; --shade: #d3978c; --text: #802d23; }
.iy-button.large { min-height: 64px; padding-inline: 26px; border-radius: 32px; font-size: 22px; }
.iy-button.compact { min-height: 44px; padding: 6px 14px; font-size: 16px; }
:is(.iy-button,.iygl-button):hover:not(:disabled) { filter: brightness(1.025); }
/* Paired actions show the current state in their icon and words. */
.iy-button[aria-pressed="true"]:not([data-pair]), :is(.iy-button,.iygl-button):active:not(:disabled) {
  background: linear-gradient(145deg,var(--base),var(--top));
  box-shadow: inset 3px 3px 6px var(--shade),inset -3px -3px 6px var(--rim, #ffffffb3);
}
.iy-button[data-choice-mode][aria-pressed="true"] { --base: #bbe9cd; --top: #e5faed; --shade: #84b79a; --text: #15482d; }
.iy-button[aria-pressed] { position: relative; }
.iy-button[data-choice-mode][aria-pressed="true"]::after {
  content: ""; position: absolute; right: -4px; top: -5px;
  width: 21px; height: 21px; border-radius: 50%;
  background: #167144 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10 3 3 7-7' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow: inset 0 1px 1px #acf2c9,0 2px 4px #062e2270;
}
@media (forced-colors: active) {
  .iy-button[data-choice-mode][aria-pressed="true"]::after { content: "✓"; color: HighlightText; background: Highlight; text-align: center; }
}
:is(.iy-button,.iygl-button):focus-visible { outline: 3px solid #225bda; outline-offset: 4px; }
:is(.iy-button,.iygl-button):disabled { background: #e3e9f2; color: #536278; box-shadow: none; cursor: default; }
:is(.iy-button,.iygl-button):disabled img { filter: grayscale(1); opacity: .6; }
@media (forced-colors: active) { :is(.iy-button,.iygl-button) { border: 1px solid ButtonText; } }

[data-theme="dark"] {
  color-scheme: dark;
  --rim: #a4c7ff4a;
  --cast: #040910b5;
  --bounce: #819dc90e;
}
[data-theme="dark"] :is(.iy-button,.iygl-button) { --top: #394b60; --base: #263446; --shade: #162131; --text: #f0f6ff; }
[data-theme="dark"] :is(.iy-button.go,.iygl-button-primary) { --top: #326bdb; --base: #2255c5; --shade: #12347d; }
[data-theme="dark"] :is(.iy-button.primary,.iygl-button-outline) { --top: #355888; --base: #26446d; --shade: #142940; }
[data-theme="dark"] .iy-button[data-choice-mode][aria-pressed="true"] { --top: #315947; --base: #214333; --shade: #102e23; --text: #e6f9ed; }
[data-theme="dark"] .iy-button.danger { --top: #67423e; --base: #492e30; --shade: #2b1d21; --text: #ffe1d8; }
[data-theme="dark"] :is(.iy-button,.iygl-button):disabled { background: #242e3b; color: #a5b2c1; }
[data-theme="dark"] :is(.iy-button,.iygl-button):focus-visible { outline-color: #9bc8ff; }

.motion svg { flex: none; color: #34669b; }
[data-theme="dark"] .motion svg { color: #c5e2ff; }
.motion .door { transform-origin: 23px 24px; }
.motion .leg { transform-origin: 15px 30px; }
.motion .slash,.motion[aria-checked="false"] .waves { display: none; }
.motion[aria-checked="false"] .slash { display: block; }
