/* Advent Prayer Journal: web app sample. Colors and lettering are the version 2 journal's own. */
@font-face { font-family: "SS4"; src: url("fonts/SourceSerif4-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "SS4"; src: url("fonts/SourceSerif4-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "SS4"; src: url("fonts/SourceSerif4-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "SS4"; src: url("fonts/SourceSerif4-BoldItalic.ttf") format("truetype"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --navy: #1A2446; --deep: #121A36; --ink: #1B213E; --gold: #D69628; --goldd: #8F6110; --amber: #F4C06C;
  --cream: #FDF3E2; --page: #FFFAF0;
  --soft: rgba(27,33,62,.82); --faint: rgba(27,33,62,.62); --rule: rgba(27,33,62,.22);
  --line: 34px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--deep); color: var(--ink); font-family: "SS4", Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.55; }
p, h1, h2 { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding-bottom: 74px; background: var(--deep); }
.app > main { animation: pagein .38s ease both; }
@keyframes pagein { from { transform: translateY(10px); } to { transform: none; } }
.lbl { font-size: 12.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--goldd); }
.kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.small { font-size: 14.5px; color: var(--faint); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 10px 22px; border-radius: 26px; border: 0; background: var(--amber); color: var(--deep); font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer; text-align: center; line-height: 1.2; }
.btn:hover { background: #F8D595; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; border: 1.5px solid currentColor; font-weight: 400; }
.btn.ghost:hover { background: rgba(244,192,108,.14); }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: inherit; font-size: inherit; }

/* ---------------------------------------------------------------- home: night, and the village */
.home { background: linear-gradient(180deg, var(--s0) 0, var(--s1) 340px, var(--deep) 900px); color: var(--cream); padding-bottom: 28px; min-height: 100vh; }
.hero { position: relative; aspect-ratio: 470 / 250; overflow: hidden; }
.hero .pic, .sky .pic { position: absolute; inset: 0; }
.hero .pic svg, .sky .pic svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .hd { position: absolute; left: 20px; right: 20px; top: 18px; }
.hero .kicker { color: var(--amber); font-size: 12.5px; }
.hero h1 { font-size: 40px; font-weight: 400; line-height: 1.05; margin-top: 8px; letter-spacing: -0.005em; }
.hero .sub { font-style: italic; font-size: 16px; opacity: .92; margin-top: 2px; }

.todaycard { display: flex; align-items: center; gap: 18px; margin: 18px 16px 0; padding: 18px 18px; border-radius: 16px; background: rgba(253,243,226,.07); border: 1px solid rgba(244,192,108,.38); }
.todaycard .tw2 { flex: none; width: 92px; display: block; position: relative; }
.bigwin { display: block; width: 100%; height: auto; }
.todaycard .tc { flex: 1; min-width: 0; }
.todaycard .lbl { color: var(--amber); }
.todaycard .tline { font-size: 18px; line-height: 1.3; margin: 2px 0 12px; }
.todaycard .tword { font-size: 30px; font-weight: 700; color: var(--amber); line-height: 1; margin: -6px 0 12px; }
.todaycard .btn { width: 100%; }
.todaycard .btn.ghost { color: var(--cream); }
.win-today { animation: breathe 3.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .78; } }

.candles { display: flex; align-items: center; gap: 16px; margin: 22px 20px 0; }
.candles .cs { flex: none; width: 118px; }
.candles .cs svg { display: block; width: 100%; height: auto; }
.candles p { font-size: 14.5px; line-height: 1.4; font-style: italic; color: rgba(253,243,226,.9); }

.vsec { margin: 28px 16px 0; }
.vh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.vh h2 { font-size: 26px; font-weight: 400; }
.vh .count { font-size: 14.5px; color: var(--amber); font-style: italic; }
.vcap { font-size: 15.5px; line-height: 1.45; color: rgba(253,243,226,.9); margin: 4px 0 12px; }
.village { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid rgba(244,192,108,.3); }
.village a { cursor: pointer; }
.village .vw-closed { cursor: default; }
.village .pulse { animation: pulse 2.8s ease-in-out infinite; transform-origin: center; }
@keyframes pulse { 0%, 100% { opacity: .25; } 50% { opacity: .95; } }

.links { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 16px 0; }
.links .btn { flex: 1 1 100%; color: var(--cream); font-size: 16px; }
.sample { margin: 26px 16px 0; padding: 16px 16px 14px; border-radius: 12px; background: rgba(9,15,39,.6); border: 1px dashed rgba(253,243,226,.45); font-size: 15px; line-height: 1.45; color: rgba(253,243,226,.92); }
.sample .pick { display: flex; gap: 8px; margin: 12px 0 10px; }
.sample .pick button { flex: 1; min-height: 46px; border-radius: 10px; border: 1.5px solid rgba(253,243,226,.6); background: transparent; color: var(--cream); cursor: pointer; font-size: 14px; white-space: nowrap; padding: 0 4px; }
.sample .pick button[aria-pressed="true"] { background: var(--cream); color: var(--deep); font-weight: 700; border-color: var(--cream); }
.sample .small { color: rgba(253,243,226,.75); }

