/* Four personal ambient themes. Decorative layers never receive input or move content. */
.theme-ambient {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  contain: strict;
  pointer-events: none;
  user-select: none;
  background: var(--bg);
}
.theme-ambient *, .theme-ambient::before, .theme-ambient::after { pointer-events: none; }
.theme-ambient > span {
  display: block;
  position: absolute;
  inset: -12%;
  background-repeat: no-repeat;
  transform-origin: 50% 50%;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
.theme-ambient::before, .theme-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
}
:root:is([data-theme="studio-gold"],[data-theme="cyberpunk"],[data-theme="kitty"],[data-theme="merdeka"]) body {
  isolation: isolate;
  background: var(--bg);
}
:root:is([data-theme="studio-gold"],[data-theme="cyberpunk"],[data-theme="kitty"],[data-theme="merdeka"]) .theme-ambient { display: block; }
:root:is([data-theme="studio-gold"],[data-theme="cyberpunk"],[data-theme="kitty"],[data-theme="merdeka"]) #app {
  position: relative;
  z-index: 1;
}
:root:is([data-theme="studio-gold"],[data-theme="cyberpunk"],[data-theme="kitty"],[data-theme="merdeka"]) .teamflow-tools {
  position: relative;
  z-index: 2;
}
:root:is([data-theme="studio-gold"],[data-theme="cyberpunk"],[data-theme="kitty"],[data-theme="merdeka"]) .shell { background: transparent; }
:root:is([data-theme="studio-gold"],[data-theme="cyberpunk"],[data-theme="kitty"],[data-theme="merdeka"]) :is(.attachment-preview-dialog,.receipt-dialog) {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
}

/* Native camera / gallery pickers need the same readable surfaces as text fields.
   The app ID keeps these rules above the work board's injected form styles. */
:root:is([data-theme="studio-gold"],[data-theme="cyberpunk"],[data-theme="kitty"],[data-theme="merdeka"]) #app input[type="file"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
}
:root:is([data-theme="studio-gold"],[data-theme="cyberpunk"],[data-theme="kitty"],[data-theme="merdeka"]) #app input[type="file"]::file-selector-button {
  max-width: 100%;
  min-height: 38px;
  margin-inline-end: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--accent-soft);
  font: inherit;
  line-height: 1.45;
  white-space: normal;
  cursor: pointer;
}
:root:is([data-theme="studio-gold"],[data-theme="cyberpunk"],[data-theme="kitty"],[data-theme="merdeka"]) #app input[type="file"]:disabled::file-selector-button {
  opacity: .6;
  cursor: not-allowed;
}

