/* Consistent touch rhythm, with breathing room above the system navigation. */
.panel{padding:18px 20px 24px;scroll-padding:20px;scrollbar-width:none;border-radius:26px 26px 0 0}
.panel-head{height:auto;min-height:36px;margin:0 0 12px;align-items:center}
.panel-head h1{line-height:1.45;font-size:15px;min-width:0;letter-spacing:.6px}
.panel-head .icon-button{height:38px!important;width:38px;flex-shrink:0}
.panel>:last-child{margin-bottom:12px}
.panel .tabs,.panel .chips,.panel .target-tabs,.quick-actions{gap:8px;align-items:center;padding:5px 2px 9px;margin:0 0 6px}
.panel .tabs button,.panel .chips button,.panel .target-tabs button,.quick-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:8px 13px;border-radius:20px;line-height:1.35;flex-shrink:0;vertical-align:middle}
.panel .target-tabs button{min-width:68px}.panel .chips{flex-wrap:nowrap}.quick-actions{display:flex;flex-wrap:wrap}.quick-actions .chip{font-size:11px;padding:8px 11px}
.nav{padding:10px 10px max(10px,env(safe-area-inset-bottom));min-height:80px;gap:7px;align-items:center;border-top-color:color-mix(in srgb,var(--ui-line) 60%,transparent)}
.nav button{height:54px;border-radius:18px;gap:5px;line-height:1.3}.app{grid-template-rows:56px minmax(120px,1fr) var(--panel) calc(80px + env(safe-area-inset-bottom));--panel:268px}
.workspace{padding-bottom:10px}.canvas-hint{margin-top:6px;height:23px;line-height:23px}.canvas-ratio{right:4px;bottom:10px}
.slider-row{display:grid;grid-template-columns:minmax(78px,auto) minmax(60px,1fr) 30px;gap:12px;min-height:52px;margin:4px 0}.slider-row label{font-size:11px;line-height:1.4;white-space:normal}.slider-row output{font-size:11px;text-align:right;min-width:30px;color:var(--ui-muted)}
.slider-row input[type=range]{width:100%;min-width:0;margin:22px 0;height:4px;background:linear-gradient(to right,var(--ui-accent) 0 var(--amount,0%),var(--ui-line) var(--amount,0%) 100%)}
.slider-row input[type=range]::-webkit-slider-thumb{width:21px;height:21px;border:3px solid var(--ui-chrome);background:var(--ui-accent);box-shadow:0 0 0 1px var(--ui-accent)}
.empty-upload{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;width:min(100%,300px);min-height:240px;color:var(--ui-ink);border-radius:34px;transition:background .3s,transform .2s;background:radial-gradient(ellipse at 50% 40%,color-mix(in srgb,var(--ui-glass) 48%,transparent),transparent 65%)}
.empty-upload .import-mark{display:grid;place-items:center;width:100px;height:100px;border:1px solid color-mix(in srgb,var(--ui-ink) 18%,transparent);border-radius:32px;background:linear-gradient(145deg,var(--ui-glass),transparent);box-shadow:inset 0 1px 0 #ffffff44,0 12px 50px #182b2310}.import-mark svg{width:42px;height:42px;stroke-width:.9}.empty-upload strong{font-size:17px;font-weight:450;letter-spacing:2px}.empty-upload>span:last-child{font-size:11px;letter-spacing:2px;color:var(--ui-muted)}
.no-photo .canvas-ratio{display:none}.no-photo .canvas-hint{font-size:11px}.no-photo{--panel:190px}.first-steps{display:flex;gap:15px;justify-content:space-between;margin:16px 0 12px;color:var(--ui-muted);font-size:10px}
.app.browse-photo{--panel:376px}.study-card{flex:0 0 156px;min-width:0;display:flex;flex-direction:column;align-items:stretch}.study-card .effect-card{flex:initial;min-width:0;width:100%;padding:5px;border-radius:14px;text-align:left}.study-card canvas{width:144px;height:90px;border-radius:10px}.study-card strong{font-size:12px;line-height:1.5;margin:7px 3px 3px}.study-card small{font-size:10px;line-height:1.6;width:auto;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:32px;color:var(--ui-muted);margin:0 3px}
.effect-strip{align-items:flex-start;gap:10px;padding:5px 2px 12px;margin-top:0}.example-link{align-self:flex-start;text-align:left;min-height:34px;padding:6px 8px;color:var(--ui-accent);font-size:10px}.panel .note{margin:6px 0 10px;line-height:1.7}.browse-tabs{margin-bottom:3px!important}
.example-dialog{width:min(92vw,680px);max-height:86dvh;padding:20px;border-radius:26px;border:1px solid var(--ui-line);color:var(--ui-ink);background:var(--ui-chrome);box-shadow:0 25px 100px #0005;overscroll-behavior:contain}.example-dialog::backdrop{background:#12272370;backdrop-filter:blur(9px)}.example-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:10px;margin-bottom:18px}.example-head h2{font-size:16px;font-weight:500;margin:0;letter-spacing:1px}.example-head button{min-height:38px;flex-shrink:0}.example-gallery{display:grid;gap:25px}.example-gallery h3{font-size:15px;font-weight:500;margin:0 0 12px}.example-gallery img{display:block;width:100%;border-radius:14px;aspect-ratio:auto;object-fit:contain;background:var(--ui-base)}.example-gallery .primary{width:100%;margin-top:8px}
.appearance-toggle{display:flex;justify-content:space-between;align-items:center;font-size:13px;margin:0 0 18px;padding-bottom:14px;border-bottom:1px solid var(--ui-line)}.appearance-switch{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-line);border-radius:24px;min-width:86px;min-height:38px;padding:8px 12px;gap:7px;font-size:11px;background:var(--ui-glass)}.appearance-switch:before{content:'';width:9px;height:9px;border-radius:50%;background:var(--ui-muted);opacity:.5}.appearance-switch.on:before{background:var(--ui-accent);opacity:1}.theme-list{padding:6px 3px 12px!important;gap:9px!important;flex-wrap:wrap!important;overflow:visible!important}.theme-choice{min-height:40px!important;display:inline-flex!important;align-items:center!important;border-radius:16px!important;gap:7px!important;padding:8px 12px!important}
.settings-grid{gap:10px;margin-top:12px}.settings-grid button{min-height:44px;line-height:1.5}.tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible}.tools button{min-width:0;padding:8px 4px;font-size:10px;min-height:42px;line-height:1.4}.panel .text-link{min-height:36px;line-height:1.5}
.app.typing{--panel:158px;grid-template-rows:44px minmax(110px,1fr) var(--panel) 0}.app.typing .panel{padding:10px 16px 14px}.app.typing .text-edit textarea{height:82px;min-height:82px}.app.typing .panel>:not(.panel-head):not(.text-edit){display:none}
@media(max-height:700px){.app{--panel:220px;grid-template-rows:50px minmax(100px,1fr) var(--panel) calc(74px + env(safe-area-inset-bottom))}.app.browse-photo{--panel:340px}.nav{min-height:74px;padding-top:9px;padding-bottom:max(9px,env(safe-area-inset-bottom))}.no-photo{--panel:165px}.empty-upload{min-height:180px;gap:10px}.empty-upload .import-mark{width:76px;height:76px;border-radius:25px}}
@media(min-width:820px){.app{grid-template-columns:minmax(0,1fr) 390px;grid-template-rows:64px minmax(0,1fr) 86px}.panel{padding:24px;border-radius:26px 0 0 0}.nav{grid-column:2;grid-row:3}.workspace{grid-row:2/4}.study-card{flex-basis:calc(50% - 7px)}.study-card canvas{width:100%}.effect-strip{flex-wrap:wrap}.empty-upload{min-height:340px}.example-dialog{max-height:88vh}.app.typing{grid-template-columns:minmax(0,1fr) 390px;grid-template-rows:64px minmax(0,1fr) 86px}.app.typing .panel{overflow:auto}}
@media(prefers-reduced-motion:no-preference){.empty-upload .import-mark{animation:import-arrive .6s cubic-bezier(.2,.8,.2,1) both}@keyframes import-arrive{from{opacity:0;transform:translateY(9px) rotate(-6deg)}to{opacity:1;transform:none}}}