.pickdate { display: flex; align-items: center; gap: 10px; margin: 12px 0 10px; }
.pickdate select { flex: 1; min-height: 46px; border-radius: 10px; border: 1.5px solid rgba(253,243,226,.6); background: var(--deep); color: var(--cream); padding: 0 10px; font: inherit; }
.hero.early { aspect-ratio: auto; padding: 40px 0 30px; } .hero.early .hd { position: static; padding: 0 20px; }
/* morning: the sky is light, so the words on it turn dark */
.home.dawn { color: var(--navy); background: linear-gradient(180deg, var(--s0) 0, var(--s1) 300px, var(--s2) 620px, var(--cream) 1100px); }
.home.dawn .hero .kicker, .home.dawn .todaycard .lbl, .home.dawn .vh .count { color: var(--goldd); }
.home.dawn .todaycard { background: rgba(255,253,248,.72); border-color: rgba(214,150,40,.7); }
.home.dawn .todaycard .tword { color: #B47B17; }
.home.dawn .todaycard .btn { background: var(--navy); color: var(--cream); }
.home.dawn .todaycard .btn.ghost { background: transparent; color: var(--navy); }
.home.dawn .candles p, .home.dawn .vcap { color: var(--soft); }
.home.dawn .links .btn { color: var(--navy); }
.home.dawn .sample { background: var(--deep); }

/* ---------------------------------------------------------------- one day */
.day, .keep { background: var(--page); min-height: 100vh; }
.sky { position: relative; aspect-ratio: 470 / 230; overflow: hidden; background: var(--deep); color: var(--cream); }
.sky .back { position: absolute; left: 10px; top: 8px; padding: 12px 10px; font-size: 15px; text-decoration: none; color: var(--cream); opacity: .95; }
.sky .hd { position: absolute; left: 20px; top: 42px; }
.sky .kicker { color: var(--amber); font-size: 12px; }
.sky h1 { font-size: 32px; font-weight: 400; line-height: 1.05; margin-top: 4px; }
.day.dawn .sky, .day.dawn .sky .back { color: var(--navy); }
.day.dawn .sky .kicker { color: var(--goldd); }
.sky .hwin { position: absolute; right: 14px; top: 12px; width: 52px; }
.sky .hwin svg { display: block; width: 100%; height: auto; }

.map { display: flex; align-items: center; gap: 8px; padding: 6px 20px 0; font-size: 12.5px; font-style: italic; color: var(--faint); }
.map .mp { flex: 1; min-width: 0; }
.day .body { padding: 10px 20px 40px; }
.week { margin: 6px 0 22px; padding: 18px 18px 16px; border-radius: 10px; background: #FFFDF8; border: 1px solid rgba(214,150,40,.55); }
.week h2 { font-size: 34px; font-weight: 400; color: var(--navy); line-height: 1.1; margin-top: 2px; }
.week .wverse { margin-top: 10px; font-size: 18px; line-height: 1.45; font-style: italic; color: var(--navy); }
.week .wintro { margin-top: 12px; }
.week .wcandle { margin-top: 12px; padding-left: 12px; border-left: 2px solid var(--amber); font-style: italic; color: var(--soft); }
.week .wq { display: block; margin-top: 14px; font-weight: 700; color: var(--navy); }
textarea.lines.short { min-height: calc(var(--line) * 3); }
.lead { display: flex; align-items: flex-start; gap: 14px; }
.lead .num { flex: none; font-size: 76px; line-height: .86; color: var(--gold); letter-spacing: -0.03em; min-width: 50px; }
.verse { font-size: 19.5px; line-height: 1.42; font-style: italic; color: var(--navy); }
.ref { margin-top: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--goldd); }
.sec { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.sec i { flex: 1; border-top: 1px solid rgba(214,150,40,.62); }
.note { margin-top: 6px; }
.passage { margin-top: 10px; font-size: 15px; color: var(--soft); }
.passage summary { cursor: pointer; font-style: italic; padding: 12px 0; }
.passage p { margin-top: 4px; padding: 12px 14px; background: #FFFDF8; border-left: 2px solid var(--amber); line-height: 1.6; font-size: 16px; color: var(--ink); }
.passage sup { font-size: 10px; font-weight: 700; color: var(--goldd); margin-right: 3px; }
.todayline { margin-top: 12px; font-size: 15px; line-height: 1.45; font-style: italic; color: var(--soft); padding: 2px 0 2px 12px; border-left: 2px solid var(--amber); }
.todayline .lbl { font-style: normal; margin-right: 6px; }
.q { display: block; margin-top: 22px; font-weight: 700; font-size: 18px; line-height: 1.35; color: var(--navy); }
textarea { display: block; width: 100%; border: 0; background: transparent; resize: none; overflow: hidden; padding: 0; border-radius: 0; }
textarea.lines { margin-top: 4px; font-size: 18px; line-height: var(--line); min-height: calc(var(--line) * 5);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line) - 1px), var(--rule) calc(var(--line) - 1px), var(--rule) var(--line)); background-attachment: local; }
textarea:focus, input[type="text"]:focus { outline: none; }
textarea.lines:focus { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line) - 1px), rgba(214,150,40,.8) calc(var(--line) - 1px), rgba(214,150,40,.8) var(--line)); }
.few { margin-top: 6px; font-size: 14px; font-style: italic; color: var(--faint); }

