:root {
  color-scheme: light;
  --ink: #263d3b;
  --muted: #738783;
  --teal: #2b7469;
  --teal-dark: #225e55;
  --line: #d8e4df;
  --glass: rgba(255, 255, 255, .67);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: #edf3ef; color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
button, a, select, input { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #76b7ac; outline-offset: 3px; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ambient { position: fixed; z-index: -1; width: 650px; height: 650px; border-radius: 50%; pointer-events: none; filter: blur(80px); opacity: .5; }
.ambient-mint { top: -370px; left: -140px; background: #bfdfce; }
.ambient-blue { top: 8%; right: -310px; background: #cedfed; }
.glass { background: var(--glass); border: 1px solid rgba(255, 255, 255, .88); box-shadow: 0 8px 32px #41645508, inset 0 1px 0 #ffffffbd; backdrop-filter: blur(24px) saturate(135%); -webkit-backdrop-filter: blur(24px) saturate(135%); }
.app-header { margin: 18px 24px 0; padding: 15px 20px; border-radius: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-icon { width: 42px; height: 42px; border-radius: 11px; box-shadow: 0 3px 8px #2d6c5622; }
.brand h1 { margin: 0; font-size: 21px; letter-spacing: -.6px; font-weight: 700; }
.brand p { margin: 4px 0 0; font-size: 11px; color: var(--muted); letter-spacing: .4px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.home-link { display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; padding: 8px 4px; font-size: 12px; color: #657e77; }
.home-link svg { width: 18px; height: 18px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 15px; border: 1px solid transparent; border-radius: 11px; font-size: 12px; font-weight: 600; line-height: 1.4; transition: background .16s, box-shadow .16s, transform .16s; white-space: nowrap; }
.button svg { width: 17px; height: 17px; }
.primary { background: var(--teal); color: white; box-shadow: 0 4px 12px #2b74691c; }
.primary:hover:not(:disabled) { background: var(--teal-dark); transform: translateY(-1px); }
.secondary { background: #ffffffab; border-color: #d9e6df; color: #42645c; box-shadow: inset 0 1px 0 #fff; }
.secondary:hover:not(:disabled) { background: white; border-color: #b5d0c4; }
.workspace { display: grid; grid-template-columns: 284px minmax(330px, 1fr) 226px; gap: 24px; padding: 24px; max-width: 1800px; margin: 0 auto; align-items: start; }
.left-column { display: grid; gap: 16px; min-width: 0; }
.library-panel, .settings-panel, .details-panel { border-radius: 18px; overflow: hidden; }
.library-panel { padding: 17px 16px 11px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-heading h2 { margin: 0; font-size: 13px; letter-spacing: .2px; font-weight: 650; }
.count { font-size: 10px; color: #7a9289; background: #e8f0eb; padding: 3px 7px; border-radius: 6px; }
.library-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 15px 0 10px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #72857e; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--teal); width: 14px; height: 14px; margin: 0; cursor: pointer; flex: none; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--teal); font-size: 11px; }
.text-button.danger { color: #92706b; }
.text-button:hover:not(:disabled) { text-decoration: underline; }
.library-list { max-height: 230px; min-height: 96px; overflow: auto; scrollbar-width: thin; scrollbar-color: #bfd2c8 transparent; display: grid; gap: 7px; }
.library-placeholder { margin: auto; padding: 25px 8px; font-size: 11px; text-align: center; color: #8fa098; line-height: 1.7; }
.library-item { display: grid; grid-template-columns: 14px 51px minmax(0, 1fr); align-items: center; gap: 9px; border: 1px solid transparent; border-radius: 10px; padding: 7px; background: #ffffff69; transition: border-color .16s, background .16s; cursor: pointer; min-width: 0; }
.library-item:hover { background: #fff9; }
.library-item.active { border-color: #89b7a7; background: #eef7f2; }
.library-preview { width: 51px; height: 43px; display: block; border-radius: 5px; object-fit: cover; background: #dae5de; }
.library-name { margin: 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; font-weight: 600; }
.library-open { min-width: 0; width: 100%; padding: 3px 0; border: 0; background: transparent; text-align: left; }
.preview-wrap.drag-over { outline: 3px dashed #2b7469; outline-offset: -5px; }
.library-detail { display: block; font-size: 10px; color: #8c9e96; margin-top: 4px; }
.library-hint { margin: 10px 0 0; color: #95a49d; font-size: 9px; line-height: 1.7; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 10px 10px 0; padding: 3px; border-radius: 11px; background: #e8efebad; }
.tab { border: 0; border-radius: 8px; background: transparent; padding: 8px 5px; font-size: 11px; color: #7c8f85; }
.tab.active, .tab[aria-selected="true"] { background: #fff; color: #2f6658; font-weight: 600; box-shadow: 0 2px 6px #3654430b; }
.tab-panel { padding: 20px 16px 17px; }
fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
legend { font-size: 11px; font-weight: 600; margin: 0 0 10px; padding: 0; color: #5a746b; }
.frame-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.frame-option { min-width: 0; display: flex; align-items: center; flex-direction: column; gap: 7px; border: 1px solid #dfe8e2; background: #ffffff80; padding: 10px 3px 8px; border-radius: 11px; font-size: 10px; color: #7a8e84; }
.frame-option:hover { background: #fff; }
.frame-option.active, .frame-option[aria-pressed="true"] { border-color: #7aa993; box-shadow: 0 0 0 1px #7aa993; color: #336c59; background: #f9fffc; }
.frame-mini { display: block; width: 48px; height: 38px; border-radius: 3px; background: #faf9f5; border: 1px solid #e5e9e0; position: relative; box-shadow: 0 2px 3px #3c584310; }
.frame-mini::before { content: ""; position: absolute; inset: 5px 5px 9px; background: linear-gradient(155deg, #d5e7e5 45%, #a4bfb4 46% 65%, #739487 66%); }
.mini-blur { background: linear-gradient(140deg, #d1e7e5, #8fae9d); }
.mini-gradient { background: linear-gradient(140deg, #ede4d1, #d4e4d7); }
.mini-shadow::before { box-shadow: 2px 2px 4px #49604d55; }
.mini-double::after { content: ""; position: absolute; inset: 3px 3px 7px; border: 1px solid #c6d4c9; }
.mini-polaroid::before { inset: 4px 4px 14px; }
.palette-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.palette-option { display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 8px 3px; border: 1px solid #dfe8e2; background: #fff7; border-radius: 9px; font-size: 10px; color: #718579; }
.palette-option.active, .palette-option[aria-pressed="true"] { background: #f3fbf5; border-color: #7eab94; color: #376e59; }
.swatch { width: 12px; height: 12px; border-radius: 50%; border: 1px solid #d4dbd2; flex: none; }
.swatch-white { background: #fff; }
.swatch-ivory { background: #f3ecdd; }
.swatch-charcoal { background: #2d3132; border-color: #2d3132; }
.range-control { margin-bottom: 19px; }
.range-control > label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; font-weight: 500; color: #5f766c; margin-bottom: 11px; }
output { color: #6e8d7e; font-size: 10px; font-variant-numeric: tabular-nums; }
input[type="range"] { display: block; width: 100%; margin: 0; accent-color: #6a9b82; cursor: pointer; height: 16px; }
.setting-note { margin: 0; color: #8a9d90; font-size: 10px; line-height: 1.8; overflow-wrap: anywhere; }
.toggle-list { display: grid; gap: 15px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; color: #657e6e; cursor: pointer; }
.toggle-row small { display: block; font-size: 9px; color: #96a89b; margin-top: 5px; }
input[type="checkbox"].switch { appearance: none; -webkit-appearance: none; width: 29px; height: 17px; background: #d5dfd8; border-radius: 10px; position: relative; transition: background .16s; }
input[type="checkbox"].switch::after { content: ""; position: absolute; height: 13px; width: 13px; border-radius: 50%; background: white; top: 2px; left: 2px; box-shadow: 0 1px 2px #34524220; transition: transform .16s; }
input[type="checkbox"].switch:checked { background: #72a78b; }
input[type="checkbox"].switch:checked::after { transform: translateX(12px); }
.select-control { margin-bottom: 18px; }
.select-control label { display: block; font-size: 11px; color: #5f766c; margin-bottom: 8px; }
select { width: 100%; padding: 9px 10px; border: 1px solid #dce6dd; color: #536e5e; background: #ffffffb3; border-radius: 8px; font-size: 11px; }
.export-actions { display: grid; gap: 9px; margin: 22px 0 14px; }
.export-actions .button { width: 100%; font-size: 11px; }
.preview-section { min-width: 0; padding: 9px 0 0; }
.preview-heading { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 0 4px 20px; }
.preview-heading > div { min-width: 0; flex: 1; }
.preview-badge { flex-shrink: 0; }
.eyebrow { color: #83a18d; font-size: 9px; font-weight: 650; letter-spacing: 1.8px; }
.preview-heading h2 { font-weight: 550; font-size: 14px; margin: 8px 0 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-badge { display: flex; gap: 5px; align-items: center; white-space: nowrap; font-size: 9px; color: #79957f; background: #ffffff6e; padding: 6px 8px; border-radius: 20px; border: 1px solid #ffffffb8; }
.preview-badge > span { width: 4px; height: 4px; background: #80a98b; border-radius: 50%; }
.preview-wrap { min-height: 570px; height: calc(100vh - 212px); max-height: 930px; width: 100%; position: relative; display: flex; align-items: center; justify-content: center; padding: 26px; border-radius: 20px; background: linear-gradient(145deg, #e1e9e2c2, #dce7e2a6); border: 1px solid #ffffff9c; box-shadow: inset 0 2px 14px #4f755808; overflow: hidden; }
#preview-canvas { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 16px 45px #234c3828; }
.empty-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px; }
.empty-frame { width: 214px; padding: 12px 12px 9px; background: #fff; box-shadow: 0 13px 32px #2f604519; transform: rotate(-4deg); margin: 0 0 32px; }
.empty-frame svg { display: block; width: 100%; height: auto; stroke: none; }
.empty-frame-footer { display: flex; justify-content: space-between; gap: 5px; margin-top: 10px; color: #779186; font-size: 5px; }
.empty-frame-footer span:first-child { font-weight: 650; font-size: 8px; }
.empty-state h3 { font-size: 17px; font-weight: 600; letter-spacing: -.25px; margin: 0; }
.empty-state p { font-size: 11px; color: #8aa190; line-height: 1.8; margin: 12px 0 22px; }
.empty-state .button { font-size: 11px; }
.privacy-note { margin: 17px 0 0; color: #93aa99; font-size: 9px; }
.preview-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 5px 0; color: #8fa396; font-size: 9px; font-variant-numeric: tabular-nums; }
.details-panel { padding: 18px 16px; margin-top: 0; }
.camera-icon { width: 16px; height: 16px; color: #9ab29e; }
.details-intro { font-size: 9px; color: #9daf9f; margin: 8px 0 25px; }
.metadata-list { margin: 0; font-size: 11px; }
.metadata-list > div { margin: 0 0 17px; }
.metadata-list dt { color: #94a594; font-size: 9px; margin-bottom: 5px; }
.metadata-list dd { color: #607761; margin: 0; font-weight: 500; line-height: 1.7; overflow-wrap: anywhere; }
.metadata-list dd img { max-width: 58px; max-height: 18px; object-fit: contain; vertical-align: middle; margin-right: 6px; }
.metadata-empty { color: #95a898; font-size: 10px; line-height: 1.9; padding: 16px 0 30px; }
.local-note { padding-top: 16px; border-top: 1px solid #dfe9de; display: flex; align-items: start; gap: 7px; margin-top: 24px; }
.local-note svg { width: 13px; height: 13px; color: #99b197; margin-top: 1px; }
.local-note p { margin: 0; color: #96ab94; font-size: 9px; line-height: 1.9; }
.status-toast { position: fixed; z-index: 50; bottom: 25px; left: 50%; transform: translateX(-50%); max-width: min(90vw, 620px); border-radius: 13px; padding: 12px 19px; background: #254d40ed; box-shadow: 0 8px 32px #20453222; color: white; font-size: 12px; line-height: 1.7; text-align: center; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); }
@media (min-width: 1600px) { .workspace { grid-template-columns: 300px minmax(330px, 1fr) 248px; gap: 30px; } }
@media (max-width: 1200px) {
  .workspace { grid-template-columns: 264px minmax(320px, 1fr); gap: 20px; }
  .details-panel { grid-column: 2; }
  .left-column { grid-row: 1 / span 2; }
  .metadata-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; }
  .metadata-list > .metadata-empty { grid-column: 1 / -1; }
  .details-intro { margin-bottom: 18px; }
  .metadata-list > div { margin-bottom: 12px; }
  .local-note { margin-top: 6px; }
  .preview-wrap { min-height: 470px; height: min(65vh, 680px); }
}
@media (max-width: 800px) {
  .app-header { margin: 12px 14px 0; padding: 13px 14px; gap: 12px; border-radius: 16px; }
  .brand h1 { font-size: 19px; }
  .brand p { font-size: 9px; }
  .app-icon { width: 35px; height: 35px; }
  .home-link { margin-right: 0; }
  .home-link span { display: none; }
  .button { padding: 9px 12px; font-size: 11px; }
  .header-actions { gap: 7px; }
  .workspace { padding: 18px 14px 28px; grid-template-columns: 232px minmax(0, 1fr); gap: 14px; }
  .preview-wrap { min-height: 410px; padding: 14px; height: 55vh; }
  .preview-heading { padding-bottom: 16px; }
  .preview-heading h2 { max-width: 100%; font-size: 12px; }
  .preview-badge { display: none; }
  .empty-frame { width: 168px; margin-bottom: 28px; }
  .empty-state { padding: 18px; }
  .empty-state h3 { font-size: 13px; }
  .empty-state p { font-size: 10px; }
  .metadata-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .app-header { flex-wrap: wrap; padding: 13px; gap: 13px; }
  .brand { gap: 9px; }
  .brand p { display: none; }
  .app-icon { width: 31px; height: 31px; }
  .brand h1 { font-size: 18px; }
  .header-actions { gap: 6px; }
  .header-actions .button { padding: 8px 9px; border-radius: 9px; }
  .header-actions .button svg { width: 15px; height: 15px; }
  .home-link { padding: 6px 0; }
  .workspace { display: flex; flex-direction: column; gap: 18px; }
  .preview-section { order: 0; width: 100%; padding-top: 1px; }
  .preview-heading { padding: 0 4px 13px; }
  .preview-heading h2 { max-width: 100%; font-size: 13px; }
  .preview-badge { display: flex; }
  .preview-wrap { height: min(62vh, 540px); min-height: 365px; border-radius: 16px; padding: 16px; }
  .empty-frame { width: 178px; margin-bottom: 23px; }
  .empty-state h3 { font-size: 15px; }
  .empty-state p { margin: 10px 0 17px; }
  .privacy-note { margin-top: 14px; }
  .preview-footer { padding-top: 11px; }
  .left-column { order: 1; width: 100%; grid-template-columns: 1fr; gap: 18px; }
  .library-panel { padding: 16px; }
  .library-list { max-height: 242px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-placeholder { grid-column: 1 / -1; }
  .library-item { padding: 6px; gap: 6px; grid-template-columns: 13px 43px minmax(0, 1fr); }
  .library-preview { width: 43px; height: 39px; }
  .library-detail { font-size: 9px; }
  .tab-panel { padding: 21px 18px 18px; }
  .frame-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .frame-option { padding: 14px 4px 10px; font-size: 11px; }
  .frame-mini { width: 59px; height: 45px; }
  .palette-option { padding: 10px; font-size: 11px; }
  .range-control { margin-bottom: 23px; }
  .range-control > label, .toggle-row, .select-control label, legend { font-size: 12px; }
  .range-control > label { margin-bottom: 13px; }
  .range-control input[type="range"] { height: 24px; }
  .toggle-list { gap: 19px; }
  .setting-note { font-size: 11px; }
  .select-control select { font-size: 12px; padding: 10px; }
  .export-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .export-actions .button { white-space: normal; min-height: 40px; }
  .details-panel { order: 2; width: 100%; padding: 19px 18px; }
  .metadata-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .app-header { margin-left: 10px; margin-right: 10px; padding: 12px 10px; }
  .brand h1 { font-size: 16px; }
  .app-icon { width: 27px; height: 27px; }
  .header-actions .button { font-size: 10px; padding: 8px; }
  .header-actions .button svg { display: none; }
  .workspace { padding-left: 10px; padding-right: 10px; }
  .library-list { grid-template-columns: 1fr; max-height: 208px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
