@charset "UTF-8";
:root {
  --ninjaBlack: #000;
  --ninjaBlack2: #010101;
  --ninjaGray: #888;
  --ninjaGray2: #eee;
  --ninjaSkin: #f1c27d;
  --ninjaSkin2: #ae8953;
  --ninjaBorder: #000;
  --ninjaBorderWidth: 2px;
  --animationDuration: 3s;
  --animationDelay: 0.5s;
  --animationCount: 1;
  --animationTiming: cubic-bezier(0.5, 0.1, 1, 0.8);
  --animationTiming: ease-out;
  --ninja-dynamic-color: #0000ff;
  --ninja-logo-color-1: #09133d;
  --ninja-logo-color-2: #1f3c93;
  --ninja-logo-color-3: #5f88e2;
  --tnw-glass-bg: rgba(255, 255, 255, 0.16);
  --tnw-glass-border: rgba(255, 255, 255, 0.35);
  --tnw-glass-shadow: rgba(0, 0, 0, 0.18);
  --tnw-highlight: rgba(255, 255, 255, 0.75);
  --tnw-pill-bg: rgba(255, 255, 255, 0.76);
  --tnw-icon: rgba(255, 255, 255, 0.96);
  --tnw-icon-active: #000000;
  --tnw-divider: rgba(0, 0, 0, 0.14);
}

[data-theme="dark"] {
  --tnw-glass-bg: rgba(30, 30, 35, 0.5);
  --tnw-glass-border: rgba(255, 255, 255, 0.16);
  --tnw-glass-shadow: rgba(0, 0, 0, 0.48);
  --tnw-highlight: rgba(255, 255, 255, 0.22);
  --tnw-pill-bg: rgba(60, 60, 65, 0.8);
  --tnw-icon: rgba(255, 255, 255, 0.55);
  --tnw-icon-active: #fff;
  --tnw-divider: rgba(255, 255, 255, 0.2);
}

@keyframes widget-brand-shimmer {
  to { background-position: 100% 50%; }
}

div {
  position: relative;
}

*::after,
*::before {
  content: "";
  position: absolute;
  display: block;
}

.ninja {
  animation: kataMain var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  min-width: 400px;
  height: 330px;
  display: flex;
  justify-content: center;
  transform-origin: bottom center;
  transition: 0.2s;
  top: 0;
  cursor: pointer;
}
.ninja:hover .armBottom.arm2Bottom {
  transform: rotate(145deg);
  transition: 0.2s;
}
.ninja:hover .armBottom.arm1Bottom {
  transform: rotate(-120deg);
  transition: 0.2s;
}
.ninja:hover .eye.eyeRight::after {
  top: -12px;
}
.ninja:hover .noggin {
  transform: rotate(-10deg);
}
.ninja:hover .headBandWrap {
  top: -2em;
  right: 1em;
  transform: rotate(-10deg) scaley(0.95);
}

.noggin {
  animation: kata var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  background: var(--ninjaBlack);
  border-radius: 50% 50% 50% 50%/60% 60% 40% 40%;
  border: var(--ninjaBorderWidth) solid var(--ninjaBorder);
  width: 9em;
  height: 8em;
  top: 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
  transition: 0.2s;
}
.noggin::before {
  content: "岡羽ム";
  color: var(--ninjaBlack);
  font-weight: 900;
  font-size: 0.9em;
  top: 2.1em;
  opacity: 1;
  z-index: 1;
}
.noggin:after {
  content: "";
  position: absolute;
  top: 2.9em;
  display: block;
  width: 10em;
  height: 3em;
  border-radius: 50%;
  box-shadow: 0px -20px 0 0 var(--ninjaGray2);
}

.eyeHole {
  position: absolute;
  z-index: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 15px 15px 0;
  width: 7em;
  height: 3em;
  background: var(--ninjaSkin);
  border-radius: 100px/50px;
  bottom: 20px;
  border: var(--ninjaBorderWidth) solid var(--ninjaBorder);
  overflow: hidden;
}
.eyeHole::after {
  content: "";
  display: block;
  position: absolute;
  top: 8px;
  width: 11em;
  height: 3em;
  border-radius: 50%;
  box-shadow: 0px -10px 0 0 var(--ninjaSkin2);
}
.eyeHole .eyeWrap {
  animation: eyes var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  display: flex;
  justify-content: space-around;
  width: 7em;
}
.eyeHole .eye {
  width: 20px;
  height: 20px;
  background: var(--ninjaBlack);
  border-radius: 50%;
  box-shadow: -4px -3px 0 0 var(--ninjaSkin2);
  transition: 0.2s;
}
.eyeHole .eye::before {
  content: "";
  display: block;
  position: absolute;
  width: 8px;
  height: 8px;
  right: 2px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
}
.eyeHole .eye::after {
  content: "";
  display: block;
  position: absolute;
  width: 25px;
  height: 5px;
  background: var(--ninjaBlack);
  border-radius: 0 100%;
  transition: 0.2s;
}
.eyeHole .eye.eyeLeft {
  animation: kataLeftEye 15s 7s ease-in-out infinite;
  transform-origin: center;
}
.eyeHole .eye.eyeLeft::before {
  animation: kataLeftEye2 15s 7s ease-in-out infinite;
}
.eyeHole .eye.eyeLeft::after {
  top: -8px;
  right: 0;
  transform: rotate(10deg);
  transition: 0.2s;
}
.eyeHole .eye.eyeRight::after {
  animation: kataEyebrow var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  top: -7px;
  transform: rotate(-25deg);
}

.headBandWrap {
  animation: kataBand var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  transition: 0.2s;
  position: absolute;
  top: 0;
  right: 0em;
  transform-origin: bottom left;
}
.headBandWrap .headBand {
  position: absolute;
  z-index: -1;
  height: 2em;
  background: var(--ninjaGray2);
  border-radius: 0 100%;
  transform-origin: 0 0;
  border: var(--ninjaBorderWidth) solid var(--ninjaBorder);
  box-shadow: inset 0px -5px 0 0 var(--ninjaGray);
}
.headBandWrap .headBand.headBand1 {
  width: 5em;
  top: 3.9em;
  right: 6em;
  -webkit-transform: rotate(-50deg);
  transform: rotate(-40deg);
}
.headBandWrap .headBand.headBand2 {
  width: 3em;
  top: 3em;
  right: 6em;
  transform: rotate(0deg);
}

.torso {
  animation: kata2 var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  background: var(--ninjaBlack);
  position: absolute;
  top: 6em;
  width: 6.5em;
  height: 6em;
  transform-origin: bottom center;
}

