/* PowerFrame Pro: gallery, editor and campaign pages. Tight corners (4 to 6px), big touch targets. */
.pf-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.pf-brand { display: inline-flex; align-items: center; gap: 9px; font: 800 17px/1 var(--display); color: var(--ink); text-decoration: none; white-space: nowrap; }
.pf-logo { width: 26px; height: 26px; border-radius: 4px; background: var(--accent); position: relative; flex: none; }
.pf-logo::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--paper); }
.pf-top nav { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.pf-top nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 600; white-space: nowrap; }
.pf-top nav a[aria-current] { color: var(--accent-ink); box-shadow: 0 2px 0 var(--accent); }
.pf-top .btn, .pf-editor .btn, .pf-cta .btn { border-radius: 4px; }
@media (max-width: 640px) { .pf-top { padding: 8px 12px; flex-wrap: wrap; row-gap: 6px; } .pf-top nav { gap: 14px; font-size: 13px; width: 100%; overflow-x: auto; } .pf-top nav a:not(.btn) { padding: 6px 0; } .pf-top nav .btn { display: none; } .pf-brand { font-size: 15px; } }

.pf-wrap { max-width: 1180px; margin: 0 auto; padding: 22px 20px 30px; }
.pf-camp { padding-top: 28px; }
.pf-hero { padding: 26px 0 8px; }
.pf-hero h1 { font-size: clamp(34px, 6vw, 60px); letter-spacing: -0.03em; color: var(--ink); }
.pf-hero p { font-size: 17px; color: var(--ink-2); max-width: 60ch; margin: 10px 0 0; }
.pf-title { font-size: clamp(24px, 4vw, 36px); letter-spacing: -0.02em; margin: 4px 0 6px; }
.pf-lede { font-size: 16px; color: var(--ink-2); margin: 0 0 14px; max-width: 62ch; }
.pf-crumb { font-size: 13px; color: var(--ink-3); margin: 0 0 4px; }
.pf-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.pf-tools input[type=search] { flex: 1 1 260px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; font: 400 15px var(--text); background: var(--paper); }
.pf-tiers, .pf-styles { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-chip { height: 40px; padding: 0 14px; border: 1px solid var(--line); background: var(--paper); border-radius: 4px; font: 600 13.5px var(--text); color: var(--ink-2); cursor: pointer; }
.pf-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pf-privacy { font-size: 13px; color: var(--ink-3); margin: 14px 0 0; padding-left: 24px; position: relative; }
.pf-privacy::before { content: ''; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1l5.500 2v4.500c0 3.500-2.500 6-5.500 7.500C5 13.500 2.500 11 2.500 7.500V3z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1l5.500 2v4.500c0 3.500-2.500 6-5.500 7.500C5 13.500 2.500 11 2.500 7.500V3z'/%3E%3C/svg%3E") center/contain no-repeat; }

.pf-sec { margin-top: 34px; }
.pf-sec h2 { font-size: 22px; }
.pf-sec > .muted { margin: 4px 0 0; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 14px; }
.pf-card { display: flex; flex-direction: column; gap: 3px; padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.pf-card:hover, .pf-card:focus-visible { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--accent) 70%, transparent); }
.pf-card[hidden] { display: none; }
.pf-card-art { display: block; aspect-ratio: 1; border-radius: 4px; overflow: hidden; background: repeating-conic-gradient(#EEF1F6 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.pf-card-art canvas, .pf-card-art img { width: 100%; height: 100%; display: block; object-fit: contain; }
.pf-card b { font: 700 14px/1.25 var(--display); margin-top: 6px; }
.pf-card small { font-size: 12px; color: var(--ink-3); }
.pf-none { margin: 30px 0; color: var(--ink-2); }
.pf-cta { margin-top: 40px; padding: 22px; border-radius: 6px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; color: #fff; background: #18202F; }
.pf-cta h2 { font-size: 22px; color: #fff; }
.pf-cta p { margin: 6px 0 0; opacity: .88; max-width: 58ch; }
.pf-soon { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 10px; }
.pf-soon-card { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.pf-soon-card:hover { border-color: var(--accent); }
.pf-soon-card canvas { width: 100%; height: auto; aspect-ratio: 1; border-radius: 4px; }
.pf-soon-card b { font: 700 13px/1.25 var(--display); margin-top: 4px; }
.pf-soon-card small { font-size: 12px; color: var(--ink-3); }

/* ---------------- editor ---------------- */
.pf-editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; margin-top: 14px; }
.pf-stage-col { position: sticky; top: 70px; min-width: 0; }
.pf-stage { --ar: 1; --maxh: min(72vh, 760px); position: relative; width: min(100%, calc(var(--maxh) * var(--ar))); aspect-ratio: var(--ar); margin: 0 auto; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: repeating-conic-gradient(#E6EAF1 0 25%, #fff 0 50%) 0 0 / 22px 22px; box-shadow: 0 24px 50px -30px rgba(24, 32, 47, .5); touch-action: none; }
.pf-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; outline-offset: -3px; }
.pf-stage canvas:active { cursor: grabbing; }
.pf-stage[data-tool=punch] canvas { cursor: crosshair; }
.pf-empty { position: absolute; left: 0; right: 0; bottom: 26%; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; text-align: center; padding: 0 16px; }
.pf-empty[hidden] { display: none; }
.pf-empty > * { pointer-events: auto; }
.pf-empty span { font-size: 13px; color: var(--ink); background: rgba(255, 255, 255, .9); padding: 4px 10px; border-radius: 4px; }
.pf-noart { top: 0; bottom: 0; justify-content: center; }
.pf-pick { cursor: pointer; }
.pf-guide { position: absolute; background: #E11D74; opacity: 0; pointer-events: none; transition: opacity .12s; }
.pf-guide-x { top: 0; bottom: 0; left: 50%; width: 1px; }
.pf-guide-y { left: 0; right: 0; top: 50%; height: 1px; }
.pf-stage.snap-x .pf-guide-x, .pf-stage.snap-y .pf-guide-y { opacity: .9; }
.pf-msg { margin: 10px 0 0; padding: 9px 12px; border-radius: 4px; font-size: 14px; background: var(--tint); color: var(--ink); }
.pf-msg.bad { background: #FEF3F2; color: var(--bad); }
.pf-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pf-dim { margin-left: auto; }
.pf-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pf-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.pf-panel[hidden] { display: none; }
.pf-panel h2 { font-size: 15px; }
.pf-panel h3 { font-size: 13px; color: var(--ink-2); }
.pf-panel p { margin: 0; }
.pf-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pf-tab { height: 46px; border: 1px solid var(--line); background: var(--paper); border-radius: 4px; font: 700 14px var(--text); color: var(--ink-2); cursor: pointer; }
.pf-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pf-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pf-row .btn-sm { height: 40px; }
.pf-range { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.pf-range input { width: 100%; height: 32px; accent-color: var(--accent); }
.pf-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.pf-field input, .pf-custom input, .pf-row-fmt select { height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; font: 400 15px var(--text); width: 100%; background: var(--paper); }
.pf-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); min-height: 32px; }
.pf-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.pf-colors { display: flex; gap: 14px; flex-wrap: wrap; }
.pf-colors label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-3); }
.pf-colors input[type=color] { width: 56px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.pf-sizes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pf-size { text-align: left; padding: 9px 10px; min-height: 52px; border: 1px solid var(--line); background: var(--paper); border-radius: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.pf-size b { font: 700 13px var(--text); color: var(--ink); }
.pf-size small { font-size: 11.5px; color: var(--ink-3); }
.pf-size.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--tint); }
.pf-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pf-custom[hidden] { display: none; }
.pf-custom label { font-size: 12px; color: var(--ink-3); display: flex; flex-direction: column; gap: 4px; }
.pf-shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pf-shape { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 60px; border: 1px solid var(--line); background: var(--paper); border-radius: 4px; cursor: pointer; color: var(--ink); font: 600 11.5px var(--text); }
.pf-shape:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--tint); }
.pf-holebox { border-top: 1px solid var(--line-2); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pf-holebox[hidden] { display: none; }
.pf-reshape { display: flex; flex-wrap: wrap; gap: 4px; }
.pf-mini { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--paper); border-radius: 4px; cursor: pointer; color: var(--ink-2); }
.pf-mini.on { border-color: var(--accent); color: var(--accent-ink); background: var(--tint); }
.pf-save .btn { width: 100%; }
.pf-row-fmt { display: grid; grid-template-columns: 1fr; gap: 6px; }
.pf-savebar { margin-top: 18px; }
.pf-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 120px; align-items: end; }
.pf-bars span { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 3px; }
.pf-bars i { display: block; width: 100%; min-height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
.pf-bars small { font-size: 10px; color: var(--ink-3); }

@media (max-width: 900px) {
  .pf-editor { grid-template-columns: 1fr; gap: 12px; }
  /* On a phone the picture scrolls away with the page, so every control has the whole screen. */
  .pf-stage-col { position: static; }
  .pf-stage { --maxh: 68vh; }
  .pf-top { position: static; }
  .pf-wrap { padding: 14px 20px 26px; }
  .pf-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
}

/* ---------------- motion (off when the device asks for less) ---------------- */
.pf-glint { position: relative; overflow: hidden; }
.pf-glint::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 28%; transform: skewX(-20deg); background: rgba(255, 255, 255, .38); opacity: 0; }
.pf-glint:hover::after { animation: pf-glint .6s ease-out 1; }
@keyframes pf-glint { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 1; } }
.pf-sec .pf-card { animation: pf-rise .5s ease both; }
.pf-sec .pf-card:nth-child(2) { animation-delay: .04s; } .pf-sec .pf-card:nth-child(3) { animation-delay: .08s; } .pf-sec .pf-card:nth-child(4) { animation-delay: .12s; }
.pf-sec .pf-card:nth-child(5) { animation-delay: .16s; } .pf-sec .pf-card:nth-child(6) { animation-delay: .2s; } .pf-sec .pf-card:nth-child(n+7) { animation-delay: .24s; }
@keyframes pf-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pf-editor.ready .pf-stage { animation: pf-bloom .7s ease-out 1; }
@keyframes pf-bloom { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 24px 50px -30px rgba(24, 32, 47, .5), 0 0 0 26px transparent; } }
@media (prefers-reduced-motion: reduce) {
  .pf-glint:hover::after, .pf-sec .pf-card, .pf-editor.ready .pf-stage { animation: none; }
  .pf-card, .pf-guide { transition: none; }
  .pf-card:hover { transform: none; }
}

