[hidden] { display: none !important; }
.frame-hero { padding: 104px 0 28px; border-bottom: 0; }
.frame-hero .wrap, .frame-shell > .wrap { width: min(1200px,calc(100% - 48px)); }
.frame-hero h1 { margin: 14px 0 10px; font-size: clamp(30px,4vw,46px); letter-spacing: -.035em; line-height: 1.18; }
.frame-hero .hero-lead { font-size: 16px; line-height: 1.6; }
.frame-hero .eyebrow { font-size: 10px; }
.tool-switcher { display: flex; align-items: center; gap: 5px; margin-bottom: 20px; font-size: 12px; }
.tool-switcher a, .tool-switcher span { min-height: 36px; padding: 8px 13px; border-radius: 999px; color: #b8b1c4; }
.tool-switcher a:hover { background: #ffffff09; color: #fff; }
.tool-switcher [aria-current] { background: #b49aef19; border: 1px solid #b49aef32; color: #e0d1ff; }
.frame-shell { padding: 0 0 70px; }
.frame-tool-card { margin: 0 auto; padding: 24px; border: 1px solid #ffffff12; border-radius: 28px; background: #17141e; box-shadow: 0 24px 64px #00000029; }
.photo-upload { display: grid; grid-template-columns: 1fr 1fr; min-height: 340px; align-items: center; gap: 40px; padding: 30px; border: 1px dashed #a78bfa55; border-radius: 22px; background: #a78bfa05; transition: background .18s,border-color .18s; }
.photo-upload.is-over { border-color: #c4b5fd; background: #a78bfa16; }
.empty-art { display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 0; }
.empty-art img { display: block; width: 27%; height: auto; border-radius: 5px; box-shadow: 0 8px 20px #0003; }
.empty-art img:nth-child(2) { width: 32%; }
.empty-step { color: #c6b1f8; font-size: 11px; letter-spacing: .06em; }
.photo-upload h2 { margin: 12px 0 8px; font-size: clamp(22px,3vw,30px); }
.upload-description { max-width: 420px; margin: 0; color: #b0a8bd; font-size: 14px; line-height: 1.65; }
.file-label { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 24px; margin: 20px 0 0; padding: 12px 20px; border: 0; border-radius: 14px; background: #b39aef; color: #191222; font: inherit; font-weight: 750; cursor: pointer; }
#photoInput { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.file-types, .local-note { margin: 12px 0 0; color: #a8a0b3; font-size: 11px; line-height: 1.6; }
.local-note { color: #b6afc2; }
.local-note span, .frame-privacy-note span { margin-right: 5px; color: #91d9bb; }
.tool-feedback { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 13px 16px; border: 1px solid #fca5a530; border-radius: 14px; background: #fca5a50b; }
.tool-error { margin: 0; color: #fecaca; font-size: 13px; line-height: 1.5; }
#retryFrame { flex: 0 0 auto; padding: 8px 11px; border: 1px solid #ffffff26; border-radius: 10px; color: #fff; background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.editor-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(360px,1fr); align-items: start; gap: 26px; }
.preview-panel, .controls-panel { min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.panel-heading > div:first-child { display: flex; align-items: center; gap: 9px; }
.panel-heading h2 { margin: 0; font-size: 15px; }
.preview-chip { padding: 4px 7px; border-radius: 999px; color: #a0d8bf; background: #91d9bb0c; font-size: 10px; }
.preview-actions { display: flex; gap: 6px; }
.preview-actions button { min-height: 40px; padding: 8px 12px; border: 1px solid #ffffff13; border-radius: 12px; background: #ffffff05; color: #ddd6e8; font: inherit; font-size: 12px; cursor: pointer; }
.preview-actions button:hover { border-color: #b39aef77; background: #b39aef12; }
.preview-stage { display: grid; min-height: 360px; place-items: center; overflow: hidden; padding: 18px; border: 1px solid #ffffff0c; border-radius: 22px; background: #100e16; background-image: linear-gradient(45deg,#ffffff03 25%,transparent 25%,transparent 75%,#ffffff03 75%),linear-gradient(45deg,#ffffff03 25%,transparent 25%,transparent 75%,#ffffff03 75%); background-position: 0 0,9px 9px; background-size: 18px 18px; }
#photoPreview { display: block; width: auto; height: auto; max-width: 100%; max-height: min(72vh,760px); touch-action: pan-y; cursor: default; box-shadow: 0 9px 32px #0004; }
#photoPreview[data-fit="cover"] { touch-action: none; cursor: grab; }
#photoPreview.is-cropping { cursor: grabbing; }
.photo-meta { margin: 12px 0 0; color: #aaa2b5; font-size: 11px; line-height: 1.5; }
.crop-hint { margin: 5px 0 0; color: #ada4bb; font-size: 12px; line-height: 1.6; }
.controls-panel { padding: 20px; border: 1px solid #ffffff0c; border-radius: 22px; background: #ffffff02; }
.control-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.control-group legend { padding: 0; font-size: 16px; font-weight: 720; }
.frame-count { margin-left: 5px; font-size: 11px; font-weight: 500; color: #aaa2b5; }
.control-help { margin: 6px 0 13px; color: #a69bb5; font-size: 11px; line-height: 1.55; }
.frame-style-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; }
.frame-style { position: relative; display: flex; flex-direction: column; min-width: 0; gap: 6px; padding: 5px; border: 1px solid #ffffff13; border-radius: 12px; background: #ffffff02; color: #c9c1d5; font: inherit; font-size: 10px; text-align: center; cursor: pointer; transition: background .18s,border-color .18s; }
.frame-style:hover { border-color: #b39aef77; background: #b39aef0a; }
.frame-style[aria-pressed="true"] { border-color: #c4b5fd; background: #b39aef20; color: #fff; box-shadow: 0 0 0 1px #c4b5fd44; }
.frame-style[aria-pressed="true"]::after { content: '✓'; position: absolute; top: 7px; right: 7px; display: grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; background: #ede5ff; color: #302047; font-size: 10px; font-weight: 800; }
.app-frame-thumb { display: block; width: 100%; height: auto; aspect-ratio: 1122/1402; object-fit: contain; border-radius: 5px; }
.frame-style > span { min-height: 28px; display: flex; align-items: center; justify-content: center; line-height: 1.4; overflow-wrap: anywhere; }
.adjustment-heading { margin: 21px 0 13px; padding-top: 18px; border-top: 1px solid #ffffff0b; font-size: 14px; font-weight: 700; }
.control-row { display: grid; grid-template-columns: 1fr; gap: 15px; margin-top: 12px; }
.select-control, .range-control { display: grid; min-width: 0; gap: 8px; color: #cbc3d6; font-size: 12px; }
.segmented-control { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid #ffffff10; border-radius: 14px; background: #110f18; }
.segmented-control button { min-height: 42px; padding: 8px; border: 0; border-radius: 10px; background: transparent; color: #aaa0b9; font: inherit; font-size: 12px; cursor: pointer; }
.segmented-control button[aria-pressed="true"] { background: #443953; color: #fff; }
.range-control span { display: flex; align-items: center; justify-content: space-between; }
.range-control strong { font-weight: 600; color: #d9cbee; font-variant-numeric: tabular-nums; }
.range-control input { width: 100%; min-height: 32px; margin: 0; accent-color: #b39aef; cursor: pointer; }
.frame-adjustments { gap: 10px; }
.color-control { display: flex; min-height: 45px; align-items: center; justify-content: space-between; gap: 9px; padding: 5px 10px; border: 1px solid #ffffff10; border-radius: 13px; font-size: 12px; color: #cbc3d6; }
.color-control input { width: 42px; height: 32px; padding: 2px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; }
.opening-fill { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 11px; line-height: 1.5; color: #b4a9c3; }
.opening-fill input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: #b39aef; }
.export-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.export-actions button { min-height: 48px; padding: 10px; border: 1px solid #b39aef55; border-radius: 14px; font: inherit; font-size: 13px; font-weight: 720; cursor: pointer; }
.primary-tool { background: #b39aef; color: #191222; }
.secondary-tool { background: #b39aef09; color: #e2d7f4; }
.export-note { margin: 9px 0 0; color: #a69bb5; font-size: 11px; line-height: 1.6; }
.photo-status { min-height: 18px; margin: 12px 0 0; color: #b5abc2; font-size: 12px; line-height: 1.5; }
.photo-status[data-tone="success"] { color: #a0d8bf; }
.photo-status[data-tone="busy"] { color: #d9cbee; }
#photoFrameTool button:disabled, #photoFrameTool input:disabled { opacity: .45; cursor: not-allowed; }
#photoFrameTool[aria-busy="true"] .preview-chip { color: #d9cbee; }
#photoFrameTool :is(button,input,canvas):focus-visible, .tool-switcher a:focus-visible, .frame-app-cta a:focus-visible { outline: 3px solid #c4b5fd; outline-offset: 3px; }
.frame-app-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding: 15px 18px; border-top: 1px solid #ffffff0d; }
.frame-app-cta h3 { margin: 0 0 4px; font-size: 13px; }
.frame-app-cta p { margin: 0; color: #a79cb7; font-size: 12px; line-height: 1.5; }
.frame-app-cta a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 42px; padding: 8px 12px; border-radius: 11px; background: #b39aef0e; color: #dbcaf6; font-size: 12px; }
.frame-content { max-width: 1000px; margin: 48px auto 0; }
.frame-content h2 { margin: 0 0 12px; font-size: 25px; }
.frame-content p { color: #bcb2c9; font-size: 14px; line-height: 1.8; }
.frame-faq { margin-top: 30px; }
.frame-faq details { border-bottom: 1px solid #ffffff10; }
.frame-faq summary { padding: 16px 0; color: #e4dceb; cursor: pointer; font-size: 14px; }
.frame-faq details p { margin: 0 0 16px; color: #b0a6bf; }
.frame-privacy-note { margin-top: 24px; color: #afa5bd; font-size: 12px; }
@media (max-width: 960px) {
  .editor-grid { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .preview-stage { min-height: 300px; }
  .control-row { grid-template-columns: 1fr 1fr; }
  .frame-style-grid { display: flex; overflow-x: auto; padding: 3px 3px 12px; gap: 10px; scroll-snap-type: x proximity; }
  .frame-style { flex: 0 0 86px; scroll-snap-align: center; font-size: 11px; }
  .frame-style > span { min-height: 30px; }
}
@media (max-width: 600px) {
  .frame-hero { padding: 92px 0 22px; }
  .frame-hero .wrap, .frame-shell > .wrap { width: calc(100% - 28px); }
  .frame-hero h1 { font-size: 30px; }
  .frame-hero .hero-lead { font-size: 14px; }
  .tool-switcher { margin-bottom: 15px; }
  .frame-tool-card { padding: 14px; border-radius: 23px; }
  .photo-upload { grid-template-columns: 1fr; gap: 24px; min-height: 0; padding: 24px 16px; text-align: center; }
  .empty-art { max-width: 310px; margin: auto; gap: 9px; }
  .upload-copy h2 { font-size: 25px; }
  .upload-description { font-size: 13px; }
  .file-label { width: 100%; }
  .panel-heading { gap: 8px; }
  .panel-heading > div:first-child { gap: 6px; }
  .panel-heading h2 { font-size: 14px; }
  .preview-actions button { padding: 7px 9px; font-size: 11px; }
  .preview-chip { display: none; }
  .preview-stage { padding: 12px; min-height: 0; border-radius: 17px; }
  #photoPreview { max-height: 56vh; }
  .controls-panel { padding: 16px 13px; border-radius: 18px; }
  .control-row { grid-template-columns: 1fr; gap: 14px; }
  .frame-adjustments { gap: 7px; }
  .control-help { margin-bottom: 10px; }
  .frame-app-cta { flex-direction: column; align-items: flex-start; padding: 16px 2px 0; gap: 10px; }
  .frame-content { margin-top: 36px; }
  .frame-content h2 { font-size: 23px; }
  .tool-feedback { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .photo-upload, .frame-style { transition: none; } }