.arms {
  top: 0.5em;
}
.arms > *, .arms > * > * {
  position: absolute;
}
.arms .arm1 {
  animation: arm1Kata var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  left: 0;
  transform: rotate(35deg);
  transform-origin: top left;
}
.arms .arm2 {
  animation: arm2Kata var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  top: 2em;
  right: 1.8em;
  transform: rotate(-50deg);
  transform-origin: top right;
}
.arms .armTop {
  width: 2.5em;
  height: 5.5em;
  background: var(--ninjaBlack);
  border-radius: 1em;
}
.arms .armBottom,
.arms .armBottomSleeve {
  position: absolute;
  width: 2.4em;
  top: 4.5em;
  height: 4em;
}
.arms .armBottom.arm1Bottom,
.arms .armBottomSleeve.arm1Bottom {
  animation: arm1bottomKata var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  transform-origin: top center;
  transform: rotate(-130deg);
  transition: 0.2s;
}
.arms .armBottom.arm2Bottom,
.arms .armBottomSleeve.arm2Bottom {
  animation: arm2bottomKata var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  transform-origin: top center;
  transform: rotate(140deg);
  transition: 0.2s;
}
.arms .armBottom .hand,
.arms .armBottomSleeve .hand {
  position: absolute;
  z-index: -1;
  width: 1.5em;
  height: 2em;
  background: var(--ninjaSkin);
  border: var(--ninjaBorderWidth) solid var(--ninjaBorder);
  box-shadow: inset 5px 0px 0 var(--ninjaSkin2);
}
.arms .armBottom .hand.hand1,
.arms .armBottomSleeve .hand.hand1 {
  top: 3.6em;
  right: 0.4em;
  -webkit-transform: rotate(30deg);
  transform: rotate(-2deg);
  border-radius: 72% 28% 95% 25%/46% 29% 71% 54%;
}
.arms .armBottom .hand.hand2,
.arms .armBottomSleeve .hand.hand2 {
  top: 3.5em;
  right: 0.7em;
  -webkit-transform: rotate(-90deg);
  transform: rotate(-150deg);
  border-radius: 72% 18% 0% 0%/81% 49% 14% 7%;
}
.arms .armBottom .armBottomSleeve,
.arms .armBottomSleeve .armBottomSleeve {
  top: 0;
  background: var(--ninjaBlack2);
  border-top-left-radius: 1em;
  border-top-right-radius: 1em;
}

.pants {
  animation: kata3 var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  position: absolute;
  width: 6.5em;
  height: 2em;
  top: 12em;
  background: var(--ninjaBlack);
  transform-origin: bottom center;
}
.pants::after {
  content: "";
  position: absolute;
  top: 2.1em;
  left: 2.6em;
  display: block;
  width: 1.3em;
  height: 3em;
  border-radius: 50%;
  box-shadow: 0px -20px 0 0 var(--ninjaBlack);
}
.pants .leg1 {
  animation: kataLeg1 var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  position: absolute;
  left: 1px;
  transform: rotate(10deg);
  transform-origin: top left;
}
.pants .leg2 {
  animation: kataLeg2 var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  position: absolute;
  top: 0;
  right: 1px;
  transform: rotate(-10deg);
  transform-origin: top right;
}
.pants .legTop {
  width: 3.2em;
  height: 3.5em;
  background: var(--ninjaBlack);
  border-radius: 1em;
}

.tnw-liquid-shell {
  width: auto;
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
}

.tnw-liquid-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px;
  border-radius: 999px;
  /* FLICKER FIX 2026-06-15: backdrop-filter removed — this glass nav lives in a
     TRANSPARENT iframe over the dashboard, so the live blur re-blurred the page behind
     it every scroll/animation frame (the ghost trails at the top). A more opaque frosted
     bg keeps the look with zero page bleed. */
  background: var(--tnw-glass-bg);
  background-color: rgba(244, 248, 255, 0.82);
  box-shadow:
    0 16px 40px -18px var(--tnw-glass-shadow),
    0 4px 12px -6px var(--tnw-glass-shadow),
    inset 0 1px 1px var(--tnw-highlight),
    inset 0 0 0 1px var(--tnw-glass-border);
  isolation: isolate;
}

.tnw-liquid-glare-container {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  overflow: hidden;
  pointer-events: none;
}

.tnw-liquid-glare {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(circle 90px at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.4) 0%, transparent 100%);
}

.tnw-liquid-nav:hover .tnw-liquid-glare {
  opacity: 1;
}

.tnw-nav-items {
  position: relative;
  display: flex;
  gap: 4px;
}

.tnw-active-pill {
  position: absolute;
  top: 0;
  left: 0;
  height: 44px;
  border-radius: 999px;
  background: var(--tnw-pill-bg);
  box-shadow:
    0 0 0 1px rgba(8, 12, 20, 0.7),
    0 0 14px rgba(255, 255, 255, 0.35),
    0 8px 18px rgba(0, 0, 0, 0.34),
    inset 0 1px 1px rgba(255, 255, 255, 0.65);
  z-index: 1;
}

