/* کارت تولد «روزگار»: روزنامه‌ی قدیمی روز تولد + آلبوم زندگی. همه‌ی نقش‌ها CSS و SVG است. */
@font-face { font-family: "RZ Sans"; src: url("../fonts/vazirmatn-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "RZ Sans"; src: url("../fonts/vazirmatn-arabic-700-normal.woff2") format("woff2"); font-weight: 600 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "RZ Sans"; src: url("../fonts/vazirmatn-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "RZ Sans"; src: url("../fonts/vazirmatn-latin-700-normal.woff2") format("woff2"); font-weight: 600 800; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "RZ Head"; src: url("../fonts/lalezar-arabic-400-normal.woff2") format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "RZ Head"; src: url("../fonts/lalezar-latin-400-normal.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+2010-2025, U+2027-206F; }
@font-face { font-family: "RZ Serif"; src: url("../fonts/amiri-400.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "RZ Nastaliq"; src: url("../fonts/Miremad.woff2") format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "RZ Script"; src: url("../fonts/great-vibes-400.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF; }

/* ---------- رنگ‌بندی‌ها ---------- */
:root {
  --table: #5d2f38; --table2: #3e1d25;
  --paper: #fbf4ea; --paper2: #f3e6d4; --ink: #2c1f22; --muted: #6c5658; --hair: rgba(44, 31, 34, .18);
  --accent: #9c5561; --accent-ink: #fff; --gold: #b48a4a; --soft: #f1dcd8;
  --ok: #3f7d4e; --no: #a2423f;
  --sans: "RZ Sans", Tahoma, "Segoe UI", sans-serif;
  --head: "RZ Head", "RZ Sans", Tahoma, sans-serif;
  --serif: "RZ Serif", "RZ Sans", Georgia, serif;
  --nast: "RZ Nastaliq", "RZ Serif", serif;
  --fs: 19px;
}
.th-navy {
  --table: #1d2740; --table2: #121a2c;
  --paper: #f7f1e5; --paper2: #ece2cf; --ink: #1c2333; --muted: #57607a; --hair: rgba(28, 35, 51, .18);
  --accent: #24324f; --gold: #9a6a40; --soft: #e5ddcd;
}
.th-sepia {
  --table: #4a3a2c; --table2: #2e241a;
  --paper: #f0e4c9; --paper2: #e4d3ae; --ink: #2b2117; --muted: #6a5640; --hair: rgba(43, 33, 23, .22);
  --accent: #6b4a2e; --gold: #9c7c4c; --soft: #e6d6b4;
}
.sz-large { --fs: 21px; }
.sz-xl { --fs: 23.5px; }
html[lang="en"] { --head: Georgia, "Times New Roman", serif; --nast: "RZ Script", Georgia, serif; }

* { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--table2); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 400 1rem/1.95 var(--sans);
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--table) 85%, #fff) 0%, var(--table) 45%, var(--table2) 100%) fixed;
  padding: calc(64px + env(safe-area-inset-top)) 10px 30px;
  overflow-x: hidden;
}
body.locked { overflow: hidden; height: 100vh; }
img { max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.tone-bw { filter: grayscale(1) contrast(1.05); }
.tone-sepia { filter: sepia(.85) saturate(.8) contrast(1.02) brightness(1.02); }
.pv-bar { position: fixed; z-index: 90; bottom: 10px; left: 50%; transform: translateX(-50%); background: #000c; color: #fff; font-size: 13px; font-weight: 700; border-radius: 99px; padding: 6px 16px; white-space: nowrap; pointer-events: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- نوار ابزار بالا: متن درشت، زبان، آهنگ ---------- */
.tools { position: fixed; z-index: 60; inset: 0 0 auto; display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; pointer-events: none; }
.tools > *, .tools .tool { pointer-events: auto; }
.tool { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 6px 14px; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 999px; background: rgba(0, 0, 0, .45); color: #fff; font: 700 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tool svg { width: 20px; height: 20px; }
.tool .aa { font: 700 18px/1 Georgia, serif; } .tool .aa b { font-size: 13px; }
.tool.music.on { background: var(--gold); border-color: var(--gold); }
.tool.music.on svg { animation: rz-bob 1.2s ease-in-out infinite; }
.langs { display: flex; gap: 6px; } .langs [aria-current] { background: #fff; color: #000; }
@keyframes rz-bob { 50% { transform: translateY(-2px) rotate(-6deg); } }
.locked .tools { opacity: 0; pointer-events: none; }
.locked .tools .music { opacity: 1; }

/* ---------- کاغذ روزنامه ---------- */
.paper {
  position: relative; max-width: 680px; margin: 0 auto; padding: 22px 18px 26px;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .27 0 0 0 0 .18 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(90deg, rgba(120, 85, 40, .08), transparent 6%, transparent 94%, rgba(120, 85, 40, .08));
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), inset 0 0 50px rgba(120, 85, 40, .10);
  border-radius: 3px;
}
.paper::before { content: ""; position: absolute; inset: 7px; border: 1px solid var(--hair); pointer-events: none; }
.corner { position: absolute; top: 10px; width: 64px; height: 64px; color: var(--gold); opacity: .8; pointer-events: none; }
.corner.tl { inset-inline-start: 10px; transform: scaleX(-1); } .corner.tr { inset-inline-end: 10px; }

.surprise { position: relative; margin: 6px 4px 14px; padding: 10px 14px; border: 2px dashed var(--no); color: var(--no); background: color-mix(in srgb, var(--no) 8%, transparent); font-weight: 700; text-align: center; border-radius: 6px; transform: rotate(-.6deg); }

/* سرتیتر */
.mast { position: relative; text-align: center; padding: 6px 0 10px; border-bottom: 4px double var(--ink); }
.mast-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 0 56px 6px; font-size: .74rem; font-weight: 700; color: var(--muted); }
.mast-meta span:empty { display: none; }
.mast-name { margin: 0; padding-top: 14px; font: 400 clamp(3.4rem, 17vw, 5.6rem)/1.25 var(--nast); color: var(--ink); letter-spacing: 0; }
html[lang="en"] .mast-name { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: clamp(2.2rem, 10vw, 3.6rem); line-height: 1.2; text-transform: uppercase; letter-spacing: .02em; }
.mast-motto { margin: 2px 0 0; padding-top: 6px; border-top: 1px solid var(--ink); font: 400 1rem/1.7 var(--serif); color: var(--muted); }
.sub-label { position: absolute; inset-inline-end: -6px; bottom: -22px; z-index: 2; display: grid; padding: 6px 14px; background: #fffdf8; color: var(--ink); border: 1px solid var(--hair); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); transform: rotate(-3deg); text-align: start; line-height: 1.4; }
.sub-label small { font-size: .7rem; color: var(--muted); } .sub-label b { font-size: 1.05rem; color: var(--accent); }

/* صفحه‌ی اول */
.front { position: relative; padding: 26px 0 16px; text-align: center; border-bottom: 1px solid var(--ink); }
.kicker { margin: 0 0 8px; } .kicker span { display: inline-block; padding: 2px 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .85rem; }
.headline { margin: 0; font: 400 clamp(1.9rem, 8.4vw, 2.9rem)/1.45 var(--head); color: var(--ink); text-wrap: balance; }
html[lang="en"] .headline { font-weight: 700; line-height: 1.2; }
.dateline { margin: 6px 0 12px; font: 400 1.05rem var(--serif); color: var(--muted); }
.front-photo { margin: 6px auto 0; max-width: 460px; }
.front-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--ink); padding: 5px; background: #fff; }
.front-photo figcaption { margin-top: 4px; font-size: .78rem; color: var(--muted); text-align: start; }
.engraving { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border: 1px solid var(--ink); padding: 5px; color: var(--accent); overflow: hidden;
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent) 10%, transparent) 0 2px, transparent 2px 7px), var(--paper2); }
.engraving svg { width: 52%; height: 70%; color: var(--accent); }
.engraving svg { margin-bottom: 14%; }
.engraving span { position: absolute; bottom: 6px; inset-inline: 0; font: 400 1.8rem/1.2 var(--nast); color: var(--ink); }
.engraving b { position: absolute; top: 8px; inset-inline-start: 14px; font: 400 2.2rem/1 var(--head); color: var(--gold); }
.deck { margin: 12px auto 0; max-width: 520px; font: 400 1.12rem/1.9 var(--serif); color: var(--ink); }
.front-photo { position: relative; }
.age-stamp { position: absolute; z-index: 2; inset-inline-start: -8px; top: -14px; display: grid; place-content: center; width: 86px; height: 86px; border-radius: 50%; border: 3px double var(--no); color: var(--no); transform: rotate(-12deg); text-align: center; line-height: 1; background: color-mix(in srgb, var(--paper) 70%, transparent); }
.age-stamp b { font: 400 2.2rem/1 var(--head); } .age-stamp small { font-size: .75rem; font-weight: 700; }

/* بخش‌ها */
.sec { position: relative; padding: 22px 2px 24px; border-bottom: 1px solid var(--ink); }
.sec:last-of-type { border-bottom: 0; }
.folio { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .72rem; color: var(--muted); }
.folio::after { content: ""; flex: 1; border-top: 1px solid var(--hair); }
.folio span { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border: 1px solid var(--hair); border-radius: 50%; }
.folio b { font-weight: 700; }
.h { margin: 0 0 6px; font: 400 clamp(1.6rem, 6.6vw, 2.15rem)/1.4 var(--head); color: var(--ink); text-align: center; }
html[lang="en"] .h { font-weight: 700; }
.h.boxed { display: block; width: fit-content; margin-inline: auto; padding: 0 18px; border-block: 3px double var(--ink); }
.sub { margin: 0 0 14px; text-align: center; color: var(--muted); font: 400 1.02rem/1.8 var(--serif); }
.hint { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: .85rem; }

/* سرمقاله */
.lead .drop { margin: 6px 0 0; font: 400 1.1rem/2 var(--serif); text-align: justify; }
.lead .drop::first-letter { float: inline-start; margin-inline-end: 8px; font: 400 3.6em/1 var(--head); color: var(--accent); }
html[lang="en"] .lead .drop::first-letter { font-family: Georgia, serif; font-weight: 700; }
.lead-when { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 0; padding: 12px 14px; border: 1px solid var(--ink); background: color-mix(in srgb, var(--soft) 60%, transparent); font-weight: 700; font-size: 1.05rem; text-align: center; }
.lead-when svg { flex: 0 0 26px; height: 26px; color: var(--accent); }
.sign { margin: 14px 0 0; padding-inline-end: 12px; font: 400 1.5rem/1.9 var(--nast); color: var(--accent); text-align: end; }

/* ستون سال تولد */
.cols { display: grid; gap: 0; }
.news { padding: 10px 0; border-top: 1px solid var(--hair); }
.news:first-child { border-top: 0; }
.news h3 { margin: 0 0 4px; font: 400 1.3rem/1.5 var(--head); color: var(--accent); }
html[lang="en"] .news h3 { font-family: Georgia, serif; font-weight: 700; }
.news p { margin: 0; font: 400 1.04rem/1.95 var(--serif); text-align: justify; }
@media (min-width: 620px) { .cols { grid-template-columns: 1fr 1fr; gap: 0 22px; } .news:nth-child(2) { border-top: 0; } .news { border-inline-start: 0; } .cols .news:nth-child(even) { padding-inline-start: 22px; border-inline-start: 1px solid var(--hair); } }
.facts { margin-top: 14px; padding: 12px 16px 6px; border: 2px solid var(--ink); background: color-mix(in srgb, var(--soft) 45%, transparent); }
.facts h3 { margin: 0 0 6px; font: 400 1.3rem/1.4 var(--head); text-align: center; }
.facts dl { margin: 0; display: grid; gap: 0; }
.facts dl div { display: grid; grid-template-columns: minmax(80px, auto) 1fr; gap: 12px; padding: 7px 0; border-top: 1px dotted var(--hair); }
.facts dl div:first-child { border-top: 0; }
.facts dt { font-weight: 700; color: var(--accent); } .facts dd { margin: 0; }

/* آلبوم زندگی */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; min-height: 48px; padding: 6px 18px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; font-weight: 700; font-size: .95rem; cursor: pointer; }
.tabs [aria-selected="true"] { background: var(--ink); color: var(--paper); }
.book { position: relative; perspective: 1600px; }
.leaf {
  position: relative; padding: 18px 16px 34px; border-radius: 4px 10px 10px 4px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .07), transparent 7%), #fffdf7;
  box-shadow: 0 1px 0 #e9e0cf, 0 2px 0 #fff, 0 3px 0 #e9e0cf, 0 4px 0 #fff, 0 5px 0 #e2d7c3, 0 18px 30px -18px rgba(0, 0, 0, .45);
  border: 1px solid #e6dccb; transform-origin: right center;
}
[dir="ltr"] .leaf { transform-origin: left center; border-radius: 10px 4px 4px 10px; background: linear-gradient(-90deg, rgba(0, 0, 0, .07), transparent 7%), #fffdf7; }
.leaf.turn-out { animation: rz-out .42s ease-in forwards; }
.leaf.turn-in { animation: rz-in .5s ease-out; }
.leaf.turn-out.back { animation-name: rz-out-b; } .leaf.turn-in.back { animation-name: rz-in-b; }
@keyframes rz-out { to { transform: rotateY(-75deg); opacity: 0; } }
@keyframes rz-in { from { transform: rotateY(60deg); opacity: 0; } }
@keyframes rz-out-b { to { transform: rotateY(75deg); opacity: 0; } }
@keyframes rz-in-b { from { transform: rotateY(-60deg); opacity: 0; } }
.leaf header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--hair); }
.leaf h3 { margin: 0; padding: 6px 10px 0 4px; font: 400 2rem/2 var(--nast); color: var(--accent); }
html[lang="en"] .leaf h3 { font: 400 2.2rem/1.3 var(--nast); }
.yrs { font-weight: 700; color: var(--muted); font-size: .95rem; white-space: nowrap; }
.snaps { display: grid; gap: 14px; }
.snaps.n2, .snaps.n3, .snaps.n4 { grid-template-columns: 1fr 1fr; }
.snaps.n3 .snap:first-child { grid-column: 1 / -1; }
.snaps.empty { display: grid; place-items: center; height: 150px; border: 1.5px dashed var(--hair); border-radius: 6px; color: var(--gold); opacity: .7; }
.snaps.empty svg { width: 110px; height: 110px; }
.snap { margin: 0; }
.snap .zoom { position: relative; display: block; width: 100%; padding: 8px 8px 8px; border: 0; background: #fff; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5); cursor: zoom-in; transform: rotate(-1deg); }
.snap:nth-child(even) .zoom { transform: rotate(1.2deg); }
.snap img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.snaps.n1 img { aspect-ratio: auto; max-height: 62vh; object-fit: contain; background: #f4efe6; }
.pc { position: absolute; width: 22px; height: 22px; background: linear-gradient(135deg, var(--ink) 50%, transparent 50%); opacity: .82; }
.pc.a { top: 2px; left: 2px; } .pc.b { top: 2px; right: 2px; transform: scaleX(-1); } .pc.c { bottom: 2px; left: 2px; transform: scaleY(-1); } .pc.d { bottom: 2px; right: 2px; transform: scale(-1); }
.snap figcaption { margin-top: 8px; font: 400 1.15rem/1.5 var(--nast); text-align: center; color: var(--muted); }
html[lang="en"] .snap figcaption { font: italic 400 1rem/1.5 Georgia, serif; }
.leaf-text { margin: 14px 0 0; font: 400 1.1rem/1.95 var(--serif); }
.leaf-n { position: absolute; bottom: 8px; inset-inline-start: 14px; font-size: .8rem; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
.pager .pn { font-weight: 700; color: var(--muted); white-space: nowrap; }
.pager .big-btn { flex: 1; padding-inline: 8px; white-space: nowrap; font-size: .95rem; }

/* قبل و بعد */
.ba-box { position: relative; overflow: hidden; border: 1px solid var(--ink); padding: 0; aspect-ratio: 4 / 5; max-height: 78vh; margin-inline: auto; background: #000; user-select: none; touch-action: pan-y; }
.ba-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-then { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
[dir="rtl"] .ba-then { clip-path: inset(0 0 0 calc(100% - var(--x))); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .5); pointer-events: none; }
[dir="rtl"] .ba-line { left: auto; right: var(--x); margin: 0 -1.5px 0 0; }
.ba-line i { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: #fff; color: var(--ink); font: 700 20px/1 var(--sans); font-style: normal; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
[dir="rtl"] .ba-range { direction: rtl; }
.ba-tag { position: absolute; bottom: 12px; padding: 4px 12px; background: rgba(0, 0, 0, .6); color: #fff; font-weight: 700; font-size: .9rem; border-radius: 99px; pointer-events: none; }
.ba-tag.then { inset-inline-start: 12px; } .ba-tag.now { inset-inline-end: 12px; }

/* نامه‌های خانواده */
.letters { display: grid; gap: 18px; }
.letter { position: relative; padding: 18px 18px 14px; background: #fffdf6; border: 1px solid #e8dcc6; box-shadow: 0 10px 20px -14px rgba(0, 0, 0, .5);
  background-image: repeating-linear-gradient(180deg, transparent 0 calc(2.05em - 1px), rgba(80, 110, 160, .16) calc(2.05em - 1px) 2.05em); background-position: 0 14px; }
.letter:nth-child(odd) { transform: rotate(-.6deg); } .letter:nth-child(even) { transform: rotate(.5deg); }
.letter::before { content: ""; position: absolute; top: -10px; left: 50%; width: 90px; height: 22px; margin-left: -45px; background: color-mix(in srgb, var(--gold) 35%, #fff8); transform: rotate(-2deg); opacity: .85; }
.letter p { margin: 0; font: 400 1.12rem/2.05em var(--serif); white-space: normal; }
.letter-ph { float: inline-end; width: 38%; margin: 4px 0 8px; margin-inline-start: 12px; border: 5px solid #fff; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .5); transform: rotate(2deg); }
.letter footer { clear: both; margin-top: 8px; padding-inline-end: 10px; text-align: end; }
.letter footer b { display: inline-block; padding: 0 10px; font: 400 1.7rem/1.8 var(--nast); color: var(--accent); }
.letter footer small { display: block; color: var(--muted); font-size: .85rem; }
.voice { margin-top: 10px; }
.voice.playing { background: var(--accent); color: var(--accent-ink); }

/* آگهی‌ها */
.adgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.ad { padding: 10px 12px; border: 1px solid var(--ink); background: color-mix(in srgb, var(--paper2) 50%, transparent); font-size: .95rem; line-height: 1.75; }
.ad:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.ad b { display: block; margin-bottom: 2px; padding-bottom: 2px; border-bottom: 1px solid var(--hair); font: 400 1.15rem/1.5 var(--head); text-align: center; }
.ad p { margin: 0; }
@media (max-width: 380px) { .adgrid { grid-template-columns: 1fr; } }

/* تقویم و شمارش */
.when-big { margin: 0 0 14px; text-align: center; font-weight: 700; font-size: 1.25rem; line-height: 1.7; }
.when-big span { color: var(--accent); }
.cal { max-width: 420px; margin: 0 auto; padding: 12px; border: 2px solid var(--ink); background: #fffdf7; }
.cal .m { text-align: center; font: 400 1.4rem/1.5 var(--head); margin-bottom: 6px; }
.cal .g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.cal b { font-size: .85rem; color: var(--muted); } .cal b.hol { color: var(--no); }
.cal .d { display: grid; place-items: center; aspect-ratio: 1; font-size: 1rem; border-radius: 50%; }
.cal .d.on { background: var(--accent); color: var(--accent-ink); font-weight: 800; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--gold); }
.cd { display: flex; justify-content: center; gap: 14px; margin: 18px 0 2px; }
.cd div { display: grid; place-items: center; min-width: 108px; padding: 10px 8px; border: 2px solid var(--ink); background: #fffdf7; }
.cd b { font: 400 2.8rem/1.1 var(--head); color: var(--accent); }
.cd small { font-weight: 700; color: var(--muted); }
.count-msg { text-align: center; font-weight: 700; font-size: 1.2rem; color: var(--accent); }

/* محل */
.venue-ph { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--ink); padding: 5px; background: #fff; margin-bottom: 12px; }
.info { margin: 0; display: grid; gap: 0; }
.info div { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 10px 0; border-top: 1px dotted var(--hair); }
.info div:first-child { border-top: 0; }
.info dt { font-weight: 700; color: var(--accent); } .info dd { margin: 0; font-size: 1.05rem; }
.btns { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 520px) { .btns { grid-template-columns: 1fr 1fr; } }

/* برنامه */
.tl { list-style: none; margin: 8px 0 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; top: 20px; bottom: 20px; inset-inline-start: 27px; border-inline-start: 2px dotted var(--gold); }
.tl li { position: relative; display: grid; grid-template-columns: 56px auto 1fr; align-items: center; gap: 12px; padding: 8px 0; }
.tl .ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); color: var(--accent); }
.tl .ic svg { width: 28px; height: 28px; }
.tl time { font: 400 1.35rem/1 var(--head); color: var(--accent); min-width: 3.2em; }
.tl .tt { font-weight: 700; font-size: 1.05rem; line-height: 1.6; }

/* دکمه‌های بزرگ */
.big-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; padding: 10px 20px; border: 2px solid var(--accent); border-radius: 14px; background: var(--accent); color: var(--accent-ink); font: 700 1.02rem/1.4 var(--sans); text-decoration: none; cursor: pointer; text-align: center; transition: transform .15s, filter .15s; }
.big-btn:active { transform: scale(.98); }
.big-btn.ghost { background: transparent; color: var(--accent); }
.big-btn.wide { width: 100%; }
.big-btn svg { width: 22px; height: 22px; flex: 0 0 22px; }
.big-btn:disabled { opacity: .6; }

/* تأیید حضور و یادگاری */
.rs, .wf { display: grid; gap: 14px; max-width: 520px; margin: 0 auto; }
.choice { display: grid; gap: 10px; }
.choice button { min-height: 62px; border: 2px solid var(--ink); border-radius: 14px; background: #fffdf7; font-weight: 800; font-size: 1.12rem; cursor: pointer; }
.choice .st-yes[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.choice .st-maybe[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #fff; }
.choice .st-no[aria-pressed="true"] { background: var(--no); border-color: var(--no); color: #fff; }
.choice [aria-pressed="true"]::before { content: "✓ "; }
.rs label, .wf label { display: grid; gap: 6px; font-weight: 700; }
.rs input, .rs textarea, .wf input, .wf textarea { width: 100%; min-height: 56px; padding: 12px 14px; border: 2px solid var(--hair); border-radius: 12px; background: #fffdf7; font-size: 1.05rem; font-weight: 400; }
.rs textarea, .wf textarea { min-height: 110px; line-height: 1.8; }
.rs input:focus, .rs textarea:focus, .wf input:focus, .wf textarea:focus { border-color: var(--accent); outline: none; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 2px solid var(--hair); border-radius: 12px; background: #fffdf7; font-weight: 700; }
.stepper div { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 56px; height: 56px; border: 2px solid var(--accent); border-radius: 50%; background: transparent; color: var(--accent); font: 700 1.6rem/1 var(--sans); cursor: pointer; }
.stepper b { min-width: 2ch; text-align: center; font-size: 1.6rem; }
.msg { margin: 0; min-height: 1.5em; text-align: center; font-weight: 700; color: var(--ok); }
.msg.err { color: var(--no); }
.wlist { display: grid; gap: 12px; margin-top: 18px; }
.wish { margin: 0; padding: 12px 16px; border-inline-start: 4px solid var(--gold); background: color-mix(in srgb, var(--paper2) 55%, transparent); }
.wish p { margin: 0; font: 400 1.08rem/1.9 var(--serif); }
.wish cite { display: block; margin-top: 4px; font-style: normal; font-weight: 700; color: var(--accent); text-align: end; }
.wish.new { animation: rz-rise .6s ease-out; }
@keyframes rz-rise { from { opacity: 0; transform: translateY(14px); } }

/* پایان */
.closing { text-align: center; }
.closing-ph { display: block; width: min(320px, 80%); aspect-ratio: 4 / 5; object-fit: cover; margin: 0 auto 10px; border: 8px solid #fff; box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .6); transform: rotate(-2deg); }
.closing-orn { width: 120px; height: 120px; color: var(--gold); }
.verse { margin: 4px 0; font: 400 clamp(2rem, 9vw, 2.8rem)/1.6 var(--nast); color: var(--accent); }
.closing .sign { text-align: center; }
.brand { margin: 18px 0 0; text-align: center; font-size: .8rem; color: var(--muted); }

/* نمایش بزرگ عکس */
.lb { position: fixed; inset: 0; z-index: 80; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom)); background: rgba(10, 8, 6, .94); color: #fff; }
.lb[hidden] { display: none; }
.lb-x { justify-self: end; color: #fff !important; border-color: #fff !important; }
.lb figure { margin: 0; display: grid; place-items: center; min-height: 0; }
.lb img { max-width: 100%; max-height: 72vh; object-fit: contain; border: 6px solid #fff; }
.lb figcaption { margin-top: 8px; font-size: 1.05rem; text-align: center; }
.lb-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lb-nav .big-btn { color: #fff; border-color: rgba(255, 255, 255, .7); flex: 1; }

/* ---------- ورودی‌ها ---------- */
.intro { position: fixed; inset: 0; z-index: 70; display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; align-items: center; gap: 8px; padding: calc(70px + env(safe-area-inset-top)) 16px calc(22px + env(safe-area-inset-bottom)); overflow: hidden;
  background: radial-gradient(90% 60% at 50% 35%, color-mix(in srgb, var(--table) 94%, #fff), var(--table2) 85%); transition: opacity .9s ease, visibility .9s; touch-action: none; }
.intro.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.npi-hello { margin: 0; color: #fff; font: 400 clamp(1.8rem, 8vw, 2.4rem)/1.5 var(--nast); text-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
html[lang="en"] .npi-hello { font: 400 2.2rem/1.3 var(--nast); }
.intro-hint { margin: 0; color: rgba(255, 255, 255, .9); font-weight: 700; }
.intro-hint::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-inline-end: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: rz-blink 1.4s ease-in-out infinite; vertical-align: middle; }
@keyframes rz-blink { 50% { opacity: .25; } }
.intro-go { min-width: min(320px, 88vw); background: var(--paper); color: var(--ink); border-color: var(--paper); font-size: 1.1rem; }
.npi-table { position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(92deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 11px), repeating-linear-gradient(178deg, rgba(0, 0, 0, .06) 0 1px, transparent 1px 23px); }

/* روزنامه‌ی تاشده: نیمه‌ی بالا (سرتیتر) پیداست و نیمه‌ی پایین پشتش تا شده؛ با لمس پایین باز می‌شود */
.npi-paper { --w: min(84vw, 360px, 54vh); --hh: calc(var(--w) * .74); position: relative; align-self: start; width: var(--w); height: var(--hh); margin-top: 4vh; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1400px; transform: rotate(-3deg); transition: transform .9s cubic-bezier(.3, .9, .3, 1), opacity .8s; }
.npi-top, .npi-inner { position: absolute; inset: 0; display: grid; gap: 6px; padding: 12px 14px; color: var(--ink); text-align: center; background-color: var(--paper); }
.npi-top { z-index: 2; align-content: start; background-image: linear-gradient(0deg, rgba(0, 0, 0, .09), transparent 12%); box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .7); }
.npi-flap { position: absolute; inset: 100% 0 auto; height: var(--hh); z-index: 1; transform-origin: 50% 0; transform: rotateX(-180deg); transition: transform 1.2s cubic-bezier(.45, 0, .2, 1); }
.npi-inner { align-content: start; backface-visibility: hidden; -webkit-backface-visibility: hidden; background-image: linear-gradient(180deg, rgba(0, 0, 0, .1), transparent 14%); box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .7); }
.npi.open .npi-flap { transform: rotateX(0deg); }
.npi-lines { display: block; height: 40px; background: repeating-linear-gradient(180deg, var(--hair) 0 2px, transparent 2px 8px); }
.npi-photo { display: grid; place-items: center; height: calc(var(--hh) * .62); overflow: hidden; border: 1px solid var(--ink); background: var(--paper2); color: var(--accent); }
.npi-photo img { width: 100%; height: 100%; object-fit: cover; } .npi-photo svg { width: 46%; height: 90%; }
.npi-meta { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.npi-mast { font: 400 calc(var(--w) * .19)/1.2 var(--nast); }
html[lang="en"] .npi-mast { font: 700 calc(var(--w) * .1)/1.25 Georgia, serif; text-transform: uppercase; }
.npi-rule { display: block; border-top: 3px double var(--ink); }
.npi-head { font: 400 calc(var(--w) * .066)/1.55 var(--head); text-wrap: balance; }
.npi-label { position: absolute; z-index: 4; top: calc(var(--hh) - 30px); inset-inline-end: -16px; display: grid; padding: 6px 14px; background: #fffdf8; color: var(--ink); border: 1px solid rgba(0, 0, 0, .15); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6); transform: rotate(4deg); line-height: 1.35; text-align: start; max-width: 70%; transition: opacity .3s; }
.npi-label small { font-size: 12px; color: var(--muted); } .npi-label b { font-size: 18px; color: var(--accent); overflow-wrap: anywhere; }
.npi.open .npi-label { opacity: 0; }
.npi.open .npi-paper { transform: rotate(0deg); }
.npi.zoom .npi-paper { transform: scale(1.8) translateY(10%); opacity: 0; transition: transform 1s cubic-bezier(.6, 0, .3, 1), opacity .8s ease .2s; }
.npi:not(.open) .npi-paper { animation: rz-wiggle 3.2s ease-in-out 1.2s infinite; }
@keyframes rz-wiggle { 0%, 86%, 100% { transform: rotate(-3deg); } 90% { transform: rotate(-1.5deg) translateY(-4px); } 95% { transform: rotate(-4deg); } }

/* آلبوم چرمی */
.abi-book { --w: min(78vw, 330px, 54vh); position: relative; width: var(--w); height: calc(var(--w) * 1.32); padding: 0; border: 0; background: none; cursor: pointer; perspective: 1600px; transition: transform 1s cubic-bezier(.3, .9, .3, 1); }
.abi-page { position: absolute; inset: 4px 0 4px 4px; display: grid; place-items: center; align-content: center; gap: 10px; padding: 16px; background: #fffdf6; border-radius: 4px 12px 12px 4px; box-shadow: inset 12px 0 18px -14px rgba(0, 0, 0, .5), 0 20px 40px -16px rgba(0, 0, 0, .7); color: var(--ink); }
.abi-photo { display: grid; place-items: center; width: 82%; aspect-ratio: 3 / 4; overflow: hidden; padding: 8px; background: #fff; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .5); transform: rotate(-2deg); color: var(--accent); }
.abi-photo img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.7); } .abi-photo svg { width: 70%; height: 70%; }
.abi-year { font: 400 1.6rem/1 var(--head); color: var(--muted); }
.abi-cover { position: absolute; inset: 0; transform-origin: right center; transform-style: preserve-3d; transition: transform 1.3s cubic-bezier(.5, 0, .2, 1); }
[dir="ltr"] .abi-cover { transform-origin: left center; }
.abi-face { position: absolute; inset: 0; border-radius: 6px 14px 14px 6px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.abi-front { display: grid; place-items: center; align-content: center; gap: 6px; padding: 22px; color: #e9cf96; text-align: center;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(120% 90% at 35% 25%, color-mix(in srgb, var(--accent) 70%, #fff 12%), var(--accent) 45%, color-mix(in srgb, var(--accent) 60%, #000) 100%);
  box-shadow: inset 0 0 0 10px rgba(0, 0, 0, .12), inset 0 0 0 11px rgba(233, 207, 150, .5), inset -14px 0 20px -12px rgba(0, 0, 0, .6), 0 26px 44px -18px rgba(0, 0, 0, .8); }
.th-rose .abi-front { background-color: #6e2f3a; }
.abi-front::after { content: ""; position: absolute; inset: 18px; border: 1.5px dashed rgba(233, 207, 150, .55); border-radius: 4px 10px 10px 4px; pointer-events: none; }
.abi-orn { width: 72px; height: 72px; color: #e9cf96; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .5)); }
.abi-title { font-size: .95rem; font-weight: 700; letter-spacing: .02em; opacity: .9; }
.abi-name { font: 400 calc(var(--w) * .17)/1.35 var(--nast); text-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 -1px 0 rgba(255, 240, 200, .25); background: linear-gradient(180deg, #f6e3b4, #c79a4e 60%, #f0d89c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.abi-years { font: 400 1.2rem/1 var(--head); opacity: .85; }
.abi-plate { margin-top: 8px; display: grid; padding: 6px 16px; background: linear-gradient(180deg, #f3e3bf, #cfae6d); color: #3b2a16; border-radius: 3px; box-shadow: 0 2px 4px rgba(0, 0, 0, .5); line-height: 1.35; }
.abi-plate small { font-size: 11px; } .abi-plate b { font-size: 17px; }
.abi-corner { position: absolute; width: 34px; height: 34px; border: 3px solid #d9b56a; z-index: 1; }
.abi-corner.c1 { top: 8px; left: 8px; border-right: 0; border-bottom: 0; } .abi-corner.c2 { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.abi-corner.c3 { bottom: 8px; left: 8px; border-right: 0; border-top: 0; } .abi-corner.c4 { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.abi-back { transform: rotateY(180deg); background: #efe3cc; box-shadow: inset 0 0 0 10px rgba(0, 0, 0, .06); }
.abi.open .abi-cover { transform: rotateY(-165deg); }
[dir="ltr"] .abi.open .abi-cover { transform: rotateY(165deg); }
.abi.open .abi-book { transform: translateX(calc(var(--w) * -.25)); }
[dir="ltr"] .abi.open .abi-book { transform: translateX(calc(var(--w) * .25)); }
.abi.zoom .abi-book { transform: scale(2.4); opacity: 0; transition: transform 1s cubic-bezier(.6, 0, .3, 1), opacity .8s ease .2s; }
.abi:not(.open) .abi-book { animation: rz-breath 3s ease-in-out infinite; }
@keyframes rz-breath { 50% { transform: translateY(-5px) rotate(-.8deg); } }

/* بعد از ورودی، کاغذ آرام بالا می‌آید */
.arrive .paper { animation: rz-arrive 1s cubic-bezier(.2, .8, .2, 1); }
@keyframes rz-arrive { from { transform: translateY(40px) scale(.97); opacity: 0; } }

@media (min-width: 720px) {
  body { padding-top: 84px; }
  .paper { padding: 30px 34px 34px; }
  .corner { width: 84px; height: 84px; }
  .front-photo { float: none; }
}
@media (max-width: 420px) {
  .mast-meta span:last-child { display: none; }
  .mast-meta { padding: 0 44px 6px; font-size: .68rem; }
  .corner { width: 50px; height: 50px; }
  .age-stamp { width: 74px; height: 74px; } .age-stamp b { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
html[lang="en"] .lead .drop, html[lang="en"] .news p { text-align: start; hyphens: auto; }