/* Black & Gold: long satin arcs, slender metallic contours and quiet gold dust. */
:root[data-theme="studio-gold"] {
  --theme-outer: #100e0b;
  --theme-trim: linear-gradient(90deg,#8c6529,#f2d08c 48%,#bc8e41 77%,#6b4c24);
}
:root[data-theme="studio-gold"] .theme-ambient {
  background: radial-gradient(ellipse at 14% 0%,#2d2214 0,transparent 51%),#14110e;
}
:root[data-theme="studio-gold"] .theme-ambient::before {
  background: repeating-linear-gradient(118deg,transparent 0 119px,#edc87507 120px 121px,transparent 122px 240px);
}
:root[data-theme="studio-gold"] .theme-ribbon-one {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201600%201000%22%20fill%3D%22none%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20x1%3D%2270%22%20y1%3D%22100%22%20x2%3D%221450%22%20y2%3D%22930%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%239e681d%22%20stop-opacity%3D%220%22%2F%3E%3Cstop%20offset%3D%22.38%22%20stop-color%3D%22%23ddb15d%22%20stop-opacity%3D%22.55%22%2F%3E%3Cstop%20offset%3D%22.62%22%20stop-color%3D%22%23f7d58f%22%20stop-opacity%3D%22.85%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23b4802a%22%20stop-opacity%3D%220%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M-240%20220C180-120%20360%20780%20880%20470S1410%20260%201840%20840%22%20stroke%3D%22url(%23g)%22%20stroke-width%3D%22150%22%2F%3E%3Cpath%20d%3D%22M-240%20253C180-87%20360%20813%20880%20503S1410%20293%201840%20873%22%20stroke%3D%22%23e6bc72%22%20stroke-opacity%3D%22.8%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M-240%20295C180-45%20360%20855%20880%20545S1410%20335%201840%20915%22%20stroke%3D%22%23e6bc72%22%20stroke-opacity%3D%22.35%22%20stroke-width%3D%221%22%2F%3E%3C%2Fsvg%3E");
  background-size: cover;
  opacity: .34;
  animation-name: theme-gold-flow;
  animation-duration: 34s;
}
:root[data-theme="studio-gold"] .theme-ribbon-two {
  inset: -9% -20%;
  background: radial-gradient(ellipse at 75% 12%,#f1cf891a 0,transparent 43%),
    radial-gradient(ellipse at 22% 83%,#b784311c 0,transparent 42%);
  animation-name: theme-soft-current;
  animation-duration: 29s;
}
:root[data-theme="studio-gold"] .theme-motifs {
  background-image: radial-gradient(circle,#f0cf8b 0 1px,transparent 1.8px),
    radial-gradient(circle,#c39546 0 1px,transparent 1.7px);
  background-size: 157px 211px,233px 179px;
  background-position: 12px 60px,85px 22px;
  background-repeat: repeat;
  opacity: .13;
  animation-name: theme-dust-drift;
  animation-duration: 42s;
}

/* Cyberpunk: an ink-blue canvas with restrained cyan circuitry and magenta currents. */
:root[data-theme="cyberpunk"] {
  color-scheme: dark;
  --ink: #eef6ff;
  --muted: #b9c9df;
  --accent: #73eaff;
  --accent-soft: #1b3047;
  --surface: #142033;
  --line: #526681;
  --bg: #0b1222;
  --nav: #101b30;
  --theme-outer: #070c19;
  --theme-accent-ink: #092131;
  --theme-hero: #172c46;
  --theme-detail: #e88aff;
  --theme-trim: linear-gradient(90deg,#74efff,#8e9bff 52%,#ef82e6);
}
:root[data-theme="cyberpunk"] .theme-ambient {
  background: radial-gradient(ellipse at 85% 8%,#292044 0,transparent 48%),
    radial-gradient(ellipse at 4% 87%,#123243 0,transparent 50%),#090f1e;
}
:root[data-theme="cyberpunk"] .theme-ambient::before {
  background: linear-gradient(#66daef0c 1px,transparent 1px),linear-gradient(90deg,#66daef0c 1px,transparent 1px);
  background-size: 52px 52px;
}
:root[data-theme="cyberpunk"] .theme-ribbon-one {
  background: linear-gradient(123deg,transparent 21%,#6eeaff04 34%,#6eeaff2b 44%,#8cdfff07 51%,transparent 62%);
  animation-name: theme-neon-current;
  animation-duration: 27s;
}
:root[data-theme="cyberpunk"] .theme-ribbon-two {
  background: linear-gradient(143deg,transparent 37%,#ce70e918 47%,#e98aff2b 49%,#bd6ae906 55%,transparent 70%);
  opacity: .8;
  animation-name: theme-neon-return;
  animation-duration: 33s;
}
:root[data-theme="cyberpunk"] .theme-motifs {
  inset: -8%;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20900%20900%22%20fill%3D%22none%22%3E%3Cg%20stroke%3D%22%2370ecff%22%20stroke-width%3D%221%22%3E%3Cpath%20d%3D%22M-70%20140H190l90%2090h250l110%20110h330M-100%20690h260l80-80h220l140-140h380%22%2F%3E%3Cpath%20d%3D%22M100-60v190l100%20100v190l80%2080v400M660-70v260l-80%2080v200l130%20130v350%22%20opacity%3D%22.4%22%2F%3E%3C%2Fg%3E%3Cg%20stroke%3D%22%23e47cff%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M-80%20530h270l150-150h300l110-110h220%22%2F%3E%3Cpath%20d%3D%22M-80%20570h140l160-160h290l130-130h330%22%20opacity%3D%22.3%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22%2372eaff%22%3E%3Ccircle%20cx%3D%22280%22%20cy%3D%22230%22%20r%3D%224%22%2F%3E%3Ccircle%20cx%3D%22640%22%20cy%3D%22340%22%20r%3D%223%22%2F%3E%3Ccircle%20cx%3D%22240%22%20cy%3D%22610%22%20r%3D%223%22%2F%3E%3Ccircle%20cx%3D%22580%22%20cy%3D%22270%22%20r%3D%223%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22%23eb8bff%22%3E%3Ccircle%20cx%3D%22190%22%20cy%3D%22530%22%20r%3D%224%22%2F%3E%3Ccircle%20cx%3D%22640%22%20cy%3D%22380%22%20r%3D%224%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-size: 900px 900px;
  background-repeat: repeat;
  opacity: .13;
  animation-name: theme-circuit-drift;
  animation-duration: 40s;
}
:root[data-theme="cyberpunk"] :is(.form-error:not(.inline-error),.wf-form-error,.btn.wf-delete-button,.storebot-error,.storebot-critical,.inventory-error) { color: #ffb4c1; }
:root[data-theme="cyberpunk"] .att-rule-pass { color: #95e3b1; }
:root[data-theme="cyberpunk"] .att-rule-exception { color: #ffb4aa; }

/* Sweet Bow: cream-pink ribbons, white kitten faces and small bow/heart details. */
:root[data-theme="kitty"] {
  --theme-outer: #f7dce8;
  --theme-trim: linear-gradient(90deg,#e79cbb,#cf5f92 43%,#f0b6cc 77%,#edc5d5);
}
:root[data-theme="kitty"] .theme-ambient {
  background: radial-gradient(ellipse at 82% 4%,#ffe2ee 0,transparent 48%),#fff4f7;
}
:root[data-theme="kitty"] .theme-ribbon-one {
  background: radial-gradient(ellipse at 50% 80%,transparent 0 41%,#f1a8c42c 42% 49%,#ffe7ef 50% 53%,transparent 54%);
  opacity: .8;
  animation-name: theme-satin-current;
  animation-duration: 30s;
}
:root[data-theme="kitty"] .theme-ribbon-two {
  background: radial-gradient(ellipse at 60% 10%,transparent 0 46%,#efbedb42 47% 53%,#ffffff8c 54% 56%,transparent 57%);
  opacity: .9;
  animation-name: theme-satin-return;
  animation-duration: 37s;
}
:root[data-theme="kitty"] .theme-motifs {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20480%20480%22%20fill%3D%22none%22%3E%3Cdefs%3E%3Cg%20id%3D%22bow%22%20stroke%3D%22%23cc5d90%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M17%2015C-2-5-9%205-6%2017c-3%2015%206%2019%2023%205M23%2015C42-5%2049%205%2046%2017c3%2015-6%2019-23%205%22%20fill%3D%22%23f49bbc%22%2F%3E%3Cellipse%20cx%3D%2220%22%20cy%3D%2218%22%20rx%3D%228%22%20ry%3D%229%22%20fill%3D%22%23fbc3d8%22%2F%3E%3C%2Fg%3E%3Cg%20id%3D%22cat%22%3E%3Cpath%20d%3D%22M18%2031%2012%207c14-2%2024%204%2030%2013%2015-4%2033-4%2047%200%206-10%2017-15%2029-13l-5%2025c11%2010%2017%2021%2016%2034-2%2026-28%2041-65%2041S0%2092%200%2066c0-14%207-26%2018-35Z%22%20fill%3D%22%23fffdfb%22%20stroke%3D%22%23cf7ba0%22%20stroke-width%3D%223%22%2F%3E%3Cellipse%20cx%3D%2240%22%20cy%3D%2260%22%20rx%3D%224%22%20ry%3D%226%22%20fill%3D%22%2378475b%22%2F%3E%3Cellipse%20cx%3D%2291%22%20cy%3D%2260%22%20rx%3D%224%22%20ry%3D%226%22%20fill%3D%22%2378475b%22%2F%3E%3Cellipse%20cx%3D%2265%22%20cy%3D%2273%22%20rx%3D%227%22%20ry%3D%225%22%20fill%3D%22%23f4d879%22%20stroke%3D%22%23cf7ba0%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22m11%2060-20-5m19%2014-22%201m25%2011L-5%2089m124-29%2020-5m-19%2014%2022%201m-25%2011%2018%208%22%20stroke%3D%22%23b66a8b%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%2F%3E%3Cuse%20href%3D%22%23bow%22%20transform%3D%22translate(100%2016)%20rotate(18)%20scale(.8)%22%2F%3E%3C%2Fg%3E%3C%2Fdefs%3E%3Cuse%20href%3D%22%23cat%22%20transform%3D%22translate(55%2070)%20rotate(-9%2065%2055)%22%2F%3E%3Cuse%20href%3D%22%23cat%22%20transform%3D%22translate(280%20310)%20rotate(8%2065%2055)%20scale(.82)%22%2F%3E%3Cuse%20href%3D%22%23bow%22%20transform%3D%22translate(365%2095)%20rotate(15)%20scale(.8)%22%2F%3E%3Cuse%20href%3D%22%23bow%22%20transform%3D%22translate(83%20345)%20rotate(-15)%20scale(.65)%22%2F%3E%3Cg%20fill%3D%22%23f2b2ca%22%3E%3Cpath%20d%3D%22M249%20174c-18-23-43%205-7%2029l7%205%207-5c36-24%2011-52-7-29Z%22%2F%3E%3Cpath%20d%3D%22M232%20399c-11-15-27%203-4%2019l4%203%205-3c23-16%207-34-5-19Z%22%2F%3E%3Ccircle%20cx%3D%22410%22%20cy%3D%22225%22%20r%3D%224%22%2F%3E%3Ccircle%20cx%3D%2232%22%20cy%3D%22235%22%20r%3D%224%22%2F%3E%3Ccircle%20cx%3D%22215%22%20cy%3D%2273%22%20r%3D%223%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-size: 480px 480px;
  background-repeat: repeat;
  opacity: .18;
  animation-name: theme-bow-drift;
  animation-duration: 44s;
}

/* Jalur Gemilang: red-and-white ribbons and the flag's crescent / fourteen-point star. */
:root[data-theme="merdeka"] {
  --theme-flag-art: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20560%20280%22%3E%3Crect%20width%3D%22560%22%20height%3D%22280%22%20fill%3D%22%23fff%22%2F%3E%3Cpath%20d%3D%22M0%200h560v20H0zm0%2040h560v20H0zm0%2040h560v20H0zm0%2040h560v20H0zm0%2040h560v20H0zm0%2040h560v20H0zm0%2040h560v20H0z%22%20fill%3D%22%23cc2538%22%2F%3E%3Cpath%20fill%3D%22%23112d69%22%20d%3D%22M0%200h280v160H0z%22%2F%3E%3Ccircle%20cx%3D%22100%22%20cy%3D%2280%22%20r%3D%2252%22%20fill%3D%22%23f2cc4e%22%2F%3E%3Ccircle%20cx%3D%22117%22%20cy%3D%2280%22%20r%3D%2245%22%20fill%3D%22%23112d69%22%2F%3E%3Cpolygon%20points%3D%22214.00%2C36.00%20218.01%2C61.45%20232.66%2C40.26%20225.22%2C64.93%20247.62%2C52.19%20230.22%2C71.19%20255.92%2C69.43%20232.00%2C79.00%20255.92%2C88.57%20230.22%2C86.81%20247.62%2C105.81%20225.22%2C93.07%20232.66%2C117.74%20218.01%2C96.55%20214.00%2C122.00%20209.99%2C96.55%20195.34%2C117.74%20202.78%2C93.07%20180.38%2C105.81%20197.78%2C86.81%20172.08%2C88.57%20196.00%2C79.00%20172.08%2C69.43%20197.78%2C71.19%20180.38%2C52.19%20202.78%2C64.93%20195.34%2C40.26%20209.99%2C61.45%22%20fill%3D%22%23f2cc4e%22%2F%3E%3C%2Fsvg%3E");
  --theme-mark: var(--theme-flag-art);
  --theme-detail: #e3b843;
  --theme-trim: linear-gradient(90deg,#182f6d 0 36%,#d84452 36% 59%,#fff9ee 59% 75%,#e7bd4a 75%);
}
:root[data-theme="merdeka"] .theme-ambient {
  background: radial-gradient(ellipse at 5% 5%,#cddbf33d 0,transparent 48%),#f3f6fc;
}
:root[data-theme="merdeka"] .theme-ambient::before {
  background: linear-gradient(128deg,#213e7c0b 0 22%,transparent 22% 100%);
}
:root[data-theme="merdeka"] .theme-ribbon-one {
  background: radial-gradient(ellipse at 70% 5%,transparent 0 47%,#d5415430 48% 51%,#ffffffdf 52% 55%,#d5415420 56% 59%,transparent 60%);
  animation-name: theme-flag-current;
  animation-duration: 32s;
}
:root[data-theme="merdeka"] .theme-ribbon-two {
  background: radial-gradient(ellipse at 15% 95%,transparent 0 42%,#193c811d 43% 47%,#fff9e8d9 48% 50%,#d29c2920 51% 53%,transparent 54%);
  animation-name: theme-flag-return;
  animation-duration: 39s;
}
:root[data-theme="merdeka"] .theme-motifs {
  inset: 0;
  background-image: var(--theme-flag-art),var(--theme-flag-art);
  background-position: 105% 12%, -5% 88%;
  background-size: clamp(210px,30vw,440px) auto,clamp(180px,26vw,380px) auto;
  opacity: .1;
  animation-name: theme-flag-drift;
  animation-duration: 44s;
}

/* Choice controls remain ordinary, stationary controls in every theme. */
[data-theme-choice="cyberpunk"] { --appearance-swatch: linear-gradient(135deg,#101a2f 42%,#6eeaff 42% 69%,#e784eb 69%); }
.appearance-motion-tag {
  display: inline-flex;
  grid-column: 2;
  align-items: center;
  width: fit-content;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
}
.appearance-choice strong .appearance-motion-tag { margin-inline-start: 4px; vertical-align: middle; }
.appearance-section-title { margin-block: 14px 0; font-size: 13px; color: var(--ink); }
.appearance-static-themes { margin-block-start: 16px; padding-block-start: 7px; border-block-start: 1px solid var(--line); }
.appearance-static-themes > summary { font-size: 13px; color: var(--muted); }
.appearance-motion-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-block-start: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 650;
}
.appearance-motion-control input { flex: 0 0 auto; }
.appearance-motion-control > span { min-width: 0; }
.appearance-motion-control small { display: block; font-size: 11px; font-weight: 400; }
.appearance-reduced-note { display: none; color: var(--muted); font-size: 12px; margin-block-start: 8px; }

/* No layout, background-position or color is animated. */
@keyframes theme-gold-flow {
  from { transform: translate3d(-5%,3%,0) rotate(-8deg) scale(1.04); }
  to { transform: translate3d(5%,-3%,0) rotate(2deg) scale(1.1); }
}
@keyframes theme-soft-current {
  from { transform: translate3d(4%,-2%,0) scale(1.02); opacity: .68; }
  to { transform: translate3d(-4%,3%,0) scale(1.12); opacity: .95; }
}
@keyframes theme-dust-drift {
  from { transform: translate3d(0,1%,0); }
  to { transform: translate3d(2%,-4%,0); }
}
@keyframes theme-neon-current {
  from { transform: translate3d(-12%,5%,0) rotate(-7deg) scale(1.04); }
  to { transform: translate3d(10%,-6%,0) rotate(3deg) scale(1.12); }
}
@keyframes theme-neon-return {
  from { transform: translate3d(9%,-4%,0) rotate(4deg); }
  to { transform: translate3d(-9%,6%,0) rotate(-4deg); }
}
@keyframes theme-circuit-drift {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(3%,-4%,0); }
}
@keyframes theme-satin-current {
  from { transform: translate3d(-5%,-3%,0) rotate(-8deg) scale(1.02); }
  to { transform: translate3d(6%,4%,0) rotate(6deg) scale(1.1); }
}
@keyframes theme-satin-return {
  from { transform: translate3d(5%,3%,0) rotate(4deg); }
  to { transform: translate3d(-5%,-4%,0) rotate(-5deg); }
}
@keyframes theme-bow-drift {
  from { transform: translate3d(0,1%,0) rotate(-1deg); }
  to { transform: translate3d(1%,-3%,0) rotate(1deg); }
}
@keyframes theme-flag-current {
  from { transform: translate3d(-5%,3%,0) rotate(-7deg) scale(1.03); }
  to { transform: translate3d(5%,-3%,0) rotate(5deg) scale(1.1); }
}
@keyframes theme-flag-return {
  from { transform: translate3d(5%,-2%,0) rotate(4deg); }
  to { transform: translate3d(-5%,4%,0) rotate(-5deg); }
}
@keyframes theme-flag-drift {
  from { transform: translate3d(0,1%,0) rotate(-1deg); }
  to { transform: translate3d(-1%,-2%,0) rotate(1deg); }
}
:root[data-appearance-motion="off"] .theme-ambient > span,
:root[data-motion-paused="true"] .theme-ambient > span { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .theme-ambient > span { animation: none !important; transform: none !important; }
  .appearance-reduced-note { display: block; }
}
@media (max-width: 600px) {
  :root[data-theme="kitty"] .theme-motifs { background-size: 360px 360px; opacity: .15; }
  :root[data-theme="cyberpunk"] .theme-motifs { background-size: 650px 650px; opacity: .12; }
  :root[data-theme="studio-gold"] .theme-motifs { opacity: .1; }
}
@media print { .theme-ambient { display: none !important; } }