.tnw-nav-btn,
.tnw-theme-btn {
  border: 0;
  background: transparent;
  color: var(--tnw-icon);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tnw-nav-btn {
  position: relative;
  z-index: 2;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font: 600 15px/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

.tnw-btn-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tnw-btn-content i,
.tnw-btn-content svg {
  width: 20px;
  height: 20px;
  font-size: 18px;
}

.tnw-nav-btn.active {
  color: var(--tnw-icon-active);
}

.tnw-divider {
  width: 1px;
  height: 24px;
  margin: 0 6px;
  background: var(--tnw-divider);
}

.tnw-theme-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.tnw-theme-btn:hover,
.tnw-theme-btn:focus-visible {
  color: var(--tnw-icon-active);
  outline: none;
}
.pants .legBottom,
.pants .legBottomSleeve {
  position: absolute;
  width: 3.2em;
  top: 2.5em;
  height: 3.5em;
}
.pants .legBottom.leg1Bottom,
.pants .legBottomSleeve.leg1Bottom {
  transform-origin: top center;
  transform: rotate(0deg);
}
.pants .legBottom.leg2Bottom,
.pants .legBottomSleeve.leg2Bottom {
  animation: kataLeg2bottom var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  transform-origin: top left;
  top: 2.5em;
  right: 0.05em;
  transform: rotate(0deg);
}
.pants .legBottom .feet,
.pants .legBottomSleeve .feet {
  position: absolute;
  z-index: -1;
  width: 3.5em;
  height: 2em;
  background: var(--ninjaBlack);
}
.pants .legBottom .feet.foot1,
.pants .legBottomSleeve .feet.foot1 {
  animation: kataFoot1 var(--animationDuration) var(--animationDelay) var(--animationTiming) var(--animationCount);
  top: 3.1em;
  right: 0.1em;
  transform: rotate(-2deg);
  border-radius: 50% 50% 84% 16%/88% 16% 84% 12%;
}
.pants .legBottom .feet.foot2,
.pants .legBottomSleeve .feet.foot2 {
  top: 3.1em;
  right: -0.5em;
  transform: rotate(0deg);
  border-radius: 50% 50% 14% 86%/17% 90% 10% 83%;
}
.pants .legBottom .legBottomSleeve,
.pants .legBottomSleeve .legBottomSleeve {
  top: 0;
  background: var(--ninjaBlack2);
  border-top-left-radius: 1em;
  border-top-right-radius: 1em;
}

.sword {
  animation: kata4 var(--animationDuration) 1 var(--animationTiming) var(--animationCount);
  position: absolute;
  width: 13em;
  height: 0.5em;
  left: 7.9em;
  top: 6.7em;
  background: var(--ninjaGray);
  border-bottom-right-radius: 20px;
  box-shadow: inset 0px -3px 0 0 var(--ninjaGray2);
  overflow: visible;
  transform: rotate(35deg);
  -webkit-transform-origin: top left;
  transform-origin: top left;
}
.sword::before {
  height: 0.8em;
  width: 3.5em;
  left: -3em;
  top: -2px;
  background: var(--ninjaBlack2);
  box-shadow: inset 0 -5px 0 black;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}
.sword::after {
  width: 1.6em;
  height: 0.5em;
  border-radius: 1em/0.5em;
  left: -5px;
  top: 0;
  background: var(--ninjaBlack2);
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}

.star {
  transform-origin: center center;
  z-index: -1;
  animation: star 2.9s 0.58s;
  position: absolute;
  left: -6em;
  top: 2.5em;
  display: block;
  width: 0px;
  height: 0px;
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
  border-bottom: 70px solid #fff;
  transform: scale(0.22);
}
.star::before {
  content: "";
  position: absolute;
  top: -45px;
  left: -65px;
  display: block;
  height: 0;
  width: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-bottom: 80px solid #fff;
  transform: rotate(-35deg);
}
.star::after {
  content: "";
  position: absolute;
  top: 3px;
  left: -105px;
  display: block;
  width: 0px;
  height: 0px;
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
  border-bottom: 70px solid #fff;
  transform: rotate(-70deg);
}

@keyframes eyes {
  5% {
    left: 1.2em;
    transform: translateY(-4px);
  }
  95% {
    left: 1.2em;
    transform: translateY(-4px);
  }
  100% {
    left: 0;
    transform: translateY(0);
  }
}
@keyframes star {
  0% {
    transform: translate(0, 0) scale(0.22) rotate(0deg);
  }
  100% {
    transform: translate(-50vw, 250vw) scale(0.22) rotate(-2500deg);
  }
}
@keyframes kataMain {
  5% {
    top: 1em;
  }
  95% {
    top: 1em;
  }
  100% {
    top: 0;
  }
}
@keyframes kata {
  5% {
    top: 3em;
    transform: rotate(-20deg) scaley(0.95);
  }
  95% {
    top: 3em;
    transform: rotate(-20deg) scaley(0.95);
  }
  100% {
    top: 0;
    transform: rotate(0deg) scaley(1);
  }
}
@keyframes kataBand {
  5% {
    top: 1em;
    right: 1em;
    transform: rotate(-10deg) scaley(0.95);
  }
  95% {
    top: 1em;
    right: 1em;
    transform: rotate(-10deg) scaley(0.95);
  }
  100% {
    top: 0;
    right: 0em;
    transform: rotate(0deg) scaley(1);
  }
}
@keyframes kataEye {
  5% {
    height: 16px;
  }
  95% {
    height: 16px;
  }
  100% {
    height: 20px;
  }
}
@keyframes kataEyebrow {
  5% {
    top: -13px;
  }
  95% {
    top: -13px;
  }
  100% {
    top: -6px;
  }
}
@keyframes kataLeftEye {
  1% {
    transform: scaleY(0.2);
  }
  2% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(1);
  }
}
@keyframes kataLeftEye2 {
  1% {
    opacity: 0;
  }
  2% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@keyframes kata2 {
  5% {
    top: 9em;
    transform: scaley(0.85);
  }
  95% {
    top: 9em;
    transform: scaley(0.85);
  }
  100% {
    top: 6em;
    transform: scaley(1);
  }
}
@keyframes arm1Kata {
  5% {
    transform: rotate(-5deg);
  }
  95% {
    transform: rotate(-5deg);
  }
  100% {
    transform: rotate(35deg);
  }
}
@keyframes arm1bottomKata {
  5% {
    transform: rotate(0deg);
  }
  95% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-130deg);
  }
}
@keyframes arm2Kata {
  5% {
    transform: rotate(-120deg);
  }
  95% {
    transform: rotate(-120deg);
  }
  100% {
    transform: rotate(-50deg);
  }
}
@keyframes arm2bottomKata {
  5% {
    transform: rotate(0deg);
  }
  95% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(140deg);
  }
}
@keyframes kata3 {
  5% {
    top: 13em;
    transform: scaley(0.85);
  }
  95% {
    top: 13em;
    transform: scaley(0.85);
  }
  100% {
    top: 12em;
    transform: scaley(1);
  }
}
@keyframes kataLeg1 {
  5% {
    left: 4px;
    transform: rotate(50deg);
  }
  95% {
    left: 4px;
    transform: rotate(50deg);
  }
  100% {
    left: 1px;
    transform: rotate(10deg);
  }
}
@keyframes kataLeg2 {
  5% {
    right: 22px;
    transform: rotate(-60deg);
  }
  95% {
    right: 22px;
    transform: rotate(-60deg);
  }
  100% {
    right: 1px;
    transform: rotate(-10deg);
  }
}
@keyframes kataLeg2bottom {
  5% {
    right: -1.5em;
    top: 0.5em;
    transform: rotate(60deg);
  }
  95% {
    right: -1.5em;
    top: 0.5em;
    transform: rotate(60deg);
  }
  100% {
    right: 0.05em;
    top: 2.5em;
    transform: rotate(0deg);
  }
}
@keyframes kataFoot1 {
  5% {
    right: -0.3em;
    transform: rotate(-35deg);
  }
  95% {
    right: -0.3em;
    transform: rotate(-35deg);
  }
  100% {
    right: 0.1em;
    transform: rotate(-2deg);
  }
}
@keyframes kata4 {
  5% {
    top: 9.5em;
    transform: rotate(13deg) scaley(0.95);
  }
  95% {
    top: 9.5em;
    transform: rotate(13deg) scaley(0.95);
  }
  100% {
    top: 6.7em;
    transform: rotate(35deg) scaley(1);
  }
}
html {
  width: 100%;
  height: 100vh;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: inherit;
}
*:before, *:after {
  box-sizing: inherit;
}

body {
  background: transparent;
  background-color: transparent;
  font-family: "Titillium Web", sans-serif;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  padding-top: 1.2rem;
}

h1 {
  font-size: 3em;
  font-weight: 900;
  opacity: 1;
  margin: 3.2rem 0 0.45rem;
}

.buttonWrap {
  position: static;
  width: 100%;
  margin-top: 0.7rem;
  display: flex;
  justify-content: center;
  outline: none !important;
}
.buttonWrap::before, .buttonWrap::after {
  outline: none !important;
}

.outlineToggle,
.animTrigger {
  z-index: 4;
  outline: none !important;
  margin: 0 2vw;
}
.outlineToggle::before, .outlineToggle::after,
.animTrigger::before,
.animTrigger::after {
  outline: none !important;
}
.outlineToggle input,
.animTrigger input {
  display: none;
  outline: none !important;
}
.outlineToggle label,
.animTrigger label {
  position: relative;
  font-family: arial;
  outline: none !important;
  cursor: pointer;
  background: #000;
  color: goldenrod;
  margin: 10px;
  font-size: 1.2em;
  transition: 0.2s;
  padding: 10px 15px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid #000;
  overflow: hidden;
}
.outlineToggle label:hover,
.animTrigger label:hover {
  transform: scale(1.03);
}
.outlineToggle label:active,
.animTrigger label:active {
  transform: scale(1);
}
.outlineToggle label::after,
.animTrigger label::after {
  left: -3em;
  height: 4em;
  width: 2em;
  background: rgba(255, 255, 255, 0.062745098);
  transform: skew(-30deg);
  transition: 0.3s;
}
.outlineToggle label:hover::after,
.animTrigger label:hover::after {
  left: 110%;
}

body.outlineIt *,
body.outlineIt *::before,
body.outlineIt *::after {
  outline: 1px dashed goldenrod;
}

.widget-refresh-header {
  width: 100%;
  margin: 0 0 0.3rem;
  padding: 0;
  text-align: center;
  white-space: nowrap; /* one line: "Last Report Imported for <name> was <date>" */
  font-family: "Titillium Web", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #f6fbff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease, max-height 0.18s ease, margin 0.18s ease;
  pointer-events: none;
}

.widget-refresh-header.is-visible {
  opacity: 1;
  max-height: 2rem;
  transform: translateY(0);
}

.widget-console {
  width: 100%;
  min-height: 14.6rem;
  max-height: 14.6rem;
  margin: 0 0 2rem; /* lift the console up off the bottom edge */
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(6, 13, 6, 0.98), rgba(2, 7, 2, 0.98));
  border: 1px solid var(--widget-console-border, rgba(67, 125, 67, 0.45));
  box-shadow: inset 0 0 0 1px var(--widget-console-glow, rgba(32, 75, 32, 0.22)), 0 10px 26px rgba(0, 0, 0, 0.28);
  color: var(--widget-console-color, #6dff8f);
  font-family: "SFMono-Regular", "Consolas", "Menlo", "Monaco", monospace;
  font-size: 0.83rem;
  line-height: 1.35;
  text-align: left;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(93, 181, 110, 0.62) rgba(8, 16, 8, 0.88);
}

