/* GDN Apps — Money Flow / Gilded Atelier V0.5
 * Main screen only. The original approved .folio fullscreen card design is untouched.
 * Everything is rendered by CSS/SVG; no paid services, images or runtimes. */
:root{color-scheme:light;--gold:#d7a74e;--gold2:#fff3c6;--dark:#211c19}
html{scroll-behavior:smooth}
body{
  min-height:100svh;color:#493425;overflow-x:hidden;
  background:
    radial-gradient(ellipse at 50% 12%,#dfba80 0%,#dec39f 31%,transparent 70%),
    url("./grain.png"),linear-gradient(158deg,#fff3df,#edcfa5 55%,#f7e5c9);
  background-size:auto,260px 260px,auto;
  background-attachment:scroll;
  font-family:Georgia,"Times New Roman",serif;
  padding-bottom:94px;
}
body:before{
  content:"";position:absolute;z-index:0;left:0;right:0;top:0;height:clamp(310px,60vw,520px);opacity:1;
  pointer-events:none;
  background:
    radial-gradient(ellipse at 50% 51%,rgba(242,189,121,.65),transparent 37%),
    radial-gradient(ellipse at 50% -15%,#0f1016 5%,#443023 51%,rgba(115,80,53,.72) 85%,transparent 100%);
  background-size:100% 100%;
  mask-image:linear-gradient(#000 0%,#000 64%,transparent 100%);
}
body:after{content:none}
.shell{max-width:1050px;margin:auto;padding:12px clamp(10px,3.5vw,34px) 22px}
header.luxury-head{display:flex;flex-direction:column;align-items:center;min-height:195px;padding:9px 0 26px;position:relative}
header.luxury-head .logo-symbol{width:90px;height:91px;position:relative;margin:4px auto -2px}
header.luxury-head .logo-symbol::before{
 content:"";z-index:-1;position:absolute;inset:-13px;border-radius:50%;
 background:radial-gradient(circle,#ffcf7f 0%,#bd783248 34%,transparent 72%);
 filter:blur(7px)
}
header.luxury-head .logo-symbol img{filter:drop-shadow(0 2px 2px #3b2113) drop-shadow(0 0 8px #fdd792b5)}
header.luxury-head .brand-flourish{
 width:min(76vw,405px);max-width:unset;height:2px;margin:0 auto 13px;
 background:linear-gradient(90deg,transparent,#e7c07c 20%,#fdf3c8 50%,#e7c07c 80%,transparent);
 box-shadow:0 0 12px #ffd4968a;
}
header.luxury-head h1{
 color:#fff4dc;font:italic 600 clamp(36px,7vw,55px)/1.05 Georgia,"Times New Roman",serif;
 letter-spacing:-.025em;text-shadow:0 2px 3px #1b0d08,0 0 12px #f8ca83;
 text-align:center;margin:0;
}
header.luxury-head .brand-subtitle{
 font:700 10px/1.5 system-ui,sans-serif;color:#f5d99f;
 letter-spacing:.18em;text-transform:uppercase;margin:9px 0 0;text-shadow:0 1px 4px #29180d;
}
header.luxury-head .host-badge{
 position:absolute;left:0;top:21px;border:1px solid #cc9f61;border-radius:100px;
 display:flex;align-items:center;gap:6px;white-space:nowrap;
 background:linear-gradient(150deg,#4b3022,#211c20 70%);
 box-shadow:inset 0 1px 0 #f1ca7a8c,0 3px 12px #170f09a5;
 padding:7px 12px;color:#f7d68a;
 font:700 12px/1.2 Georgia,serif;
}
header.luxury-head .host-badge svg{width:16px;height:16px;fill:#edbb63}
header.luxury-head .header-seal{
 position:absolute;right:3px;top:23px;
 width:35px;height:35px;border:1.5px solid #d2ad6b;border-radius:50%;
 color:#ffda8e;display:grid;place-items:center;
 background:radial-gradient(circle at 30% 20%,#72563f,#1e1c21 80%);
 box-shadow:inset 0 1px 2px #ffe5ac88,0 4px 10px #0006;
}
header.luxury-head .header-seal svg{width:19px;height:19px}
header.luxury-head::after{
 content:"";height:16px;width:min(190px,50vw);margin:3px auto 0;
 background:
 linear-gradient(90deg,transparent 0%,#d5a15e 32%,transparent 47%,transparent 53%,#d5a15e 68%,transparent 100%) center/100% 1px no-repeat;
 opacity:.95;
}
.matrix{gap:14px;position:relative;z-index:1}
.field{
 min-height:240px;border-radius:24px;padding:19px 12px 15px;
 background:
 radial-gradient(ellipse at 45% 16%,#fffcf4d9,transparent 63%),
 url("./grain.png"),linear-gradient(148deg,#fff6e6 0%,#f1d8b3 72%,#ebca9f 100%);
 background-size:auto,200px,auto;
 border:2.2px solid #b78336;
 box-shadow:
 inset 0 0 0 3px #fff9ec,inset 0 0 0 5px #e7c18b,
 inset 0 0 0 7px #ffe8c2a8,inset 0 11px 16px #fffcf1b3,
 inset 0 -7px 15px #a8703e4d,
 0 4px 0 #825932,0 10px 20px #6440237a,0 0 8px #ffda9875;
}
.field.completed{border-color:#c69751}
.field::before,.field::after{width:44px;height:44px;top:3px;left:3px;opacity:.8;filter:drop-shadow(0 1px 1px #805f34a3)}
.field::after{top:auto;left:auto;bottom:3px;right:3px}
.question{display:flex!important;flex-direction:column;align-items:center;text-align:center;gap:8px}
.question-symbol{
 width:61px!important;height:61px!important;flex:none!important;padding:6px!important;
 border:0!important;border-radius:0!important;
 background:none!important;box-shadow:none!important;
 color:#ad7930!important;filter:drop-shadow(0 1px 0 #fff3cc) drop-shadow(2px 3px 1px #8e642e9c)!important
}
.question-symbol .ico{stroke-width:1.75;filter:drop-shadow(0 -1px .3px #f5cf82)}
.question-title{
 max-width:94%;font:700 clamp(18px,2.5vw,25px)/1.1 Georgia,"Times New Roman",serif!important;
 color:#352218!important;text-shadow:0 1px 0 #fff7dd99
}
.field-main{padding:5px 0 0!important}
.field-icons{display:none!important}
.field:not(.completed) .field-main::after{
 content:"";width:75%;height:18px;align-self:end;
 display:block;margin:0 auto;
 background:linear-gradient(90deg,transparent 2%,#b88b4b 24%,transparent 43%,#dcb16c 51%,transparent 59%,#b88b4b 76%,transparent 98%) center/100% 1px no-repeat;
 opacity:.62
}
.field .pick-card{
 width:96%;min-height:85px;position:relative;
 border-radius:15px;background:linear-gradient(148deg,#fff9e9,#e9cda2);
 border:1.5px solid #bc8e4d;
 box-shadow:inset 0 0 0 3px #fff9e9,inset 0 0 0 4px #d9b070,0 5px 9px #714f32a3;
}
.field .pick-name{font-size:clamp(12px,1.7vw,16px)}
.field .pick-id{font-size:27px}
.dice-area{
 max-width:610px;min-height:202px;margin:20px auto 0;padding:3px 16px 12px;
 background:transparent;border:0;border-radius:0;
 box-shadow:none;position:relative
}
.dice-area::before{
 content:"";width:min(540px,95%);height:123px;left:50%;top:16px;
 border:1.2px solid #e8b666;border-radius:50%;
 background:
 radial-gradient(ellipse at center,#ffd6997c,transparent 62%),
 radial-gradient(ellipse at center,transparent 58%,#fff0c4 60%,transparent 64%);
 box-shadow:0 0 23px #ffdfad,0 0 10px #ffeaab inset;
 opacity:.8;pointer-events:none
}
.dice-area::after{
 content:"";position:absolute;z-index:-1;top:0;left:6%;right:6%;height:120px;
 background:radial-gradient(ellipse at center,#fbe7c7c9,transparent 75%);filter:blur(7px)
}
.dice-row{gap:clamp(19px,7vw,46px);margin:0 auto 10px;justify-content:center;align-items:center;perspective:none}
.dice-row::before{display:none}
.dice-holder{
 --dice:102px;width:var(--dice);height:var(--dice);
 display:grid;place-items:center;perspective:610px;position:relative;
 filter:drop-shadow(0 10px 7px #533b2180)
}
.dice-holder::after{
 content:"";position:absolute;z-index:-1;width:100px;height:24px;bottom:-13px;left:1px;
 background:radial-gradient(ellipse at center,#6a45286c,transparent 68%);filter:blur(5px);
}
.dice-cube{
 width:var(--dice);height:var(--dice);position:relative;
 transform-style:preserve-3d;
 transform:rotateX(-24deg) rotateY(-30deg);
 will-change:transform;
}
.die-face{
 position:absolute;inset:0;
 display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);
 gap:5px;padding:16px;border:2px solid #e0b873;
 border-radius:19px;
 backface-visibility:hidden;
 background:
 linear-gradient(135deg,#fffefa 0%,#fff6e6 35%,#ecd4ac 78%,#c69b64 100%);
 box-shadow:inset 3px 3px 5px #ffffff,inset -5px -5px 8px #a16f37a6,0 0 8px #e5b97055;
}
.die-face::after{content:"";position:absolute;inset:3px;border-radius:15px;border:1px solid #fff7dcaa;pointer-events:none}
.die-face.front{transform:translateZ(calc(var(--dice)/2))}
.die-face.back{transform:rotateY(180deg) translateZ(calc(var(--dice)/2))}
.die-face.right{transform:rotateY(90deg) translateZ(calc(var(--dice)/2))}
.die-face.left{transform:rotateY(-90deg) translateZ(calc(var(--dice)/2))}
.die-face.top{transform:rotateX(90deg) translateZ(calc(var(--dice)/2))}
.die-face.bottom{transform:rotateX(-90deg) translateZ(calc(var(--dice)/2))}
.die-face .pip{
 width:clamp(9px,2.1vw,14px);height:clamp(9px,2.1vw,14px);
 max-width:none;max-height:none;place-self:center;
 background:
 radial-gradient(circle at 37% 30%,#fff2c7 0%,#eec77c 21%,#9b6325 72%,#5a3715 100%);
 border:1px solid #c99345;border-radius:50%;
 box-shadow:inset 1px 2px 2px #4b2816a8,0 1px 1px #fff9dd;
}
.dice-holder:nth-child(2) .die-face{border-color:#e6be7d}
.dice-holder.rolling .dice-cube{filter:brightness(1.07)}
.dice-labels{display:flex;justify-content:center;gap:64px;margin:6px auto 10px}
.dice-labels span{color:#8d613b;font:700 11px system-ui,sans-serif;letter-spacing:.06em}
.roll-row{display:flex;align-items:center;gap:10px;max-width:540px;margin:0 auto}
.action{
 flex:1;width:100%;padding:14px 18px;min-height:53px;
 background:linear-gradient(180deg,#6d4931 0%,#38231c 58%,#20181b 100%);
 border:2px solid #d29e4d;border-radius:100px;
 color:#fff0cb;font:700 clamp(17px,3.3vw,22px)/1.2 Georgia,serif;
 text-shadow:0 2px 2px #160d09;
 box-shadow:
 inset 0 2px 1px #ffe1a9,
 inset 0 -4px 3px #1b1112,
 0 0 0 2px #f4d9a1,
 0 6px 12px #6740237c,0 0 16px #ffd48367;
}
.action::before{content:"⚄";font-size:19px;margin-right:9px;color:#ffd98c}
.action.reset::before{content:"↺";font-size:23px}
.sound-toggle{
 width:40px;height:40px;display:grid;place-items:center;flex:none;
 border-radius:50%;border:1px solid #b58646;
 background:linear-gradient(160deg,#fff5dd,#dec092);
 color:#6e4729;box-shadow:inset 0 1px 1px #fff8e7,0 3px 6px #9d7b4a66
}
.sound-toggle svg{width:19px;height:19px}
.sound-toggle[aria-pressed="false"]{opacity:.65}
.dice-area .step{
 color:#7e5634;font:700 12px Georgia,serif;
 margin:11px 0 0;letter-spacing:.18em
}
.tabs{display:none!important}
.bottom-nav{
 position:fixed;left:50%;transform:translateX(-50%);bottom:0;z-index:20;
 padding:8px max(12px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom));
 width:min(100%,700px);height:auto;min-height:69px;
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;gap:3px;
 border:1px solid #d8b790;border-bottom:0;border-radius:24px 24px 0 0;
 background:
 radial-gradient(ellipse at 50% 0%,#fff7e4,transparent 83%),
 linear-gradient(135deg,#f7dfbd 0%,#f4e3ca 45%,#e7c59b 100%);
 box-shadow:inset 0 2px 1px #fff6e4,0 -4px 17px #3f2a176b;
 backdrop-filter:blur(11px)
}
.bottom-nav button{
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
 min-width:0;padding:5px 3px;border:0;background:transparent;
 color:#5e4431;border-radius:16px;
 font:700 clamp(10px,2.8vw,12px)/1.1 system-ui,sans-serif
}
.bottom-nav button.active{
 color:#a56518;
 background:linear-gradient(155deg,#fff7e5,#f2dab8);
 box-shadow:inset 0 1px 1px #fff,0 2px 8px #c69b6b7a;
}
.bottom-nav svg{width:23px;height:23px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round}
#libraryView,#notesView,#historyView{position:relative;z-index:1;margin:0 auto;max-width:820px}
.library{background:linear-gradient(155deg,#fff8eb,#edd4b1)!important;border-color:#b9894b!important}
.content-panel{
 background:linear-gradient(145deg,#fff8e9,#ebcfaa);
 border:2px solid #bb8a46;border-radius:22px;
 padding:20px;min-height:220px;
 box-shadow:inset 0 0 0 3px #fff8e8,inset 0 -7px 10px #aa855554,0 10px 19px #7552357a;
}
.content-panel h2{font:italic 700 28px Georgia,serif;color:#65452b;margin:0 0 15px}
.content-panel textarea{
 display:block;width:100%;height:250px;padding:14px;resize:vertical;
 color:#4a3628;background:#fffaee;border:1px solid #c59d64;border-radius:13px;font:17px/1.6 Georgia,serif
}
.content-panel p,.content-panel li{font:16px/1.6 Georgia,serif;color:#60472e}
.content-panel ol{padding-left:24px}
@media(max-width:600px){
 .shell{padding:9px 11px 10px}
 header.luxury-head{min-height:169px;padding:4px 0 19px}
 header.luxury-head .logo-symbol{height:80px;width:80px;margin-top:0}
 header.luxury-head h1{font-size:clamp(32px,9vw,45px)}
 header.luxury-head .host-badge{left:0;top:16px;font-size:11px;padding:6px 9px}
 header.luxury-head .header-seal{top:15px}
 header.luxury-head .brand-subtitle{font-size:9px;letter-spacing:.1em}
 .matrix{gap:10px}
 .field{min-height:213px;padding:13px 8px 12px;border-radius:20px}
 .field .question-symbol{width:50px!important;height:50px!important;margin:0 auto 2px!important;padding:5px!important}
 .field .question-title{font-size:clamp(14px,4vw,18px)!important;line-height:1.12}
 .field .field-main{padding-top:2px!important}
 .field:not(.completed) .field-main::after{height:8px}
 .field .pick-card{min-height:85px}
 .field .pick-id{font-size:24px}
 .field .pick-name{font-size:12px}
 .dice-area{margin:16px auto 0}
 .dice-holder{--dice:86px}
 .dice-row{gap:30px;margin-bottom:5px}
 .die-face{border-radius:17px;padding:14px;gap:4px}
 .die-face .pip{width:10px;height:10px}
 .dice-labels{gap:54px;margin-bottom:11px}
 .dice-area:before{height:99px;top:17px}
 .roll-row{gap:6px}
 .action{min-height:50px}
 .bottom-nav{border-radius:22px 22px 0 0}
}
@media(max-width:370px){
 header.luxury-head .host-badge{font-size:10px;padding:5px 6px}
 header.luxury-head .header-seal{width:29px;height:29px}
 .field{min-height:206px;padding:13px 6px}
 .field .question-title{font-size:13.6px!important}
 .question-symbol{margin-bottom:1px!important}
 .dice-holder{--dice:78px}
 .die-face{padding:13px}
 .dice-row{gap:24px}
}
@media(prefers-reduced-motion:reduce){
 .dice-cube{will-change:auto}
 .field,.action,.bottom-nav button{transition:none}
}
/* Compact first mobile viewport so the dice CTA stays clear of fixed navigation. */
@media(min-width:361px) and (max-width:600px){
 header.luxury-head{min-height:149px;padding:2px 0 10px}
 header.luxury-head .logo-symbol{width:70px;height:69px}
 header.luxury-head .brand-flourish{margin-bottom:5px}
 header.luxury-head h1{font-size:clamp(30px,8.2vw,36px)}
 header.luxury-head::after{height:7px}
 .field{min-height:183px;padding:10px 8px 8px}
 .field .question{gap:2px}
 .field .question-symbol{width:46px!important;height:46px!important}
 .field .question-title{font-size:clamp(14px,3.8vw,17px)!important}
 .field .field-main{padding-top:0!important}
 .field:not(.completed) .field-main::after{height:4px}
 .matrix{gap:9px}
 .dice-area{margin-top:10px;min-height:167px;padding:0 10px 4px}
 .dice-holder{--dice:77px}
 .dice-row{gap:30px;margin-bottom:4px}
 .die-face{padding:12px;border-radius:14px}
 .die-face .pip{width:9px;height:9px}
 .dice-labels{margin:2px auto 8px}
 .dice-area::before{height:84px;top:10px}
 .action{min-height:47px}
 .step{margin:7px 0 0!important}
}
@media(max-width:360px){
 .field{min-height:178px}
 .dice-holder{--dice:73px}
 .dice-area{margin-top:8px}
}

/* V0.6: more breathing room below the matrix, stronger physical cube shape. */
.dice-area{margin-top:clamp(38px,4vw,54px)!important}
.dice-row{perspective:none}
.dice-holder{
 perspective:740px;
 filter:drop-shadow(0 9px 6px #4c2b0fad) drop-shadow(0 0 10px #fff5d9ad);
 transform-style:preserve-3d;
}
.dice-holder:after{bottom:-16px;background:radial-gradient(ellipse at center,#6a4326bd,transparent 69%);filter:blur(5px)}
.dice-cube{
 transform:rotateX(-25deg) rotateY(-34deg);
 transform-style:preserve-3d;
 -webkit-transform-style:preserve-3d;
}
.die-face{
 border:2.4px solid #ca9650;
 border-radius:15px;
 background:linear-gradient(140deg,#fffefb 1%,#fffaf0 33%,#f5e3bd 70%,#d6af70 100%);
 box-shadow:inset 4px 4px 7px #fffffff5,
            inset -7px -7px 12px #986833ad,
            inset 0 0 2px #8d5b3380,
            0 0 2px #cba361;
 -webkit-backface-visibility:hidden;
 backface-visibility:hidden;
}
.die-face.front{
 background:linear-gradient(128deg,#fffefa 0%,#fffaf0 34%,#f3deba 67%,#d4aa72 100%);
 border-color:#c28e49;
 box-shadow:inset 4px 4px 8px #fff,
            inset -10px -10px 16px #a6793ec7,
            0 0 3px #cba361;
}
.die-face.right,.die-face.left{
 background:linear-gradient(122deg,#f1d8b0,#d0a66d 65%,#ad7740);
 border-color:#b98b53;
 box-shadow:inset 2px 2px 6px #fff3df,inset -9px -8px 14px #80542bcc;
}
.die-face.top{
 background:linear-gradient(146deg,#fffefa 3%,#f6dfb8 77%,#e1bd86);
 box-shadow:inset 3px 3px 7px #fff,inset -6px -7px 9px #bf935dae;
}
.die-face.back,.die-face.bottom{
 background:linear-gradient(137deg,#ead1a9,#b8864f 95%);
}
.die-face .pip{
 background:radial-gradient(circle at 36% 30%,#ffefba 2%,#b57530 46%,#6f4017 82%,#533018 100%);
 border:1px solid #ad7438;
 box-shadow:inset 1px 2px 2px #49290fae,inset -1px -1px 1px #fff3b6b5,0 1px 1px #fff9e6;
}
.dice-holder.rolling .dice-cube{filter:none}
@media(min-width:361px) and (max-width:600px){
 .dice-area{margin-top:39px!important}
 .dice-holder{--dice:85px}
 .die-face{padding:13px}
 .die-face .pip{width:11px;height:11px}
}
@media(max-width:360px){
 .dice-area{margin-top:35px!important}
 .dice-holder{--dice:79px}
 .die-face{padding:12px}
}

/* V0.6 mobile four-card layout: avoid the bottom navigation overlapping Reset. */
@media(min-width:361px) and (max-width:600px){
 .field.completed .question-symbol{width:42px!important;height:42px!important}
 .field.completed .pick-card{min-height:64px;padding:4px 4px;gap:1px}
 .field.completed .pick-card .pick-id{font-size:22px}
 .field.completed .pick-card .pick-name{font-size:11.5px;line-height:1.08}
}
