:root{color-scheme:light;--bg:#faf6f4;--paper:#fffdfb;--surface:#f3e9e8;--line:#eadfdf;--ink:#43343d;--muted:#86747d;--accent:#b74670;--accent-press:#9d365c;--rose:#f6e4eb;--mint:#89ab9c;--radius:20px;--shadow:0 14px 48px #7650630b;font-family:"Plus Jakarta Sans","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,system-ui,sans-serif}
:root[data-theme=dark]{color-scheme:dark;--bg:#17151b;--paper:#211d26;--surface:#2d2631;--line:#3d3241;--ink:#f6eaf0;--muted:#beabba;--accent:#ef9dbb;--accent-press:#fac1d6;--rose:#3b2834;--mint:#9cc9b7;--shadow:0 14px 48px #0002}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-size:14px;line-height:1.7;-webkit-font-smoothing:antialiased}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer}button,a,input,select{outline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent)}button:disabled{opacity:.38;cursor:not-allowed}a{color:inherit;text-decoration:none}button{color:inherit}button,input,select{accent-color:var(--accent)}[hidden]{display:none!important}h1,h2,h3,p{margin:0}h2{font-size:16px;letter-spacing:.015em;line-height:1.8}h3{font-size:13px}input[type=color]{width:40px;height:36px;padding:3px;border:1px solid var(--line);border-radius:10px;background:var(--paper);cursor:pointer}input[type=checkbox]{width:18px;height:18px;flex:none}input[type=range]{width:100%;height:32px;margin:0;cursor:pointer}select,input[type=text]{display:block;width:100%;min-height:46px;border:1px solid var(--line);border-radius:11px;padding:10px 12px;background:var(--paper);color:var(--ink);font-size:16px}select{font-size:13px}.skip{position:fixed;top:-80px;z-index:20;padding:12px 24px;background:var(--paper)}.skip:focus{top:5px}.header{height:80px;padding:0 38px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;background:var(--paper)}.brand{display:flex;align-items:center;gap:12px;font-size:15px;font-weight:750;letter-spacing:.015em}.brand small{display:block;font-size:10px;font-weight:400;letter-spacing:.08em;color:var(--muted);margin-top:1px}.brand-mark{position:relative;display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--accent);border-radius:13px 13px 13px 3px;background:var(--rose);color:var(--accent);font-family:Georgia,serif;font-style:italic;font-size:27px}.brand-mark span{font-style:normal;position:absolute;top:-5px;right:-4px;font-size:14px;background:var(--paper);line-height:1.4}.header-nav{display:flex;align-items:center;gap:24px}.header-nav a{font-size:11px;color:var(--muted);border-bottom:1px solid var(--line);padding:8px 0}.icon-button{display:inline-grid;place-items:center;min-width:44px;min-height:44px;border:0;border-radius:12px;background:transparent;font-size:23px;line-height:1}.icon-button:hover{background:var(--rose)}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 414px;max-width:1600px;margin:auto;min-height:calc(100dvh - 80px)}.studio{padding:34px 38px 24px;min-width:0}.studio-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;gap:12px}.eyebrow{font-family:monospace;font-size:10px;letter-spacing:.2em;color:var(--muted);margin-bottom:4px}h1{font-size:28px;letter-spacing:.035em;line-height:1.5;font-weight:750}.title-dot{color:var(--accent);margin-left:3px}.lead{font-size:11px;margin-top:5px;color:var(--muted);letter-spacing:.03em}.local-badge{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:10px;color:var(--muted)}.local-badge i{width:6px;height:6px;border-radius:50%;background:var(--mint)}.stage-shell{border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);box-shadow:var(--shadow);overflow:hidden;max-width:760px;margin:auto}.stage-top,.stage-bottom{min-height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;gap:8px}.stage-top>span{font:9px monospace;letter-spacing:.15em;color:var(--muted)}.stage-top>div{display:flex;align-items:center}.quiet{border:0;background:none;font-size:10px;color:var(--muted);min-height:44px;padding:0 8px}.stage{height:clamp(330px,calc(100dvh - 370px),660px);position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;background-color:var(--surface);background-image:linear-gradient(45deg,#ffffff1a 25%,transparent 25%),linear-gradient(-45deg,#ffffff1a 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ffffff1a 75%),linear-gradient(-45deg,transparent 75%,#ffffff1a 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0;touch-action:none;cursor:grab}.stage.drag-over{box-shadow:inset 0 0 0 3px var(--accent)}.stage.brushing{cursor:crosshair}.stage canvas{height:100%;width:auto;max-width:100%;aspect-ratio:1;object-fit:contain;display:block;position:relative;z-index:1}.stage-guide{position:absolute;inset:9%;border:1px dashed #b899a34d;border-radius:50%;aspect-ratio:1;max-height:82%;margin:auto;pointer-events:none}.stage-bottom{border-top:1px solid var(--line)}.stage-bottom>span{font-size:10px;color:var(--muted);line-height:1.6}.history{display:flex;flex:none}.history button{font-size:25px}.empty-state{position:absolute;z-index:2;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:16px}.empty-art{display:grid;place-items:center;background:var(--paper);width:94px;height:94px;border-radius:50%;border:1px solid #ddbdca;box-shadow:0 0 0 6px var(--surface),0 0 0 7px #d5b9c4;color:var(--accent);font-size:38px;position:relative;margin-bottom:28px}.empty-art span{font-size:24px;position:absolute;right:-8px;bottom:0;background:var(--accent);color:var(--paper);width:30px;height:30px;border-radius:50%;line-height:30px}.empty-state h2{font-size:17px;letter-spacing:.03em}.empty-state p{font-size:12px;color:var(--muted);margin:9px 0 20px}.empty-state small{font-size:9px;color:var(--muted);margin-top:10px}.primary,.secondary,.tool{display:inline-flex;align-items:center;justify-content:center;gap:16px;min-height:46px;padding:10px 18px;border-radius:12px;border:1px solid transparent;font-size:12px;font-weight:650;transition:background .18s,transform .18s}.primary{background:var(--accent);color:var(--paper);box-shadow:0 4px 12px #a83f6515}.primary:hover{background:var(--accent-press)}.primary:active,.secondary:active{transform:translateY(1px)}.primary span{font-size:18px}.secondary{background:var(--paper);border-color:var(--line)}.secondary:hover{background:var(--rose);border-color:var(--accent)}.text-button{min-height:44px;background:none;border:0;color:var(--accent);text-decoration:underline;text-underline-offset:4px;font-size:11px}.image-actions{display:flex;align-items:center;gap:10px;max-width:760px;margin:16px auto 0}.image-actions .secondary{font-size:11px;padding:8px 12px}.image-actions>span{margin-left:auto;color:var(--muted);font-size:10px}.studio-note{text-align:center;font-size:10px;color:var(--muted);letter-spacing:.06em;margin-top:22px;line-height:1.9}.mobile-only{display:none}.editor{background:var(--paper);border-left:1px solid var(--line);display:flex;flex-direction:column;height:calc(100dvh - 80px);position:sticky;top:0}.editor-heading{display:flex;justify-content:space-between;align-items:center;padding:22px 24px 16px;font:9px monospace;letter-spacing:.12em;color:var(--muted)}.editor-heading>span:last-child{font-style:italic;letter-spacing:0}.tabs{display:grid;grid-template-columns:repeat(4,1fr);padding:0 18px;border-bottom:1px solid var(--line)}.tabs button{position:relative;min-height:65px;border:0;background:none;color:var(--muted);font-size:11px;padding:6px}.tabs button>span{display:block;font-size:22px;line-height:1.3;font-weight:400}.tabs button[aria-selected=true]{color:var(--accent);font-weight:700}.tabs button[aria-selected=true]:after{content:'';position:absolute;bottom:-1px;left:16%;width:68%;height:3px;background:var(--accent);border-radius:5px 5px 0 0}.panel-scroll{overflow-y:auto;flex:1;scrollbar-width:thin;scrollbar-color:var(--line) transparent}.panel{padding:22px 24px 28px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.section-title h2{font-size:14px}.section-title .icon-button{color:var(--accent);min-height:36px;min-width:36px}.categories{display:flex;gap:5px;overflow-x:auto;padding:12px 0 14px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}.categories button{flex:none;min-height:36px;border:1px solid var(--line);border-radius:30px;padding:5px 11px;font-size:10px;background:var(--paper);color:var(--muted)}.categories button[aria-pressed=true]{background:var(--ink);color:var(--paper);border-color:var(--ink)}.frame-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;max-height:365px;overflow-y:auto;padding:3px;scrollbar-width:thin}.frame-choice{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:98px;padding:6px 3px;border:1px solid var(--line);border-radius:12px;background:var(--paper);transition:background .16s,border-color .16s}.frame-choice[aria-pressed=true]{border:2px solid var(--accent);padding:5px 2px;background:var(--rose)}.frame-choice[aria-pressed=true]:before{content:'✓';position:absolute;top:2px;right:6px;color:var(--accent);font-size:11px;font-weight:700}.frame-choice img{width:58px;height:58px}.frame-choice span{font-size:8px;white-space:nowrap;letter-spacing:-.03em;margin-top:3px}.selected-name{display:flex;justify-content:space-between;align-items:center;margin-top:12px;color:var(--accent);font-size:11px}.selected-name>span:last-child{font-size:9px;color:var(--muted)}.control-section{border-top:1px solid var(--line);margin-top:20px;padding-top:18px}.check-label{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:10px;min-height:44px}.check-label input{width:15px;height:15px}.palettes{display:flex;gap:8px;margin-top:6px}.palette{width:34px;height:34px;min-width:34px;border:4px solid var(--paper);outline:1px solid var(--line);border-radius:50%;padding:0}.palette:hover{outline:2px solid var(--accent)}.color-pair{display:flex;gap:18px;margin:16px 0 10px}.color-pair label{display:flex;align-items:center;gap:8px;font-size:10px;color:var(--muted)}.range-label{display:flex;justify-content:space-between;margin-top:16px;font-size:11px;font-weight:600;min-height:22px}.range-label output{font:11px monospace;font-weight:400;color:var(--muted)}details{border-top:1px solid var(--line);margin-top:20px;padding-top:4px}summary{display:flex;justify-content:space-between;align-items:center;min-height:48px;font-size:11px;cursor:pointer;list-style:none}summary::-webkit-details-marker{display:none}summary>span{font-size:19px;color:var(--muted)}details[open] summary>span{transform:rotate(45deg)}.field-label{display:block;font-size:11px;font-weight:600;margin:18px 0 8px}.inline-control{display:flex;align-items:center;justify-content:space-between;margin-top:16px;gap:10px;font-size:11px}.check-row{display:flex;align-items:center;gap:12px;padding:15px 0;border-top:1px solid var(--line);margin-top:16px;font-size:12px;cursor:pointer}.check-row small{display:block;font-size:10px;font-weight:400;color:var(--muted);line-height:1.7;margin-top:3px}.helper{font-size:11px;color:var(--muted);line-height:1.9;margin:8px 0 16px}.helper.small{font-size:10px}.button-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:18px}.button-row>*{flex:1;text-align:center}.button-row>span{flex:0 0 40px;font:11px monospace;color:var(--muted)}.button-row .secondary{padding:8px 10px;font-size:11px}.small-badge{font:8px monospace;letter-spacing:.09em;color:var(--accent);background:var(--rose);padding:5px 7px;border-radius:5px}.brush-tools{display:flex;gap:6px;margin-top:20px}.tool{padding:8px;flex:1;background:var(--paper);border:1px solid var(--line);font-size:10px;min-height:46px;white-space:nowrap}.tool.active{background:var(--rose);color:var(--accent);border-color:var(--accent)}.full{width:100%}.save-large{margin:24px 0 10px;min-height:52px;font-size:14px}.save-tip{display:flex;gap:12px;padding:15px;background:var(--rose);border-radius:12px;margin:18px 0}.save-tip>span{font-size:23px;color:var(--accent)}.save-tip p{font-size:10px;color:var(--muted);line-height:1.9}.editor-footer{padding:14px 24px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:12px;background:var(--paper)}.save-state{font-size:10px;color:var(--muted)}.compact{font-size:11px;min-height:42px;padding:8px 16px}.toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);z-index:100;background:var(--ink);color:var(--paper);padding:13px 22px;border-radius:12px;max-width:min(90vw,560px);width:max-content;box-shadow:var(--shadow);font-size:12px;line-height:1.8}.toast.error{background:#9d3854;color:#fff}#brush-cursor{display:none;position:absolute;z-index:4;pointer-events:none;border:1px solid #fff;outline:1px solid #bb426a;background:#df739d20;border-radius:50%;transform:translate(-50%,-50%)}.works{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}.work-card{min-width:0}.work-card img{width:100%;aspect-ratio:1;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.work-card button{font-size:9px;padding:4px;min-height:36px;border:0;background:transparent;width:50%;color:var(--muted)}dialog{max-width:min(560px,94vw);width:560px;max-height:90dvh;overflow:auto;background:var(--paper);color:var(--ink);padding:24px;border:1px solid var(--line);border-radius:22px;box-shadow:0 20px 80px #0003}dialog::backdrop{background:#24182688;backdrop-filter:blur(4px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-header h2{font-size:16px}.profile-comparison{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:14px 0 24px}.profile-comparison>div{text-align:center;min-width:0}.profile-comparison img{width:100%;aspect-ratio:1;object-fit:contain;background:var(--surface)}.profile-comparison strong{display:block;font-size:10px;margin-top:12px}.profile-circle{border-radius:50%}.mock-profile{display:flex;gap:14px;align-items:center;padding:20px;border:1px solid var(--line);border-radius:14px}.mock-profile img{width:48px;height:48px;border-radius:50%;background:var(--surface)}.mock-profile strong{font-size:12px}.mock-profile p{font-size:10px;color:var(--muted)}#result-image{width:100%;display:block;margin:16px 0;background:var(--surface)}.stage-shell.expanded{position:fixed;inset:12px;z-index:40;margin:0;max-width:none;display:flex;flex-direction:column;box-shadow:0 0 0 100vmax #211728b3}.stage-shell.expanded .stage{flex:1;height:auto;min-height:0}.stage-shell.expanded canvas{max-height:100%;max-width:100%;object-fit:contain}.stage-shell.expanded .stage-top{flex:none}.stage-shell.expanded .stage-bottom{flex:none}
@media(min-width:1450px){.studio{padding-left:64px;padding-right:64px}.stage{height:clamp(450px,calc(100dvh - 380px),720px)}}
@media(max-width:1100px){.workspace{grid-template-columns:minmax(0,1fr) 370px}.studio{padding:28px 24px}.studio-heading{align-items:flex-start;flex-direction:column;gap:10px}.local-badge{font-size:9px}.panel{padding:20px}.editor-heading{padding:20px}.stage{height:clamp(290px,calc(100dvh - 430px),550px)}.frame-choice img{width:52px;height:52px}.frame-choice{min-height:90px}.image-actions{flex-wrap:wrap}.image-actions>span{width:100%;text-align:right}.editor-footer{padding:12px 20px}}
@media(max-width:767px){.header{height:64px;padding:0 18px}.brand{font-size:12px;gap:8px}.brand small{font-size:8px}.brand-mark{width:32px;height:32px;font-size:24px}.header-nav{gap:10px}.header-nav a{font-size:9px}.header-nav .icon-button{min-width:36px}.workspace{display:flex;flex-direction:column;min-height:calc(100dvh - 64px)}.studio{padding:20px 16px 0}.studio-heading{margin-bottom:16px;flex-direction:row;align-items:center}.eyebrow{font-size:8px}h1{font-size:23px}.lead{font-size:10px}.local-badge{font-size:0;gap:0}.local-badge i{width:8px;height:8px}.stage-shell{border-radius:16px}.stage-top{min-height:36px;padding:0 10px}.stage-top>span{font-size:8px}.stage-top .icon-button,.stage-top .quiet{min-height:36px}.stage{height:clamp(240px,40dvh,370px)}.stage-bottom{padding:0 10px;min-height:42px}.stage-bottom>span{font-size:9px}.stage-bottom .icon-button{min-width:36px;min-height:40px}.empty-art{width:56px;height:56px;font-size:25px;margin-bottom:15px;box-shadow:0 0 0 4px var(--surface),0 0 0 5px #d5b9c4}.empty-art span{font-size:16px;line-height:22px;width:22px;height:22px}.empty-state h2{font-size:13px}.empty-state p{font-size:10px;line-height:1.7;margin:6px 0 10px}.empty-state p br{display:none}.empty-state .primary{min-height:40px;font-size:11px;padding:6px 16px}.empty-state .text-button{min-height:34px;font-size:10px}.empty-state small{font-size:8px;margin-top:4px}.image-actions{margin-top:10px;gap:8px;flex-wrap:nowrap}.image-actions .secondary{min-height:40px;font-size:10px;padding:6px 10px}.image-actions>span{width:auto;margin-left:auto;font-size:8px;max-width:100px;line-height:1.6}.studio-note{display:none}.editor{height:auto;min-height:480px;position:static;border-left:0;border-top:1px solid var(--line);margin-top:20px}.editor-heading{padding:15px 20px 6px;font-size:8px}.tabs{padding:0 16px;position:sticky;top:0;background:var(--paper);z-index:5}.tabs button{min-height:59px}.panel-scroll{overflow:visible}.panel{padding:18px 20px 28px}.frame-grid{grid-template-columns:repeat(4,minmax(0,1fr));max-height:310px;gap:8px}.frame-choice{min-height:96px}.frame-choice img{width:58px;height:58px}.frame-choice span{font-size:8px}.editor-footer{position:sticky;bottom:0;padding:12px 20px max(12px,env(safe-area-inset-bottom));z-index:5;box-shadow:0 -6px 18px #8a4b6207}.categories button{min-height:40px}.range-label{font-size:12px}input[type=range]{height:40px}.check-row{min-height:56px}.palettes{justify-content:space-between;gap:6px}.palette{width:32px;height:32px;min-width:32px}dialog{padding:18px}.profile-comparison{gap:12px}.toast{bottom:85px}.mobile-only{display:block}.stage-shell.expanded{inset:8px}.stage-shell.expanded .stage{height:auto}.stage-shell.expanded .stage-bottom>span{max-width:65%}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* Drawing controls remain reachable next to the image on phones and in the expanded view. */
.canvas-tools{position:absolute;z-index:5;bottom:10px;left:50%;transform:translateX(-50%);display:flex;gap:3px;border:1px solid var(--line);background:var(--paper);padding:4px;border-radius:13px;box-shadow:0 3px 16px #54354414;touch-action:manipulation;white-space:nowrap}
.canvas-tools button{min-height:38px;min-width:40px;background:transparent;border:0;border-radius:9px;padding:5px 10px;font-size:11px}
.canvas-tools button.active{background:var(--rose);color:var(--accent)}
@media(max-width:767px) and (min-height:700px){
  .workspace{height:calc(100dvh - 64px);min-height:0;overflow:hidden}
  .studio{flex:none;padding:10px 16px 0}
  .studio-heading{margin-bottom:10px}
  .studio-heading .lead{display:none}
  .stage{height:clamp(195px,29dvh,265px)}
  .editor{flex:1;min-height:0;margin-top:12px;overflow:hidden}
  .editor-heading{display:none}
  .tabs{position:static;flex:none}
  .panel-scroll{overflow-y:auto;min-height:0}
  .editor-footer{position:static;flex:none}
  .canvas-tools button{min-height:34px;min-width:34px;font-size:10px;padding:4px 8px}
}