.widget-console.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.widget-console-line {
  display: block;
  white-space: normal;
  word-break: break-word;
  /* Console now lives in its own left half-column (SMS is the right half). */
  max-width: 100%;
}

.widget-console-line::before {
  content: "> ";
  color: var(--widget-console-prefix, rgba(132, 255, 159, 0.72));
}

.widget-console-line + .widget-console-line {
  margin-top: 0.2rem;
}

.widget-console.is-error {
  color: var(--widget-console-color, #8dff9e);
  border-color: var(--widget-console-border, rgba(156, 255, 178, 0.42));
}

html,
body {
  height: 100%;
  min-height: 100%;
}

body {
  display: block;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
}

.widget-shell {
  --widget-frame-scale-y: 1;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 0.5rem;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  aspect-ratio: auto;
  padding: 1.55rem 1.7rem 1.1rem;
  border-radius: 0;
  background-image: url("/assets/widget-console-frame-square-v6.png");
  background-image: -webkit-image-set(
    url("/assets/widget-console-frame-square-v6.webp") type("image/webp"),
    url("/assets/widget-console-frame-square-v6.png") type("image/png")
  );
  background-image: image-set(
    url("/assets/widget-console-frame-square-v6.webp") type("image/webp"),
    url("/assets/widget-console-frame-square-v6.png") type("image/png")
  );
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% calc(100% * var(--widget-frame-scale-y));
  background-color: #ffffff;
  box-shadow: none;
}

.widget-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.widget-column {
  position: relative;
  z-index: 1;
}

.widget-column-left {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  padding-top: 1.45rem;
}

/* Version Update box — white bold text on a subtle dark glass panel */
.widget-version-panel {
  width: 100%;
  max-width: 18rem;
  box-sizing: border-box;
  padding: 0.9rem 1.05rem;
  border-radius: 0.85rem;
  background: rgba(8, 12, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  color: #ffffff;
  text-align: left;
}

.widget-version-title {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}

.widget-version-number {
  margin: 0 0 0.55rem;
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
}

.widget-version-list {
  margin: 0;
  padding-left: 1.05rem;
  list-style: disc;
}

.widget-version-list li {
  margin: 0.2rem 0;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
}

.widget-column-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.95rem;
  width: 100%;
  max-width: none;
  padding-top: 0.85rem;
}

.widget-column-right {
  display: flex;
  justify-content: center;
  min-width: 0;
  padding-top: 2rem;
}

.widget-refresh-summary {
  width: 100%;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  white-space: pre-line;
}

.ninja {
  min-width: 0;
  width: 13.8rem;
  height: 15rem;
  transform: scale(0.72);
  transform-origin: left center;
  margin-top: 1.35rem;
}

.widget-console {
  width: 100%;
  min-height: 14.6rem;
  max-height: 14.6rem;
  margin: 0;
  padding: 0.72rem 0.95rem;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.widget-console:empty {
  opacity: 0.82;
}

.buttonWrap {
  position: static;
  width: min(26rem, 100%);
  bottom: auto;
  display: flex;
  justify-content: center;
}

.widget-refresh-action {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0.1rem 0;
}

.widget-refresh-button-wrap {
  --widget-refresh-angle-1: -75deg;
  --widget-refresh-angle-2: -45deg;
  --widget-refresh-hover-time: 400ms;
  --widget-refresh-hover-ease: cubic-bezier(0.25, 1, 0.5, 1);
  --widget-refresh-border-width: clamp(1px, 0.0625em, 4px);
  position: relative;
  z-index: 2;
  border-radius: 999vw;
  background: transparent;
  pointer-events: none;
  transition: all var(--widget-refresh-hover-time) var(--widget-refresh-hover-ease);
}

.widget-refresh-button-shadow {
  --shadow-cutoff-fix: 2em;
  position: absolute;
  width: calc(100% + var(--shadow-cutoff-fix));
  height: calc(100% + var(--shadow-cutoff-fix));
  top: calc(0% - var(--shadow-cutoff-fix) / 2);
  left: calc(0% - var(--shadow-cutoff-fix) / 2);
  filter: blur(clamp(2px, 0.125em, 12px));
  pointer-events: none;
}

.widget-refresh-button-shadow::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: 999vw;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
  width: calc(100% - var(--shadow-cutoff-fix) - 0.25em);
  height: calc(100% - var(--shadow-cutoff-fix) - 0.25em);
  top: calc(var(--shadow-cutoff-fix) - 0.5em);
  left: calc(var(--shadow-cutoff-fix) - 0.875em);
  padding: 0.125em;
  box-sizing: border-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.widget-refresh-button {
  all: unset;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20.5rem;
  border-radius: 999vw;
  pointer-events: auto;
  background: linear-gradient(
    -75deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.05)
  );
  box-shadow:
    inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.25em 0.125em -0.125em rgba(0, 0, 0, 0.2),
    0 0 0.1em 0.25em inset rgba(255, 255, 255, 0.2),
    0 0 0 0 rgba(255, 255, 255, 1);
  /* FLICKER FIX: backdrop-filter removed (transparent-iframe page bleed on the Refresh pill). */
  transition: all var(--widget-refresh-hover-time) var(--widget-refresh-hover-ease);
}

.widget-refresh-button:hover {
  transform: scale(0.975);
  box-shadow:
    inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.15em 0.05em -0.1em rgba(0, 0, 0, 0.25),
    0 0 0.05em 0.1em inset rgba(255, 255, 255, 0.5),
    0 0 0 0 rgba(255, 255, 255, 1);
}

.widget-refresh-button span {
  position: relative;
  display: block;
  font-family: "Inter", sans-serif;
  letter-spacing: -0.05em;
  font-weight: 800;
  font-size: 1.06rem;
  color: #ffffff;
  text-shadow: 0 0.2em 0.08em rgba(0, 0, 0, 0.42);
  padding-inline: 2.05em;
  padding-block: 0.94em;
  transition: all var(--widget-refresh-hover-time) var(--widget-refresh-hover-ease);
}

.widget-refresh-button span::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 1;
  width: calc(100% - var(--widget-refresh-border-width));
  height: calc(100% - var(--widget-refresh-border-width));
  top: calc(0% + var(--widget-refresh-border-width) / 2);
  left: calc(0% + var(--widget-refresh-border-width) / 2);
  box-sizing: border-box;
  border-radius: 999vw;
  overflow: clip;
  background: linear-gradient(
    var(--widget-refresh-angle-2),
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 40% 50%,
    rgba(255, 255, 255, 0) 55%
  );
  mix-blend-mode: screen;
  background-size: 200% 200%;
  background-position: 0% 50%;
  background-repeat: no-repeat;
  transition:
    background-position calc(var(--widget-refresh-hover-time) * 1.25) var(--widget-refresh-hover-ease),
    --widget-refresh-angle-2 calc(var(--widget-refresh-hover-time) * 1.25) var(--widget-refresh-hover-ease);
  pointer-events: none;
  opacity: 0.35;
}

.widget-refresh-button:hover span::after {
  background-position: 25% 50%;
}

.widget-refresh-button:active span::after {
  background-position: 50% 15%;
  --widget-refresh-angle-2: -15deg;
}

