:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #edf3f8;
  background: #0a1421;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { display: grid; place-items: center; padding: clamp(24px, 3.8vw, 60px); background: radial-gradient(circle at 50% 38%, #17263a 0, #091320 70%); }
button, input { font: inherit; }
button, .button { cursor: pointer; }
button:disabled, input:disabled { cursor: not-allowed; }
.app { width: 100%; max-width: 1640px; height: 100%; max-height: 1140px; display: grid; grid-template-rows: 64px minmax(0, 1fr); overflow: hidden; border: 1px solid #354960; border-radius: 16px; box-shadow: 0 22px 70px #0008; }
.topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; min-width: 0; padding: 0 20px; background: #122137; border-bottom: 1px solid #2b3e53; }
.top-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; min-width: 120px; }
.brand-mark { width: 34px; height: 34px; display: block; flex: none; }
.brand-mark img { display: block; width: 100%; height: 100%; }
.brand-name { display: flex; flex-direction: column; align-items: center; }
.brand strong, .brand small { display: block; white-space: nowrap; }
.brand strong { font-size: 14px; letter-spacing: -.03em; }
.brand small { margin-top: 2px; color: #f7c65c; font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.photo-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.photo-heading strong { overflow: hidden; color: #f4f8fb; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.photo-heading span { color: #90a5b8; font-size: 11px; white-space: nowrap; }
.support-cta { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; padding: 4px 10px; border: 1px solid #647489; border-radius: 999px; background: #1b2e43; color: #cfdeea; font-size: 11px; font-weight: 650; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.support-cta strong { color: #f6cc80; font-weight: 700; }
.support-cta:hover { border-color: #d7aa5a; background: #263e56; color: #fff; }
.support-cta:focus-visible { outline: 2px solid #f7bb32; outline-offset: 3px; }
.support-heart { color: #f18a9c; font-size: 13px; line-height: 1; }
.support-cup { flex: none; width: 14px; height: 14px; color: #f6cc80; }
.support-short { display: none; }
.top-actions { display: flex; align-items: center; justify-self: end; gap: 8px; flex: none; }
.button-label-short { display: none; }
.button-label-tiny { display: none; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 35px; padding: 8px 12px; border: 1px solid #3c526a; border-radius: 8px; background: #1c3046; color: #eaf2f8; font-size: 12px; font-weight: 650; white-space: nowrap; transition: background .15s, border-color .15s; }
button:hover:not(:disabled), .button:hover { background: #2a425a; border-color: #7996ad; }
button:focus-visible, .button:focus-within, input:focus-visible { outline: 2px solid #f7bb32; outline-offset: 2px; }
button:disabled { opacity: .45; }
.primary { border-color: #f7bb32; background: #f7bb32; color: #102039; font-weight: 800; }
.primary:hover:not(:disabled) { border-color: #ffd36c; background: #ffd36c; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.add-row { display: flex; flex-direction: column; align-items: stretch; min-width: 0; margin: 16px 0 20px; }
.tool-label, .pin-palette-label { display: block; margin-bottom: 6px; color: #bed0df; font-size: 11px; font-weight: 700; text-align: center; }
.tool { width: 100%; justify-content: center; min-height: 39px; padding: 8px 11px; border-color: #f7bb32; background: #f7bb32; color: #102039; font-weight: 800; }
.tool:hover:not(:disabled) { border-color: #ffd36c; background: #ffd36c; }
.tool.active { border-color: #ffe4a1; background: #ffe4a1; box-shadow: inset 3px 0 #102039; }
.tool.active:hover:not(:disabled) { border-color: #fff0c8; background: #fff0c8; }
.pin-palette { margin: 0 0 8px; }
.pin-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pin-option { flex-direction: column; gap: 2px; min-width: 0; min-height: 54px; padding: 5px 2px; background: #1b3047; font-size: 10px; }
.pin-option img { display: block; width: 22px; height: 32px; object-fit: contain; }
.pin-option span { line-height: 1; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 252px; min-height: 0; overflow: hidden; }
.stage { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) 40px; min-width: 0; min-height: 0; background: radial-gradient(circle at 50% 40%, #1b2c41 0, #0b1726 72%); }
.photo-stage { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; overflow: hidden; padding: 20px 32px 12px; }
canvas { display: block; flex: none; touch-action: none; box-shadow: 0 14px 50px #0009; }
.status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.stage-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 0 20px; border-top: 1px solid #2b3e53; background: #0d1b2c; }
.stage-links { display: flex; align-items: center; gap: 18px; min-width: 0; }
.stage-links a { color: #acc2d4; font-size: 11px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.stage-links a:hover { color: #fff; text-decoration: underline; }
.stage-links a:focus-visible { outline: 2px solid #f7bb32; outline-offset: 3px; }
.link-short { display: none; }
.inspector { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 21px 20px; border-left: 1px solid #2b3e53; background: #112034; }
.edit-heading { margin: 17px 0 14px; padding-top: 11px; border-top: 1px solid #34485e; color: #dce8f2; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.field { margin: 0 0 17px; }
.field label { display: block; margin-bottom: 7px; color: #bed0df; font-size: 11px; font-weight: 700; text-align: center; }
.text-field input { width: 100%; height: 39px; padding: 8px 10px; border: 1px solid #40576f; border-radius: 7px; background: #0b1929; color: #fff; font-size: 13px; text-align: center; }
.text-field input:disabled { color: #8399ac; opacity: .65; }
.size-field { margin-bottom: 13px; }
.size-heading { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.size-heading label { margin-bottom: 3px; }
.size-heading label { grid-column: 2; }
.size-heading output { grid-column: 3; justify-self: end; color: #a9bdce; font-size: 11px; font-variant-numeric: tabular-nums; }
.size-field input { display: block; width: 100%; height: 27px; margin: 0; accent-color: #f7bb32; cursor: pointer; }
.color-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin: -3px 0 12px; }
.color-mode button { min-width: 0; min-height: 29px; padding: 5px 3px; border-radius: 6px; background: #15273b; color: #b6cad8; font-size: 10px; }
.color-mode button[aria-pressed="true"] { border-color: #f7bb32; background: #f7bb32; color: #102039; font-weight: 800; }
.color-mode button[aria-pressed="true"]:hover { border-color: #ffd36c; background: #ffd36c; }
.color-control { display: flex; align-items: center; justify-content: center; gap: 9px; height: 40px; padding: 5px; border: 1px solid #40576f; border-radius: 7px; background: #0b1929; }
.color-control input { flex: none; width: 47px; height: 29px; padding: 0; border: 0; border-radius: 5px; background: transparent; cursor: pointer; }
.color-control input:disabled { cursor: not-allowed; opacity: .5; }
.color-control span { color: #a9bdce; font-size: 11px; font-variant-numeric: tabular-nums; }
.delete-button { width: 100%; border-color: #c56573; background: #963c4c; color: #fff; }
.delete-button:hover:not(:disabled) { border-color: #dd8792; background: #b54a5c; }
.delete-button:disabled { opacity: 1; border-color: #43546a; background: #354357; color: #9dacc0; }
.storage-note { margin: auto 0 12px; padding-top: 9px; border-top: 1px solid #34485e; color: #9fb3c5; font-size: 11px; line-height: 1.4; text-align: center; }
.storage-note strong { color: #eaf2f8; }
@media (max-width: 1000px) {
  .brand { min-width: 34px; }
  .brand-name { display: none; }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (min-width: 741px) and (max-height: 760px) {
  body { padding: 28px; }
  .inspector { padding-top: 13px; padding-bottom: 13px; }
  .add-row { margin: 14px 0; }
  .tool-label, .pin-palette-label { margin-bottom: 3px; }
  .tool { min-height: 35px; }
  .pin-palette { margin-bottom: 4px; }
  .pin-option { min-height: 39px; }
  .pin-option img { height: 24px; }
  .edit-heading { margin: 8px 0 8px; padding-top: 7px; }
  .field { margin-bottom: 6px; }
  .size-field { margin-bottom: 6px; }
  .color-mode { margin: -2px 0 6px; }
  .storage-note { margin: auto 0 5px; padding-top: 5px; }
}
@media (min-width: 741px) and (max-height: 720px) {
  .add-row { margin: 14px 0; }
  .tool-label, .pin-palette-label { margin-bottom: 2px; }
  .pin-option { min-height: 35px; }
  .pin-option img { height: 22px; }
  .edit-heading { margin: 4px 0 5px; padding-top: 5px; }
  .text-field input { height: 35px; }
  .color-control { height: 34px; }
  .storage-note { font-size: 10px; line-height: 1.3; }
}
@media (min-width: 741px) and (max-height: 680px) {
  body { padding: 18px; }
  .inspector { padding-top: 10px; padding-bottom: 9px; }
}
@media (max-width: 820px) {
  .topbar { gap: 12px; padding: 0 14px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 225px; }
  .inspector { padding: 18px 14px; }
}
@media (min-width: 741px) and (max-width: 800px) {
  .link-full { display: none; }
  .link-short { display: inline; }
}
@media (max-width: 740px) {
  body { padding: 16px; }
  .app { border-radius: 12px; }
  .app { grid-template-rows: 46px minmax(0, 1fr) 310px; }
  .topbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: 1fr; gap: 0 7px; padding: 0 10px; }
  .top-left { display: contents; }
  .brand { grid-column: 1; grid-row: 1; min-width: 0; }
  .brand strong, .brand small { display: none; }
  .photo-heading { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-width: 0; margin: 0; }
  .photo-heading strong { max-width: 100%; font-size: 11px; }
  .photo-heading span { font-size: 10px; }
  .support-cta { min-height: 26px; padding: 3px 9px; gap: 5px; font-size: 10px; }
  .top-actions { grid-column: 3; grid-row: 1; justify-self: end; gap: 5px; }
  .top-actions button, .top-actions .button { min-height: 32px; padding: 7px 8px; font-size: 11px; }
  .workspace { display: contents; }
  .stage { grid-row: 2; }
  .stage { grid-template-rows: minmax(0, 1fr) 38px; }
  .photo-stage { padding: 12px 18px 8px; }
  .stage-footer { gap: 8px; padding: 0 10px; }
  .stage-links { gap: 12px; }
  .stage-links a { font-size: 10px; }
  .inspector { grid-row: 3; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 50px 45px 29px 66px 34px minmax(0, 1fr); gap: 6px; align-items: start; padding: 10px; border-top: 1px solid #2b3e53; border-left: 0; }
  .edit-heading, .color-control span { display: none; }
  .add-row { grid-column: 1; grid-row: 1; margin: 0; }
  .tool-label, .pin-palette-label { margin-bottom: 2px; font-size: 10px; line-height: 12px; }
  .add-row .tool { min-height: 35px; }
  .pin-palette { grid-column: 2 / -1; grid-row: 1; margin: 0; }
  .pin-palette-label { display: block; }
  .pin-option span { display: none; }
  .pin-options { gap: 4px; }
  .pin-option { min-height: 34px; height: 34px; padding: 3px; }
  .pin-option img { width: 19px; height: 25px; }
  .size-field { grid-column: 1 / -1; grid-row: 2; margin: 0; }
  .color-mode { grid-column: 1 / -1; grid-row: 3; margin: 0; }
  .size-heading label { margin-bottom: 0; }
  .size-field input { height: 23px; }
  .field { min-width: 0; margin: 0; }
  .text-field { grid-column: 1; grid-row: 4; }
  .line-field { grid-column: 2; grid-row: 4; }
  .box-field { grid-column: 3; grid-row: 4; }
  .field label { margin-bottom: 5px; font-size: 10px; }
  .text-field input { height: 38px; }
  .color-control { height: 38px; }
  .color-control input { width: 100%; height: 27px; }
  .storage-note { grid-column: 1 / -1; grid-row: 5; margin: 0; padding-top: 5px; font-size: 10px; line-height: 1.3; }
  .delete-button { grid-column: 1 / -1; grid-row: 6; width: 100%; min-height: 34px; }
}
@media (max-width: 400px) {
  .brand { gap: 0; }
  .photo-heading span { display: none; }
  .support-long { display: none; }
  .support-short { display: inline; }
  .link-full { display: none; }
  .link-short { display: inline; }
  .stage-links { gap: 8px; }
  .top-actions { gap: 3px; }
  .top-actions button, .top-actions .button { padding: 7px 6px; }
  .button-label-full { display: none; }
  .button-label-short { display: inline; }
  .upload .button-label-short { display: none; }
  .upload .button-label-tiny { display: inline; }
}
