/* SPDX-License-Identifier: MPL-2.0
   Copyright (c) 2026 Hyperiux. Modifications (c) 2026 WEBRYTME contributors.
   Approved Messingkant: ../experiments/shiny-button-v1/shiny-actions.css
   Property definitions: ../../../visualizations/shiny-controls-study/dist/hyperiux-ports.css
   MPL 2.0: ../../../visualizations/shiny-controls-study/dist/sources/upstream/LICENSE-EFFECTS.original.txt
   Play/pause artwork: Osmo, MIT. ../../../library/duo-2026-09-15/originals/action-icons/play/LICENSE.txt */

@property --hx-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@property --hx-shine {
  syntax: "<color>";
  initial-value: white;
  inherits: false;
}

html[data-wr-buttons="messing"] {
  --wr-messing-face: linear-gradient(168deg, #1b292e, #101e26);
  --wr-messing-edge: linear-gradient(170deg, #6e766b, #4b514b);
  --wr-messing-active-face: linear-gradient(165deg, #343833, #202d2d);
  --wr-messing-active-edge: linear-gradient(150deg, #d7b782, #756953);
  --wr-messing-ink: #f0e8d9;
  --wr-messing-radius: 14px 14px 14px 6px;
  --wr-messing-focus: #f3d8a3;
}

html[data-wr-buttons="messing"] :is(
  .glass-control, .inward-design-choice, .project-card-action,
  .website-preview-external, .website-preview-choice, .site-header .brass-nav
) {
  --hx-angle: -74deg;
  --hx-shine: #b1976f;
  --wr-messing-glint: conic-gradient(
    from var(--hx-angle), transparent, #79694f 6%, var(--hx-shine) 12%, #79694f 18%, transparent 24%
  );

  border: 1px solid transparent;
  border-radius: var(--wr-messing-radius);
  background:
    var(--wr-messing-face) padding-box,
    var(--wr-messing-glint) border-box,
    var(--wr-messing-edge) border-box;
  color: var(--wr-messing-ink);
  box-shadow: inset 0 1px 0 #eedfbd13, 0 3px 8px #050d1294;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-decoration: none;
  transition:
    --hx-angle 420ms cubic-bezier(.23, 1, .32, 1),
    --hx-shine 220ms ease-out,
    color 140ms ease-out,
    translate 130ms ease-out,
    box-shadow 130ms ease-out;
}

html[data-wr-buttons="messing"] :is(
  .glass-control, .inward-design-choice, .website-preview-external, .website-preview-choice
):focus-visible {
  outline: 2px solid var(--wr-messing-focus);
  outline-offset: 3px;
}

html[data-wr-buttons="messing"] .website-preview-choice:focus-visible {
  outline-offset: -4px;
}

html[data-wr-buttons="messing"] :is(
  .glass-control, .inward-design-choice, .website-preview-external, .website-preview-choice
):active:not(:disabled, [aria-disabled="true"]),
html[data-wr-buttons="messing"] .project-preview-link:active .project-card-action {
  translate: 0 1px;
  box-shadow: inset 0 2px 4px #050e15a8;
}

html[data-wr-buttons="messing"] :is(
  .glass-control, .inward-design-choice, .website-preview-external, .website-preview-choice
):focus-visible,
html[data-wr-buttons="messing"] .site-header .brass-nav:has(> .nav-glass-item:focus-visible),
html[data-wr-buttons="messing"] .project-preview-link:focus-visible .project-card-action {
  --hx-angle: 64deg;
  --hx-shine: #d4b784;
}

@media (hover: hover) and (pointer: fine) {
  html[data-wr-buttons="messing"] :is(
    .glass-control, .inward-design-choice, .website-preview-external,
    .website-preview-choice, .site-header .brass-nav
  ):hover:not(:disabled, [aria-disabled="true"]),
  html[data-wr-buttons="messing"] .project-preview-link:hover .project-card-action {
    --hx-angle: 64deg;
    --hx-shine: #d4b784;
  }
}

html[data-wr-buttons="messing"] :is(
  .coffee-side, .inward-design-choice, .about-portrait__framing
)[aria-pressed="true"],
html[data-wr-buttons="messing"] .website-preview-choice[aria-current="true"] {
  --wr-messing-face: var(--wr-messing-active-face);
  --wr-messing-edge: var(--wr-messing-active-edge);
}

html[data-wr-buttons="messing"] .project-preview-link:is(:hover, :focus-visible, :active) .project-card-action {
  border-color: transparent;
}

html[data-wr-buttons="messing"] .scene-opening .scene-actions > .glass-control {
  justify-content: center;
  min-height: 50px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 550;
}

html[data-wr-buttons="messing"] .website-preview-external { padding-inline: 12px; }
html[data-wr-buttons="messing"] .inward-design .design-action { color: var(--wr-messing-ink); }
html[data-wr-buttons="messing"] .coffee-side[aria-pressed="true"]:not(:focus-visible) { outline: none; }
html[data-wr-buttons="messing"] .inward-design-choice:active { transform: none; }
html[data-wr-buttons="messing"] .about-portrait__pause.glass-control { border-radius: 12px 12px 12px 5px; }
html[data-wr-buttons="messing"] .contact-result { --wr-messing-focus: #18382f; }

html[data-wr-buttons="messing"] .site-header .brass-nav {
  gap: 0;
  padding: 0;
  isolation: isolate;
  overflow: visible;
}

html[data-wr-buttons="messing"] .site-header .brass-nav > .nav-glass-item {
  min-width: 44px;
  min-height: 46px;
  padding-block: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--wr-messing-ink);
  box-shadow: none;
}

html[data-wr-buttons="messing"] .brass-nav > a.nav-glass-item { padding-inline: 17px; }
html[data-wr-buttons="messing"] .site-header .brass-nav > .nav-glass-item + .nav-glass-item { border-inline-start: 1px solid #dac29a3d; }
html[data-wr-buttons="messing"] .site-header .brass-nav > a:first-of-type { border-radius: 13px 0 0 5px; }
html[data-wr-buttons="messing"] .site-header .brass-nav > #music-toggle { border-radius: 0 13px 13px 0; }

html[data-wr-buttons="messing"] .site-header .brass-nav > .nav-glass-item[aria-current] {
  background: #e9c18615;
}

html[data-wr-buttons="messing"] .brass-nav .brass-marker {
  bottom: 5px;
  z-index: 2;
}

html[data-wr-buttons="messing"] .brass-nav > .nav-glass-item:focus-visible {
  outline: 2px solid var(--wr-messing-focus);
  outline-offset: -4px;
}

@media (hover: hover) and (pointer: fine) {
  html[data-wr-buttons="messing"] .site-header .brass-nav > .nav-glass-item:hover:not(:disabled) {
    background: #ebce971b;
  }
}

html[data-wr-buttons="messing"] .site-header .brass-nav > .nav-glass-item:active:not(:disabled) {
  background: #ebce9725;
  box-shadow: inset 0 2px 4px #050e15a8;
}

html[data-wr-buttons="messing"] #music-toggle .wr-play-pause {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #a98b61;
  border-radius: 10px 10px 10px 5px;
  background: linear-gradient(155deg, #3c4035, #202e2d);
  box-shadow: inset 0 1px 0 #ecd0a229, 0 2px 4px #050d1280;
  color: #f1dfbe;
  transition: border-color 160ms ease-out, color 160ms ease-out;
}

html[data-wr-buttons="messing"] #music-toggle .wr-play-pause svg {
  display: block;
  width: 17px;
  height: 18px;
}

html[data-wr-buttons="messing"] #music-toggle .wr-play-pause path {
  transform-origin: center;
  transform-box: view-box;
  transition: transform 200ms cubic-bezier(.2, .7, .3, 1), opacity 160ms ease-out;
}

html[data-wr-buttons="messing"] #music-toggle .wr-play-pause__pause {
  opacity: 0;
  transform: rotate(-35deg);
}

html[data-wr-buttons="messing"] #music-toggle[data-state="playing"] .wr-play-pause__play {
  opacity: 0;
  transform: rotate(35deg);
}

html[data-wr-buttons="messing"] #music-toggle[data-state="playing"] .wr-play-pause__pause {
  opacity: 1;
  transform: none;
}