.widget-refresh-button::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 999vw;
  width: calc(100% + var(--widget-refresh-border-width));
  height: calc(100% + var(--widget-refresh-border-width));
  top: calc(0% - var(--widget-refresh-border-width) / 2);
  left: calc(0% - var(--widget-refresh-border-width) / 2);
  padding: var(--widget-refresh-border-width);
  box-sizing: border-box;
  background:
    conic-gradient(
      from var(--widget-refresh-angle-1) at 50% 50%,
      rgba(0, 0, 0, 0.5),
      rgba(0, 0, 0, 0) 5% 40%,
      rgba(0, 0, 0, 0.5) 50%,
      rgba(0, 0, 0, 0) 60% 95%,
      rgba(0, 0, 0, 0.5)
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all var(--widget-refresh-hover-time) var(--widget-refresh-hover-ease), --widget-refresh-angle-1 500ms ease;
  box-shadow: inset 0 0 0 calc(var(--widget-refresh-border-width) / 2) rgba(255, 255, 255, 0.5);
}

.widget-refresh-button-wrap:has(.widget-refresh-button:hover) .widget-refresh-button-shadow {
  filter: blur(clamp(2px, 0.0625em, 6px));
  transition: filter var(--widget-refresh-hover-time) var(--widget-refresh-hover-ease);
}

.widget-refresh-button-wrap:has(.widget-refresh-button:hover) .widget-refresh-button-shadow::after {
  top: calc(var(--shadow-cutoff-fix) - 0.875em);
  opacity: 1;
}

.widget-refresh-button-wrap:has(.widget-refresh-button:hover) .widget-refresh-button::after {
  --widget-refresh-angle-1: -125deg;
}

.widget-refresh-button-wrap:has(.widget-refresh-button:active) {
  transform: rotate3d(1, 0, 0, 25deg);
}

.widget-refresh-button-wrap:has(.widget-refresh-button:active) .widget-refresh-button {
  box-shadow:
    inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.125em 0.125em -0.125em rgba(0, 0, 0, 0.2),
    0 0 0.1em 0.25em inset rgba(255, 255, 255, 0.2),
    0 0.225em 0.05em 0 rgba(0, 0, 0, 0.05),
    0 0.25em 0 0 rgba(255, 255, 255, 0.75),
    inset 0 0.25em 0.05em 0 rgba(0, 0, 0, 0.15);
}

.widget-refresh-button-wrap:has(.widget-refresh-button:active) .widget-refresh-button-shadow {
  filter: blur(clamp(2px, 0.125em, 12px));
}

.widget-refresh-button-wrap:has(.widget-refresh-button:active) .widget-refresh-button-shadow::after {
  top: calc(var(--shadow-cutoff-fix) - 0.5em);
  opacity: 0.75;
}

.widget-refresh-button-wrap:has(.widget-refresh-button:active) .widget-refresh-button::after {
  --widget-refresh-angle-1: -75deg;
}

.widget-refresh-button-wrap:has(.widget-refresh-button:active) .widget-refresh-button span {
  text-shadow: 0.025em 0.25em 0.05em rgba(0, 0, 0, 0.12);
}

@media (hover: none) and (pointer: coarse) {
  .widget-refresh-button span::after,
  .widget-refresh-button:active span::after {
    --widget-refresh-angle-2: -45deg;
  }

  .widget-refresh-button::after,
  .widget-refresh-button:hover::after,
  .widget-refresh-button:active::after {
    --widget-refresh-angle-1: -75deg;
  }
}

.widget-status-row {
  width: 100%;
  margin: 0;
}

.widget-status-grid {
  width: 100%;
  display: flex;
  flex-direction: row;       /* LEFT = scripts/SmartCredit console · RIGHT = SMS */
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.6rem;
  padding: 0 0.7rem;
}

.widget-status-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.widget-status-col-left {
  flex: 1 1 47%;
  min-width: 230px;
  align-items: flex-start;
  padding-left: 0.72rem;
}

.widget-status-col-right {
  flex: 1 1 47%;
  min-width: 230px;
  align-items: stretch;
  /* Bottom-align the SMS panel with the left console (the Refresh button +
     report header sit above the console, so flex-end lines the two 14.6rem
     boxes up at the same top + bottom = one clean long rectangle). */
  justify-content: flex-end;
  padding-top: 0;
  padding-right: 0;
}

.widget-status-col-left .widget-refresh-action {
  width: 100%;
  margin: -1.1rem 0 0.3rem; /* raised: Refresh button + one-line header sit higher */
}

.widget-status-col-left .widget-console {
  width: calc(100% - 1.8rem);
  margin: 0;
  margin-top: -1.8rem;   /* was -0.4rem — shifted up 1.4rem */
  margin-left: 1.8rem;   /* shifted right */
}

.widget-status-col-right .tnw-liquid-shell {
  width: 100%;
  justify-content: flex-start;
  margin-top: -0.08rem;
  padding-left: 0;
}

.widget-status-col-right .tnw-liquid-nav {
  margin-left: 0;
  transform: translate(-0.16rem, -0.12rem);
}


.animTrigger,
.outlineToggle {
  width: 100%;
  margin: 0;
}

.animTrigger label,
.outlineToggle label {
  margin: 0;
  width: 100%;
}

.widget-logo-panel {
  width: min(100%, 18.75rem);
  padding: 0.95rem 0.9rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.widget-logo-panel.has-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 13rem;
}

.widget-logo-panel.has-logo .widget-logo-title,
.widget-logo-panel.has-logo .widget-logo-upload,
.widget-logo-panel.has-logo .widget-logo-clear,
.widget-logo-panel.has-logo .widget-logo-placeholder {
  display: none !important;
}

