/* Limerence. Everything scoped under .lim-*. */

/* the phone */
.lim-sc { position: relative; width: 100%; display: flex; justify-content: center; min-height: 270px; }
.lim-phone {
  position: relative; width: 136px; height: 240px; border-radius: 26px; padding: 30px 8px 10px;
  background: linear-gradient(180deg, #1b1840, #0d1024); border: 3px solid #2c3150; box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.lim-notch { position: absolute; top: 8px; left: 50%; width: 46px; height: 10px; margin-left: -23px; border-radius: 999px; background: #05070d; }
.lim-clock { text-align: center; font-family: var(--mono); font-size: 26px; color: var(--text); opacity: .9; margin-bottom: 14px; }
.lim-note { padding: 8px 10px; border-radius: 12px; background: rgba(234,227,215,.92); color: #1b1a22; display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; transform: translateY(-14px); opacity: 0; }
.lim-note b { font-size: 13px; }
.lim-note small { font-size: 12px; color: #5d5866; }
.lim-note p { grid-column: 1 / -1; margin: 0; font-size: 14px; line-height: 1.25; }
.lim-phone.buzz .lim-note { animation: lim-in .45s cubic-bezier(.2,.8,.2,1) forwards; }
.lim-phone.buzz { animation: lim-buzz .35s linear 2; }
@keyframes lim-in { to { transform: none; opacity: 1; } }
@keyframes lim-buzz { 25% { transform: translateX(-3px) rotate(-1deg); } 75% { transform: translateX(3px) rotate(1deg); } }

/* thoughts piling up around it */
.lim-cloud { position: absolute; inset: 0; pointer-events: none; }
.lim-th {
  position: absolute; max-width: 92px; padding: 6px 9px; border-radius: 14px; background: var(--violet); color: #fff;
  font-size: 13px; font-weight: 700; line-height: 1.2; box-shadow: 0 4px 0 var(--violet-deep); animation: lim-pop .4s cubic-bezier(.2,.9,.3,1.3) both;
}
@keyframes lim-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.lim-th0 { left: 0; top: 4px; }
.lim-th1 { right: 0; top: 40px; }
.lim-th2 { left: 0; top: 110px; }
.lim-th3 { right: 0; top: 136px; }
.lim-th4 { left: 0; top: 196px; }

/* the day */
.lim-day { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.lim-dayhd { display: flex; justify-content: space-between; align-items: baseline; }
.lim-dayhd span { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--violet-bright); }
.lim-dayhd b { font-size: 13px; color: var(--dim); }
.lim-bar { display: block; height: 28px; border-radius: 10px; background: var(--raised); overflow: hidden; }
.lim-bar b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--violet), var(--violet-bright)); transition: width 1.5s cubic-bezier(.3,.6,.3,1); }
.lim-bar b.full { width: 94%; }
.lim-stat { margin: 0; font-size: 15px; color: var(--dim); opacity: 0; transition: opacity .4s; }
.lim-stat b { color: var(--text); }
.lim-day.shown .lim-stat { opacity: 1; }

/* flaws into charms */
.lim-flaws { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.lim-flaw {
  position: relative; display: grid; min-height: 58px; padding: 12px 16px; border-radius: 14px; overflow: hidden; text-align: left;
  background: var(--surface); border: 2px solid var(--line-strong); box-shadow: 0 4px 0 #2b2e38; font-size: 16px; font-weight: 700; color: var(--text);
}
.lim-flaw > span { grid-area: 1 / 1; align-self: center; transition: opacity .45s, transform .45s; }
.lim-b { opacity: 0; transform: translateY(8px); color: #2A1B00; }
.lim-flaw.lit { border-color: var(--gold); background: linear-gradient(120deg, #fde6b0, #fcc050 45%, #f7e8ff); box-shadow: 0 4px 0 var(--gold-deep), 0 0 18px rgba(252,192,80,.45); }
.lim-flaw.lit .lim-a { opacity: 0; transform: translateY(-8px); }
.lim-flaw.lit .lim-b { opacity: 1; transform: none; }
.lim-glint { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 12% 30%, #fff 0 2px, transparent 3px), radial-gradient(circle at 34% 78%, #fff 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 58% 22%, #fff 0 2px, transparent 3px), radial-gradient(circle at 80% 70%, #fff 0 2.5px, transparent 3.5px), radial-gradient(circle at 92% 28%, #fff 0 1.5px, transparent 2.5px); }
.lim-flaw.lit .lim-glint { animation: lim-glint 1.2s ease-out 2; }
@keyframes lim-glint { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: .35; } }

/* the salt mine */
.lim-mine { width: 100%; display: flex; justify-content: center; }
.lim-shaft { position: relative; width: min(100%, 320px); height: 230px; overflow: hidden; }
.lim-rim { position: absolute; left: 22%; right: 22%; top: 96px; height: 14px; border-radius: 6px; background: #4a3d2c; z-index: 2; }
.lim-dark { position: absolute; left: 24%; right: 24%; top: 104px; bottom: 0; background: linear-gradient(#020306, #0a0c16); border: 4px solid #4a3d2c; border-top: 0; border-radius: 0 0 14px 14px; box-shadow: inset 0 10px 20px rgba(0,0,0,.8), 0 0 0 10px rgba(122,98,70,.25); }
.lim-twig { position: absolute; left: 50%; top: 30px; width: 130px; margin-left: -65px; z-index: 1; transition: transform 1s cubic-bezier(.5,0,.8,.4), opacity .3s .8s; }
.lim-twig path { fill: none; stroke: #8a6a48; stroke-width: 5; stroke-linecap: round; }
.lim-mine.drop .lim-twig { transform: translateY(170px) rotate(18deg); opacity: 0; }
.lim-gem { position: absolute; left: 50%; top: 0; width: 260px; margin-left: -130px; z-index: 3; opacity: 0; transform: translateY(150px) scale(.8); transition: transform 1.1s cubic-bezier(.2,.8,.2,1), opacity .6s; }
.lim-mine.rise .lim-gem { opacity: 1; transform: none; }
.lim-later { position: absolute; left: 0; right: 0; top: 150px; z-index: 2; text-align: center; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--violet-bright); opacity: 0; transition: opacity .4s; }
.lim-later.on { opacity: 1; }
.lim-mine.rise .lim-later { opacity: 0; }

/* the birthday */
.lim-phone.lim-small { width: 150px; height: 200px; margin: 0 auto; }
.lim-small .lim-note { opacity: 1; transform: none; }
.lim-none { margin-top: 12px; text-align: center; font-size: 12px; font-weight: 700; color: var(--dim); }

/* three Jordans */
.lim-pk { width: 100%; }
.choices.lim-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lim-three .choice { padding: 8px 6px; align-items: stretch; }
.lim-chat { position: relative; width: 100%; display: flex; flex-direction: column; gap: 5px; padding-top: 34px; }
.lim-who { font-size: 13px; font-weight: 800; color: var(--violet-bright); text-align: center; }
.lim-chat p { margin: 0; padding: 6px 8px; border-radius: 12px 12px 12px 4px; background: var(--raised); font-size: 12px; font-weight: 600; line-height: 1.2; text-align: left; }
.lim-chat p i { font-style: normal; color: var(--faint); }
.lim-fire { position: absolute; top: 0; left: 50%; width: 26px; height: 30px; margin-left: -13px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff3c4 0 18%, var(--gold) 40%, #f08a3c 75%); transform: scale(.35); opacity: .35; transform-origin: 50% 100%; transition: transform .9s cubic-bezier(.2,.8,.2,1), opacity .6s; }
.lim-three.burn .lim-yes .lim-fire { transform: scale(.55); opacity: .8; }
.lim-three.burn .lim-no .lim-fire { transform: scale(.3); opacity: .3; }
.lim-three.burn .lim-maybe .lim-fire { transform: scale(1.15); opacity: 1; animation: lim-flick .5s ease-in-out .9s 4 alternate; }
@keyframes lim-flick { to { transform: scale(1.25) rotate(-4deg); } }

/* two friends */

@media (max-height: 700px) {
  .lim-sc { min-height: 236px; }
  .lim-phone { height: 220px; }
  .lim-phone { height: 216px; }
  .lim-th3 { top: 124px; }
  .lim-th4 { top: 172px; }
  .lim-shaft { height: 200px; }
  .lim-flaw { min-height: 52px; padding: 10px 14px; }
}

/* Stendhal */
.lim-st img { width: min(70%, 240px); display: block; margin: 0 auto; }