html[data-wr-buttons="messing"] #music-toggle[data-state="playing"] .wr-play-pause {
  border-color: #e0bd82;
  color: #fff0cb;
}

html[data-wr-buttons="messing"] #music-toggle .music-note { width: 12px; height: 12px; color: #c2af8c; }
html[data-wr-buttons="messing"] #music-toggle[data-state="playing"] .music-note { color: #f1d8a6; }

@media (max-width: 760px) {
  html[data-wr-buttons="messing"] .brass-nav > a.nav-glass-item { padding-inline: 10px; }
  html[data-wr-buttons="messing"] .scene-opening .scene-actions > .glass-control {
    min-height: 46px;
    padding-inline: 14px;
    font-size: 14px;
  }
}

@media (max-width: 400px) {
  html[data-wr-buttons="messing"] .site-header {
    column-gap: 4px;
    padding-inline: clamp(8px, 12.5vw - 32px, 18px);
  }
  html[data-wr-buttons="messing"] .brass-nav > a.nav-glass-item {
    padding-inline: clamp(4px, 7.5vw - 20px, 10px);
  }
  html[data-wr-buttons="messing"] .site-header .brass-nav > .nav-music {
    flex-basis: clamp(48px, 15vw, 60px);
    width: auto;
  }
  html[data-wr-buttons="messing"] #music-toggle .glass-label { gap: 4px; }
}