.widget-logo-panel.has-logo .widget-logo-preview-shell {
  min-height: 0;
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.widget-logo-panel.has-logo .widget-logo-preview {
  max-height: 11.8rem;
}

.widget-logo-title {
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.widget-logo-upload {
  display: block;
  cursor: pointer;
}

.widget-logo-upload span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100%;
  padding: 0.62rem 0.75rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.9rem;
  font-weight: 600;
}

.widget-logo-upload input {
  display: none;
}

.widget-logo-preview-shell {
  display: grid;
  place-items: center;
  min-height: 9.2rem;
  margin-top: 0.75rem;
  padding: 0.8rem;
  position: relative;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.widget-logo-preview {
  max-width: 108%;
  max-height: 8.7rem;
  object-fit: contain;
}

.widget-logo-placeholder {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
  text-align: center;
  color: rgba(255, 255, 255, 0.58);
}

.widget-logo-clear {
  width: 100%;
  margin-top: 0.72rem;
  padding: 0.58rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.widget-logo-mini-upload {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
}

.widget-logo-mini-upload:hover {
  background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 520px) {
  body {
    padding: 0.85rem;
    overflow: auto;
  }

  .widget-shell {
    gap: 0.75rem;
  }

  .widget-top-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .widget-column-left,
  .widget-column-right {
    justify-content: center;
  }

  .ninja {
    transform: scale(0.66);
    transform-origin: center center;
  }

  .widget-logo-panel,
  .buttonWrap,
  .widget-console,
  .widget-refresh-summary {
    width: 100%;
  }

  }
}
@media (max-width: 520px) {
  .widget-status-col-right {
    align-items: flex-start;
  }
}

/* ── SMS panel (right half of the status row) — chat bubbles ──────────────── */
.sms-panel { width: 100%; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.widget-status-col-right { min-height: 0; }
.sms-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.4rem; margin: 0 0.2rem 0.3rem; min-width: 0;
}
.sms-panel-title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(210, 230, 255, 0.6);
}
/* Top-right filter tabs */
.sms-tabs { display: flex; gap: 0.25rem; flex: 0 0 auto; }
.sms-tab {
  appearance: none; border: 1px solid rgba(218, 236, 255, 0.18);
  background: rgba(255, 255, 255, 0.05); color: rgba(214, 230, 255, 0.7);
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 0.18rem 0.45rem; border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.sms-tab:hover { color: #fff; border-color: rgba(218, 236, 255, 0.4); }
.sms-tab.is-active { background: #2563eb; border-color: #2563eb; color: #fff; }
/* Dropdown filters (Service → provider, Client → person-in-window) */
.sms-dd { position: relative; }
.sms-dd-menu {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 30;
  min-width: 8.5rem; max-height: 12rem; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1px; padding: 4px;
  background: #0b1226; border: 0.5px solid rgba(218, 236, 255, 0.22);
  border-radius: 10px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
.sms-dd-item {
  appearance: none; border: none; background: transparent; text-align: left;
  color: rgba(222, 234, 255, 0.86); font-size: 0.68rem; font-weight: 600;
  padding: 0.32rem 0.5rem; border-radius: 7px; cursor: pointer; white-space: nowrap;
}
.sms-dd-item:hover { background: rgba(37, 99, 235, 0.35); color: #fff; }

/* Clean-view toggle: one button hides every .nt-hideable panel, leaving just the
   black/blue bordered frame. The button itself stays visible to toggle back. */
.widget-clean-toggle {
  position: absolute; top: 0.9rem; right: 1.15rem; z-index: 60;
  width: 2rem; height: 2rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 16, 34, 0.72); color: #8fd3ff;
  border: 1px solid rgba(120, 200, 255, 0.45); cursor: pointer;
  font-size: 0.82rem; line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.widget-clean-toggle:hover {
  background: rgba(37, 99, 235, 0.5); color: #fff;
  box-shadow: 0 0 12px rgba(80, 180, 255, 0.6);
}
.widget-shell.is-clean .nt-hideable,
.widget-shell.is-settings .nt-hideable { display: none !important; }

/* Settings: keep page/iframe background transparent — the v6 settings frame image supplies the white interior. */
html.tnw-settings-mode,
body.tnw-settings-mode {
  color: #111827;
}

/* Settings: swap frame asset only — identical size/position as dark v6 (no layout shift). */
.widget-shell.is-settings {
  background-image: url("/assets/widget-console-frame-square-v6-settings.png");
  background-image: -webkit-image-set(
    url("/assets/widget-console-frame-square-v6-settings.webp") type("image/webp"),
    url("/assets/widget-console-frame-square-v6-settings.png") type("image/png")
  );
  background-image: image-set(
    url("/assets/widget-console-frame-square-v6-settings.webp") type("image/webp"),
    url("/assets/widget-console-frame-square-v6-settings.png") type("image/png")
  );
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% calc(100% * var(--widget-frame-scale-y));
}

/* Fullscreen SMS */
#smsFullscreen {
  display: none; position: absolute; inset: 0; z-index: 40;
  padding: 3.4rem 3rem 2.6rem;
}
.widget-shell.is-clean #smsFullscreen { display: flex; }

/* ── Fullscreen Settings ──────────────────────────────────────────────── */
/* ── Business Settings — white / light theme ── */
#settingsFullscreen {
  display: none; position: absolute; inset: 0; z-index: 40;
  padding: 1.8rem 1.8rem 1.8rem; overflow-y: auto;
  background: transparent;
}
.widget-shell.is-settings #settingsFullscreen {
  display: flex;
  flex-direction: column;
  z-index: 40;
  background: transparent;
  /* Keep form inside the white interior — clear of the glowing border art. */
  padding: clamp(3.8rem, 9vw, 5.2rem) clamp(2.4rem, 5.5vw, 3.6rem) clamp(2.2rem, 4.5vw, 3.2rem);
}

/* ── Fullscreen API (Integrations) — reuses the white v6 settings frame, same
   coordinates as Business Settings (no layout shift). ── */
html.tnw-api-mode,
body.tnw-api-mode { color: #111827; }

.widget-shell.is-api .nt-hideable { display: none !important; }

.widget-shell.is-api {
  background-image: url("/assets/widget-console-frame-square-v6-settings.png");
  background-image: -webkit-image-set(
    url("/assets/widget-console-frame-square-v6-settings.webp") type("image/webp"),
    url("/assets/widget-console-frame-square-v6-settings.png") type("image/png")
  );
  background-image: image-set(
    url("/assets/widget-console-frame-square-v6-settings.webp") type("image/webp"),
    url("/assets/widget-console-frame-square-v6-settings.png") type("image/png")
  );
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% calc(100% * var(--widget-frame-scale-y));
}

#apiFullscreen {
  display: none; position: absolute; inset: 0; z-index: 40;
  padding: 1.8rem 1.8rem 1.8rem; overflow-y: auto;
  background: transparent;
}
.widget-shell.is-api #apiFullscreen {
  display: flex;
  flex-direction: column;
  z-index: 40;
  background: transparent;
  padding: clamp(3.8rem, 9vw, 5.2rem) clamp(2.4rem, 5.5vw, 3.6rem) clamp(2.2rem, 4.5vw, 3.2rem);
}
.widget-shell.is-api .sfs-card {
  flex: 1; width: 100%; display: flex; flex-direction: column;
  border-radius: 16px; background: #ffffff;
  border: 1px solid rgba(120, 200, 255, 0.35);
  box-shadow: 0 4px 28px rgba(0, 60, 160, 0.10);
  overflow: hidden;
}

/* API integration cards — ported from the dashboard styles so they render in-widget. */
#apiFullscreen .integration-stack { display: grid; gap: 0.6rem; padding: 1.2rem 1.4rem 1.4rem; overflow-y: auto; }
#apiFullscreen .integration-card {
  border: 1px solid rgba(93, 101, 119, 0.16);
  border-radius: 18px; background: rgba(255, 255, 255, 0.74); overflow: hidden;
}
#apiFullscreen .integration-card summary {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.85rem 0.95rem; cursor: pointer; font-weight: 700; color: #18584c; list-style: none;
}
#apiFullscreen .integration-card summary::-webkit-details-marker { display: none; }
#apiFullscreen .integration-card[open] summary {
  border-bottom: 1px solid rgba(93, 101, 119, 0.12); background: rgba(235, 246, 241, 0.8);
}
#apiFullscreen .integration-summary-brand { display: inline-flex; align-items: center; min-width: 0; }
#apiFullscreen .integration-summary-label {
  flex: 0 0 auto; font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; color: #5f6d82;
}
#apiFullscreen .integration-brand-image { display: block; max-width: 100%; height: auto; object-fit: contain; }
#apiFullscreen .integration-summary-brand-smartcredit { min-height: 1.8rem; }
#apiFullscreen .integration-summary-brand-mfsn { min-height: 1.55rem; }
#apiFullscreen .integration-brand-image-smartcredit { width: 11.8rem; }
#apiFullscreen .integration-brand-image-mfsn { width: 10.8rem; }
#apiFullscreen .integration-form { display: grid; gap: 0.6rem; padding: 0.9rem 0.95rem 1rem; }
#apiFullscreen .integration-form input,
#apiFullscreen .integration-form button {
  padding: 0.72rem 0.82rem; border-radius: 14px; font-size: 0.92rem;
  border: 1px solid rgba(93, 101, 119, 0.22); background: #fff; color: #111827;
}
#apiFullscreen .integration-form button {
  cursor: pointer; font-weight: 700; color: #fff; border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
#apiFullscreen .field { display: grid; gap: 0.35rem; }
#apiFullscreen .field span { font-size: 0.85rem; color: #5f6d82; }
#apiFullscreen .form-message { font-size: 0.82rem; margin: 0.3rem 0 0; }
#apiFullscreen .form-message.muted { color: #6b7280; }

