@layer base {
  :root {
    color-scheme: light;
    --page: #f2f0eb;
    --panel: #faf9f6;
    --paper: #fffdf8;
    --ink: #242321;
    --muted: #7b7871;
    --line: rgba(39, 37, 33, 0.12);
    --accent: #4d4131;
    --accent-soft: #ebe8e4;
    --danger: #a34138;
    font-family:
      -apple-system,
      BlinkMacSystemFont,
      "PingFang SC",
      "Noto Sans SC",
      "Microsoft YaHei",
      sans-serif;
    font-synthesis: none;
    --line-tint: rgba(77,65,49,.18);
    --line-tint-soft: rgba(77,65,49,.1);
    --line-tint-strong: rgba(77,65,49,.2);
    --surface-light: rgba(255,255,255,.72);
    --surface-glass: rgba(250,249,246,.97);
    --surface-dark: rgba(55,54,52,.96);
    --touch-min: 44px;
    --input-visual-scale: .73;
    --input-row-height: calc(32px / var(--input-visual-scale));
    --input-body-height: calc(48px / var(--input-visual-scale));
    --input-width-compensation: calc(100% / var(--input-visual-scale));
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 14px;
  }
  body[data-input=mouse] {
    --touch-min: 30px;
  }
  body[data-input=mouse] :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
  }
  @media (hover: hover) and (pointer: fine) {
    body[data-input=mouse] .photo-slot-card label,
    body[data-input=mouse] .photo-slot-card button {
      opacity: .72;
      transition: opacity .12s ease, border-color .12s ease;
    }
    body[data-input=mouse] .photo-slot-card:hover label,
    body[data-input=mouse] .photo-slot-card:hover button,
    body[data-input=mouse] .photo-slot-card label:focus-visible,
    body[data-input=mouse] .photo-slot-card button:focus-visible,
    body[data-input=mouse] .photo-slot-card label:hover,
    body[data-input=mouse] .photo-slot-card button:hover {
      opacity: 1;
    }
    body[data-input=mouse] .preview-stage .fullscreen-button,
    body[data-input=mouse] .preview-stage .fullscreen-save-button {
      opacity: .8;
      transition: opacity .12s ease, transform .12s ease;
    }
    body[data-input=mouse] .preview-stage:hover .fullscreen-button,
    body[data-input=mouse] .preview-stage:hover .fullscreen-save-button,
    body[data-input=mouse] .preview-stage .fullscreen-button:focus-visible,
    body[data-input=mouse] .preview-stage .fullscreen-save-button:focus-visible {
      opacity: 1;
    }
  }
  * {
    box-sizing: border-box;
  }
  html {
    min-width: 320px;
    background: var(--page);
  }
  body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--ink);
    background:
      radial-gradient(
        circle at 8% 5%,
        rgba(255, 255, 255, .72),
        transparent 24rem),
      var(--page);
    -webkit-font-smoothing: antialiased;
  }
  button,
  input,
  textarea,
  select {
    font: inherit;
  }
  button,
  label,
  summary,
  select,
  input[type=range],
  input[type=color] {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  button {
    color: inherit;
  }
  body.preview-fullscreen,
  body.save-open {
    overflow: hidden;
  }
  .site-header {
    width: min(1480px, calc(100% - 64px));
    height: 84px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .header-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 650;
    letter-spacing: .08em;
    text-decoration: none;
  }
  .brand-mark {
    width: 21px;
    height: 25px;
    display: inline-block;
    border: 1.5px solid currentColor;
    background:
      linear-gradient(
        to bottom,
        transparent 0 61%,
        currentColor 61% 63%,
        transparent 63%);
    transform: rotate(-2deg);
  }
  .privacy-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #65625c;
    background: rgba(255, 255, 255, .42);
    font-size: 12px;
  }
  .privacy-note svg {
    width: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
  }
  .workspace {
    width: min(1480px, calc(100% - 64px));
    min-height: calc(100vh - 150px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: clamp(32px, 5vw, 88px);
    align-items: start;
  }
  .preview-column {
    min-width: 0;
    padding: 38px 0 48px;
  }
  .preview-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 26px;
  }
  .eyebrow {
    margin: 0 0 10px;
    color: #858178;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .22em;
  }
  h1 {
    margin: 0;
    font-family:
      "Songti SC",
      "Noto Serif CJK SC",
      serif;
    font-size: clamp(30px, 4.1vw, 54px);
    font-weight: 400;
    letter-spacing: -.04em;
    line-height: 1.12;
  }
  .dimension-label {
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }
  .preview-stage {
    position: relative;
    min-height: min(62vh, 720px);
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(39, 37, 33, .08);
    border-radius: 24px;
    background:
      linear-gradient(
        135deg,
        rgba(255, 255, 255, .52),
        rgba(255, 255, 255, .08)),
      repeating-linear-gradient(
        135deg,
        rgba(90, 84, 72, .025) 0 1px,
        transparent 1px 9px),
      #e9e6df;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
    padding: clamp(22px, 4vw, 58px);
    transition: background-color .2s;
  }
  .preview-stage.is-dragging {
    background-color: var(--accent-soft);
    border-color: rgba(77, 65, 49, .38);
  }
  #previewCanvas {
    display: none;
    max-width: min(var(--preview-native-width,100%), 100%);
    max-height: 69vh;
    width: auto;
    height: auto;
    box-shadow: 0 22px 55px rgba(48, 43, 34, .15), 0 2px 8px rgba(48, 43, 34, .08);
  }
  .preview-stage.has-image #previewCanvas {
    display: block;
  }
  .preview-stage.has-image .empty-state {
    display: none;
  }
  .fullscreen-button {
    right: 14px;
    bottom: 14px;
    border: 1px solid rgba(255, 255, 255, .52);
    color: #fff;
    background: rgba(27, 27, 26, .72);
  }
  .fullscreen-save-button {
    left: 14px;
    bottom: 14px;
    border: 1px solid rgba(255, 255, 255, .72);
    color: #3c3226;
    background: rgba(255, 255, 255, .94);
  }
  .fullscreen-swipe-hint {
    display: none;
  }
  body.adjust-open:not(.preview-fullscreen) .preview-heading,
  body.adjust-open:not(.preview-fullscreen) .preview-hint {
    display: none;
  }
  @media (max-width: 560px) {
    body:not(.adjust-open):not(.preview-fullscreen) .preview-stage {
      height: 42dvh;
      min-height: 260px;
      max-height: 400px;
    }
    body:not(.adjust-open):not(.preview-fullscreen) #previewCanvas {
      max-height: calc(42dvh - 28px);
    }
  }
  .preview-fullscreen .preview-stage {
    touch-action: none;
    --fullscreen-pad-top: max(20px,env(safe-area-inset-top));
    --fullscreen-pad-right: max(18px,env(safe-area-inset-right));
    --fullscreen-pad-bottom: max(20px,env(safe-area-inset-bottom));
    --fullscreen-pad-left: max(18px,env(safe-area-inset-left));
    position: fixed;
    inset: 0;
    z-index: 100;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    max-height: none;
    border: 0;
    border-radius: 0;
    padding: var(--fullscreen-pad-top) var(--fullscreen-pad-right) var(--fullscreen-pad-bottom) var(--fullscreen-pad-left);
    overflow: hidden;
    overscroll-behavior: none;
    background: #292927;
  }
  body.preview-fullscreen.adjust-open .preview-stage {
    align-items: start;
    padding-top: calc(var(--fullscreen-pad-top) + 34px);
  }
  body.preview-fullscreen.adjust-open #previewCanvas {
    max-height: calc(100dvh - var(--fullscreen-pad-top) - 34px - var(--fullscreen-pad-bottom) - 48px - var(--tray-measured-height, 224px) - 12px);
  }
  .preview-fullscreen #previewCanvas {
    max-width: min(var(--preview-native-width,100%), calc(100vw - var(--fullscreen-pad-left) - var(--fullscreen-pad-right)));
    max-height: calc(100vh - var(--fullscreen-pad-top) - var(--fullscreen-pad-bottom));
    max-height: calc(100dvh - var(--fullscreen-pad-top) - var(--fullscreen-pad-bottom));
    object-fit: contain;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
  }
  #previewStage::backdrop {
    background: #292927;
  }
  .preview-fullscreen .fullscreen-quick-controls {
    position: absolute;
    left: 50%;
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 42px);
    z-index: 4;
    width: min(350px, calc(100vw - 28px));
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 14px;
    color: #fff;
    background: rgba(24, 24, 23, .78);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    transform: translateX(-50%);
  }
  .preview-fullscreen .fullscreen-quick-controls[hidden] {
    display: none;
  }
  .fullscreen-quick-ratio button.is-active {
    border-color: rgba(234, 222, 206, .72);
    color: #fff;
    background: rgba(139, 118, 91, .48);
  }
  .preview-fullscreen .preview-stage.has-fullscreen-controls .fullscreen-swipe-hint {
    display: none;
  }
  .empty-state {
    position: relative;
    width: min(340px, 100%);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px dashed rgba(46, 44, 40, .22);
    border-radius: 20px;
    color: var(--muted);
    cursor: pointer;
    transition:
      border-color .18s,
      background .18s,
      transform .18s;
  }
  .empty-state:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, .32);
    transform: translateY(-2px);
  }
  .empty-state strong {
    margin-top: 5px;
    color: var(--ink);
    font-size: 15px;
  }
  .empty-state > span:last-child {
    font-size: 12px;
  }
  .empty-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .7);
  }
  .empty-icon svg {
    width: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
  }
  .preview-hint {
    margin: 13px 4px 0;
    color: #918d85;
    font-size: 11px;
  }
  .preview-quick-ratio button.is-active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent);
  }
  .preview-fullscreen .preview-quick-controls {
    display: none !important;
  }
  .editor-panel {
    position: sticky;
    top: 20px;
    overflow: hidden;
    margin-bottom: 44px;
    border: 1px solid rgba(39, 37, 33, .09);
    border-radius: 22px;
    background: rgba(250, 249, 246, .92);
    box-shadow: 0 18px 50px rgba(56, 50, 42, .08);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
  .panel-section {
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
  }
  .upload-section {
    padding-top: 24px;
  }
  .upload-button {
    position: relative;
    min-height: 47px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 12px;
    color: white;
    background: var(--accent);
    font-size: 14px;
    font-weight: 620;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(77, 65, 49, .16);
    transition: transform .15s, background .15s;
  }
  .upload-button:hover {
    background: #3f3324;
    transform: translateY(-1px);
  }
  .upload-button svg,
  .primary-button svg {
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .photo-input-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
  }
  .photo-input-overlay:disabled {
    cursor: wait;
  }
  .file-status {
    margin: 11px 2px 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .file-status.is-error {
    color: var(--danger);
    white-space: normal;
  }
  .metadata-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
  }
  .metadata-badges span {
    padding: 5px 7px;
    border-radius: 6px;
    color: #685e52;
    background: var(--accent-soft);
    font-size: 10px;
  }
  .cache-bar {
    min-height: var(--touch-min);
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    background: rgba(255, 255, 255, .34);
    font-size: 10px;
  }
  .cache-copy {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    line-height: 1.4;
  }
  .cache-copy > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .cache-copy i {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #aaa69e;
    box-shadow: 0 0 0 3px rgba(170, 166, 158, .12);
  }
  .cache-bar[data-tone=saving] .cache-copy i {
    background: #b18a48;
    box-shadow: 0 0 0 3px rgba(177, 138, 72, .13);
  }
  .cache-bar[data-tone=saved] .cache-copy i {
    background: #79664e;
    box-shadow: 0 0 0 3px rgba(121, 102, 78, .13);
  }
  .cache-bar[data-tone=warning] .cache-copy i {
    background: var(--danger);
    box-shadow: 0 0 0 3px rgba(163, 65, 56, .12);
  }
  .draft-library {
    padding: 10px 24px 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .5);
  }
  .draft-library[hidden] {
    display: none;
  }
  .draft-library-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .draft-library-head h2 {
    font-size: 11px;
  }
  .draft-library-close {
    position: relative;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(77, 65, 49, .18);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, .8);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
  }
  .draft-library-close::before {
    content: "";
    position: absolute;
    inset: -9px;
  }
  .draft-save-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
  }
  .draft-name-input {
    min-height: 30px;
    height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }
  .draft-save-as-button {
    position: relative;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: #fff;
    background: var(--accent);
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
  }
  .draft-save-as-button::before {
    content: "";
    position: absolute;
    inset: -7px 0;
  }
  .draft-save-as-button:disabled {
    opacity: .55;
    cursor: wait;
  }
  .draft-library-hint {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
  }
  .draft-library-hint[data-tone=saved] {
    color: var(--accent);
  }
  .draft-library-hint[data-tone=warning] {
    color: var(--danger);
  }
  .draft-library-list {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 4px;
    max-height: 40vh;
    overflow-y: auto;
  }
  .draft-library-empty {
    padding: 8px 2px;
    color: var(--muted);
    font-size: 9px;
  }
  .draft-item {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 8px;
    border: 1px solid rgba(77, 65, 49, .12);
    border-radius: 9px;
    background: rgba(255, 255, 255, .78);
  }
  .draft-item-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
  }
  .draft-item-copy strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .draft-item-copy small {
    color: var(--muted);
    font-size: 8.5px;
    font-variant-numeric: tabular-nums;
  }
  .draft-item-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 3px;
  }
  .draft-item-actions button {
    position: relative;
    min-height: 26px;
    padding: 0 7px;
    border: 1px solid rgba(77, 65, 49, .18);
    border-radius: 7px;
    color: var(--muted);
    background: rgba(255, 255, 255, .9);
    font-size: 9px;
    cursor: pointer;
  }
  .draft-item-actions button::before {
    content: "";
    position: absolute;
    inset: -9px 0;
  }
  .draft-item-actions .draft-item-open {
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 650;
  }
  .draft-item-actions .draft-item-danger {
    border-color: var(--danger);
    color: var(--danger);
    font-weight: 650;
  }
  fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    transition: opacity .2s;
  }
  fieldset:disabled {
    opacity: .45;
  }
  h2 {
    margin: 0;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: .02em;
  }
  .section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
  }
  .reset-style-button {
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid rgba(77, 65, 49, .3);
    border-radius: 8px;
    color: var(--accent);
    background: rgba(255, 255, 255, .72);
    font-size: 9px;
    cursor: pointer;
  }
  .reset-style-button:hover {
    background: var(--accent-soft);
  }
  .form-section {
    padding-top: 20px;
  }
  .textarea-label,
  .field-with-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
  }
  .character-count {
    color: #99958d;
    font-size: 10px;
    font-weight: 400;
  }
  .field-spacer {
    margin-top: 20px;
  }
  .metadata-settings,
  .advanced-settings {
    border-bottom: 1px solid var(--line);
  }
  .metadata-settings summary,
  .advanced-settings summary {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    font-weight: 620;
    list-style: none;
    cursor: pointer;
  }
  .metadata-settings summary::-webkit-details-marker,
  .advanced-settings summary::-webkit-details-marker {
    display: none;
  }
  .metadata-settings summary::after,
  .advanced-settings summary::after {
    content: "+";
    margin-left: auto;
    color: var(--muted);
    font-size: 17px;
    font-weight: 300;
  }
  .metadata-settings[open] summary::after,
  .advanced-settings[open] summary::after {
    content: "\2212";
  }
  .metadata-settings summary small {
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .metadata-content,
  .advanced-content {
    padding: 2px 24px 21px;
  }
  .field-with-toggle {
    margin-top: 12px;
  }
  .switch-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
  }
  .switch-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  .switch {
    position: relative;
    width: 28px;
    height: 16px;
    display: inline-block;
    border-radius: 999px;
    background: #d2cfc8;
    transition: background .18s;
  }
  .switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .18s;
  }
  .switch-label input:checked + .switch {
    background: var(--accent);
  }
  .switch-label input:checked + .switch::after {
    transform: translateX(12px);
  }
  .switch-label input:focus-visible + .switch {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .text-input,
  .select-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    outline: none;
    color: var(--ink);
    background: rgba(255, 255, 255, .72);
    transition:
      border .15s,
      box-shadow .15s,
      background .15s;
  }
  .text-input {
    height: 41px;
    padding: 0 11px;
    font-size: 12px;
  }
  .text-input:focus,
  .select-input:focus {
    border-color: rgba(77, 65, 49, .65);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(77, 65, 49, .09);
  }
  .text-input:disabled {
    color: #aaa;
    background: #f0efec;
  }
  .textarea {
    min-height: 78px;
    padding-top: 10px;
    padding-bottom: 10px;
    resize: vertical;
    line-height: 1.6;
  }
  .field-note {
    margin: 6px 2px 0;
    color: #99958d;
    font-size: 10px;
    line-height: 1.45;
  }
  .input-action-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px;
  }
  .mini-action-button {
    min-width: 76px;
    padding: 0 10px;
    border: 1px solid rgba(77, 65, 49, .35);
    border-radius: 9px;
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
  }
  .mini-action-button:disabled {
    opacity: .58;
    cursor: wait;
  }
  .mini-action-button[hidden] {
    display: none;
  }
  .map-attribution {
    display: inline-block;
    margin: 5px 2px 0;
    color: #827b71;
    font-size: 9px;
  }
  .map-attribution[hidden] {
    display: none;
  }
  .option-block {
    margin-top: 15px;
  }
  .option-label {
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--ink);
    font-size: 10px;
    font-weight: 600;
  }
  .option-label small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 400;
  }
  .ratio-picker,
  .position-picker,
  .font-picker {
    display: grid;
    gap: 6px;
  }
  .ratio-picker {
    grid-template-columns: repeat(3, 1fr);
  }
  .position-picker {
    grid-template-columns: repeat(3, 1fr);
  }
  .option-block.is-polaroid .position-picker {
    grid-template-columns: repeat(2, 1fr);
  }
  .position-picker button[hidden] {
    display: none;
  }
  .font-picker {
    grid-template-columns: repeat(3, 1fr);
  }
  .ratio-picker button,
  .position-picker button,
  .font-picker button {
    min-height: 34px;
    padding: 0 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, .7);
    font-size: 10px;
    cursor: pointer;
  }
  .ratio-picker button.is-active,
  .position-picker button.is-active,
  .font-picker button.is-active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent);
  }
  .position-picker button {
    min-height: 31px;
    font-size: 9px;
  }
  .position-picker button:disabled {
    opacity: .42;
    cursor: default;
  }
  .option-block.is-disabled {
    opacity: .5;
  }
  .font-modern {
    font-family:
      -apple-system,
      BlinkMacSystemFont,
      "PingFang SC",
      sans-serif;
  }
  .font-wenkai {
    font-family:
      "LXGW WenKai Screen R",
      "Kaiti SC",
      cursive;
  }
  .font-serif {
    font-family:
      "Noto Serif SC Variable",
      "Songti SC",
      "STSong",
      serif;
  }
  .template-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .template-button {
    min-height: 75px;
    padding: 9px 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-size: 11px;
    cursor: pointer;
    transition:
      border .15s,
      background .15s,
      box-shadow .15s;
  }
  .template-button:hover {
    border-color: rgba(77, 65, 49, .45);
  }
  .template-button.is-active {
    border-color: var(--accent);
    background: #faf8f6;
    box-shadow: 0 0 0 1px var(--accent);
  }
  .template-mini {
    position: relative;
    width: 34px;
    height: 42px;
    display: block;
    background: #fdfbf6;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
  }
  .template-mini::before {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    top: 4px;
    height: 24px;
    background:
      linear-gradient(
        145deg,
        #aaa59e,
        #ded4c2);
  }
  .template-mini::after {
    content: "";
    position: absolute;
    height: 2px;
    background: #777;
    opacity: .65;
  }
  .mini-polaroid::after {
    left: 9px;
    right: 9px;
    bottom: 6px;
  }
  .mini-magazine {
    background:
      linear-gradient(
        to bottom,
        #fff 0 24%,
        #b8b0a1 24% 62%,
        #fff 62%);
  }
  .mini-magazine::before {
    display: none;
  }
  .mini-magazine::after {
    left: 4px;
    width: 9px;
    bottom: 5px;
    box-shadow: 12px 0 0 rgba(119, 119, 119, .45);
  }
  .mini-place::before {
    inset: 0;
    height: auto;
    background:
      linear-gradient(
        160deg,
        #ded8c5,
        #827a70 60%,
        #3a3227);
  }
  .mini-place::after {
    left: 7px;
    right: 7px;
    top: 13px;
    bottom: auto;
    height: 2px;
    background: white;
    box-shadow: 0 4px 0 rgba(255, 255, 255, .65);
  }
  .title-input {
    height: auto;
    min-height: 58px;
    padding-top: 9px;
    padding-bottom: 9px;
    resize: vertical;
    font-weight: 560;
    line-height: 1.55;
    white-space: pre-wrap;
  }
  .caption-label {
    margin-top: 13px;
  }
  .template-controls {
    margin-top: 13px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .5);
  }
  .template-controls[hidden] {
    display: none;
  }
  .magazine-font-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }
  .magazine-font-picker button {
    min-height: 34px;
    padding: 0 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: white;
    font-size: 10px;
    cursor: pointer;
  }
  .magazine-font-picker button.is-active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent);
  }
  .mag-font-noto-bold {
    font-family: "Noto Serif SC Variable", serif;
    font-weight: 700;
  }
  .mag-font-youyou {
    font-family:
      "\53c8\53c8\610f\5b8b  Local",
      "\53c8\53c8\610f\5b8b",
      "youyou-yisong",
      "Noto Serif SC Variable",
      serif;
    font-weight: 400;
  }
  .mag-font-wenkai {
    font-family:
      "LXGW WenKai Screen R",
      "Noto Serif SC Variable",
      serif;
    font-weight: 400;
  }
  .magazine-spacing-control {
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }
  .magazine-spacing-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }
  .magazine-spacing-picker button {
    min-height: 32px;
    padding: 0 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: #fff;
    font-size: 9px;
    cursor: pointer;
  }
  .magazine-spacing-picker button.is-active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent);
  }
  .place-control-row + .place-control-row {
    margin-top: 10px;
  }
  .place-position-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .place-position-picker button {
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: white;
    font-size: 9px;
    cursor: pointer;
  }
  .place-position-picker button.is-active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent);
  }
  .drag-hint {
    margin: 10px 1px 0;
    color: #918d85;
    font-size: 9px;
    line-height: 1.45;
  }
  .preview-stage.place-card-active #previewCanvas {
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
  }
  .preview-stage.place-card-active.is-text-dragging #previewCanvas {
    cursor: grabbing;
  }
  .auto-color-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 9px;
    cursor: pointer;
  }
  .auto-color-row > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .color-swatch {
    width: 14px;
    height: 14px;
    display: inline-block;
    border: 2px solid white;
    border-radius: 50%;
    background: #3d362e;
    box-shadow: 0 0 0 1px var(--line);
  }
  .auto-color-row input {
    accent-color: var(--accent);
  }
  .range-field {
    display: block;
    margin-top: 15px;
  }
  .range-field > span {
    display: flex;
    justify-content: space-between;
    margin-bottom: 9px;
    font-size: 11px;
  }
  .range-field output {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }
  input[type=range] {
    width: 100%;
    height: 3px;
    margin: 4px 0 9px;
    border-radius: 999px;
    appearance: none;
    background: #d8d5ce;
    accent-color: var(--accent);
  }
  input[type=range]::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    border: 3px solid #fff;
    border-radius: 50%;
    appearance: none;
    background: var(--accent);
    box-shadow: 0 1px 5px rgba(0, 0, 0, .25);
  }
  .inline-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 13px;
  }
  .inline-fields > label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 11px;
  }
  .select-input {
    height: 37px;
    padding: 0 9px;
    font-size: 11px;
  }
  .color-control {
    height: 37px;
    padding: 0 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, .72);
    color: var(--muted);
    font-size: 10px;
  }
  input[type=color] {
    width: 18px;
    height: 18px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }
  input[type=color]::-webkit-color-swatch-wrapper {
    padding: 0;
  }
  input[type=color]::-webkit-color-swatch {
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 50%;
  }
  .color-row,
  .select-row {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 11px;
  }
  .color-row .color-control {
    width: calc(50% - 5px);
  }
  .select-row .select-input {
    width: 58%;
  }
  .panel-actions {
    padding: 18px 24px 16px;
  }
  .primary-button {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--ink);
    font-size: 13px;
    font-weight: 620;
    cursor: pointer;
    transition:
      transform .15s,
      opacity .15s,
      background .15s;
  }
  .primary-button:hover {
    background: #080808;
    transform: translateY(-1px);
  }
  .primary-button:disabled {
    cursor: wait;
    opacity: .6;
    transform: none;
  }
  .save-share-button:disabled {
    cursor: default;
  }
  .save-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }
  .save-actions > [hidden] {
    display: none;
  }
  .save-actions > .primary-button {
    order: -1;
    flex: 1 1 100%;
    text-decoration: none;
  }
  .save-actions > .secondary-link-button {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    text-decoration: none;
  }
  .save-time-note {
    margin-bottom: 0;
  }
  .text-button {
    width: 100%;
    padding: 10px 0 0;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
    cursor: pointer;
  }
  .text-button:hover {
    color: var(--ink);
  }
  footer {
    width: min(1480px, calc(100% - 64px));
    margin: 0 auto;
    padding: 18px 0 28px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    color: #96928b;
    font-size: 10px;
  }
  .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  .save-dialog {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 20px;
  }
  .save-dialog[hidden] {
    display: none;
  }
  .save-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(24, 23, 21, .68);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .save-sheet {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow: auto;
    padding: 24px;
    border-radius: 22px;
    background: #f8f7f3;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .32);
  }
  .dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .06);
    font-size: 22px;
    font-weight: 300;
    cursor: pointer;
  }
  .save-heading h2 {
    font-family:
      "Songti SC",
      "Noto Serif CJK SC",
      serif;
    font-size: 23px;
    font-weight: 400;
  }
  .save-image-wrap {
    height: min(48vh, 470px);
    margin: 18px 0 14px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 14px;
    background: #e7e4dd;
    padding: 14px;
  }
  .save-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
    -webkit-touch-callout: default;
    -webkit-user-select: auto;
    user-select: auto;
  }
  .save-instruction {
    margin: 0 2px 14px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
  }
  .secondary-link-button {
    min-height: 43px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--ink);
    background: #fff;
    font-size: 11px;
    text-decoration: none;
  }
  @media (max-width: 980px) {
    .site-header,
    .workspace,
    footer {
      width: min(100% - 36px, 720px);
    }
    .workspace {
      grid-template-columns: 1fr;
      gap: 0;
    }
    .preview-column {
      padding: 22px 0 18px;
    }
    .preview-stage {
      min-height: 48vh;
    }
    #previewCanvas {
      max-height: 60vh;
    }
    .editor-panel {
      position: static;
      margin-bottom: 36px;
    }
  }
  @media (max-width: 560px) {
    .site-header {
      width: calc(100% - 24px);
      height: 54px;
    }
    .brand-mark {
      width: 18px;
      height: 21px;
    }
    .privacy-note {
      padding: 6px 8px;
      font-size: 9px;
    }
    .workspace,
    footer {
      width: calc(100% - 16px);
    }
    .preview-column {
      padding: 6px 0 8px;
    }
    .preview-heading {
      display: none;
    }
    .preview-stage {
      padding: 14px;
      border-radius: 15px;
    }
    #previewCanvas {
      max-width: 100%;
    }
    .fullscreen-button,
    .fullscreen-save-button {
      bottom: 9px;
      min-height: var(--touch-min);
      padding: 0 13px;
    }
    .fullscreen-button {
      right: 9px;
    }
    .fullscreen-save-button {
      left: 9px;
    }
    .empty-state {
      width: 100%;
      min-height: 100%;
      border-radius: 13px;
    }
    .empty-icon {
      width: 40px;
      height: 40px;
    }
    .preview-hint {
      display: none;
    }
    .reset-style-button {
      min-height: var(--touch-min);
      font-size: 10px;
    }
    .editor-panel {
      overflow: visible;
      margin: 0 0 18px;
      border-radius: 16px;
    }
    .upload-section {
      padding: 10px 12px;
    }
    .upload-button {
      min-height: var(--touch-min);
      font-size: 12px;
    }
    .file-status {
      margin: 7px 1px 0;
      font-size: 9px;
    }
    .metadata-badges {
      display: none;
    }
    .cache-bar {
      min-height: 48px;
      padding: 6px 12px;
      font-size: 9px;
    }
    .editor-panel.has-image .upload-section {
      display: grid;
      grid-template-columns: 110px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
    }
    fieldset {
      display: flex;
      flex-direction: column;
    }
    .form-section {
      order: -3;
      padding: 12px;
    }
    .text-input,
    .select-input {
      min-height: var(--touch-min);
      font-size: 16px;
      scroll-margin-block: 96px;
    }
    .textarea {
      min-height: 72px;
      max-height: 112px;
      resize: none;
    }
    .textarea-label {
      margin-bottom: 6px;
    }
    .metadata-settings {
      order: -2;
    }
    .style-section {
      order: -1;
      padding: 11px 12px 12px;
    }
    .style-section .option-block {
      margin-top: 10px;
    }
    .ratio-picker button,
    .font-picker button,
    .position-picker button {
      min-height: var(--touch-min);
    }
    .template-picker {
      display: flex;
      gap: 7px;
      overflow-x: auto;
      padding: 2px 1px 8px;
      scroll-snap-type: x mandatory;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }
    .template-picker::-webkit-scrollbar {
      display: none;
    }
    .template-button {
      flex: 0 0 72px;
      min-height: 62px;
      padding: 6px 3px;
      justify-content: center;
      gap: 4px;
      font-size: 9px;
      scroll-snap-align: start;
    }
    .template-mini {
      width: 22px;
      height: 28px;
    }
    .template-mini::before {
      left: 3px;
      right: 3px;
      top: 3px;
      height: 16px;
    }
    .template-mini::after {
      bottom: 4px;
    }
    .magazine-font-picker button,
    .magazine-spacing-picker button,
    .place-position-picker button,
    .mini-action-button {
      min-height: var(--touch-min);
    }
    .panel-actions {
      position: sticky;
      bottom: 0;
      z-index: 20;
      padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
      border-top: 1px solid var(--line);
      background: rgba(250, 249, 246, .94);
      box-shadow: 0 -10px 24px rgba(56, 50, 42, .08);
      -webkit-backdrop-filter: blur(16px);
      backdrop-filter: blur(16px);
    }
    .primary-button {
      min-height: 48px;
    }
    .text-button {
      display: none;
    }
    footer {
      padding: 12px 2px 20px;
      gap: 12px;
      line-height: 1.5;
    }
    footer span:last-child {
      display: none;
    }
    .save-dialog {
      align-items: end;
      padding: 0;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      scroll-behavior: auto !important;
      transition: none !important;
    }
  }
  @media (max-width: 560px) {
    .switch-label,
    .auto-color-row,
    .color-row,
    .color-control,
    .secondary-link-button {
      min-height: var(--touch-min);
    }
    input[type=range] {
      height: var(--touch-min);
      margin: -7px 0 0;
      background: linear-gradient(#d8d5ce, #d8d5ce) center / 100% 3px no-repeat;
    }
    .dialog-close {
      width: var(--touch-min);
      height: var(--touch-min);
    }
  }
  @media (max-width: 560px) {
    .brand {
      font-size: 15px;
      min-height: var(--touch-min);
      padding: 4px 0;
    }
    .map-attribution {
      min-height: var(--touch-min);
      display: inline-flex;
      align-items: center;
    }
  }
  .adjust-color-title .color-control {
    width: 100px;
    height: 32px;
  }
  .adjust-color-card .range-field {
    margin-top: 9px;
  }
  .adjust-color-card .range-field > span {
    margin-bottom: 5px;
    font-size: 10px;
  }
  @media (max-width: 560px) {
    .adjust-color-title .color-control {
      height: var(--touch-min);
    }
  }
  .adjustable-style-controls {
    display: none;
  }
  .adjust-template-controls .option-block:first-child {
    margin-top: 0;
  }
  .adjust-template-controls .template-controls {
    margin-top: 14px;
  }
  .adjust-template-controls .advanced-settings {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, .48);
  }
  .adjust-template-controls .advanced-settings summary {
    padding: 13px 14px;
  }
  .adjust-template-controls .advanced-content {
    padding: 0 14px 14px;
  }
  @media (max-width: 560px) {
    .adjust-template-controls .ratio-picker button,
    .adjust-template-controls .font-picker button,
    .adjust-template-controls .position-picker button,
    .adjust-template-controls .magazine-font-picker button,
    .adjust-template-controls .magazine-spacing-picker button,
    .adjust-template-controls .place-position-picker button {
      min-height: var(--touch-min);
    }
    .adjust-template-controls .advanced-settings summary {
      min-height: 48px;
      padding: 10px 12px;
    }
    .adjust-template-controls .advanced-content {
      padding: 0 12px 14px;
    }
  }
  .adjust-template-controls > .adjustable-style-controls {
    display: block;
    margin-top: 12px;
    padding-top: 2px;
    border-top: 1px solid var(--line);
  }
  .metadata-visual-settings {
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px solid var(--line);
  }
  .metadata-visual-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 11px;
  }
  .metadata-visual-heading small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 400;
  }
  .metadata-visual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .metadata-visual-card {
    min-width: 0;
    padding: 9px 10px 5px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .5);
  }
  .metadata-visual-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    font-size: 10px;
    font-weight: 650;
  }
  .metadata-visual-title .color-control {
    width: 74px;
    height: 30px;
    padding: 0 6px;
    gap: 4px;
    font-size: 9px;
  }
  .metadata-visual-card .range-field {
    margin-top: 8px;
  }
  .metadata-visual-card .range-field > span {
    margin-bottom: 4px;
    font-size: 9px;
  }
  .preview-fullscreen .fullscreen-swipe-hint {
    position: absolute;
    left: 50%;
    bottom: auto;
    z-index: 3;
    display: block;
    transform: translateX(-50%);
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    color: rgba(255, 255, 255, .76);
    background: rgba(0, 0, 0, .18);
    font-size: 10px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    pointer-events: none;
    top: calc(max(12px, env(safe-area-inset-top)) + 8px);
  }
  .preview-fullscreen {
    --fullscreen-action-width: min(112px,calc((100vw - 56px) / 3));
  }
  .preview-fullscreen .fullscreen-save-button {
    top: auto;
    left: max(10px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    min-height: 32px;
    padding: 0 10px;
    font-size: 10px;
  }
  .preview-fullscreen .fullscreen-button {
    top: auto;
    right: max(10px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    min-height: 32px;
    padding: 0 10px;
    font-size: 10px;
  }
  @media (max-width: 560px) {
    .metadata-visual-grid {
      grid-template-columns: 1fr;
    }
    .metadata-visual-title .color-control {
      height: var(--touch-min);
    }
  }
  #advancedContent > .adjustable-style-controls {
    display: block;
    margin-top: 17px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  #advancedContent > .adjustable-style-controls .option-block:first-of-type {
    margin-top: 0;
  }
  #advancedContent > .adjustable-style-controls .template-controls {
    margin-top: 13px;
  }
  .preserve-time-toggle {
    width: 100%;
    border-radius: 8px;
  }
  .crop-editor {
    position: absolute;
    inset: 10px;
    z-index: 20;
    min-width: 0;
    min-height: 0;
    padding: 10px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 16px;
    color: #fff;
    background: rgba(25, 25, 24, .96);
    box-shadow: 0 20px 55px rgba(0, 0, 0, .38);
    touch-action: none;
  }
  .crop-editor[hidden] {
    display: none;
  }
  .crop-editor-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
  }
  .crop-editor-header small {
    color: rgba(255, 255, 255, .66);
    font-size: 9px;
    font-weight: 400;
  }
  .crop-editor-viewport {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 9px;
    background: #111;
    touch-action: none;
  }
  #cropEditorCanvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
  }
  .crop-selection {
    position: absolute;
    z-index: 2;
    border: 2px solid #fff;
    outline: 1px solid rgba(0, 0, 0, .45);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, .58);
    cursor: move;
    touch-action: none;
  }
  .crop-selection::before,
  .crop-selection::after {
    content: "";
    position: absolute;
    pointer-events: none;
    opacity: .58;
  }
  .crop-selection::before {
    left: 33.333%;
    top: 0;
    bottom: 0;
    width: 33.333%;
    border-inline: 1px solid #fff;
  }
  .crop-selection::after {
    left: 0;
    right: 0;
    top: 33.333%;
    height: 33.333%;
    border-block: 1px solid #fff;
  }
  .crop-handle {
    position: absolute;
    width: var(--touch-min);
    height: var(--touch-min);
    display: none;
  }
  .crop-selection.is-free .crop-handle {
    display: block;
  }
  .crop-handle::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: #fff;
    border-style: solid;
  }
  .handle-nw {
    left: -22px;
    top: -22px;
    cursor: nwse-resize;
  }
  .handle-nw::after {
    right: 7px;
    bottom: 7px;
    border-width: 3px 0 0 3px;
  }
  .handle-ne {
    right: -22px;
    top: -22px;
    cursor: nesw-resize;
  }
  .handle-ne::after {
    left: 7px;
    bottom: 7px;
    border-width: 3px 3px 0 0;
  }
  .handle-sw {
    left: -22px;
    bottom: -22px;
    cursor: nesw-resize;
  }
  .handle-sw::after {
    right: 7px;
    top: 7px;
    border-width: 0 0 3px 3px;
  }
  .handle-se {
    right: -22px;
    bottom: -22px;
    cursor: nwse-resize;
  }
  .handle-se::after {
    left: 7px;
    top: 7px;
    border-width: 0 3px 3px 0;
  }
  .crop-editor-zoom {
    min-width: 0;
    min-height: var(--touch-min);
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, .8);
    font-size: 9px;
  }
  .crop-editor-zoom > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    white-space: nowrap;
  }
  .crop-editor-zoom output {
    color: #fff;
    font-variant-numeric: tabular-nums;
  }
  .crop-editor-zoom > small {
    display: none;
  }
  .crop-zoom-inputs {
    min-width: 0;
    height: var(--touch-min);
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 5px;
  }
  .crop-zoom-inputs button {
    position: relative;
    justify-self: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 8px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    font-size: 15px;
    cursor: pointer;
  }
  .crop-zoom-inputs button::before {
    content: "";
    position: absolute;
    inset: -7px;
  }
  .crop-zoom-inputs button:disabled {
    opacity: .38;
  }
  .crop-zoom-inputs input[type=range] {
    min-width: 0;
    width: 100%;
    height: var(--touch-min);
    margin: 0;
    background: linear-gradient(rgba(255, 255, 255, .35), rgba(255, 255, 255, .35)) center / 100% 3px no-repeat;
  }
  .crop-zoom-inputs input[type=range]::-webkit-slider-thumb {
    background: #ece5dc;
  }
  .crop-editor-actions {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 8px;
  }
  .crop-editor-actions button {
    min-height: var(--touch-min);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 9px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    font-size: 11px;
    cursor: pointer;
  }
  .crop-editor-actions #cropApplyButton {
    border-color: rgba(255, 255, 255, .75);
    color: #3d3224;
    background: #fff;
    font-weight: 680;
  }
  .preview-fullscreen .crop-editor {
    inset: var(--fullscreen-pad-top) var(--fullscreen-pad-right) var(--fullscreen-pad-bottom) var(--fullscreen-pad-left);
    border-radius: 12px;
  }
  @media (max-width: 560px) {
    .crop-editor {
      inset: 4px;
      padding: 8px;
      border-radius: 12px;
    }
    .crop-editor-header {
      align-items: start;
      flex-direction: column;
      gap: 2px;
    }
  }
  @media (min-width: 721px) {
    body {
      --desk-label: 104px;
    }
    body .editor-panel .panel-section .metadata-content,
    body .editor-panel .panel-section .advanced-content {
      padding-inline: 0;
    }
    body .editor-panel .file-status {
      margin-inline: 0;
    }
    body .editor-panel .range-field {
      display: grid;
      grid-template-columns: var(--desk-label) minmax(0, 1fr);
      align-items: center;
      column-gap: 10px;
    }
    body .editor-panel .range-field > span {
      margin-bottom: 0;
    }
  }
  @media (min-width: 1200px) {
    body[data-input=mouse] .crop-editor-viewport {
      cursor: ns-resize;
    }
    body[data-input=mouse] .crop-selection {
      cursor: move;
    }
  }
  @media (min-width: 1200px) {
    body.preview-fullscreen.adjust-open .preview-stage {
      align-items: center;
      padding-top: var(--fullscreen-pad-top);
      padding-right: calc(var(--fullscreen-pad-right) + 356px);
    }
    body.preview-fullscreen.adjust-open #previewCanvas {
      max-width: min(var(--preview-native-width,100%), calc(100vw - var(--fullscreen-pad-left) - var(--fullscreen-pad-right) - 356px));
      max-height: calc(100dvh - var(--fullscreen-pad-top) - var(--fullscreen-pad-bottom));
    }
  }
}