/* The front door leads with the maker; the holiday wall follows. */
.pf-holidays { margin-top: 54px; padding-top: 30px; border-top: 1px solid var(--line); }
.pf-h2big { font-size: clamp(26px, 4.4vw, 40px); letter-spacing: -0.02em; }
.pf-hero + .pf-editor { margin-top: 18px; }
.pf-card-art { box-shadow: 0 10px 22px -14px rgba(24, 32, 47, .55); }
.pf-editor:not(.has-art) [data-needs-art] { display: none; }
.pf-editor:not(.has-art) .pf-shapes { opacity: .55; pointer-events: none; }

/* A holiday with illustrated artwork: its words and colors are part of the art, so those fields hide for that look. */
.pf-editor.is-art [data-drawn-only] { display: none; }
.pf-editor:not(.is-art) [data-art-only] { display: none; }

/* ---------------- studio: text, emoji, stamps ---------------- */
.pf-tabs { grid-template-columns: repeat(3, 1fr); }
.pf-tab { font-size: 13px; padding: 0 4px; }
.pf-layerbox { border: 1px solid var(--line-2); border-radius: 6px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--tint); }
.pf-layerbox[hidden], .pf-layerbox [hidden] { display: none; }
.pf-fontchip { height: 44px; text-transform: none; }
.pf-emojitabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.pf-emojitabs .pf-chip { flex: none; height: 36px; padding: 0 10px; font-size: 12.5px; }
.pf-emojigrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; max-height: 196px; overflow-y: auto; padding: 2px; }
.pf-emo { height: 44px; border: 1px solid transparent; background: transparent; border-radius: 4px; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.pf-emo:hover, .pf-emo:focus-visible { border-color: var(--accent); background: var(--tint); }
.pf-stampbtn canvas { width: 28px; height: 28px; }
.pf-inlinecolor { display: inline-flex; align-items: center; gap: 6px; font: 400 12px var(--text); color: var(--ink-3); margin-left: 8px; }
.pf-inlinecolor input { width: 36px; height: 28px; padding: 1px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.pf-layerlist { display: flex; flex-direction: column; gap: 4px; }
.pf-layer { text-align: left; height: 40px; padding: 0 10px; border: 1px solid var(--line); background: var(--paper); border-radius: 4px; font: 500 13.5px var(--text); color: var(--ink); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-layer.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pf-stage[data-tool=design] canvas { cursor: default; }
.pf-or { background: none !important; font-weight: 700; }
.pf-blankrow { display: inline-flex; gap: 6px; align-items: center; background: none !important; padding: 0 !important; }
.pf-blankrow input { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.pf-editor:not(.is-blank) [data-blank-only] { display: none; }
[data-blank-only] { margin: 0 0 4px; }
.pf-card-blank { display: grid; place-items: center; width: 100%; height: 100%; background: #111; color: #fff; font: 700 13px var(--display); }

/* Exact numbers beside the sliders. */
.pf-range.has-num { grid-template-columns: 68px 1fr 68px; }
.pf-num { height: 40px; width: 68px; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; font: 600 16px var(--text); text-align: center; background: var(--paper); color: var(--ink); -moz-appearance: textfield; }
.pf-num::-webkit-outer-spin-button, .pf-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* iPhones zoom the whole page when a field's text is under 16px, which pushed the canvas off the screen. */
.pf-editor input, .pf-editor select, .pf-tools input { font-size: 16px !important; }
.pf-editor input.pf-num { width: 68px; min-height: 40px; padding: 0 6px; }

/* A post to share with the frame */
.pf-post { display: grid; gap: 8px; margin-top: 6px; padding: 12px; border: 1px solid var(--line, #E3E7EE); border-radius: 6px; }
.pf-post p { margin: 0; }
.pf-post textarea { width: 100%; min-height: 110px; resize: vertical; border-radius: 4px; font-size: 16px !important; line-height: 1.4; }
.pf-card-art.is-art { background: #1B2233 radial-gradient(circle at 50% 46%, #AEB7C6 0 30%, transparent 31%); }

/* A campaign inside someone else's website */
.pf-embed { padding-top: 8px; }
.pf-embed .pf-stage-col { top: 0; }

/* Sample flyers on the empty studio */
.pf-samples { display: grid; gap: 6px; justify-items: center; background: none !important; padding: 0 !important; margin-top: 6px; }
.pf-samples small { font: 600 12.5px var(--text); color: var(--ink-2); background: rgba(255, 255, 255, .9); padding: 3px 8px; border-radius: 4px; }
.pf-samplerow { display: flex; gap: 8px; background: none !important; padding: 0 !important; }
.pf-sample { width: 64px; height: 64px; padding: 0; border: 2px solid #fff; border-radius: 5px; overflow: hidden; cursor: pointer; background: #fff; box-shadow: 0 8px 18px -10px rgba(24, 32, 47, .6); transition: transform .2s ease, box-shadow .2s ease; }
.pf-sample img { width: 100%; height: 100%; display: block; object-fit: cover; }
.pf-sample:hover, .pf-sample:focus-visible { transform: translateY(-3px) rotate(-3deg); box-shadow: 0 14px 22px -12px rgba(225, 29, 116, .8); }
@media (prefers-reduced-motion: no-preference) {
  .pf-noart .pf-pick { animation: pf-nudge 2.8s ease-in-out 1.2s infinite; }
  @keyframes pf-nudge { 0%, 86%, 100% { transform: none; } 90% { transform: translateY(-3px) scale(1.03); } 94% { transform: translateY(0) scale(1); } 97% { transform: translateY(-2px); } }
  .pf-sample { animation: pf-rise .5s ease both; }
  .pf-sample:nth-child(2) { animation-delay: .08s; } .pf-sample:nth-child(3) { animation-delay: .16s; } .pf-sample:nth-child(4) { animation-delay: .24s; }
}

/* Questions and answers, and the links at the end of a holiday page */
.pf-faq { margin: 40px 0 10px; max-width: 820px; }
.pf-faq h2 { font-family: var(--display); font-weight: 900; font-size: clamp(24px, 5vw, 32px); letter-spacing: -0.02em; margin: 0 0 12px; }
.pf-faq details { border: 1px solid var(--line); border-radius: 6px; background: var(--paper); margin: 0 0 8px; }
.pf-faq summary { cursor: pointer; padding: 14px 44px 14px 16px; font: 700 16px/1.35 var(--display); color: var(--ink); list-style: none; position: relative; }
.pf-faq summary::-webkit-details-marker { display: none; }
.pf-faq summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font: 700 22px/1 var(--display); color: var(--accent); transition: transform .25s ease; }
.pf-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.pf-faq details p { margin: 0; padding: 0 16px 16px; color: var(--ink-2); line-height: 1.6; }
.pf-allframes { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 6px; }