/* Outer card — sit on the white frame interior */
.widget-shell.is-settings .sfs-card {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(120, 200, 255, 0.35);
  box-shadow: 0 4px 28px rgba(0, 60, 160, 0.10);
  overflow: hidden;
}

.sfs-card {
  flex: 1; width: 100%; display: flex; flex-direction: column;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(120, 200, 255, 0.35);
  box-shadow: 0 4px 28px rgba(0, 60, 160, 0.10);
  overflow: hidden;
}

/* Page header */
.sfs-pg-header {
  padding: 1.4rem 1.8rem 1.1rem;
  border-bottom: 1px solid #e8edf5;
  text-align: center;
  background: #fff;
  flex-shrink: 0;
}
.sfs-pg-eyebrow {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: #9ca3af; margin: 0 0 0.3rem;
}
.sfs-pg-title {
  font-size: 1.7rem; font-weight: 800; color: #111827; margin: 0 0 0.35rem; line-height: 1.15;
}
.sfs-pg-subtitle { font-size: 0.78rem; color: #6b7280; margin: 0 0 0.18rem; }
.sfs-pg-sync { font-size: 0.73rem; color: #3b82f6; margin: 0; font-weight: 500; }

/* Scrollable form body */
.sfs-form-wrap {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0; margin: 0; padding: 0; overflow: hidden;
}
.sfs-form-scroll {
  flex: 1; overflow-y: auto; padding: 1.2rem 1.4rem 1.4rem;
  display: flex; flex-direction: column; gap: 1rem;
  scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.12) transparent;
}
.sfs-form-scroll::-webkit-scrollbar { width: 4px; }
.sfs-form-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 2px; }

/* Section cards */
.sfs-section-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.85rem;
}

/* Section heading */
.sfs-section-hd { margin-bottom: 0.1rem; }
.sfs-section-eyebrow {
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #0ea5e9; margin: 0 0 0.15rem;
}
.sfs-section-title {
  font-size: 0.95rem; font-weight: 700; color: #111827; margin: 0;
}

/* Logo + color row */
.sfs-logo-color-row { display: flex; gap: 1.2rem; align-items: flex-start; }
.sfs-logo-editor { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.sfs-logo-preview-shell {
  border: 1.5px dashed #cbd5e1; border-radius: 10px; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  padding: 0.8rem; background: #f8fafc;
}
.sfs-logo-preview { max-height: 60px; max-width: 100%; object-fit: contain; }
.sfs-logo-placeholder { font-size: 0.72rem; color: #94a3b8; margin: 0; text-align: center; line-height: 1.55; }
.sfs-color-editor { display: flex; flex-direction: column; gap: 0.45rem; }
.sfs-color-label {
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #6b7280;
}

/* Upload Image button */
.sfs-upload-btn-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  background: #3b82f6; border: none; border-radius: 8px; padding: 0.52rem 1.2rem;
  cursor: pointer; font-size: 0.8rem; font-weight: 600; color: #fff;
  transition: background 0.15s; align-self: flex-start;
}
.sfs-upload-btn-wrap:hover { background: #2563eb; }
.sfs-upload-btn-wrap input { display: none; }

/* Field grids */
.sfs-fields-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.65rem 0.8rem;
}
.sfs-links-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem 0.8rem;
}
.sfs-bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.sfs-stack { display: flex; flex-direction: column; gap: 0.6rem; }

