@import url("./header.css");
.card-presentation{position:fixed;inset:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#e4d9c2;color:#1c2733;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;font:16px/1.5 var(--font-body,"Hanken Grotesk",system-ui,sans-serif)}
.card-presentation::backdrop{background:#e4d9c2}
.card-presentation header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:calc(16px + env(safe-area-inset-top)) 24px 16px}
.card-presentation header>span{font-weight:500;line-height:1.4;overflow-wrap:anywhere}
.card-presentation button{min-width:44px;min-height:44px;font:600 16px/1.25 var(--font-body,"Hanken Grotesk",system-ui,sans-serif);cursor:pointer;border:1px solid #d7c9af;border-radius:999px;padding:10px 18px;background:#fffdf8;color:#1c2733}
.card-presentation button:hover:not(:disabled){border-color:#764c1c}
.card-presentation button:focus-visible{outline:3px solid #764c1c;outline-offset:3px}
.card-presentation button[aria-pressed=true],.card-presentation [data-open]{background:#1c2733;color:#fffdf8}
.card-presentation button:disabled{opacity:.5;cursor:wait}
.presentation-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
.card-presentation [data-make-yours]{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 18px;border:1px solid #1c2733;border-radius:24px;background:#1c2733;color:#fffdf8;font:inherit;text-align:center;text-decoration:none}
.card-presentation [data-make-yours]:focus-visible{outline:3px solid #a06c2c;outline-offset:3px}
.presentation-actions [data-close]{min-height:44px}
.card-presentation [hidden]{display:none!important}
.presentation-stage{position:relative;min-height:0;display:grid;place-items:center;isolation:isolate}
.presentation-card{width:min(100%,1100px);height:100%;}
.presentation-card .physical-card{display:block;width:100%;height:100%}
.card-presentation footer{text-align:center;padding:16px 16px calc(16px + env(safe-area-inset-bottom));border-top:1px solid #e4d9c280}
.card-presentation footer p{margin:0 auto 12px;max-width:60ch;font-size:16px;line-height:1.5;color:#55606b}
.presentation-giphy-credit{display:block;width:max-content;margin:0 auto 8px;line-height:1}.presentation-giphy-credit img{display:block;max-width:100%;height:auto}
.card-presentation nav{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
@media(prefers-reduced-motion:reduce){.card-presentation *, .card-presentation *::before{transition:none!important}}

.presentation-opening{width:min(100%,900px);height:100%;display:grid;place-items:center;overflow:hidden}.presentation-opening keepze-card{width:100%;max-height:100%}

/* The artwork is centered in the space between the persistent header and footer. */
.presentation-stage{padding:16px 20px;overflow:hidden}
.presentation-card{min-width:0;min-height:0;align-self:stretch;justify-self:center}
@media(max-width:560px){.presentation-stage{padding:12px}.card-presentation header{padding-inline:16px}.card-presentation nav{gap:8px}.card-presentation nav button{padding:10px 14px;font-size:15px}}
@media(max-width:560px){.card-presentation header:has(.presentation-actions){flex-wrap:wrap;gap:12px}.card-presentation header:has(.presentation-actions)>span{width:100%;font-size:16px}.presentation-actions{justify-content:flex-start;width:100%;gap:8px}.presentation-actions [data-make-yours],.presentation-actions [data-close]{padding:10px 14px;font-size:15px}}

.card-presentation.card-presentation-inline{position:relative;inset:auto;width:100%;height:clamp(500px,75vh,850px);max-width:1100px;margin:auto;border-radius:12px;grid-template-rows:minmax(0,1fr) auto;isolation:isolate}
.card-presentation-inline>header[hidden]{display:none}
/* The centered grid must give its inline reader the available page width. */
#recipient-presentation{width:100%;max-width:1100px;min-width:0}
@media(max-width:560px){.card-presentation.card-presentation-inline{height:clamp(480px,72svh,700px)} }

.floating-card-surface{touch-action:auto;user-select:none;-webkit-user-select:none;transform-style:preserve-3d;cursor:grab}
.floating-card-surface:active{cursor:grabbing}
.organizer-preview:has(.card-presentation-inline){display:block}
.organizer-preview .preview-well:has(.card-presentation-inline){aspect-ratio:auto;overflow:visible;padding:0;width:100%}

/* Sent-card page: no frame around the envelope, and the footer controls get their own room. */
.organizer-preview .preview-well:has(.card-presentation-inline){height:auto;min-height:0;border:0;border-radius:0;background:none;box-shadow:none;padding:0;overflow:visible}
.card-presentation-inline footer{padding:12px 16px 18px}

/* Reading stays with the card. Normal semantic words are visually clipped;
   artwork failures reveal the same complete messages on the main paper. */
.card-reading-content[hidden]{display:none!important}
.card-reading-content:not(.card-reading-fallback){position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;pointer-events:none}
.card-reading-content.card-reading-fallback{box-sizing:border-box;align-self:stretch;width:min(100%,48rem);min-height:0;max-height:100%;overflow:auto;overscroll-behavior:contain;margin:0;padding:clamp(20px,5vw,48px);background:#fffdf8;color:#1c2733;font:18px/1.65 var(--font-body,"Hanken Grotesk",system-ui,sans-serif);overflow-wrap:anywhere;user-select:text;-webkit-user-select:text}
.card-reading-content.card-reading-fallback:focus-visible{outline:3px solid #a06c2c;outline-offset:-3px}
.card-reading-content section+section{margin-top:24px}
.card-reading-content h3{margin:0 0 8px;font-size:17px;line-height:1.4}
.card-reading-content p{margin:0 0 12px;white-space:pre-wrap}
.card-reading-content section:last-child p:last-child{margin-bottom:0}

/* At browser zoom or a short landscape viewport, scroll the presentation rather
   than clipping the envelope, its instruction, or the persistent controls. */
@media(max-height:500px){.card-presentation:not(.card-presentation-inline){grid-template-rows:auto minmax(460px,1fr) auto;overflow-y:auto}}

/* V5 activities share the existing recipient stage and normal card runtime. */
.presentation-stage.v5-has-activity{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,440px);gap:20px;align-items:center;overflow:hidden}
.v5-has-activity .presentation-card{width:100%;height:100%;min-height:240px}
.v5-has-activity [data-v5-activity-host]{width:100%;max-height:100%;min-height:0;overflow:auto;align-self:stretch;overscroll-behavior:contain;padding:4px}
.v5-has-activity .v5-activity{margin:0;padding:16px;font-size:14px}
.v5-has-activity .v5-activity h2{font-size:22px}
.v5-has-activity .v5-dial{width:180px;height:180px}
.v5-has-activity .v5-dial-ring span{transform:rotate(var(--tick)) translateY(-58px) rotate(calc(-1 * var(--tick)))}
@media(max-width:700px){.presentation-stage.v5-has-activity{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(120px,25vh) minmax(0,1fr);gap:8px;padding:8px}.v5-has-activity .presentation-card{height:100%;min-height:120px}.v5-has-activity .v5-activity{padding:12px}.v5-has-activity .v5-activity p{margin:6px 0}.v5-has-activity .v5-dial{width:150px;height:150px}.v5-has-activity .v5-dial-ring span{transform:rotate(var(--tick)) translateY(-44px) rotate(calc(-1 * var(--tick)))}}

/* The identity wrapper opts into the canonical header.css logo lockup only.
   Its div tag leaves the normal site header's sticky bar and dimensions unused. */
.card-presentation>header:has(.presentation-identity){flex-wrap:wrap;align-items:center;gap:16px}
.card-presentation .presentation-identity{display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px;min-width:0;flex:1 1 200px}
.card-presentation .presentation-brand{flex:none;max-width:100%}
.card-presentation .presentation-context{font:500 15px/1.4 var(--font-body,"Hanken Grotesk",system-ui,sans-serif);color:#764c1c;max-width:24ch}
.card-presentation [data-close]{flex:none;background:#764c1c;border-color:#764c1c;color:#fffdf8;font-weight:600}
.card-presentation [data-close]:hover:not(:disabled){background:#1c2733;border-color:#1c2733}
.card-presentation [data-close]:focus-visible{outline-color:#1c2733}
@media(max-width:560px){.card-presentation .presentation-identity{flex-basis:100%;gap:8px 16px}.card-presentation .presentation-context{margin-left:auto}.card-presentation>header>[data-close]{margin-left:auto}.card-presentation header:has(.presentation-identity) .presentation-actions{justify-content:flex-end}}

/* Sender context is interface text above the existing stage in both modal and
   inline views. The stage keeps its own card/activity layout unchanged. */
/* Keep width-derived paper geometry when names or controls need more height. */
.card-presentation:not(.card-presentation-inline){grid-template-rows:auto minmax(min-content,1fr) auto;overflow-y:auto}
.card-presentation.card-presentation-inline{grid-template-rows:minmax(min-content,1fr) auto;overflow-y:auto}
.card-presentation .presentation-body{display:grid;grid-template-rows:auto minmax(calc(min(86vw,420px) * .68 + 144px),1fr);min-width:0;min-height:min-content}
.card-presentation .presentation-sender{grid-row:1;margin:0;padding:8px 20px 4px;font:500 16px/1.5 var(--font-body,"Hanken Grotesk",system-ui,sans-serif);color:#1c2733;text-align:center;overflow-wrap:anywhere}
.card-presentation .presentation-body>.presentation-stage{grid-row:2;min-height:0}

/* Keep the return action beside the compact brand on a short phone viewport.
   The label and quill stay intact while the paper gets the remaining height. */
@media(max-width:560px){
 .card-presentation:not(.card-presentation-inline)>header:has(>.presentation-identity){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:calc(12px + env(safe-area-inset-top)) 16px 12px}
 .card-presentation:not(.card-presentation-inline)>header>.presentation-identity{flex-basis:auto;gap:6px;min-width:0}
 .card-presentation:not(.card-presentation-inline)>header>.presentation-identity .keepze-brand{grid-template-columns:28px max-content;column-gap:7px;min-height:40px}
 .card-presentation:not(.card-presentation-inline)>header>.presentation-identity .keepze-feather{width:28px;height:36px}
 .card-presentation:not(.card-presentation-inline)>header>.presentation-identity .keepze-name{font-size:28px}
 .card-presentation:not(.card-presentation-inline)>header>.presentation-identity .keepze-tagline{font-size:10px}
 .card-presentation:not(.card-presentation-inline)>header>.presentation-identity .presentation-context{flex-basis:100%;margin:0;font-size:14px}
 .card-presentation:not(.card-presentation-inline)>header>[data-close]{max-width:128px;margin:0;padding:10px 12px}
 .card-presentation[data-reading-mode=message] .presentation-card>.floating-card-surface{transform-origin:50% 0}
}

/* Inline organizer previews use the page scroll, not a second scrollport that
   can hide sender context when a leaf or a nearby Edit action receives focus. */
.card-presentation.card-presentation-inline{height:auto;min-height:clamp(500px,75vh,850px);overflow:visible}
@media(max-width:560px){.card-presentation.card-presentation-inline{min-height:clamp(480px,72svh,700px)}}
