:root {
  --ink: #303030; --muted: #616161; --line: #d4d4d4; --bg: #f1f1f1;
  --surface: #fff; --green: #008060; --green-hover: #006e52; --yellow: #ffca28;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px "DM Sans", system-ui, sans-serif; }
.topbar { height: 56px; background: #1a1a1a; color: #f3f3f3; display: flex; align-items: center; padding: 0 16px; position: sticky; top: 0; z-index: 5; box-shadow: 0 1px 0 #000; }
.brand { min-width: 250px; display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #95bf47; color: #173630; box-shadow: inset 0 0 0 1px #ffffff30; }
.privacy { position: absolute; left: 50%; transform: translateX(-50%); width: min(470px, 42vw); height: 34px; padding: 0 12px; display: flex; align-items: center; color: #c9c9c9; background: #303030; border: 1px solid #4a4a4a; border-radius: 9px; font-size: 12px; }
.privacy span { margin-right: 8px; font-size: 15px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; position: relative; }.reset-btn { padding: 7px 12px; color: #eee; background: #303030; border: 1px solid #616161; border-radius: 8px; font: inherit; cursor: pointer; box-shadow: 0 1px 0 #000; }
.reset-btn:hover { background: #3d3d3d; }
.auth-trigger { padding: 7px 13px; color: #173630; background: #95bf47; border: 0; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; }.user-button { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 9px 0 5px; color: #eee; background: #303030; border: 1px solid #565656; border-radius: 9px; font: inherit; cursor: pointer; }.user-avatar { width: 25px; height: 25px; display: grid; place-items: center; color: #173630; background: #95bf47; border-radius: 7px; font-size: 11px; font-weight: 800; }.user-dropdown { width: 210px; position: absolute; top: 42px; right: 76px; z-index: 20; padding: 10px; color: #303030; background: #fff; border: 1px solid #d4d4d4; border-radius: 10px; box-shadow: 0 8px 24px #0002; }.user-dropdown small { display: block; padding: 4px 5px 10px; color: #666; overflow: hidden; text-overflow: ellipsis; }.user-dropdown button { width: 100%; padding: 8px; color: #8e1f0b; background: #fff; border: 1px solid #e0b4aa; border-radius: 7px; cursor: pointer; }
.workspace { min-height: calc(100vh - 56px); display: grid; grid-template-columns: 390px 1fr; }
.sidebar { max-height: calc(100vh - 56px); overflow: auto; padding: 20px 20px 48px; background: var(--bg); border-right: 1px solid #dedede; }
.upload-zone { height: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: var(--surface); border: 1.5px dashed #b7b7b7; border-radius: 12px; cursor: pointer; box-shadow: 0 1px 0 #0000000d; transition: .18s; }
.upload-zone:hover, .upload-zone.drag { border-color: var(--green); background: #f2fbf7; }
.upload-icon { color: var(--green); font-size: 25px; }
.upload-zone strong { font-size: 13px; }.upload-zone span, .save-box small { color: #777; font-size: 11px; }
.position-panel { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 0 #0000000d; }
.position-panel summary { padding: 12px; font-size: 12px; font-weight: 600; cursor: pointer; list-style: none; }.position-panel summary span { float: right; }
.mini-controls { padding: 0 12px 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.mini-controls label { display: grid; gap: 4px; color: #777; font-size: 11px; }.mini-controls label:last-child { grid-column: 1 / -1; }
.section-divider { height: 1px; margin: 25px 0 20px; background: #d9d9d9; }
.section-heading { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 20px; }
.section-heading > b { width: 25px; height: 25px; display: grid; place-items: center; color: #fff; background: #303030; border-radius: 7px; font-size: 11px; }
.section-heading h2 { margin: 0 0 2px; color: #202020; font-size: 16px; }.section-heading p { margin: 0; color: #797979; font-size: 11px; }
.field-label { display: flex; justify-content: space-between; margin: 12px 0 7px; color: #484848; font-size: 11px; font-weight: 600; }
.field-label em { color: #797979; font-size: 10px; font-style: normal; font-weight: 400; }
.control-section textarea, .single-line, .save-row input { width: 100%; padding: 10px; background: #fff; border: 1px solid #8a8a8a; border-radius: 8px; outline: none; resize: vertical; font: inherit; box-shadow: inset 0 1px 0 #0000000d; }
.control-section textarea:focus, .single-line:focus, .save-row input:focus { border-color: var(--green); box-shadow: 0 0 0 2px #00806040; }
.single-line { height: 35px; padding: 7px 10px; }.field-row { display: flex; align-items: center; }.field-row .field-label { flex: 1; }
.color-chip { display: flex; align-items: center; gap: 7px; }.color-chip input { width: 33px; height: 25px; padding: 0; border: 1px solid #bbb; border-radius: 5px; }.color-chip code { color: #666; font-size: 10px; }
.hint { margin: 6px 0 14px; color: #007a5c; font-size: 10px; line-height: 1.35; }
.slider-label { display: flex; justify-content: space-between; margin: 15px 0 5px; font-size: 11px; }.slider-label strong { color: var(--green); font-size: 11px; }input[type=range] { width: 100%; accent-color: var(--green); }
.save-box { margin-top: 18px; padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 0 #0000000d; }.save-row,.template-row { display: flex; gap: 8px; }.save-row input { height: 35px; flex: 1; font-size: 12px; }.save-row button,.template-row button { padding: 0 13px; color: #fff; background: #303030; border: 0; border-radius: 8px; font-weight: 600; cursor: pointer; }.template-row { margin: 9px 0; }.template-row select { min-width: 0; height: 34px; flex: 1; padding: 0 8px; background: #fff; border: 1px solid #8a8a8a; border-radius: 8px; font: inherit; font-size: 11px; }.template-row button { padding: 0 9px; font-size: 10px; }.template-row #deleteTemplateBtn { color: #8e1f0b; background: #fff; border: 1px solid #d5a397; }
.ratio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }.ratio { min-height: 55px; padding: 10px 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; box-shadow: 0 1px 0 #0000000a; }.ratio:hover { background: #f7f7f7; }.ratio.active { padding: 9px 3px; color: #124a39; background: #f0faf6; border: 2px solid var(--green); }.ratio strong, .ratio small { display: block; }.ratio strong { font-size: 11px; }.ratio small { margin-top: 4px; color: #777; font-size: 9px; }
.canvas-area { display: flex; flex-direction: column; align-items: center; padding: 20px 34px 34px; overflow: auto; background: var(--bg); }
.unlock { width: min(720px, 100%); height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; color: #fff; background: #303030; border: 0; border-radius: 12px; box-shadow: 0 2px 0 #000; text-align: center; cursor: pointer; font: inherit; }.unlock:hover { background: #242424; }.unlock.unlocked { background: var(--green); box-shadow: 0 2px 0 #004b38; }.unlock span { font-size: 21px; }.unlock strong, .unlock small { display: block; }.unlock strong { font-size: 12px; }.unlock small { margin-top: 2px; color: #d0d0d0; font-size: 9px; }
.poster-frame { width: min(675px, 76vh); height: min(844px, calc(100vh - 224px)); min-height: 560px; position: relative; overflow: hidden; background: #8eaa7d; border-radius: 12px; box-shadow: 0 4px 16px #0000001c; }
.poster-frame.unlocked { cursor: grab; outline: 2px solid var(--green); outline-offset: 3px; }.poster-frame.unlocked:active { cursor: grabbing; }.poster-image { position: absolute; inset: 0; background: url("assets/default-bg.svg") center/cover no-repeat; pointer-events: none; }.poster-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, #0000000a 25%, #0000002e 45%, #000000db 100%); pointer-events: none; }
.poster-top-pill { position: absolute; top: 13px; left: 50%; transform: translateX(-50%); padding: 8px 13px; color: #fff; background: #1f1f1fd9; border-radius: 20px; white-space: nowrap; font-size: 10px; }
.poster-copy { position: absolute; left: 8%; right: 7%; bottom: 7.8%; color: #fff; }.poster-title { font-size: clamp(25px, 3.4vw, 49px); font-weight: 700; line-height: 1.04; letter-spacing: -1.3px; white-space: pre-line; text-shadow: 0 1px 2px #0004; }.poster-title .accent { color: var(--yellow); }.poster-subtitle { margin-top: 25px; font: italic clamp(13px, 1.4vw, 20px) "Playfair Display", serif; white-space: nowrap; }.poster-handle { margin-top: 17px; font-size: clamp(13px, 1.3vw, 17px); }
.locked-badge { position: absolute; right: 12px; bottom: 10px; padding: 8px 11px; color: #fff; background: #303030; border-radius: 7px; font-size: 9px; font-weight: 600; }
.export-bar { width: min(720px, 100%); margin-top: 23px; padding: 14px 16px; display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 0 #0000000d; }.format { margin-right: auto; }.format > span { display: block; margin-bottom: 7px; color: #666; font-size: 11px; }.format-btn { padding: 8px 12px; background: #fff; border: 1px solid #ccc; font-size: 10px; cursor: pointer; }.format-btn:first-child { border-radius: 8px 0 0 8px; }.format-btn:last-child { border-radius: 0 8px 8px 0; }.format-btn.active { color: #fff; background: #303030; border-color: #303030; }
.lark-btn, .download-btn { height: 39px; padding: 0 14px; background: #fff; border: 1px solid #8a8a8a; border-radius: 8px; font: inherit; cursor: pointer; white-space: nowrap; }.download-btn { color: #fff; background: var(--green); border-color: #005f47; box-shadow: 0 2px 0 #004b38; font-weight: 700; }.download-btn:hover { background: var(--green-hover); }.footer-note { margin: 11px 0; color: #777; font-size: 11px; }
.toast { position: fixed; bottom: 23px; left: 50%; z-index: 10; transform: translate(-50%, 20px); padding: 11px 16px; color: #fff; background: #303030; border-radius: 10px; box-shadow: 0 4px 14px #0003; opacity: 0; pointer-events: none; transition: .25s; font-size: 12px; }.toast.show { transform: translate(-50%, 0); opacity: 1; }
.auth-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: #0009; backdrop-filter: blur(5px); }.auth-overlay[hidden] { display: none; }.auth-card { width: min(420px, 100%); position: relative; padding: 28px; background: #fff; border: 1px solid #d4d4d4; border-radius: 16px; box-shadow: 0 20px 60px #0004; }.auth-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; background: #f1f1f1; border: 0; border-radius: 8px; color: #555; font-size: 20px; cursor: pointer; }.auth-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 25px; }.auth-brand span { width: 32px; height: 32px; display: grid; place-items: center; color: #173630; background: #95bf47; border-radius: 8px; font-weight: 800; }.auth-card h2 { margin: 0 0 6px; font-size: 22px; }.auth-card > p { margin: 0 0 20px; color: #666; font-size: 12px; }.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 18px; padding: 4px; background: #f1f1f1; border-radius: 10px; }.auth-tabs button { padding: 9px; color: #666; background: transparent; border: 0; border-radius: 7px; font: inherit; cursor: pointer; }.auth-tabs button.active { color: #202020; background: #fff; box-shadow: 0 1px 3px #0002; font-weight: 700; }.auth-notice { margin-bottom: 14px; padding: 10px 12px; color: #6b4f00; background: #fff5cc; border: 1px solid #e8d488; border-radius: 8px; font-size: 11px; line-height: 1.45; }.auth-notice.error { color: #8e1f0b; background: #fff1ed; border-color: #e6b4a8; }.auth-notice.success { color: #006e52; background: #eaf8f2; border-color: #9bd6c1; }.auth-card form { display: grid; gap: 13px; }.auth-card form label { display: grid; gap: 6px; color: #444; font-size: 11px; font-weight: 600; }.auth-card form input { width: 100%; height: 42px; padding: 0 11px; background: #fff; border: 1px solid #8a8a8a; border-radius: 8px; font: inherit; outline: none; }.auth-card form input:focus { border-color: var(--green); box-shadow: 0 0 0 2px #00806040; }.auth-submit { height: 42px; margin-top: 3px; color: #fff; background: var(--green); border: 1px solid #005f47; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; }.auth-submit:disabled { opacity: .6; cursor: wait; }.guest-button { width: 100%; height: 40px; margin-top: 10px; background: #fff; border: 1px solid #8a8a8a; border-radius: 8px; font: inherit; cursor: pointer; }.auth-card .auth-terms { margin: 14px 8px 0; color: #888; text-align: center; font-size: 10px; line-height: 1.45; }
@media(max-width:900px){.workspace{grid-template-columns:330px 1fr}.sidebar{padding:16px}.privacy{display:none}.poster-frame{width:min(540px,80vw);height:calc(min(540px,80vw)*1.25);min-height:0}.export-bar{flex-wrap:wrap}.format{width:100%}}
@media(max-width:650px){.topbar{padding:0 14px}.brand{min-width:0;font-size:16px}.header-actions{gap:5px}.user-button #userName{display:none}.auth-trigger{padding:7px 9px}.workspace{display:block}.sidebar{max-height:none;border-right:0;border-bottom:1px solid #ddd}.canvas-area{padding:20px 14px}.poster-frame{width:88vw;height:110vw}.poster-title{font-size:clamp(28px,7vw,40px)}.poster-subtitle{font-size:14px;white-space:normal}.export-bar{align-items:stretch}.lark-btn,.download-btn{flex:1}.auth-card{padding:24px 20px}}