/* Fields — light theme */
.sfs-field { display: flex; flex-direction: column; gap: 0.3rem; }
.sfs-field span {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em;
  color: #374151;
}
.sfs-field input,
.sfs-field .sfs-select {
  background: #fff; border: 1px solid #d1d5db;
  border-radius: 8px; color: #111827; font-size: 0.82rem; padding: 0.46rem 0.65rem;
  outline: none; width: 100%; box-sizing: border-box; transition: border-color 0.15s, box-shadow 0.15s;
}
.sfs-field input::placeholder { color: #9ca3af; }
.sfs-field input:focus,
.sfs-field .sfs-select:focus {
  border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.sfs-field input[readonly] { color: #6b7280; background: #f9fafb; cursor: default; }
.sfs-select { appearance: none; cursor: pointer; }

/* Save button */
.sfs-save-btn {
  width: 100%; padding: 0.58rem 1rem;
  background: #3b82f6; color: #fff;
  border: none; border-radius: 8px; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.sfs-save-btn:hover { background: #2563eb; }
.sfs-message { font-size: 0.72rem; color: #6b7280; margin: 0; min-height: 1em; }
.sfs-message-ok { color: #16a34a; }
.sms-fs-card {
  flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; gap: 0.55rem;
  padding: 0.75rem 0.85rem 0.75rem; border-radius: 16px;
  /* Opaque so nothing behind the overlay (e.g. the console) can bleed through. */
  background: linear-gradient(180deg, #0b1430, #060c1c);
  border: 1px solid rgba(120, 200, 255, 0.35);
  box-shadow: inset 0 0 28px rgba(40, 120, 220, 0.18);
  overflow: visible;
}
/* Tabs + reply together form the bottom input zone */
.sms-input-zone {
  display: flex; flex-direction: column; gap: 0.35rem; flex: 0 0 auto;
  background: rgba(20, 40, 80, 0.35); border-radius: 14px;
  padding: 0.45rem 0.45rem 0.45rem;
  border: 1px solid rgba(100, 180, 255, 0.18);
}
.sms-fs-head { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.sms-fs-head .sms-panel-title { margin: 0; font-size: 0.82rem; }
/* Gear sits immediately right of "Messages" — no auto push */
.sms-fs-head .sms-fs-icon { margin-left: 0; }

/* ── Filter dropdowns: EXACT same look as the clients Status/Phase dropdowns
   (neumorphic light trigger + light menu), ported into the widget. They always
   drop DOWN. Laid out as 3 across, just above the reply bar. ── */
/* ── SMS filter tab row: All (fixed narrow) + Service (flex) + Client (flex) ── */
#smsFullscreen .sms-tabs-bottom {
  display: flex; align-items: stretch; gap: 0.4rem; flex: 0 0 auto; overflow: visible;
}
/* "All" pill — tiny fixed width, never grows */
#smsFullscreen .sms-showall {
  flex: 0 0 2.8rem; width: 2.8rem; min-height: 2rem;
  border: 1px solid rgba(154, 171, 194, 0.34); border-radius: 14px;
  background: linear-gradient(145deg, #d8dce2, #edf0f6);
  color: #355d56; font: inherit; font-size: 0.58rem; font-weight: 700;
  box-shadow: inset 4px 4px 8px #b8bcc2, inset -4px -4px 8px #ffffff;
  cursor: pointer; overflow: hidden; text-align: center;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
#smsFullscreen .sms-showall.nt-dropdown-btn.is-active {
  box-shadow: inset 0 0 0 2px rgba(12, 107, 88, 0.6);
}
/* Service + Client dropdowns share remaining space equally */
#smsFullscreen .nt-dropdown { position: relative; display: block; flex: 1 1 0; min-width: 0; }
#smsFullscreen .nt-dropdown-btn {
  width: 100%; min-height: 2.4rem;
  border: 1px solid rgba(154, 171, 194, 0.34); border-radius: 14px;
  background: linear-gradient(145deg, #d8dce2, #edf0f6);
  color: #355d56; font: inherit; font-weight: 700; text-align: left;
  padding: 0.5rem 1.9rem 0.5rem 0.85rem; cursor: pointer;
  box-shadow: inset 4px 4px 8px #b8bcc2, inset -4px -4px 8px #ffffff;
  position: relative; display: inline-flex; align-items: center; gap: 0.3rem;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
#smsFullscreen .nt-dropdown-label {
  display: inline-block; flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit;
}
#smsFullscreen .sms-dd .nt-dropdown-btn::after {
  content: '▾'; position: absolute; right: 0.7rem; top: 50%; transform: translateY(-50%);
  color: #355d56; transition: transform 140ms ease; font-size: 0.9rem;
}
#smsFullscreen .nt-dropdown.is-open .nt-dropdown-btn::after { transform: translateY(-50%) rotate(180deg); }
#smsFullscreen .nt-dropdown-btn.is-active { box-shadow: inset 0 0 0 2px rgba(12, 107, 88, 0.6); }
#smsFullscreen .nt-dropdown-menu {
  position: absolute; left: 0; bottom: calc(100% + 0.42rem); top: auto; width: 100%;
  max-height: 14.8rem; overflow: auto; border-radius: 14px;
  border: 1px solid rgba(154, 171, 194, 0.5); background: rgba(237, 240, 246, 0.98);
  box-shadow: 0 -8px 32px rgba(31, 57, 83, 0.22); padding: 0.4rem;
  display: grid; gap: 0.25rem; opacity: 0; pointer-events: none;
  transform: translateY(6px); transition: opacity 120ms ease, transform 120ms ease; z-index: 9999;
}
#smsFullscreen .nt-dropdown-menu[hidden] { display: none !important; }
#smsFullscreen .nt-dropdown.is-open .nt-dropdown-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
#smsFullscreen .nt-dropdown-menu-item {
  border: none; border-radius: 10px; background: transparent; color: #1f3553;
  padding: 0.5rem 0.7rem; text-align: left; font: inherit; font-weight: 700;
  min-height: 1.9rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#smsFullscreen .nt-dropdown-menu-item:hover,
#smsFullscreen .nt-dropdown-menu-item.is-active { background: rgba(12, 107, 88, 0.12); color: #06543f; }
.sms-fs-icon {
  appearance: none; width: 1.8rem; height: 1.8rem; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(218, 236, 255, 0.22);
  color: rgba(214, 230, 255, 0.82); cursor: pointer; font-size: 0.78rem;
}
.sms-fs-icon:hover { background: rgba(37, 99, 235, 0.4); color: #fff; }
/* the big thread fills the card instead of the fixed 14.6rem height */
/* Higher specificity than the base `.sms-thread` (which is declared later and
   would otherwise re-lock the 14.6rem height) so the thread truly flex-fills and
   the reply bar drops to the very bottom. */
#smsFullscreen .sms-thread { flex: 1 1 auto; height: auto; max-height: none; min-height: 0; }
/* Reply box: glossy blue 3D pill (border ref) + white input track with a
   paperclip on the left + a glossy blue airplane send button (airplane ref). */
.sms-fs-reply {
  display: flex; align-items: center; gap: 8px; flex: 0 0 auto;
  padding: 5px; border-radius: 999px;
  background: linear-gradient(180deg, #6fc3ff 0%, #2f86f0 45%, #1f63d6 100%);
  box-shadow:
    0 6px 16px rgba(20, 80, 200, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.65),
    inset 0 -2px 3px rgba(10, 40, 120, 0.5);
}
.sms-reply-track {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 999px; padding: 0 6px 0 12px; min-height: 2.7rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}
.sms-attach {
  flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border: none; background: transparent;
  color: #7b8190; font-size: 1rem; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  transition: color 0.12s ease, background 0.12s ease;
}
.sms-attach i { transform: translate(-1px, -1px); }
.sms-attach:hover { color: #2f86f0; background: rgba(47, 134, 240, 0.12); }
.sms-reply-track input {
  flex: 1 1 auto; min-width: 0; border: none; background: transparent; outline: none;
  color: #1f2937; font-size: 0.92rem; padding: 0.4rem 0;
}
.sms-reply-track input::placeholder { color: #9aa1ad; }
.sms-send-air {
  flex: 0 0 auto; width: 2.7rem; height: 2.7rem; border-radius: 50%; cursor: pointer; border: none; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 30% 25%, #7fc4ff 0%, #2f86f0 45%, #1450c0 100%);
  box-shadow:
    0 4px 10px rgba(20, 70, 180, 0.55),
    inset 0 2px 3px rgba(255, 255, 255, 0.55),
    inset 0 -3px 4px rgba(8, 40, 120, 0.55);
  transition: filter 0.12s ease, transform 0.08s ease;
}
.sms-send-air svg { width: 1.4rem; height: 1.4rem; fill: #fff; transform: translateX(1px); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25)); }
.sms-send-air:hover { filter: brightness(1.06); }
.sms-send-air:active { transform: scale(0.95); }
.sms-send-air:disabled { opacity: 0.5; cursor: not-allowed; }
.sms-fs-hint { font-size: 0.66rem; color: rgba(214, 230, 255, 0.6); min-height: 0.8rem; }
.sms-thread {
  list-style: none; margin: 0; padding: 1.3rem 0.55rem 0.5rem;
  flex: 0 0 auto; height: 14.6rem; max-height: 14.6rem; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 18, 40, 0.6), rgba(6, 12, 28, 0.72));
  border: 1px solid rgba(218, 236, 255, 0.14);
  display: flex; flex-direction: column; gap: 2.2rem;
}
.sms-thread::-webkit-scrollbar { width: 8px; }
.sms-thread::-webkit-scrollbar-thumb { border-radius: 8px; background-color: rgba(255, 255, 255, 0.18); }
.sms-thread::-webkit-scrollbar-track { border-radius: 8px; background-color: rgba(255, 255, 255, 0.06); }
.sms-empty { margin: auto; color: rgba(210, 230, 255, 0.45); font-size: 0.78rem; text-align: center; }

/* Smaller bubbles + bolder text so more messages fit. */
.sms-msg {
  position: relative; max-width: 78%;
  padding: 0.34rem 0.55rem; border-radius: 11px;
  font-size: 0.92rem; font-weight: 500; line-height: 1.34; word-break: break-word;
}
/* Client (inbound) messages: white bubble; the AVATAR carries the per-sender
   color. Outbound (service/owner) stays brand blue. */
.sms-msg.in  { align-self: flex-start; margin-left: 2.35rem; background: #fff; color: #10233f; border-left: 3px solid hsl(var(--sms-hue, 210) 60% 48%); }
.sms-msg.out { align-self: flex-end;   margin-right: 2.35rem; background: #2563eb; color: #fff; }

.sms-avatar {
  position: absolute; top: 0; width: 1.85rem; height: 1.85rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.74rem; font-weight: 800; color: #fff; letter-spacing: 0.02em;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  border: 1px solid rgba(255, 255, 255, 0.25); overflow: hidden;
}
.sms-msg.in  .sms-avatar { left: -2.35rem; background: hsl(var(--sms-hue, 210) 60% 48%); }
.sms-msg.out .sms-avatar { right: -2.35rem; background: linear-gradient(135deg, #2563eb, #06b6d4); }
/* Owner avatar = full-bleed borderless circular image/SVG. */
.sms-avatar.owner { background: none; border: none; padding: 0; }
.sms-avatar.owner .sms-owner-svg,
.sms-avatar.owner .sms-owner-img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }

.sms-label {
  position: absolute; top: -1.4rem; font-size: 1.1rem; font-weight: 600;
  color: #6eb9ff; white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.01em;
}
.sms-msg.in  .sms-label { left: 0.2rem; }
.sms-msg.out .sms-label { right: 0.2rem; }
.sms-label.is-number { cursor: pointer; text-decoration: underline dotted; }
.sms-label.is-number:hover { color: #facc15; }
