* { box-sizing: border-box; }
:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #29243a; background: #f5f3fa; font-size: 13px; }
body { margin: 0; background: #f5f3fa; }
button, select, input { font: inherit; }
button { cursor: pointer; transition: background .15s, box-shadow .15s; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, select:focus-visible, input:focus-visible, .drop-zone:focus-visible { outline: 3px solid #b7a5ed; outline-offset: 3px; }
.app-page { min-height: 100vh; padding: 40px 20px; }
.shell { width: min(680px, 100%); margin: auto; padding: 28px; border: 1px solid #e1e6ed; border-radius: 22px; background: #fff; box-shadow: 0 16px 48px #26354c0c; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.brand-row { display: flex; gap: 11px; align-items: center; min-width: 0; }
.brand-mark { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 13px; color: white; font-size: 25px; background: #7354d2; box-shadow: 0 4px 10px #7354d225; }
h1 { font-size: 18px; letter-spacing: -.5px; margin: 0 0 5px; }
.header p { margin: 0; font-size: 12px; color: #777185; }
.privacy-pill { color: #397e68; font-size: 10px; padding: 6px 8px; border-radius: 7px; background: #edf8f2; white-space: nowrap; }
.privacy-pill span { font-size: 8px; margin-right: 3px; }
.drop-zone { border: 1.5px dashed #cec1ee; background: #faf8ff; border-radius: 15px; padding: 28px 16px; text-align: center; transition: .15s; }
.drop-zone.is-dragging { border-color: #7354d2; background: #f0eaff; }
.drop-icon { width: 44px; height: 44px; border: 1px solid #dce6f8; border-radius: 13px; display: grid; place-items: center; margin: 0 auto 12px; font-size: 28px; background: #fff; color: #7354d2; }
.drop-title { font-weight: 650; font-size: 16px; letter-spacing: -.3px; }
.drop-subtitle { margin-top: 7px; font-size: 12px; color: #777185; }
.browse-button { margin-top: 16px; padding: 9px 18px; border: 1px solid #d5deee; border-radius: 9px; background: #fff; color: #6948c5; font-size: 12px; font-weight: 600; box-shadow: 0 2px 3px #26354c05; }
.browse-button:hover { background: #f3edff; }
.settings-panel { margin-top: 20px; }
.section-heading { color: #8b94a2; font-size: 10px; font-weight: 650; letter-spacing: 1.2px; margin-bottom: 13px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.field label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 550; color: #586375; }
.select-control, .quality-control input { width: 100%; height: 41px; border: 1px solid #dfe5ed; border-radius: 9px; background: #fff; color: #303b4f; }
.select-control { appearance: none; padding: 0 32px 0 12px; background-image: linear-gradient(45deg, transparent 50%, #8a94a6 50%), linear-gradient(135deg, #8a94a6 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
.quality-control { position: relative; }
.quality-control input { padding: 0 38px 0 12px; }
.quality-control input:disabled { color: #9099a8; background: #f4f6f9; }
.quality-control span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: #8a94a6; font-size: 12px; pointer-events: none; }
.file-section { margin-top: 18px; }
.empty-state { padding: 0 8px; text-align: center; font-size: 11px; line-height: 1.6; color: #8b94a2; }
.file-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; font-size: 12px; }
.file-header strong { margin-right: 7px; }
.file-header span { color: #8b94a2; }
.file-list { display: grid; gap: 8px; max-height: 250px; overflow: auto; }
.file-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 32px; gap: 10px; align-items: center; padding: 8px; border-radius: 11px; border: 1px solid #e5e9ef; background: #fafbfd; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 7px; background: #ecf0f6; }
.file-meta { min-width: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 550; }
.file-size { margin-top: 4px; font-size: 11px; color: #8b94a2; }
.text-button, .icon-button { border: 0; background: transparent; color: #7354d2; }
.text-button { font-size: 12px; padding: 6px 8px; }
.icon-button { width: 30px; height: 30px; border-radius: 7px; font-size: 20px; color: #8793a6; }
.icon-button:hover, .text-button:hover { background: #f3edff; }
.footer { margin-top: 20px; }
.primary-button { width: 100%; height: 46px; border: 0; border-radius: 10px; padding: 12px 16px; display: flex; align-items: center; justify-content: center; gap: 10px; background: #7354d2; color: white; font-weight: 600; box-shadow: 0 4px 10px #7354d21a; }
.primary-button:hover:enabled { background: #6243c1; }
.primary-button:disabled { background: #e8edf5; color: #8997ad; opacity: 1; box-shadow: none; }
.button-arrow { font-size: 19px; }
.status { min-height: 18px; margin-top: 10px; text-align: center; font-size: 11px; line-height: 1.5; color: #8590a1; overflow-wrap: anywhere; }
@media (max-width: 520px) { .app-page { padding: 16px 12px; } .app-page .shell { padding: 20px; } h1 { font-size: 16px; } }

/* Shared visual identity for the popup and full editor. */
.brand-mark { width: 44px; height: 44px; border-radius: 12px; background: none; box-shadow: 0 4px 12px #7354d222; }
.header { gap: 10px; }
h1 { font-weight: 700; letter-spacing: -.6px; }
.privacy-pill { border: 1px solid #dceee5; border-radius: 20px; color: #38775e; background: #f0f8f4; }
.drop-zone { border-radius: 18px; border-width: 1px; }
.drop-icon { color: #7354d2; border-color: #e5dcf7; box-shadow: 0 3px 8px #7354d208; }
.drop-subtitle { line-height: 1.6; }
.browse-button { color: #fff; background: #7354d2; border-color: #7354d2; border-radius: 10px; padding: 10px 20px; box-shadow: 0 3px 8px #7354d21c; }
.browse-button:hover:enabled { background: #6243c1; }
.settings-panel { padding-top: 20px; border-top: 1px solid #eeeaf4; }
.section-heading { color: #81768f; letter-spacing: 1.5px; font-size: 10px; }
.select-control, .quality-control input { height: 43px; border-color: #e6e0ed; background-color: #fcfbfe; }
.field label { color: #645b74; }
.primary-button { border-radius: 12px; height: 46px; }
.primary-button:disabled { background: #ede8f5; color: #958aa8; }
.empty-state { color: #81778f; }
.status { color: #81778f; font-size: 10px; }
@media (max-width: 380px) { .header { flex-wrap: wrap; } .privacy-pill { margin-left: 55px; } }

/* Landing-page identity: the supplied purple, rose and orange brand. */
:root{--brand-gradient:linear-gradient(115deg,#8134db,#b92787 38%,#cf2859 72%,#d64d22);color:#292438;background:#faf7fb}.brand-mark{background:none;box-shadow:none;border-radius:12px}.browse-button,.primary-button{background:var(--brand-gradient);border:0;box-shadow:0 4px 14px #b9278720}.browse-button:hover:enabled,.primary-button:hover:enabled{background:var(--brand-gradient);filter:brightness(.94)}.drop-zone{background:linear-gradient(135deg,#fcf7ff,#fff7fa 65%,#fff9f1);border-color:#dcb9d6}.drop-icon{color:#a12d91;border-color:#ecd6e8}.drop-zone.is-dragging{background:#f8e8f5;border-color:#a12d91}.text-button{color:#a12d91}.shell{border-color:#eadfea}.brand-row h1{font-weight:750}.privacy-pill{border-radius:8px}.select-control:focus-visible,input:focus-visible,button:focus-visible,.drop-zone:focus-visible{outline-color:#af408e}.primary-button:disabled{background:#eee5ed;color:#988896;filter:none}.settings-panel{border-top-color:#efe4ed}

.preset-note{font-size:10px;line-height:1.5;color:#81778f;margin:10px 0 0}

/* Custom export controls shared with the website. */
.text-control{width:100%;height:41px;border:1px solid #e6e0ed;border-radius:9px;padding:0 10px;background:#fcfbfe;color:#303b4f;min-width:0}.settings-panel>.field-row{margin-top:0;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr)}.preset-field{margin-top:12px}.dimensions{display:grid;grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr) 78px;gap:8px;align-items:end;margin-top:12px}.dimensions .select-control{padding-left:9px}.ratio-button{height:41px;border:1px solid #e1d6e5;background:#f6f1f8;color:#817185;border-radius:8px;font-size:22px}.ratio-button[aria-pressed="true"]{background:#f0dff2;color:#912989;border-color:#bf79b9}.quality-heading{display:flex;align-items:center;justify-content:space-between;margin-top:13px}.quality-heading label{font-size:12px}.quality-heading .quality-control{width:90px}.quality-heading input{height:34px}#quality-slider{width:100%;margin:10px 0 0;accent-color:#a12d91}.size-feedback{font-size:11px;color:#754570;line-height:1.5;margin:8px 0 0}.dimensions input:disabled{opacity:.6}@media(max-width:350px){.dimensions{gap:5px;grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr) 65px}}

/* Plan bar (v0.6.0) */
.plan-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin: 0 0 14px; padding: 9px 12px; border: 1px solid #f0e2ec; border-radius: 12px; background: linear-gradient(115deg, #fcf8ff, #fff8fa 60%, #fffaf3); font-size: 12px; color: #5f5866; }
.plan-bar.is-pro { border-color: #e6d2f1; }
.plan-label strong { color: #252532; }
.plan-badge { display: inline-block; padding: 1px 6px; margin-right: 4px; border-radius: 6px; background: var(--brand-gradient, linear-gradient(115deg, #8134db, #b92787 38%, #cf2859 72%, #d64d22)); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .4px; }
.plan-actions { display: flex; align-items: center; gap: 10px; }
.plan-link { border: 0; background: none; padding: 0; color: #8c4d88; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.plan-link:hover { color: #a12d91; }
.plan-upgrade { padding: 5px 12px; border-radius: 8px; background: var(--brand-gradient, linear-gradient(115deg, #8134db, #b92787 38%, #cf2859 72%, #d64d22)); color: #fff; font-weight: 600; text-decoration: none; }
.plan-upgrade:hover { filter: brightness(.94); }
.plan-key-form { display: flex; gap: 6px; width: 100%; }
.plan-key-form[hidden] { display: none; }
.plan-key-form input { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid #e6dcea; border-radius: 8px; font-family: ui-monospace, Menlo, monospace; font-size: 11px; }
.plan-key-form button { border: 0; border-radius: 8px; padding: 7px 12px; background: #252532; color: #fff; font-weight: 600; font-size: 12px; }
.plan-error { width: 100%; margin: 0; color: #b4233f; font-size: 11px; }
.popup-page .plan-bar { margin-bottom: 10px; padding: 7px 10px; font-size: 11px; }
.limit-note { margin-top: 8px; text-align: center; font-size: 11px; }
.limit-note a { color: #a12d91; font-weight: 600; }

/* Images / Video tabs (v0.7.0-beta) */
.video-tab, .mode-tabs { --muted: #81778f; --accent: #a12d91; }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 14px; padding: 4px; border: 1px solid #f0e2ec; border-radius: 12px; background: #fcf8fc; }
.mode-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: #6f6577; font-weight: 600; font-size: 12px; }
.mode-tabs button:hover:enabled { background: #f7edf8; }
.mode-tabs button[aria-selected="true"] { background: #fff; color: #252532; box-shadow: 0 1px 4px #75204c1a; }
.beta-badge { padding: 1px 5px; border-radius: 5px; background: var(--brand-gradient); color: #fff; font-size: 8px; font-weight: 700; letter-spacing: .5px; }
.video-stage { position: relative; border-radius: 14px; overflow: hidden; background: #17141c; }
.video-stage video { display: block; width: 100%; max-height: 340px; background: #17141c; }
.crop-guide { position: absolute; z-index: 1; border: 2px solid #fff; border-radius: 3px; box-shadow: 0 0 0 999px #0000008a; pointer-events: none; }
.crop-guide[hidden] { display: none; }
.video-file { margin: 10px 0 0; }
.video-file strong { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.video-meta-found { margin: 6px 0 0; padding: 7px 10px; border-radius: 9px; background: #f0f8f4; color: #2f6b52; font-size: 11px; line-height: 1.5; }
.video-editor .settings-panel { margin-top: 14px; padding-top: 14px; }
.trim-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trim-control { display: flex; gap: 6px; }
.mini-button { flex-shrink: 0; padding: 0 10px; border: 1px solid #e1d6e5; border-radius: 8px; background: #fcfbfe; color: #8c4d88; font-size: 11px; font-weight: 600; }
.mini-button:hover:enabled { background: #f7edf8; }
.video-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); margin-top: 12px; }
.check-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: #645b74; font-weight: 550; cursor: pointer; }
.check-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.export-heading { margin-top: 18px; }
.video-progress { height: 6px; margin-bottom: 10px; border-radius: 99px; background: #f1e7ee; overflow: hidden; }
.video-progress span { display: block; height: 100%; background: var(--brand-gradient); transition: width .2s; }
.primary-button.is-cancel { background: #252532; }
.video-warning { margin: 6px 0 0; text-align: center; font-size: 11px; color: #9a5a12; }
.video-warning[hidden] { display: none; }
.video-tip { margin: 6px 0 0; text-align: center; font-size: 10px; color: var(--muted); }
.video-tip .plan-link { font-size: 10px; }
.video-tab .results { margin-top: 12px; }
@media (max-width: 420px) { .trim-row, .video-row { grid-template-columns: 1fr; gap: 10px; } }

/* Image queue: square thumbnails in a grid; remove top-right, per-image export on hover (always shown on touch). */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.file-tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid #ece3ee; background: #f4eff6; }
.tile-thumb { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile-remove { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #1f1a2bb3; color: #fff; font-size: 17px; line-height: 1; backdrop-filter: blur(4px); }
.tile-remove:hover:enabled { background: #1f1a2be6; }
.tile-export { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); padding: 6px 12px; border: 0; border-radius: 8px; background: var(--brand-gradient); color: #fff; font-size: 11px; font-weight: 650; white-space: nowrap; box-shadow: 0 3px 10px #00000026; }
.tile-export:hover:enabled { filter: brightness(.94); }
@media (hover: hover) {
  .tile-export { opacity: 0; transition: opacity .15s; }
  .file-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #1f1a2b59, transparent 55%); opacity: 0; transition: opacity .15s; pointer-events: none; }
  .file-tile:hover .tile-export, .file-tile:focus-within .tile-export, .file-tile:hover::after, .file-tile:focus-within::after { opacity: 1; }
  .tile-export, .tile-remove { z-index: 1; }
}
.file-section + .footer { margin-top: 14px; }