.pray { margin-top: 22px; border-radius: 10px; padding: 16px 18px; background: linear-gradient(120deg, var(--pa), var(--pb)); color: var(--cream); }
.pray .lbl { color: var(--amber); display: block; margin-bottom: 4px; }
.pray .say { font-size: 20px; line-height: 1.38; font-style: italic; }
.pray .minute { margin-top: 10px; font-size: 14.5px; line-height: 1.4; color: rgba(253,243,226,.9); }
.pray .minute b { color: var(--amber); }
.pray .tiredbtn { margin-top: 12px; width: 100%; min-height: 48px; }
.day.dawn .pray { color: var(--ink); border: 1px solid rgba(214,150,40,.6); }
.day.dawn .pray .lbl, .day.dawn .pray .minute b { color: var(--goldd); }
.day.dawn .pray .minute { color: var(--soft); }

.pta { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
.fld { display: flex; flex-direction: column; gap: 1px; border-radius: 8px; background: #FFFDF8; border: 1px solid rgba(27,33,62,.2); border-top: 3px solid var(--amber); padding: 10px 14px 12px; cursor: text; }
.fld:focus-within { border-color: var(--gold); }
.fld .hint { font-size: 15px; line-height: 1.3; font-style: italic; color: var(--soft); }
.fld textarea { margin-top: 6px; font-size: 18px; line-height: 1.45; min-height: 52px; }

.more { margin-top: 10px; }
.kact { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.btn.sm { min-height: 42px; padding: 6px 16px; font-size: 14.5px; color: var(--navy); flex: 1 1 140px; }
.rem { margin-top: 22px; padding-top: 12px; border-top: 1px solid rgba(214,150,40,.62); }
.rem .cl { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.rem .lab { font-size: 15px; font-style: italic; color: var(--faint); }
.rem .word { font-size: 38px; font-weight: 700; color: #B47B17; line-height: 1.1; letter-spacing: -0.01em; }
.rem .own { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.rem .own input { flex: 1; min-width: 0; border: 0; border-bottom: 1px solid var(--rule); background: transparent; font-size: 20px; font-weight: 700; color: var(--navy); padding: 4px 0; border-radius: 0; }
.rem .own input:focus { border-bottom-color: var(--gold); }

.lightrow { display: flex; align-items: center; gap: 18px; margin-top: 28px; padding: 18px; border-radius: 16px; background: var(--deep); color: var(--cream); }
.lightrow .lw { flex: none; width: 84px; }
.lightrow > div:last-child { flex: 1; min-width: 0; }
.lightrow .btn { width: 100%; }
.lightrow .done { font-size: 22px; line-height: 1.25; color: var(--amber); font-weight: 700; }
.lightrow .small { color: rgba(253,243,226,.85); margin-top: 0; }
.lightrow .small a, .lightrow .small button { display: inline-block; padding: 12px 2px; }
.lightrow.just .bigwin { animation: lightup 1.4s ease-out both; }
.lightrow.just .glow { animation: glowin 1.8s ease-out both; }
@keyframes lightup { 0% { opacity: .25; transform: scale(.94); } 60% { opacity: 1; transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes glowin { 0% { opacity: 0; } 100% { opacity: 1; } }
.saved { min-height: 22px; font-size: 14px; font-style: italic; color: var(--faint); opacity: 0; transition: opacity .4s; }
.saved.on { opacity: 1; }
.pn { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 15px; }
.pn a { padding: 12px 0; color: var(--navy); }
.pn .shut { padding: 10px 0; color: var(--faint); font-style: italic; }

/* ---------------------------------------------------------------- the journal's other pages */
.more-list { margin: 28px 16px 0; }
.more-list h2 { font-size: 22px; font-weight: 400; }
.more-list ul { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid rgba(244,192,108,.35); }
.more-list a { display: flex; flex-direction: column; padding: 11px 2px; min-height: 48px; text-decoration: none; border-bottom: 1px solid rgba(244,192,108,.35); }
.more-list span { font-size: 17.5px; }
.more-list i { font-size: 13.5px; opacity: .78; }
.home.dawn .more-list ul, .home.dawn .more-list a { border-color: rgba(143,97,16,.4); }
.morepage .mk { color: var(--goldd); margin-top: 10px; }
.morepage .mt { font-size: 34px; font-weight: 400; line-height: 1.12; color: var(--navy); margin-top: 4px; }
.morepage .lede { margin-top: 14px; font-size: 19.5px; line-height: 1.45; font-style: italic; color: var(--navy); }
.morepage .mtxt { margin-top: 12px; }
.morepage .msmall { margin-top: 10px; font-size: 15px; font-style: italic; color: var(--soft); }
.morepage .mh { margin: 20px 0 0; font-size: 20px; color: var(--navy); }
.morepage .mh + .mtxt { margin-top: 2px; }
.morepage .mli { margin-top: 8px; padding-left: 14px; border-left: 2px solid var(--amber); }
.morepage .mtt { margin-top: 18px; font-size: 22px; font-weight: 700; color: var(--navy); }
.morepage .mk2 { margin-top: 22px; }
.morepage .mc { width: 130px; margin: 22px auto 0; } .morepage .mc svg { display: block; width: 100%; height: auto; }
.morepage .pray { background: linear-gradient(120deg, #0C142F, #121B3A); margin-top: 8px; }
.tblwrap { margin-top: 14px; overflow-x: auto; }
.tbl { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl th { text-align: left; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--goldd); padding: 6px 6px; border-bottom: 1px solid var(--gold); }
.tbl td { padding: 8px 6px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.rowsed { margin-top: 16px; display: grid; gap: 12px; }
.rowcard { border-radius: 8px; background: #FFFDF8; border: 1px solid rgba(27,33,62,.2); border-top: 3px solid var(--amber); padding: 10px 14px 8px; }
.rowcard label { display: block; margin-top: 6px; }
.rowcard input, .vcard input { display: block; width: 100%; border: 0; border-bottom: 1px solid var(--rule); background: transparent; font-size: 18px; padding: 6px 0; border-radius: 0; }
.rowcard .rm { display: inline-block; padding: 12px 0 6px; font-size: 14px; color: var(--faint); }
.addrow { background: var(--navy); color: var(--cream); }
.vcard { margin-top: 16px; padding: 16px 16px 12px; border: 1.5px dashed var(--gold); border-radius: 8px; background: #FFFDF8; break-inside: avoid; }
.vcard .verse { font-size: 18px; }
.vcard .for { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; font-style: italic; color: var(--faint); }
.w29 { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.w29 div { display: flex; align-items: baseline; gap: 8px; border-bottom: 1px solid var(--rule); padding: 7px 0; min-height: 38px; }
.w29 .n { font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.w29 .w { font-weight: 700; color: var(--navy); }

/* ---------------------------------------------------------------- the keepsake */
.keep { padding: 0 20px 48px; }
.keep .bar { padding: 8px 0 0; margin-left: -10px; }
.back2 { display: inline-block; padding: 12px 10px; font-size: 14.5px; text-decoration: none; color: var(--navy); }
.kcover { margin-top: 6px; padding: 30px 22px 24px; border: 1.5px solid var(--gold); border-radius: 6px; outline: 1px solid rgba(214,150,40,.5); outline-offset: -7px; text-align: center; background: #FFFDF8; }
.kcover .kicker { color: var(--goldd); font-size: 10.5px; }
.kcover h1 { font-size: 44px; font-weight: 400; color: var(--navy); line-height: 1.1; margin-top: 8px; }
.orn { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 6px; }
.orn i { width: 56px; border-top: 1px solid var(--gold); }
.orn b { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.kline { display: block; margin-top: 16px; }
.kline span { display: block; font-size: 15px; font-style: italic; color: var(--faint); }
.kline input { width: 100%; max-width: 320px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; text-align: center; font-size: 24px; color: var(--navy); padding: 4px 0; border-radius: 0; }
.kline input:focus { border-bottom-color: var(--gold); }
.kcover .kc { width: 130px; margin: 20px auto 0; }
.kcover .kc svg { display: block; width: 100%; height: auto; }
.empty { margin: 26px 0; font-size: 18px; font-style: italic; color: var(--soft); text-align: center; }
.kbtns { margin: 22px 0 6px; text-align: center; }
.kbtns .btn { background: var(--navy); color: var(--cream); width: 100%; }
.kbtns .small { margin-top: 10px; }
.kday { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(214,150,40,.62); break-inside: avoid; }
.khead { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.knum { font-size: 58px; line-height: .9; color: var(--gold); letter-spacing: -0.03em; }
.kh2 { flex: 1; min-width: 0; }
.kdate { font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--goldd); }
.kword { font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.kwin { flex: none; width: 46px; }
.kwin svg { display: block; width: 100%; height: auto; }
.kq { margin-top: 16px; font-weight: 700; color: var(--navy); }
.kans { margin-top: 4px; font-size: 18px; line-height: 1.6; }
.kpta { display: grid; gap: 10px; margin-top: 14px; }
.kpta div { border-left: 2px solid var(--amber); padding: 2px 0 2px 12px; }
.kpta p { font-size: 17.5px; line-height: 1.5; }
.ksay { margin-top: 16px; font-style: italic; color: var(--soft); }
.ksay .lbl { display: block; font-style: normal; }
.kend { margin-top: 30px; padding-top: 24px; border-top: 1px solid rgba(214,150,40,.62); text-align: center; break-inside: avoid; }
.kend .kv { max-width: 300px; margin: 0 auto 18px; }
.kend .village { pointer-events: none; }
.bless { font-size: 19px; line-height: 1.5; font-style: italic; color: var(--navy); }
.safe { margin-top: 36px; padding: 20px 18px; border-radius: 12px; background: var(--deep); color: var(--cream); }
.safe h2 { font-size: 24px; font-weight: 400; color: var(--amber); }
.safe p { margin-top: 10px; font-size: 16px; line-height: 1.5; }
.sbtns { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.filebtn { position: relative; overflow: hidden; color: var(--cream); cursor: pointer; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.safe .small { color: rgba(253,243,226,.85); min-height: 20px; }

.toast { position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 20px); max-width: min(90vw, 420px); padding: 12px 18px; border-radius: 12px; background: var(--cream); color: var(--deep); font-size: 15.5px; line-height: 1.35; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; border: 1px solid var(--gold); z-index: 10; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- pass 2: light, sparkle, tabs, help */
.hero, .sky { isolation: isolate; }
.tw { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.tw i { position: absolute; border-radius: 50%; background: #FFF6DD; box-shadow: 0 0 6px 1px rgba(251,227,176,.8); opacity: .15; animation: twinkle 3.6s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .1; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.25); } }
.hero .hd, .sky .hd, .sky .back, .sky .hwin { z-index: 2; }
.sky .hwin { position: absolute; }
.halo { position: absolute; inset: -16px; border-radius: 50%; background: radial-gradient(closest-side, rgba(244,192,108,.6), rgba(244,192,108,0)); pointer-events: none; opacity: 0; }
.hwin svg, .tw2 svg { position: relative; }
.hwin.wait .halo, .todaycard .tw2 .halo { animation: halo 2.8s ease-in-out infinite; }
.hwin.lit .halo, .todaycard.lit .tw2 .halo { opacity: .95; animation: haloLit 4.5s ease-in-out infinite; }
@keyframes halo { 0%, 100% { opacity: .15; transform: scale(.85); } 50% { opacity: .8; transform: scale(1.12); } }
@keyframes haloLit { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
.village .vw-lit circle { animation: haloLit 5s ease-in-out infinite; }
.todaycard .tnext { font-size: 14.5px; font-style: italic; opacity: .85; margin: -4px 0 12px; }

.sharebox { margin: 26px 16px 0; padding: 18px; border-radius: 16px; background: rgba(253,243,226,.07); border: 1px solid rgba(244,192,108,.38); text-align: center; }
.sharebox p { font-size: 17px; line-height: 1.4; margin-bottom: 12px; }
.sharebox .btn { width: 100%; }
.home.dawn .sharebox { background: rgba(255,253,248,.72); border-color: rgba(214,150,40,.7); }
.home.dawn .sharebox .btn { background: var(--navy); color: var(--cream); }

.tiles { margin: 28px 16px 0; }
.tiles h2 { font-size: 22px; font-weight: 400; margin-bottom: 12px; }
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 14px 16px; border-radius: 14px; text-decoration: none; background: rgba(253,243,226,.07); border: 1px solid rgba(244,192,108,.38); min-height: 148px; transition: transform .15s, background .15s; }
.tile:hover { background: rgba(253,243,226,.13); } .tile:active { transform: scale(.98); }
.tile svg { width: 34px; height: 34px; margin-bottom: 4px; }
.tile b { font-size: 19px; line-height: 1.2; }
.tile span { font-size: 14.5px; line-height: 1.35; opacity: .85; }
.home.dawn .tile { background: rgba(255,253,248,.72); border-color: rgba(214,150,40,.7); }
.morehome { min-height: 100vh; }

.hubpage .lede { margin-top: 8px; font-size: 18px; }
.hcards { display: grid; gap: 10px; margin-top: 18px; }
.hcard { display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%; padding: 14px 38px 14px 16px; border-radius: 12px; background: #FFFDF8; border: 1px solid rgba(27,33,62,.18); border-left: 4px solid var(--amber); text-decoration: none; cursor: pointer; position: relative; font: inherit; color: inherit; }
.hcard::after { content: "\203A"; position: absolute; right: 14px; top: 50%; transform: translateY(-54%); font-size: 26px; color: var(--gold); }
.hcard:hover { border-color: var(--gold); }
.hcard b { font-size: 18.5px; color: var(--navy); line-height: 1.25; }
.hcard span { font-size: 15px; line-height: 1.4; color: var(--soft); }
.faq { margin-top: 26px; }
.faq h2 { font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--goldd); padding-bottom: 8px; border-bottom: 1px solid rgba(214,150,40,.62); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 14px 30px 14px 0; font-size: 18px; font-weight: 700; color: var(--navy); line-height: 1.3; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 24px; font-weight: 400; color: var(--gold); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 16px; font-size: 17px; line-height: 1.55; }
.faq .hcards { margin-top: 14px; }
.contact { margin-top: 28px; padding: 20px 18px; border-radius: 14px; background: var(--deep); color: var(--cream); text-align: center; }
.contact h2 { font-size: 21px; font-weight: 400; color: var(--amber); line-height: 1.25; }
.contact p { margin: 8px 0 14px; font-size: 16px; }
.contact .btn { width: 100%; word-break: break-all; }
.rlist { margin-top: 16px; }
.rlist a, .rlist div { display: flex; align-items: baseline; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); text-decoration: none; min-height: 46px; }
.rlist .n { flex: none; width: 104px; font-size: 13.5px; color: var(--faint); }
.rlist b { flex: 1; color: var(--navy); }
.rlist i { font-size: 13.5px; color: var(--goldd); }
.rlist .shut b, .rlist .shut i { color: var(--faint); font-weight: 400; }
.morepage .sbtns { margin-top: 16px; } .morepage .filebtn { color: var(--navy); }
.morepage .sbtns .btn:first-child { background: var(--navy); color: var(--cream); }

.saverow { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.saverow .btn { flex: none; min-width: 108px; color: var(--navy); border-color: var(--navy); font-weight: 700; }
.saverow .btn.ok { background: var(--navy); color: var(--cream); }
.saverow .saved { flex: 1; text-align: left; margin: 0; }
.lightrow { margin-top: 16px; }

.hnote { margin: 16px 16px 0; padding: 14px 16px; border-radius: 14px; background: rgba(244,192,108,.14); border: 1px solid rgba(244,192,108,.5); font-size: 16.5px; line-height: 1.45; }
.hnote .lbl { color: var(--amber); display: block; margin-bottom: 2px; }
.hnote .nlinks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; }
.hnote .nlinks a, .hnote .nlinks button { padding: 10px 0; font-size: 15.5px; color: var(--amber); text-decoration: underline; }
.home.dawn .hnote { background: rgba(255,253,248,.78); border-color: rgba(214,150,40,.7); }
.home.dawn .hnote .lbl, .home.dawn .hnote .nlinks a, .home.dawn .hnote .nlinks button { color: var(--goldd); }
.copyline { margin-top: 8px; font-size: 14.5px; color: var(--faint); }
.copyline a { color: var(--navy); font-weight: 700; padding: 10px 0; display: inline-block; }
.fxcopy { margin-top: 18px; font-size: 15.5px; line-height: 1.45; animation: rise .7s 1.7s ease both; }
.fxcopy a { color: var(--amber); font-weight: 700; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.jump a { padding: 9px 14px; border-radius: 20px; border: 1px solid var(--gold); text-decoration: none; font-size: 14.5px; color: var(--navy); background: #FFFDF8; min-height: 40px; }
.faq { padding: 16px 16px 6px; border-radius: 14px; background: #FFFDF8; border: 1px solid rgba(27,33,62,.14); scroll-margin-top: 12px; }
.faq h2 { font-size: 21px !important; font-weight: 400 !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--navy) !important; border-bottom: 0 !important; padding-bottom: 2px !important; }
.faq details:last-of-type { border-bottom: 0; }
.faq summary { font-size: 17px; }
.faq .hcards { margin: 6px 0 12px; }

/* the lantern and the star in the day's picture are alive */
.pic svg [fill^="url(#gl"] { animation: lantern 3.1s ease-in-out infinite; }
.pic svg [fill^="url(#halo"] { animation: starpulse 4.2s ease-in-out infinite; }
@keyframes lantern { 0%, 100% { opacity: 1; } 18% { opacity: .72; } 31% { opacity: .95; } 47% { opacity: .64; } 63% { opacity: 1; } 82% { opacity: .8; } }
@keyframes starpulse { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
.hero::after, .sky::after { content: ""; position: absolute; left: -20%; top: 12%; width: 90px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(255,246,221,0), #FFF6DD); opacity: 0; transform: rotate(14deg); animation: shoot 19s 5s linear infinite; z-index: 1; pointer-events: none; }
.home.dawn .hero::after, .day.dawn .sky::after { display: none; }
@keyframes shoot { 0% { left: -20%; top: 8%; opacity: 0; } 1% { opacity: .95; } 5% { left: 78%; top: 30%; opacity: 0; } 100% { left: 78%; top: 30%; opacity: 0; } }

.wkstrip { display: flex; align-items: center; gap: 16px; margin: 20px 16px 0; }
.wkstrip .cs { flex: none; width: 104px; } .wkstrip .cs svg { display: block; width: 100%; height: auto; }
.wkstrip .wkr { flex: 1; min-width: 0; }
.wkstrip .lbl { color: var(--amber); }
.wkw { display: flex; gap: 4px; margin: 4px 0 2px; }
.wkw a, .wkw span { flex: 1; max-width: 44px; display: block; }
.wkw svg { display: block; width: 100%; height: auto; }
.wkstrip .wkc { font-size: 14px; font-style: italic; opacity: .85; }
.home.dawn .wkstrip .lbl { color: var(--goldd); }

.stick { position: fixed; left: 50%; bottom: calc(62px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 19; padding: 10px 16px; background: linear-gradient(180deg, rgba(255,250,240,0), rgba(255,250,240,.96) 38%); }
.stick .btn { width: 100%; background: var(--navy); color: var(--amber); min-height: 54px; font-size: 18px; border: 1.5px solid var(--gold); }
.on-day .app { padding-bottom: 150px; }
.lightrow .done.wait { color: var(--cream); font-weight: 400; }
.village .vw.fresh circle { animation: bloom 1.4s ease-out both, haloLit 5s 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.village .vw.fresh path:first-of-type { animation: lightup 1.4s ease-out both; }

.ways { display: grid; gap: 10px; margin-top: 10px; }
.way { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 14px 14px; border-radius: 12px; background: #FFFDF8; border: 1.5px solid rgba(27,33,62,.2); cursor: pointer; font: inherit; color: var(--ink); line-height: 1.45; min-height: 56px; transition: border-color .15s, background .15s; }
.way b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; color: #8F6110; border: 1.5px solid var(--gold); background: #FFFDF8; margin-top: 1px; }
.way.on { border-color: var(--gold); background: #FDF0D2; }
.way.on b { background: var(--gold); color: #fff; border-color: var(--gold); }
.way.on b::after { content: ""; }
.pickl { display: block; margin-top: 16px; font-style: italic; color: var(--soft); font-size: 16px; }
.pickl i { font-size: 14px; color: var(--faint); }

/* the moment a window lights */
.fxlight { position: absolute; left: 50%; top: 34%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(244,192,108,.42), rgba(244,192,108,.16) 38%, rgba(244,192,108,0) 70%); animation: spread 2.2s ease-out both; }
@keyframes spread { 0% { transform: scale(.05); opacity: 0; } 45% { opacity: 1; } 100% { transform: scale(1); opacity: .8; } }
.fxin { position: relative; }

.fx { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(circle at 50% 36%, #2B3A6E 0, #121A36 52%, #0A1029 100%); color: var(--cream); animation: fxin .45s ease both; overflow: auto; }
@keyframes fxin { from { opacity: 0; } to { opacity: 1; } }
.fxin { width: 100%; max-width: 380px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.fxwin { position: relative; width: 150px; margin: 0 auto 18px; }
.fxwin .bigwin { position: relative; animation: lightup 1.5s cubic-bezier(.2,.8,.2,1) both; }
.fxglow { position: absolute; inset: -70px; border-radius: 50%; background: radial-gradient(closest-side, rgba(244,192,108,.75), rgba(244,192,108,.18) 55%, rgba(244,192,108,0)); animation: bloom 1.6s ease-out both, haloLit 4s 1.6s ease-in-out infinite; }
@keyframes bloom { 0% { opacity: 0; transform: scale(.2); } 55% { opacity: 1; transform: scale(1.15); } 100% { opacity: .85; transform: scale(1); } }
@keyframes lightup { 0% { opacity: .1; transform: scale(.9); filter: brightness(.4); } 55% { opacity: 1; transform: scale(1.06); filter: brightness(1.25); } 100% { transform: scale(1); filter: none; } }
.sp { position: absolute; left: 50%; top: 46%; width: var(--s); height: var(--s); background: #FFF1CF; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(var(--d) * -1)); animation: spark 1.5s ease-out both, linger 3.2s 2s ease-in-out infinite; }
@keyframes spark { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--a)) translateY(0) scale(.2); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(var(--d) * -1)) scale(1); } }
@keyframes linger { 0% { opacity: 0; margin-top: 0; } 40% { opacity: .95; } 100% { opacity: 0; margin-top: 46px; } }
.sp:nth-child(2n) { background: #F4C06C; } .sp:nth-child(4n) { animation-duration: 1.5s, 4.6s; }
.fx .kicker { color: var(--amber); animation: rise .6s .9s ease both; }
.fxword { font-size: 54px; font-weight: 700; line-height: 1.05; color: var(--amber); margin-top: 4px; animation: rise .7s 1.05s ease both; }
.fxline { font-size: 21px; line-height: 1.35; font-style: italic; margin-top: 10px; animation: rise .7s 1.25s ease both; }
.fxcount { font-size: 15px; opacity: .85; margin: 8px 0 22px; animation: rise .7s 1.4s ease both; }
.fx .btn { width: 100%; margin-top: 10px; animation: rise .7s 1.55s ease both; }
.fx .btn.ghost { color: var(--cream); }
.fx .linkish { margin-top: 18px; padding: 10px; font-size: 15.5px; color: var(--amber); animation: rise .7s 1.7s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.sheet { position: fixed; inset: 0; z-index: 31; background: rgba(9,15,39,.6); display: flex; align-items: flex-end; justify-content: center; }
.sheetin { width: 100%; max-width: 560px; background: var(--page); border-radius: 20px 20px 0 0; padding: 24px 22px calc(22px + env(safe-area-inset-bottom)); text-align: center; }
.sheetin h2 { font-size: 26px; font-weight: 400; color: var(--navy); }
.sheetin p { margin-top: 6px; font-size: 16.5px; color: var(--soft); }
.stars { display: flex; justify-content: center; gap: 6px; margin: 16px 0 6px; }
.stars button { width: 52px; height: 52px; padding: 6px; border: 0; background: none; cursor: pointer; opacity: .35; filter: grayscale(1); transition: opacity .15s, transform .15s, filter .15s; }
.stars button.on { opacity: 1; filter: none; transform: scale(1.08); }
.stars svg { width: 100%; height: 100%; }
.revl { display: block; text-align: left; margin-top: 10px; }
.revl span { font-size: 14.5px; color: var(--soft); font-style: italic; }
.revl textarea { margin-top: 6px; border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; background: #FFFDF8; min-height: 64px; font-size: 17px; }
.sheetin .btn { width: 100%; margin-top: 14px; background: var(--navy); color: var(--cream); }
.sheetin .btn:disabled { opacity: .4; }
.sheetin .linkish { display: inline-block; margin-top: 6px; padding: 12px; color: var(--soft); }

.tabs { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 20; display: flex; background: rgba(13,20,47,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid rgba(244,192,108,.35); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 62px; text-decoration: none; color: rgba(253,243,226,.8); font-size: 13.5px; letter-spacing: .02em; }
.tabs svg { width: 24px; height: 24px; opacity: .6; filter: saturate(.5); }
.tabs a.on { color: var(--amber); font-weight: 700; }
.tabs a.on svg { opacity: 1; filter: none; }

/* ---------------------------------------------------------------- her own words look like hers: a warm shaded box with a gold edge */
:root { --mine: #FCEBC6; --mine-edge: #D69628; }
textarea.lines.has { background-color: var(--mine); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line) - 1px), rgba(214,150,40,.45) calc(var(--line) - 1px), rgba(214,150,40,.45) var(--line)); border-left: 4px solid var(--mine-edge); border-radius: 0 10px 10px 0; padding: 0 14px; color: var(--navy); }
.fld.has { background: var(--mine); border-color: rgba(214,150,40,.7); border-left: 4px solid var(--mine-edge); }
.fld.has textarea, .rowcard input.has, .own input.has, .kline input.has, .for input.has, .revl textarea.has { color: var(--navy); }
.rowcard label.has input, .for.has input, .morepage textarea.lines.has { background-color: var(--mine); }
.rowcard label.has input, .for.has input { border-left: 4px solid var(--mine-edge); border-bottom-color: transparent; border-radius: 0 8px 8px 0; padding-left: 10px; }
.own.has input { background: var(--mine); border-left: 4px solid var(--mine-edge); border-bottom-color: transparent; border-radius: 0 8px 8px 0; padding: 6px 10px; }
.mine, .kans.mine { background: var(--mine); border-left: 4px solid var(--mine-edge) !important; border-radius: 0 10px 10px 0; padding: 10px 14px !important; color: var(--navy); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.kans.mine { margin-top: 6px; }
.kpta .mine + .mine, .kpta + .kpta { margin-top: 0; }
.way.on { box-shadow: inset 4px 0 0 var(--mine-edge); }

/* ---------------------------------------------------------------- hover, press and smooth changes */
.btn, .tile, .hcard, .way, .fld, .jump a, .rlist a, .tabs a, .tabs svg, .back, .back2, .linkish, .nlinks a, .pn a, .faq summary, .copyline a, textarea, input[type="text"], .village a path, .wkw a svg, .stars button, .rowcard, .vcard, .sharebox, .todaycard, .passage summary { transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, opacity .2s ease, box-shadow .2s ease, filter .2s ease; }
.btn:active, .tile:active, .hcard:active, .way:active { transform: scale(.985); }
.faq details[open] p, .passage[open] p { animation: rise .3s ease both; }
.faq summary::after { transition: transform .2s ease; }
textarea:focus, input[type="text"]:focus { box-shadow: 0 2px 0 0 var(--gold); }
.fld:focus-within { box-shadow: 0 0 0 3px rgba(244,192,108,.35); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(9,15,39,.22); }
  .btn.ghost:hover { box-shadow: none; }
  .kbtns .btn:hover, .sheetin .btn:hover, .addrow:hover, .stick .btn:hover { background: #26335F; }
  .tile:hover { transform: translateY(-3px); border-color: var(--amber); }
  .tile:hover svg { transform: scale(1.08); } .tile svg { transition: transform .2s ease; }
  .hcard:hover { transform: translateX(3px); background: #FFF8E9; }
  .hcard:hover::after { transform: translate(4px, -54%); } .hcard::after { transition: transform .2s ease; }
  .way:hover { border-color: var(--gold); background: #FFF8E9; }
  .way.on:hover { background: #FDF0D2; }
  .fld:hover { border-color: rgba(214,150,40,.8); }
  .jump a:hover { background: var(--amber); }
  .rlist a:hover { background: #FFF8E9; padding-left: 6px; }
  .rlist a:hover i { text-decoration: underline; }
  .tabs a:hover { color: var(--cream); } .tabs a:hover svg { opacity: 1; transform: translateY(-2px); }
  .back:hover, .back2:hover, .pn a:hover, .nlinks a:hover, .linkish:hover, .copyline a:hover { opacity: .75; }
  .faq summary:hover { color: #8F6110; } .faq summary:hover::after { transform: scale(1.25); }
  .passage summary:hover { color: var(--navy); }
  .village a.vw-open:hover path:first-of-type, .village a.vw-today:hover path:first-of-type { fill: #FBE0A6; }
  .village a.vw-lit:hover circle { opacity: 1; }
  .wkw a:hover svg { transform: translateY(-3px) scale(1.06); }
  .todaycard:hover { border-color: var(--amber); }
  .todaycard .tw2:hover .bigwin { transform: scale(1.04); } .bigwin { transition: transform .25s ease; }
  .stars button:hover { opacity: .8; transform: scale(1.12); filter: none; }
  .rowcard:hover, .vcard:hover { border-color: var(--gold); }
  textarea.lines:hover:not(:focus):not(.has) { background-color: rgba(252,235,198,.35); }
}

@media (min-width: 520px) {
  .pta { grid-template-columns: repeat(3, 1fr); }
  .fld textarea { min-height: 96px; }
  .sbtns { flex-direction: row; } .sbtns .btn { flex: 1; }
}
@media (min-width: 600px) { body { padding: 24px 0 0; } .app { border-radius: 18px 18px 0 0; overflow: hidden; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- on paper: the keepsake only, no shadows, light on ink */
@media print {
  @page { margin: 0.6in; }
  html, body { background: #fff; }
  body { padding: 0; font-size: 13pt; }
  .app { max-width: none; border-radius: 0; }
  .noprint, .toast, .tabs, .fx, .sheet { display: none !important; }
  .app { padding-bottom: 0; background: #fff; } .app > main { animation: none; }
  .keep { background: #fff; padding: 0; min-height: 0; max-width: 5.8in; margin: 0 auto; }
  .kcover { margin-top: 1.4in; padding: 0.7in 0.5in; break-after: page; background: #fff; }
  .kline input { border-bottom-color: rgba(27,33,62,.35); }
  .kday { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .kend { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.print-one .kcover, body.print-one .kend, body.print-one .kday:not(.pick), body.print-one .empty { display: none; }
  body.print-one .kday { border-top: 0; margin-top: 0; }
  body:not(.on-keep) .app::before { content: "Open My Advent so far to print your journal."; display: block; padding: 1in; }
  body:not(.on-keep) .app > * { display: none; }
}
