@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');
:root{font-family:Inter,system-ui,sans-serif;color:#284b49;background:#d7f6ec;--muted:#54746d}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(circle at 30% 0,#f4fff8,#bceadb 72%,#9fd6cc);min-height:100vh}
button{font:inherit}
.wrap{width:min(1200px,calc(100% - 36px));margin:0 auto}
.btn{min-height:44px;padding:0 18px;border:2px solid #8acdc3;background:#f8fffc;border-radius:12px;color:#2a605b;font:700 14px Inter,sans-serif;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.btn:hover{filter:brightness(.96)}
.btn.pri{background:#149d8f;border-color:#149d8f;color:white}
.btn:disabled{cursor:wait;opacity:.65}
.site-header{background:rgba(255,255,255,.62);border-bottom:1px solid #9ce0d3;backdrop-filter:blur(18px)}
.site-header .wrap{min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.site-title{display:flex;align-items:center}
.site-title svg{width:32px;height:32px;flex:none}
.site-partner{display:flex;align-items:center;gap:7px;color:#263a28;min-height:44px;border-radius:8px;font:700 15px/1 'Space Grotesk',sans-serif;letter-spacing:.025em;white-space:nowrap;text-decoration:none}
.site-partner:hover>span{text-decoration:underline;text-underline-offset:4px}
.site-partner img{display:block;width:36px;height:36px;flex:none}
.site-partner-accent{color:#557029}
.dr-page{padding:32px 0 48px;color:#254b49}
.dr-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:22px}
.dr-heading h1{font:700 clamp(34px,4vw,48px)/1.1 'Space Grotesk',sans-serif;margin:6px 0}
.dr-heading p{color:var(--muted);margin:0;max-width:680px}
.dr-layout{display:grid;grid-template-columns:minmax(320px,1fr) minmax(360px,1.12fr);gap:20px;align-items:stretch}
.dr-scene,.dr-wardrobe{border-radius:28px;border:2px solid #7cd9c9;box-shadow:0 10px 28px rgba(12,67,60,.12);overflow:hidden}
.dr-scene{display:flex;flex-direction:column;background:radial-gradient(circle at 51% 42%,#f6fff9 0,#dbfff2 49%,#a4e8d7 100%);min-height:700px}
.dr-scene-top{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:20px 24px;font:700 12px Inter,sans-serif;letter-spacing:.08em;color:#367f79}
.dr-scene-top #dresscode-status{font-weight:500;letter-spacing:0;color:#277a72;text-align:right}
.dr-stage{flex:1;min-height:0;display:flex;justify-content:center;align-items:center;padding:4px 12px 10px}
.dr-stage svg{height:min(66vh,690px);min-height:420px;max-width:100%;width:auto;overflow:visible;filter:drop-shadow(0 18px 14px rgba(27,82,73,.18))}
.dr-actions{display:flex;justify-content:center;gap:12px;padding:16px 20px 22px}
.dr-actions .btn{border-radius:999px;text-align:center}.dr-actions .btn.pri{background:#179e90;border-color:#179e90}
.dr-wardrobe{background:#fffefc;border-color:#9eddd3;padding:24px;display:flex;flex-direction:column}
.dr-wardrobe-head{text-align:center;border-bottom:2px solid #c3eee5;padding:4px 0 17px}
.dr-wardrobe-head span{font:700 12px Inter,sans-serif;letter-spacing:.18em;color:#41aa9d}
.dr-wardrobe-head h2{font:700 clamp(22px,3vw,30px)/1.2 'Space Grotesk',sans-serif;color:#358e85;margin:6px 0 0}
.dr-tabs{display:flex;flex-wrap:wrap;gap:8px;padding:18px 0 16px}
.dr-tab{flex:none;min-height:44px;padding:9px 14px;border-radius:14px;border:2px solid #f4afd2;background:#fff7fb;color:#b3457e;font:700 13px Inter,sans-serif;cursor:pointer}
.dr-tab.on{background:#f889bf;color:#68264f;box-shadow:inset 0 -3px 0 #df62a0}
.dr-items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-content:start;max-height:570px;overflow-y:auto;padding:2px 3px 8px}
.dr-item{min-width:0;min-height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:2px solid #dcece9;border-radius:20px;background:linear-gradient(#fff,#f6faf9);cursor:pointer;color:#34534f;box-shadow:0 3px 0 #d4e3e0;transition:border-color .18s,box-shadow .18s;padding:9px}
.dr-item:hover{border-color:#f789ba}
.dr-item.on{border-color:#f070aa;box-shadow:0 0 0 3px #ffe2ef,0 3px 0 #dc78a7}
.dr-item svg{width:100%;height:102px;overflow:hidden;filter:drop-shadow(0 3px 2px rgba(40,50,50,.16))}
.dr-item picture{display:block;flex:none;width:100%}
.dr-item img{flex:none;width:100%;height:102px;object-fit:contain;border-radius:12px;display:block}
.dr-item span{font:700 12px Inter,sans-serif;text-align:center;line-height:1.2}
.dr-palette-wrap{border:2px solid #f6bdd9;border-radius:22px;background:#fff1f8;padding:15px;margin-top:auto}
.dr-palette-wrap h3{margin:0 0 10px;color:#a93d78;font:700 14px Inter,sans-serif}
.dr-palette{display:flex;flex-wrap:wrap;gap:9px;justify-content:space-between}
.dr-color{width:38px;height:38px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px #aeb3b6;cursor:pointer}
.dr-color.on{box-shadow:0 0 0 3px #ed5ea1,0 2px 8px #a94b8240}
.dr-color:disabled{opacity:.45;cursor:not-allowed}
.site-partner:focus-visible,.dr-page button:focus-visible,.dr-page a:focus-visible,.dr-export-dialog :is(button,a,input):focus-visible{outline:3px solid #176fc7;outline-offset:3px}
.dr-export-dialog{width:min(440px,calc(100% - 28px));max-height:calc(100dvh - 28px);border:2px solid #9eddd3;border-radius:22px;background:#fffefc;color:#254b49;box-shadow:0 16px 40px #163e3b4d;padding:clamp(16px,5vw,24px);overflow:auto}
.dr-export-dialog::backdrop{background:#132e2b94}
.dr-export-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 12px}
.dr-export-dialog h2{font:700 clamp(20px,6vw,25px)/1.15 'Space Grotesk',sans-serif;margin:0}
.dr-export-close{flex:none;width:44px;height:44px;border:0;border-radius:12px;background:#edf8f5;color:#2a605b;font-size:25px;cursor:pointer}
.dr-export-dialog label{display:block;margin:0 0 5px;font-size:14px;font-weight:700}
.dr-export-dialog input{width:100%;min-height:44px;padding:9px 12px;border:1px solid #8bbcb5;border-radius:10px;color:inherit;background:white;font:inherit;font-size:16px;margin-bottom:14px}
.dr-export-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:6px}
.dr-export-status{font-size:14px;margin:0 0 12px}
.dr-export-result img{display:block;width:auto;height:auto;max-width:100%;max-height:55dvh;margin:0 auto 12px;border:1px solid #cde6e2;border-radius:8px}
@media(max-width:860px){
  .dr-layout{grid-template-columns:minmax(0,1fr);align-items:start}
  .dr-scene{min-height:0}
  .dr-stage svg{height:clamp(260px,45svh,460px);min-height:0}
  .dr-items{max-height:none;overflow:visible}
  .dr-palette-wrap{margin-top:12px}
}
@media(max-width:620px){
  .wrap{width:calc(100% - 24px)}
  .site-header .wrap{min-height:56px}
  .site-title svg{width:26px;height:26px}
  .site-partner{gap:5px;font-size:13px}
  .site-partner img{width:29px;height:29px}
  .dr-page{--preview-height:clamp(198px,31svh,285px);padding:16px 0 28px}
  .dr-heading{margin-bottom:15px}
  .dr-heading h1{font-size:clamp(26px,7vw,36px);margin:0 0 6px}
  .dr-heading p{font-size:14px;line-height:1.4}
  .dr-wardrobe-head>span{display:none}
  .dr-layout{gap:13px}
  .dr-scene,.dr-wardrobe{border-radius:19px}
  .dr-scene-top{gap:6px;padding:10px 12px 5px;font-size:11px;min-height:30px}
  .dr-stage{padding:0 10px 5px}
  .dr-stage svg{height:var(--preview-height);filter:drop-shadow(0 8px 7px rgba(27,82,73,.18))}
  .dr-actions{gap:8px;padding:6px 10px 10px}
  .dr-actions .btn{padding:5px 4px;max-width:175px;min-width:0;flex:1;font-size:12px}
  .dr-wardrobe{padding:12px}
  .dr-wardrobe-head{text-align:left;padding:0 0 10px}
  .dr-wardrobe-head h2{margin:0}
  .dr-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:12px 0}
  .dr-tab{padding:6px 3px;border-radius:11px;font-size:12px;min-width:0}
  .dr-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .dr-item{min-height:112px;border-radius:15px;padding:7px}
  .dr-item svg,.dr-item img{height:76px}
  .dr-palette-wrap{padding:12px}
  .dr-palette{justify-content:flex-start;gap:10px}
  .dr-color{width:44px;height:44px}
}
@media(max-width:360px){.dr-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:480px) and (max-width:620px){.dr-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:620px) and (min-height:680px){
  .dr-scene{position:sticky;top:8px;z-index:1}
  .dr-wardrobe button{scroll-margin-top:calc(var(--preview-height) + 112px)}
}
@media(min-width:621px) and (max-width:860px) and (orientation:landscape) and (max-height:560px){
  .site-header .wrap{min-height:52px}
  .site-partner img{width:30px;height:30px}
  .dr-page{padding-top:12px}
  .dr-heading{margin-bottom:12px}
  .dr-heading h1{font-size:26px;margin:0 0 4px}
  .dr-heading p{font-size:13px;max-width:none}
  .dr-wardrobe-head>span{display:none}
  .dr-layout{grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:14px}
  .dr-scene{position:sticky;top:8px}
  .dr-stage svg{height:clamp(130px,45svh,240px)}
  .dr-scene-top{padding:10px 12px;font-size:11px}
  .dr-actions{gap:6px;padding:4px 8px 10px}
  .dr-actions .btn{flex:1;min-width:0;padding:5px 3px;font-size:12px}
  .dr-wardrobe{padding:14px}
  .dr-wardrobe-head{padding:0 0 8px}
  .dr-wardrobe-head h2{margin:0}
  .dr-tabs{gap:6px;padding:10px 0}
  .dr-tab{padding-inline:9px}
  .dr-items{gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce){.dr-item{transition:none}}

#dc-boca-movimento{opacity:0;animation:dr-mouth 4.6s ease-in-out infinite}
#dc-lacos,#dc-back,#dc-fantasia-cabeca{transform-box:fill-box;animation:dr-sway 4.6s ease-in-out infinite}
#dc-lacos,#dc-fantasia-cabeca{transform-origin:50% 75%}
#dc-back{transform-origin:50% 80%;animation-delay:-.7s}
#dc-coleira{animation:dr-soft-lift 4.6s ease-in-out infinite}
@keyframes dr-mouth{0%,60%,92%,100%{opacity:0}72%,80%{opacity:1}}
@keyframes dr-sway{0%,100%{transform:rotate(0)}50%{transform:rotate(1.7deg)}}
@keyframes dr-soft-lift{0%,100%{transform:translateY(0)}50%{transform:translateY(3px)}}
@media(prefers-reduced-motion:reduce){
  #dc-boca-movimento,#dc-lacos,#dc-back,#dc-fantasia-cabeca,#dc-coleira{animation:none}
}
