/* Members' additions (19 November 2026): terms step, branding set-up, photo uploads, photo credit, the guide page.
   Loaded after app.css and brand.css. Little Emperors brand: white, stone, black, terracotta #B96A55, square corners. */

/* ---------- Full-screen steps (terms and conditions, first set-up) ---------- */
.gate { position: fixed; inset: 0; z-index: 70; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; background: #ffffff; color: #000000; outline: none;
  padding: calc(18px + var(--safe-t)) 16px calc(28px + var(--safe-b)); animation: fade .2s ease both; }
.gate-in { width: 100%; max-width: 920px; margin: 0 auto; display: grid; gap: 18px; }
.gate-mark { width: min(220px, 60%); aspect-ratio: 1260 / 292; margin: 4px auto 6px; background: #000000;
  -webkit-mask: url(/brand/wordmark.svg) center / contain no-repeat; mask: url(/brand/wordmark.svg) center / contain no-repeat; }
.gate-body { display: grid; gap: 14px; min-width: 0; }
.gate-body > h1 { font-size: clamp(30px, 6vw, 46px); }
.gate-body > .lede { margin: 0; color: #3a3a3a; font-size: 16.5px; max-width: 64ch; }
.gate-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.gate-actions .btn { min-height: 48px; }

/* Terms */
.terms-box { max-height: min(46dvh, 460px); overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px; background: #F3F3F1; border: 1px solid #D8D8CC; border-radius: 0; }
.terms-box:focus-visible { outline: 2px solid #000000; outline-offset: 2px; }
.terms-text { display: grid; gap: 8px; }
.terms-text h3 { font-size: 20px; margin-top: 8px; }
.terms-text h3:first-child { margin-top: 0; }
.terms-text p { margin: 0; font-size: 15px; line-height: 1.55; color: #1c1c1c; overflow-wrap: anywhere; }
.terms-ask { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid #D8D8CC; background: #ffffff; border-radius: 0; }
.terms-ask-head { display: flex; align-items: center; gap: 10px; }
.terms-ask-head .emblem.small { width: 34px; height: 34px; flex: none; }
.terms-log { display: grid; gap: 8px; max-height: 180px; overflow-y: auto; }
.terms-log p { margin: 0; padding: 9px 12px; font-size: 15px; max-width: 46ch; overflow-wrap: anywhere; border-radius: 0; }
.terms-said { background: #ECEBE6; justify-self: start; }
.terms-mine { background: #000000; color: #ffffff; justify-self: end; }
.terms-answer { display: flex; gap: 8px; }
.terms-answer .input { flex: 1; min-width: 0; border-radius: 0; }
.terms-answer .btn { flex: none; }

/* ---------- Your branding ---------- */
.brand-form { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.brand-preview { display: grid; gap: 8px; position: sticky; top: 0; }
.brand-canvas { width: 100%; height: auto; display: block; background: #ECEBE6; border-radius: 0; }
.brand-form .card-box { border-radius: 0; min-width: 0; }
.brand-switch { flex-wrap: nowrap; align-items: flex-start; }
.font-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.font-option { position: relative; display: grid; gap: 4px; padding: 12px 12px 10px; border: 1px solid #D8D8CC; background: #ffffff; cursor: pointer; min-width: 0; }
.font-option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.font-option:has(input:checked) { border-color: #000000; box-shadow: inset 0 0 0 1px #000000; }
.font-option:has(input:focus-visible) { outline: 2px solid #B96A55; outline-offset: 2px; }
.font-sample { font-size: 21px; line-height: 1.15; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Add your photographs ---------- */
.up-combo { display: block; }
.up-combo input { width: 100%; max-width: none; min-height: 46px; border-radius: 0; padding: 11px 14px; font-size: 16px; }
.up-combo .combo-list { left: 0; right: auto; width: 100%; border-radius: 0; }
.up-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.up-thumbs:empty { display: none; }
.up-thumb { position: relative; width: 84px; height: 84px; background: #ECEBE6; }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-thumb .icon-btn { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; background: #ffffff; color: #000000; border: 1px solid #D8D8CC; border-radius: 0; }
.up-thumb .icon-btn svg { width: 14px; height: 14px; }
.up-tags { max-height: 150px; overflow-y: auto; }
.up-confirm { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.up-confirm input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: #000000; }
.up-send { justify-content: flex-end; }
.up-row { border-radius: 0; }
.up-pic { width: 64px; height: 64px; object-fit: cover; flex: none; background: #ECEBE6; }
.up-status { font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px; border: 1px solid currentColor; white-space: nowrap; }
.up-status.wait { color: #6f6d66; }
.up-status.yes { color: #2f7a4f; }
.up-status.no { color: #B96A55; }

/* ---------- Photo credit and footer ---------- */
.photo-credit { margin-top: 4px; font-size: 11.5px; color: #6f6d66; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid[data-size="s"] .photo-credit { display: none; }
.foot-copy { flex-basis: 100%; order: 3; }
.foot .linkbtn { font-size: 13px; color: var(--ink-3) !important; }

/* Welcome page: a note that is not an error. */
.note-text { margin: 0 0 16px; padding: 12px 14px; background: #F3F3F1; border-left: 3px solid #B96A55; font-size: 14.5px; color: #1c1c1c; max-width: 44ch; text-align: left; }

/* The account menu has more entries now: it scrolls rather than leaving the screen. */
.menu { max-height: calc(100dvh - 150px - var(--safe-b)); overflow-y: auto; overscroll-behavior: contain; }

/* ---------- Guide page ---------- */
.guide-main { max-width: 760px; width: 100%; margin: 0 auto; padding: 18px 20px 56px; min-width: 0; }
.guide-main h1 { font-size: clamp(34px, 7vw, 52px); margin: 12px 0 12px; }
.guide-main .lede { color: #3a3a3a; font-size: 17px; margin: 0 0 18px; max-width: 58ch; }
.guide-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.guide-nav { display: grid; gap: 2px; margin: 0 0 28px; padding: 14px 16px; background: #F3F3F1; border: 1px solid #D8D8CC; list-style: none; counter-reset: gnav; }
.guide-nav li { counter-increment: gnav; }
.guide-nav a { display: flex; gap: 10px; align-items: baseline; min-height: 40px; padding: 8px 4px; text-decoration: none; font-size: 15.5px; border-bottom: 1px solid #e4e2da; }
.guide-nav li:last-child a { border-bottom: 0; }
.guide-nav a::before { content: counter(gnav); font: 600 13px/1 var(--sans); color: #B96A55; min-width: 18px; }
.guide-section { padding: 24px 0 8px; border-top: 1px solid #D8D8CC; scroll-margin-top: 84px; }
.guide-section > .eyebrow { color: #B96A55; }
.guide-section h2 { font-size: clamp(26px, 5vw, 34px); margin: 8px 0 10px; }
.guide-section p { margin: 0 0 12px; font-size: 16px; line-height: 1.6; }
.guide-steps { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: gstep; display: grid; gap: 10px; }
.guide-steps > li { counter-increment: gstep; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 16px; line-height: 1.55; }
.guide-steps > li::before { content: counter(gstep); width: 34px; height: 34px; display: grid; place-items: center; background: #000000; color: #ffffff; font: 600 14px/1 var(--sans); }
.guide-steps b { font-weight: 700; }
.guide-note { padding: 12px 14px; background: #F3F3F1; border-left: 3px solid #B96A55; font-size: 15px; line-height: 1.55; margin: 0 0 14px; }
.guide-note p:last-child { margin-bottom: 0; }
.guide-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid #D8D8CC; font-size: 13px; color: #6f6d66; }

@media (max-width: 760px) {
  .gate { padding-left: 14px; padding-right: 14px; }
  .gate-actions .btn { flex: 1 1 140px; }
  .brand-form { grid-template-columns: minmax(0, 1fr); }
  .brand-preview { position: static; max-width: 260px; margin: 0 auto; width: 100%; }
  .font-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .terms-box { max-height: 42dvh; }
  .up-row .grow { min-width: 120px; }
  /* Full width on a phone, so the floating guide never hides the words on the button. */
  .up-send .btn { flex: 1; }
  /* Standalone pages: the wordmark is the drawn mark only (the hidden text must not come back at phone width). */
  .masthead.page-top .wordmark { font-size: 0; letter-spacing: 0; }
  .masthead.page-top .wordmark::before { width: 150px; margin: 0 0 0 auto; }
}

@media print {
  .masthead, .guide-tools, .back-bottom, .tabbar, .toasts { display: none !important; }
  body { background: #ffffff !important; }
  .welcome { display: block; min-height: 0; }
  .guide-main { max-width: none; padding: 0; }
  .guide-section { break-inside: avoid; }
  .guide-nav { break-after: page; }
  a { text-decoration: none; }
}
