@font-face{font-family:Booth Sans Bold;src:url(fonts/BoothSans.woff2) format("woff2");font-weight:800;font-display:block}
@font-face{font-family:Booth Sans;src:url(fonts/BoothSans.woff2) format('woff2');font-weight:100 900;font-display:block}
@font-face{font-family:Booth Serif;src:url(fonts/BoothSerif.woff2) format('woff2');font-weight:100 900;font-display:block}
@font-face{font-family:Booth Hand;src:url(fonts/BoothHand.woff2) format('woff2');font-weight:400;font-display:block}
:root{--theme-primary:#a47b46;--theme-soft:#f4ecdf;--theme-bg:#faf7f0;--theme-ink:#443b30;--theme-line:#e7ddce}
body[data-theme=wedding]{--theme-soft:#f4ecdf;--theme-bg:#faf7f0;--theme-ink:#443b30;--theme-line:#e7ddce;--theme-pattern:radial-gradient(ellipse at 0 100%,#d5d9ba88,transparent 32%),radial-gradient(ellipse at 100% 0,#e6cba955,transparent 35%)}
body[data-theme=event]{--theme-soft:#e2f4f4;--theme-bg:#f3faf9;--theme-ink:#153e46;--theme-line:#c8e7e8;--theme-pattern:radial-gradient(circle at 0 100%,#ffc76566,transparent 25%),radial-gradient(circle at 100% 0,#5ad8d344,transparent 30%)}
body[data-theme]{--teal:var(--theme-primary);--cream:var(--theme-bg);--ink:var(--theme-ink);--line:var(--theme-line);color:var(--ink);background:var(--theme-pattern),var(--theme-bg)}
body[data-theme] main>.page:not(.hero):not(.admin){background-image:linear-gradient(#ffffffd9,#ffffffd9),var(--custom-background);background-size:cover;background-position:center}
body[data-theme] button:not(.secondary):not(.ghost):not(.frameTile):not(.featureCard):not(.homeTouch),body[data-theme] .fileButton:not(.secondary){background:var(--theme-primary)}
body[data-theme] .brand,body[data-theme] .title[data-step]:before{color:var(--theme-primary)}
body[data-theme] header{background:#ffffffad;border-color:var(--line);backdrop-filter:blur(12px)}
body[data-theme] .hero{background:var(--theme-pattern),var(--theme-bg)}
.hero:before,.hero:after{display:none}body[data-page=home] header{display:none}body[data-page=home] #home{height:100vh;height:100dvh;min-height:0}
.homeWelcome{text-align:center;z-index:1;pointer-events:none}.homeWelcome h1{font-size:clamp(38px,5vw,80px);letter-spacing:7px}.homeWelcome p{color:var(--theme-primary)}
body[data-theme=wedding] .homeWelcome h1{font-family:Booth Serif,serif}
#home{cursor:pointer}#heroImage{background-size:contain;background-repeat:no-repeat}
#homeStart.homeTouch{position:absolute;bottom:4vh;z-index:2;color:white;background:#243530df;border:1px solid #ffffff70;box-shadow:0 4px 24px #0002;min-height:56px;padding:14px 32px;left:50%;transform:translateX(-50%);white-space:nowrap}
#home[data-hint-position=bottom-left] #homeStart{left:3vw;transform:none}#home[data-hint-position=bottom-right] #homeStart{left:auto;right:3vw;transform:none}
#homePreviewBar{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:80}
.featureChoices{flex:1;display:flex;justify-content:center;align-items:center;gap:3vw;min-height:0}
body[data-theme] .featureCard{color:var(--ink);background:#ffffffdf;border:1px solid var(--line);border-radius:28px;box-shadow:0 16px 50px #5343330b;width:min(38vw,540px);height:clamp(230px,42vh,420px);padding:30px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px}
.featureCard strong{font-size:clamp(26px,3vw,44px)}.featureCard>span:last-child{font-size:clamp(14px,1.4vw,20px);font-weight:400}.featureIcon{color:var(--theme-primary);font-size:70px;line-height:1}.featureCard:hover{outline:3px solid var(--theme-primary)}
#edit .title{padding:0;flex-shrink:0}#edit .title h1{font-size:clamp(24px,2.2vw,34px);margin-bottom:3px}#edit .title p{font-size:14px}
#edit .editLayout{grid-template-columns:minmax(0,1.1fr) minmax(400px,1fr);gap:24px;min-height:0}
#edit .editCanvasWrap{grid-column:1;grid-row:1;position:relative;background:var(--theme-soft);padding:16px;border:1px solid var(--line)}
#edit .editLayout aside{grid-column:2;grid-row:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:16px;border:1px solid var(--line);background:#ffffffed}
#edit .tabbar{display:grid;grid-template-columns:repeat(4,1fr);position:static;flex-shrink:0;gap:8px;padding:0 0 10px;background:transparent}
#edit .tabbar button{font-size:18px;min-height:46px;padding:8px;margin:0}
#edit #stickerTools{display:flex;flex-direction:column;flex:1;min-height:0;gap:10px}
.categoryBar{display:flex;gap:8px;align-items:center;flex-shrink:0}.categoryBar>button{padding:7px 12px!important;margin:0!important;font-size:24px}
#stickerCategoryTabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));flex:1;gap:6px;min-width:0}
#stickerCategoryTabs button{font-size:15px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:8px 4px!important;margin:0!important}
#edit #stickerGrid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:12px;margin:0}
#edit #stickerGrid button{background:var(--theme-bg);border:1px solid var(--line);min-height:0;height:100%;margin:0;padding:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;border-radius:14px}
#edit #stickerGrid img{height:calc(100% - 26px);width:100%;min-height:0;max-height:140px;object-fit:contain;flex:1}
#edit #stickerGrid span{display:block;width:100%;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stickerPager{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-shrink:0}.stickerPager button{padding:9px 18px!important;margin:0!important}.stickerPager span{font-size:15px;white-space:nowrap}
#photoTools,#drawTools,#textTools{min-height:0;overflow:auto;flex:1;padding:2px 4px}
#edit #textTools{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;align-content:start}
#textTools h2,#textTools label:first-of-type,#textPreviewStatus,#textTools .row{grid-column:1/-1}
#edit #textTools h2{font-size:20px;margin:0}#edit #textTools label{font-size:15px;margin:0}#edit #textTools textarea{height:72px;resize:none;font-size:20px;padding:8px}#edit #textTools select{font-size:16px;padding:8px}
#edit #textTools input[type=color]{height:40px}#edit #textTools input[type=range]{min-height:32px}#textPreviewStatus{font-size:13px;margin:0;color:var(--theme-primary)}#edit #textTools .row button{font-size:16px;padding:8px 14px;min-height:44px;margin:0}
#edit #layerTools{position:absolute;right:12px;bottom:64px;z-index:4;width:min(300px,90%);max-height:85%;overflow:auto;background:white;padding:16px;box-shadow:0 8px 30px #0002;border:1px solid var(--line);border-radius:16px;margin:0;font-size:15px}
#adjustLayer{position:absolute;bottom:12px;right:12px;font-size:15px;min-height:40px;padding:8px 18px}
#edit footer{padding:0;justify-content:space-between}#edit footer #finishEdit{margin-left:auto;min-width:200px}
.themePreview{min-height:160px;border:1px solid var(--line);border-radius:16px;padding:24px;display:flex;gap:14px;flex-direction:column;align-items:center;margin:15px 0;background:#faf7f0;background-size:cover;background-position:center;color:#443b30}.themePreview[data-theme=event]{background-color:#e7f7f7;color:#153e46}.themePreview strong{font-size:26px}.previewButton{background:var(--theme-primary);padding:10px 30px;color:white;border-radius:30px}.categoryAdminRow{display:flex;gap:8px;align-items:center;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:10px 0}.categoryAdminRow strong{flex:1;min-width:120px}.categoryAdminRow button{font-size:14px;padding:8px 15px}
@media(max-height:800px){#edit .title[data-step]:before{display:none}#edit .title p{display:none}#edit .editLayout{gap:16px}#edit .editLayout aside{padding:12px}#edit #stickerGrid img{max-height:110px}#edit footer button{min-height:44px}#edit .tabbar button{min-height:44px;font-size:16px}#edit .title h1{font-size:25px}}
@media(max-width:1050px){#edit .editLayout{grid-template-columns:minmax(0,1fr) minmax(360px,1fr)}#edit .editLayout{gap:12px}#stickerCategoryTabs button{font-size:13px}#edit .tabbar{gap:5px}}
@media(max-width:720px){#edit .editLayout{grid-template-columns:1fr;grid-template-rows:minmax(200px,42%) minmax(300px,1fr)}#edit .editCanvasWrap{grid-row:1;grid-column:1}#edit .editLayout aside{grid-row:2;grid-column:1}#edit{height:auto;min-height:100vh}.featureChoices{flex-direction:column}.featureCard{width:90vw!important}.homeTouch{max-width:90vw}}

body[data-theme=wedding]{--theme-art:url(theme-wedding.svg)}body[data-theme=event]{--theme-art:url(theme-event.svg)}body[data-theme] main>.page:not(.hero):not(.admin){background-image:var(--theme-art),linear-gradient(#ffffffd9,#ffffffd9),var(--custom-background);background-size:100% 100%,cover,cover}body[data-theme] .hero{background-image:var(--theme-art),var(--theme-pattern);background-size:100% 100%,cover}

#themePreview{position:relative;min-height:270px;background-size:contain;background-repeat:no-repeat;background-position:center;overflow:hidden}#themePreview>span:first-child,#themePreview>strong{background:#ffffffb8;border-radius:8px;padding:4px 12px}#themePreviewHint{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);white-space:nowrap;max-width:95%;overflow:hidden;text-overflow:ellipsis;background:#243530df;color:white;border:1px solid #ffffff70;padding:12px 24px;font-weight:600}#themePreview[data-hint-position=bottom-left] #themePreviewHint{left:16px;transform:none}#themePreview[data-hint-position=bottom-right] #themePreviewHint{left:auto;right:16px;transform:none}.historyCard>label{display:flex;align-items:center;gap:10px}.historyCard .row{margin-top:10px}.historyCard p{overflow-wrap:anywhere}.historyCard .resultState{font-weight:600;color:var(--theme-primary)}