@media (max-width: 360px) {
  html[data-wr-buttons="messing"] .scene-opening .scene-actions > .glass-control {
    padding-inline: 10px;
    font-size: 13px;
  }
}

html.is-still[data-wr-buttons="messing"] :is(
  .glass-control, .inward-design-choice, .project-card-action, .website-preview-external,
  .website-preview-choice, .site-header .brass-nav, #music-toggle .wr-play-pause, #music-toggle .wr-play-pause path
) {
  transition: none;
  translate: none;
}

@media (prefers-reduced-motion: reduce) {
  html[data-wr-buttons="messing"] :is(
    .glass-control, .inward-design-choice, .project-card-action, .website-preview-external,
    .website-preview-choice, .site-header .brass-nav, #music-toggle .wr-play-pause, #music-toggle .wr-play-pause path
  ) {
    transition: none;
    translate: none;
  }
}

@media (forced-colors: active) {
  html[data-wr-buttons="messing"] { --wr-messing-focus: Highlight; }

  html[data-wr-buttons="messing"] :is(
    .glass-control, .inward-design-choice, .project-card-action, .website-preview-external,
    .website-preview-choice, .site-header .brass-nav, #music-toggle .wr-play-pause
  ) {
    background: ButtonFace;
    border-color: ButtonText;
    color: ButtonText;
    box-shadow: none;
  }

  html[data-wr-buttons="messing"] .site-header .brass-nav > .nav-glass-item { color: ButtonText; }
  html[data-wr-buttons="messing"] .site-header .brass-nav > .nav-glass-item + .nav-glass-item { border-inline-start-color: ButtonText; }
  html[data-wr-buttons="messing"] .contact-result { --wr-messing-focus: Highlight; }

  html[data-wr-buttons="messing"] :is(.inward-design-choice, .coffee-side, .about-portrait__framing)[aria-pressed="true"],
  html[data-wr-buttons="messing"] .website-preview-choice[aria-current="true"] { border-color: Highlight; }
}
