/* Dos ambientes; una misma experiencia móvil. */
.ja-page.jm-page {
  --accent: #A54732;
  --line: #D8CCBA;
  --soft-paper: #EFE6D7;
  padding: 0 0 calc(var(--upload-height, 108px) + 24px);
  overflow-wrap: anywhere;
}
.jm-page [hidden] { display: none !important; }
.jm-page a, .jm-page select, .jm-page summary { -webkit-tap-highlight-color: transparent; }
.jm-page a:focus-visible, .jm-page select:focus-visible, .jm-page summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 4px;
}
.jm-page svg { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.jm-container { width: min(100% - 36px, 1000px); margin-inline: auto; }
.jm-nav { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jm-page .jm-back { display: inline-flex; align-items: center; gap: 7px; min-height: 48px; font-size: 14px; }
.jm-page .jm-signature { font: 400 28px/1.1 var(--font-script); white-space: nowrap; }
.jm-hero { position: relative; display: grid; grid-template-columns: 1fr .8fr; align-items: center; gap: 10px; padding: 10px 0 26px; }
.jm-page .jm-eyebrow { font-size: 10px; font-weight: 500; line-height: 1.5; text-transform: uppercase; letter-spacing: .15em; color: var(--accent); }
.jm-page .jm-title { margin-top: 9px; font: 700 clamp(39px, 10.8vw, 58px)/.98 var(--font-serif); letter-spacing: -.035em; }
.jm-page .jm-title em { display: block; color: var(--accent); font-weight: 600; }
.jm-ink-word { position: relative; display: inline-block; }
.jm-page .jm-ink { display: none; }
.jm-page.jm-elegante .jm-ink { display: block; position: absolute; left: 0; bottom: -.19em; width: 100%; height: .28em; pointer-events: none; color: var(--accent); stroke-width: 2.4; opacity: .8; }
.jm-elegante .jm-ink path { stroke-dasharray: 1; stroke-dashoffset: 0; animation: jm-write-ink .65s cubic-bezier(.35,.05,.3,1) .4s backwards; }
.jm-page .jm-hero-note { margin-top: 12px; font-size: 16px; line-height: 1.4; color: var(--ink-soft); }
.jm-page .jm-photo { position: relative; padding: 6px 6px 25px; background: var(--paper); border: 1px solid var(--line); transform: rotate(3deg); box-shadow: 0 8px 20px #49332012; }
.jm-page .jm-photo img { width: 100%; height: 166px; object-fit: cover; object-position: 51% 30%; }
.jm-photo figcaption { position: absolute; bottom: 6px; width: calc(100% - 12px); text-align: center; font-size: 9px; letter-spacing: .15em; color: var(--ink-soft); }
.jm-elegante .jm-photo.is-landing { animation: jm-photo-land .85s cubic-bezier(.2,.65,.3,1) both; }
.jm-equation { display: grid; grid-template-columns: 1fr 16px 1fr 16px 1fr; align-items: center; gap: 4px; padding: 16px 9px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.jm-equation > div { min-width: 0; }
.jm-equation strong { display: block; font: 700 44px/.95 var(--font-serif); }
.jm-equation span { display: block; margin-top: 6px; font-size: 16px; line-height: 1.2; }
.jm-equation b { font-size: 19px; font-weight: 400; color: var(--ink-soft); }
.jm-total { color: var(--accent); }
.jm-prize { position: relative; margin-top: 18px; padding: 19px 20px 21px; border-radius: 10px; background: #30251F; color: var(--paper); text-align: center; }
.jm-prize::before { content: ""; position: absolute; inset: 6px; border: 1px solid #B98C6D; border-radius: 5px; opacity: .55; pointer-events: none; }
.jm-page .jm-prize p { position: relative; margin: 0 auto; max-width: 36ch; font-size: 16px; line-height: 1.5; }
.jm-prize strong { display: block; margin-bottom: 3px; color: #EBC2A4; font: 700 29px/1.05 var(--font-serif); }
.jm-prize em { display: block; margin-top: 3px; font: italic 600 clamp(29px, 8vw, 36px)/1.05 var(--font-serif); }
.jm-page .jm-instruction { margin: 16px auto 20px; max-width: 39ch; text-align: center; font-size: 16px; color: var(--ink-soft); line-height: 1.5; }
.jm-picker { padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.jm-picker label { display: block; font-weight: 500; font-size: 17px; margin-bottom: 9px; }
.jm-select-wrap { position: relative; }
.jm-select-wrap select { appearance: none; -webkit-appearance: none; width: 100%; min-height: 52px; padding: 12px 42px 12px 14px; border-radius: 6px; border: 1px solid #AA9A86; color: var(--ink); background: var(--bg); font: 400 16px/1.5 var(--font-ui); cursor: pointer; }
.jm-select-wrap > svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--accent); }
.jm-page .jm-picker-help { margin-top: 9px; font-size: 16px; color: var(--ink-soft); }
.jm-page .jm-selected-link { display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 8px; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; font-size: 16px; }
.jm-lists { display: grid; gap: 36px; margin-top: 34px; align-items: start; }
.jm-section-heading { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 18px; }
.jm-section-number { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; font: 500 11px/1 var(--font-ui); margin-top: 4px; color: var(--ink-soft); }
.jm-page .jm-section-heading h2 { margin-top: 5px; font: 700 clamp(29px, 8vw, 35px)/1.02 var(--font-serif); letter-spacing: -.02em; }
.jm-section-heading h2 em { display: block; font-weight: 600; color: var(--accent); }
.jm-page .jm-mission-list { padding: 0; margin: 0; list-style: none; }
.jm-mission-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 17px 0; border-top: 1px solid var(--line); }
.jm-mission-number { font: 600 19px/1.45 var(--font-serif); color: var(--accent); font-variant-numeric: lining-nums tabular-nums; }
.jm-page .jm-mission-list p { font-size: 16px; line-height: 1.6; }
.jm-page .jm-list-note { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 16px; color: var(--ink-soft); }
.jm-dossier { position: relative; padding-top: 25px; scroll-margin-top: 18px; min-width: 0; }
.jm-dossier-tab { position: absolute; top: 0; left: 0; background: var(--soft-paper); border: 1px solid #CBB89E; border-bottom: none; padding: 8px 20px 12px; border-radius: 10px 16px 0 0; font-size: 10px; text-transform: uppercase; letter-spacing: .17em; }
.jm-dossier-inner { position: relative; isolation: isolate; overflow: hidden; padding: 23px 18px 10px; background: var(--soft-paper); border: 1px solid #CBB89E; border-radius: 0 12px 12px 12px; box-shadow: 0 8px 22px #58402808; }
.jm-dossier .jm-section-heading { position: relative; z-index: 2; }
.jm-dossier-unselected { text-align: center; padding: 20px 0; }
.jm-envelope { color: #9A7154; margin: 0 auto 18px; }
.jm-envelope circle { fill: var(--soft-paper); }
.jm-page .jm-dossier-unselected p { font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.jm-page .jm-text-link { display: inline-flex; gap: 8px; align-items: center; min-height: 48px; color: var(--accent); font-size: 16px; text-decoration: underline; text-underline-offset: 4px; }
.jm-page .jm-stamp { display: inline-block; max-width: 100%; margin: 2px 0 20px; padding: 8px 12px; color: var(--accent); border: 1px solid currentColor; outline: 1px solid currentColor; outline-offset: -4px; font-size: 16px; font-weight: 500; line-height: 1.4; transform: rotate(-1.5deg); }
.jm-dossier-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; border-top: 1px solid var(--line); padding: 8px 0 4px; }
.jm-flap { pointer-events: none; position: absolute; inset: 0; z-index: 1; visibility: hidden; }
.jm-flap span { position: absolute; inset: 0; opacity: 0; background: linear-gradient(150deg, #D6C6AC, var(--soft-paper)); border-bottom: 1px solid #C0A98B; transform-origin: top; }
.jm-flap span + span { display: none; }
.jm-dossier.is-opening .jm-flap { visibility: visible; }
.jm-dossier.is-opening .jm-flap span { animation: jm-open-paper .6s cubic-bezier(.2,.7,.2,1) both; }
.jm-cinematografica .jm-dossier.is-opening .jm-table-list li { animation: jm-reveal .4s ease backwards; animation-delay: calc(var(--mission-index, 0) * 55ms + 80ms); }
.jm-elegante .jm-mission-list li.is-arriving { animation: jm-mission-arrive .5s cubic-bezier(.2,.7,.2,1) both; }
.jm-dossier.is-opening .jm-stamp { animation: jm-stamp .4s ease both; }
.jm-page .jm-footer { text-align: center; padding: 38px 0 20px; color: var(--ink-soft); }
.jm-page .jm-footer p { font-size: 16px; margin-bottom: 8px; }
.jm-footer .jm-signature { color: var(--ink); font-size: 34px; }
.jm-upload { position: fixed; z-index: 20; inset: auto 0 0; padding: 10px max(14px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); background: #FBF8F2; border-top: 1px solid var(--line); box-shadow: 0 -5px 22px #4933200A; }
.jm-upload-inner { max-width: 520px; margin-inline: auto; }
.jm-page .jm-upload-button { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 13px 12px; min-height: 52px; background: var(--accent); color: var(--paper); border-radius: 6px; font-size: 16px; font-weight: 500; line-height: 1.35; transition: background .2s ease, transform .2s ease; }
.jm-upload-button span { text-align: center; }
.jm-page .jm-upload p { margin-top: 5px; font-size: 12px; text-align: center; color: var(--ink-soft); }
.jm-upload-button:active { transform: scale(.985); }
.jm-page .jm-noscript { margin-top: 28px; }
.jm-noscript details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.jm-noscript summary { min-height: 48px; padding: 12px 0; cursor: pointer; }
.jm-page .jm-skip { position: fixed; left: 12px; top: 8px; z-index: 30; background: var(--paper); color: var(--ink); padding: 12px; transform: translateY(-200%); }
.jm-skip:focus { transform: none; }
.jm-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#mesa, #comunes { scroll-margin-top: 18px; }
.jm-page #mesa-title:focus { outline: none; }
.jm-hero-copy, .jm-equation { animation: jm-reveal .6s ease backwards; }
.jm-equation { animation-delay: .1s; }
@keyframes jm-reveal { from { opacity: .15; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes jm-open-paper { 0% { opacity: .85; transform: perspective(700px) rotateX(0); } 70% { opacity: .3; } 100% { opacity: 0; transform: perspective(700px) rotateX(-100deg); } }
@keyframes jm-stamp { from { opacity: .3; transform: scale(1.08) rotate(-7deg); } to { opacity: 1; transform: scale(1) rotate(-1.5deg); } }
@keyframes jm-photo-land {
  0% { opacity: .35; transform: translateY(-18px) rotate(-4deg) scale(1.025); }
  65% { opacity: 1; transform: translateY(2px) rotate(4.4deg) scale(1); }
  84% { transform: translateY(0) rotate(2.5deg); }
  100% { opacity: 1; transform: translateY(0) rotate(3deg); }
}
@keyframes jm-mission-arrive { from { opacity: .3; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes jm-write-ink { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Cine: misma paleta de boda, luz cálida y contraste fotográfico. */
.jm-cinematografica .jm-top { position: relative; background: #211D1A; color: var(--paper); }
.jm-cinematografica .jm-nav { position: relative; z-index: 3; border-bottom: 1px solid #FBF8F22B; }
.jm-cinematografica .jm-hero { isolation: isolate; min-height: 236px; display: flex; align-items: flex-end; padding: 26px 0 30px; }
.jm-cinematografica .jm-hero-copy { position: relative; z-index: 2; width: 74%; }
.jm-cinematografica .jm-title { font-size: clamp(43px, 12vw, 64px); color: var(--paper); text-shadow: 0 2px 14px #211D1A80; }
.jm-cinematografica .jm-title em { color: #F0B49B; }
.jm-cinematografica .jm-hero .jm-eyebrow { color: #EABD9F; }
.jm-cinematografica .jm-hero-note { color: #F4EADC; }
.jm-page.jm-cinematografica .jm-photo { position: absolute; z-index: -1; inset: 0 -18px 0 14%; padding: 0; border: none; background: #211D1A; box-shadow: none; transform: none; overflow: hidden; }
.jm-cinematografica .jm-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 29%; animation: jm-film .9s ease both; }
.jm-cinematografica .jm-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #211D1A 0%, #211D1A99 28%, #211D1A10 70%), linear-gradient(0deg, #211D1A 0%, #211D1A1A 70%); }
.jm-cinematografica .jm-photo::before { content: ""; position: absolute; z-index: 1; inset: -30%; opacity: 0; background: linear-gradient(110deg, transparent 42%, #F6D9AD33 50%, transparent 58%); animation: jm-light .9s ease .15s both; pointer-events: none; }
.jm-cinematografica .jm-photo figcaption { display: none; }
.jm-cinematografica .jm-equation { border-top: 0; padding-top: 20px; }
.jm-cinematografica .jm-picker { border-top: 3px solid var(--accent); }
.jm-cinematografica .jm-dossier-tab { background: #302923; color: #F5D6C3; border-color: #302923; }
.jm-cinematografica .jm-dossier-inner { border-top: 3px solid #302923; }
.jm-cinematografica .jm-flap span { right: 50%; background: #302923; border-right: 1px solid #AD8570; transform-origin: left; }
.jm-cinematografica .jm-flap span + span { display: block; left: 50%; right: 0; border-right: 0; border-left: 1px solid #AD8570; }
.jm-cinematografica .is-opening .jm-flap span { animation: jm-panel-left .9s cubic-bezier(.2,.7,.2,1) both; }
.jm-cinematografica .is-opening .jm-flap span + span { animation-name: jm-panel-right; }
.jm-cinematografica .is-opening .jm-table-list li { animation-duration: .5s; animation-delay: calc(var(--mission-index, 0) * 70ms + 120ms); }
@keyframes jm-film { from { opacity: .3; transform: scale(1.045); } to { opacity: 1; transform: scale(1); } }
@keyframes jm-light { 0% { opacity: 0; transform: translateX(-65%); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateX(65%); } }
@keyframes jm-panel-left { from { opacity: .9; transform: translateX(0); } to { opacity: 0; transform: translateX(-102%); } }
@keyframes jm-panel-right { from { opacity: .9; transform: translateX(0); } to { opacity: 0; transform: translateX(102%); } }
@media (hover: hover) {
  .jm-page .jm-upload-button:hover { background: #843725; }
  .jm-page .jm-back:hover, .jm-page .jm-text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
}
@media (max-width: 350px) {
  .jm-nav { gap: 6px; }
  .jm-page .jm-nav .jm-signature { font-size: 24px; }
  .jm-page .jm-back { font-size: 13px; gap: 4px; }
  .jm-page .jm-photo img { height: 152px; }
  .jm-page.jm-cinematografica .jm-photo img { height: 100%; }
  .jm-page .jm-title { font-size: 37px; }
  .jm-page .jm-hero-note br { display: none; }
  .jm-page .jm-upload-button { gap: 6px; padding-inline: 9px; }
  .jm-upload-button > svg { width: 18px; }
  .jm-dossier-inner { padding-inline: 14px; }
}
@media (min-width: 720px) {
  .jm-container { width: min(100% - 64px, 1000px); }
  .jm-nav { min-height: 76px; }
  .jm-hero { max-width: 700px; margin: 10px auto 24px; grid-template-columns: 1fr 230px; gap: 50px; }
  .jm-page .jm-title { font-size: 76px; }
  .jm-page .jm-photo img { height: 210px; }
  .jm-page .jm-hero-note { font-size: 18px; }
  .jm-brief { max-width: 640px; margin-inline: auto; }
  .jm-equation { padding-block: 22px; }
  .jm-equation strong { font-size: 52px; }
  .jm-picker { max-width: 500px; margin-inline: auto; }
  .jm-lists { grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 46px; }
  .jm-dossier { margin-top: -25px; }
  .jm-dossier-inner { padding-inline: 24px; }
  .jm-cinematografica .jm-hero { margin: 0 auto; max-width: none; min-height: 310px; }
  .jm-cinematografica .jm-hero-copy { width: 60%; }
  .jm-page.jm-cinematografica .jm-photo { inset: 0 0 0 28%; }
  .jm-cinematografica .jm-photo img { height: 100%; object-position: 50% 30%; }
  .jm-upload { position: static; margin-top: 20px; }
  .ja-page.jm-page { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .jm-page *, .jm-page *::before, .jm-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .jm-page .jm-flap { display: none; }
}
