/* Interactive phone on the home page (site/phone.js). Built at the app's
   real size (390 x 844) and scaled to fit, using the app's tokens from
   src/ui/theme.ts. */

@font-face {
  font-family: 'Fraunces Italic';
  src: url('fonts/Fraunces_500Medium_Italic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

.lp-wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; --s: 0.8; }
.lp-device { background: var(--forest); border-radius: calc(46px * var(--s) + 10px); padding: 10px; box-shadow: 0 30px 60px rgba(40, 52, 40, 0.22), 0 6px 16px rgba(40, 52, 40, 0.12); }
.lp-fit { width: calc(390px * var(--s)); height: calc(844px * var(--s)); border-radius: calc(46px * var(--s)); overflow: hidden; position: relative; }
.lp-screen { position: absolute; left: 0; top: 0; width: 390px; height: 844px; transform: scale(var(--s)); transform-origin: 0 0; background: #f6f4ec; color: #343a34; font: 400 15px/22px var(--sans); overflow: hidden; text-align: left; }
.lp-screen::before { content: ''; position: absolute; z-index: 5; top: 12px; left: 50%; width: 120px; height: 34px; margin-left: -60px; border-radius: 20px; background: #141a14; }
.lp-view { position: absolute; inset: 0; }
.lp-scroll { position: absolute; inset: 52px 0 0 0; overflow-y: auto; padding: 10px 20px 120px; scrollbar-width: none; overscroll-behavior: contain; }
.lp-scroll::-webkit-scrollbar { display: none; }
.lp-scroll.lp-noTabs { top: 104px; padding-top: 6px; padding-bottom: 40px; }
.lp-screen button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
.lp-screen button:focus-visible { outline: 3px solid #84977f; outline-offset: 2px; }
.lp-ic { flex: none; display: block; }
.mock-caption { text-align: center; font-size: 13px; color: var(--subtle); margin-top: 14px; max-width: 36ch; }

/* type */
.lp-display { font: 500 31px/38px var(--serif); letter-spacing: -0.7px; color: #343a34; margin: 0; }
.lp-title { font: 500 25px/32px var(--serif); letter-spacing: -0.5px; margin: 6px 0; color: #343a34; }
.lp-head { font: 500 20px/26px var(--serif); letter-spacing: -0.2px; color: #343a34; margin: 0; display: block; }
.lp-metric { font: 500 36px/42px var(--serif); letter-spacing: -0.8px; color: #343a34; display: block; }
.lp-metric.small { font-size: 25px; line-height: 32px; }
.lp-num { font: 500 22px/28px var(--serif); color: #343a34; display: block; }
.lp-body { margin: 6px 0 0; }
.lp-muted { color: #5d635c; margin: 4px 0 0; }
.lp-cap { font-size: 13px; line-height: 18px; color: #7d827b; margin: 0; display: block; }
.lp-label { font-size: 13px; line-height: 18px; font-weight: 600; margin: 0; display: block; }
.lp-over { font-size: 10.5px; line-height: 14px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; margin: 0; display: block; }
.lp-green { color: #5c6f57; }
.lp-lav, .lp-lavd { color: #8e80a8; }
.lp-honey { color: #8c6a1e; }
.lp-oninkm { color: rgba(244, 241, 230, 0.62); }
.lp-center { text-align: center; }
.lp-link { font-size: 13px; font-weight: 600; color: #5c6f57; }
.lp-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* surfaces */
.lp-card { display: block; width: 100%; background: #fff; border-radius: 24px; padding: 18px; margin-bottom: 14px; box-shadow: 0 8px 18px rgba(40, 52, 40, 0.07); }
.lp-screen button.lp-card { background: #fff; padding: 18px; margin-bottom: 14px; }
.lp-card.lp-flat { background: #eeebe1; box-shadow: none; margin-top: 18px; }
.lp-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: #eeebe1; color: #5d635c; font-size: 10.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.lp-tag.sage { background: #dce3d5; color: #5c6f57; }
.lp-tag.lav { background: #ece7f2; color: #6e6188; }
.lp-tag.honey { background: #f4e7c5; color: #8c6a1e; }
.lp-screen .lp-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; border-radius: 16px; background: #283428; color: #f4f1e6; font-weight: 600; margin-top: 14px; text-align: center; }
.lp-sec { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 12px; }

/* home */
.lp-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.lp-avatar { width: 44px; height: 44px; border-radius: 50%; background: #dce3d5; color: #5c6f57; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex: none; }
.lp-brain { position: relative; background: #283428; color: #f4f1e6; border-radius: 30px; padding: 20px; margin-bottom: 14px; display: grid; grid-template-columns: 1fr 128px; gap: 4px; overflow: hidden; }
.lp-level { font: 500 44px/50px var(--serif); letter-spacing: -1.2px; margin: 6px 0 8px; color: #f4f1e6; }
.lp-stage { display: inline-block; padding: 5px 12px; border-radius: 999px; background: #4a4a30; color: #f4e7c5; font-size: 13px; font-weight: 600; }
.lp-xpbar { height: 8px; border-radius: 99px; background: rgba(244, 241, 230, 0.16); margin-top: 18px; overflow: hidden; }
.lp-xpbar span { display: block; height: 100%; border-radius: 99px; background: #e2b85c; transition: width 0.5s ease; }
.lp-xptext { font-size: 13px; color: rgba(244, 241, 230, 0.62); margin: 8px 0 0; }
.lp-brain-art { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 52%, rgba(233, 225, 245, 0.55), rgba(216, 208, 229, 0) 68%); }
.lp-mascot { width: 124px; height: auto; }
.lp-buddy { grid-column: 1 / -1; margin: 12px 0 0; padding: 12px 14px; border-radius: 16px; background: #34443a; font-size: 14px; font-weight: 600; color: #f4f1e6; }
.lp-next { display: flex; gap: 14px; align-items: flex-start; }
.lp-tile-ic { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #343a34; }
.lp-tile-ic.sage { background: #dce3d5; }
.lp-tile-ic.lav { background: #ece7f2; }
.lp-tile-ic.honey { background: #f4e7c5; }
.lp-tile-ic.white { background: #fff; width: 34px; height: 34px; border-radius: 10px; }
.lp-complete { background: #dce3d5; box-shadow: none; }
.lp-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lp-screen .lp-plan { display: flex; flex-direction: column; gap: 2px; border-radius: 20px; padding: 12px; min-height: 128px; }
.lp-screen .lp-plan.sage { background: #dce3d5; }
.lp-screen .lp-plan.lav { background: #ece7f2; }
.lp-screen .lp-plan.honey { background: #f4e7c5; }
.lp-plan .lp-over { margin-top: 12px; color: #5d635c; }
.lp-plan.lav .lp-over { color: #8e80a8; }
.lp-plan.honey .lp-over { color: #8c6a1e; }
.lp-plan b { font-size: 14px; line-height: 19px; color: #343a34; }
.lp-plan small { font-size: 12px; color: #5d635c; }
.lp-plan-top { display: flex; justify-content: space-between; align-items: flex-start; }
.lp-done { width: 22px; height: 22px; border-radius: 50%; background: #5c6f57; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.lp-screen .lp-goal { display: flex; align-items: center; gap: 10px; }
.lp-goal-copy { flex: 1; display: grid; gap: 4px; }
.lp-gauge { width: 84px; height: 48px; flex: none; }
.lp-list { padding: 6px 16px; }
.lp-screen .lp-habit { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border-top: 1px solid #e2dfd4; }
.lp-screen .lp-habit:first-child { border-top: 0; }
.lp-habit-ic { width: 40px; height: 40px; border-radius: 12px; background: #eeebe1; display: inline-flex; align-items: center; justify-content: center; color: #5d635c; flex: none; }
.lp-habit-txt { flex: 1; min-width: 0; }
.lp-habit-txt b { display: block; font-weight: 600; font-size: 15px; line-height: 20px; }
.lp-habit-txt small { font-size: 13px; color: #7d827b; }
.lp-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #d4d1c6; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; transition: background-color 0.2s, border-color 0.2s; }
.lp-habit.done .lp-check { background: #84977f; border-color: #84977f; }
.lp-habit.done b { color: #7d827b; text-decoration: line-through; text-decoration-color: #b9c7b0; }
.lp-week { display: flex; justify-content: space-between; }
.lp-day { display: grid; justify-items: center; gap: 6px; }
.lp-day small { font-size: 12px; color: #7d827b; }
.lp-day i { width: 32px; height: 32px; border-radius: 50%; background: #eeebe1; display: block; }
.lp-day i.on { background: #b9c7b0; }
.lp-day i.today { box-shadow: 0 0 0 2px #5d635c inset; }

/* tab bar */
.lp-tabbar { position: absolute; left: 16px; right: 16px; bottom: 24px; z-index: 4; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px; border-radius: 30px; background: #fff; box-shadow: 0 12px 24px rgba(40, 52, 40, 0.16); }
.lp-screen .lp-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0; border-radius: 22px; font-size: 11px; font-weight: 600; color: #7d827b; }
.lp-screen .lp-tab.on { background: #283428; color: #f4f1e6; }

/* train and focus grid */
.lp-ex-row { display: flex; align-items: center; gap: 14px; color: #7d827b; }
.lp-ex-ic { width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; color: #5d635c; flex: none; }
.lp-ex-ic.sage { background: #dce3d5; color: #5c6f57; }
.lp-ex-ic.lav { background: #ece7f2; color: #8e80a8; }
.lp-ex-ic.honey { background: #f4e7c5; color: #8c6a1e; }
.lp-ex-ic.big { width: 72px; height: 72px; border-radius: 20px; margin-bottom: 10px; }
.lp-ex-txt { flex: 1; display: grid; gap: 1px; }
.lp-ex-meta { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; color: #7d827b; }
.lp-navbar { position: absolute; z-index: 3; top: 56px; left: 0; right: 0; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding: 0 12px; }
.lp-navbar h3 { margin: 0; text-align: center; font: 500 20px/26px var(--serif); color: inherit; }
.lp-screen .lp-back { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.lp-dark { position: absolute; inset: 0; background: #283428; color: #f4f1e6; padding: 110px 20px 30px; }
.lp-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.lp-dots i { width: 28px; height: 5px; border-radius: 9px; background: rgba(244, 241, 230, 0.2); }
.lp-dots i.on { background: #e2b85c; }
.lp-find { text-align: center; font: 500 44px/52px var(--serif); margin: 6px 0 22px; color: #f4f1e6; }
.lp-find em { font-family: 'Fraunces Italic', var(--serif); font-style: italic; color: #e2b85c; }
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.lp-screen .lp-cell { aspect-ratio: 1; border-radius: 20px; background: #36463a; color: #f4f1e6; font: 500 34px/1 var(--serif); text-align: center; transition: background-color 0.15s, transform 0.1s; }
.lp-screen .lp-cell:active { transform: scale(0.96); }
.lp-screen .lp-cell.found { background: #b9c7b0; color: #5c6f57; cursor: default; }
.lp-cell.miss { animation: lp-shake 0.3s; }
.lp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 10px; }
.lp-stats .lp-card { margin: 0; padding: 12px 6px; text-align: center; }
.lp-stats small { display: block; font-size: 12px; color: #7d827b; }
.lp-stats b { font: 500 24px/30px var(--serif); color: #343a34; }
.lp-mascot-lg { width: 170px; height: auto; margin: 0 auto 10px; display: block; }
.lp-confetti { position: relative; height: 0; }
.lp-confetti i { position: absolute; width: 9px; height: 14px; border-radius: 4px; opacity: 0.8; }
.lp-confetti i:nth-child(1) { left: 40px; top: 10px; background: #b9c7b0; transform: rotate(30deg); }
.lp-confetti i:nth-child(2) { left: 280px; top: 30px; background: #d8d0e5; transform: rotate(-20deg); }
.lp-confetti i:nth-child(3) { left: 60px; top: 120px; background: #e2b85c; transform: rotate(60deg); }
.lp-confetti i:nth-child(4) { left: 300px; top: 140px; background: #84977f; transform: rotate(10deg); }
.lp-confetti i:nth-child(5) { left: 230px; top: 0; background: #e2b85c; transform: rotate(-40deg); }

/* log */
.lp-chips { display: flex; gap: 8px; margin: 8px 0 16px; overflow: hidden; }
.lp-chip { padding: 8px 14px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 6px rgba(40, 52, 40, 0.06); }
.lp-chip.on { background: #283428; color: #f4f1e6; }
.lp-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 5px; border-radius: 999px; background: #eeebe1; margin-bottom: 14px; }
.lp-seg > * { text-align: center; padding: 10px 0; border-radius: 999px; font-size: 13px; font-weight: 600; color: #5d635c; }
.lp-screen .lp-seg > button { text-align: center; padding: 10px 0; }
.lp-screen .lp-seg > .on { background: #283428; color: #f4f1e6; }
.lp-stepper { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.lp-screen .lp-round { width: 48px; height: 48px; border-radius: 50%; background: #eeebe1; display: inline-flex; align-items: center; justify-content: center; color: #343a34; }

/* insights */
.lp-weekcard { background: #dce3d5; box-shadow: none; margin-top: 16px; }
.lp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.lp-chart { position: relative; height: 150px; margin-top: 18px; display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 10px; padding-bottom: 22px; }
.lp-barcol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.lp-barcol i { width: 18px; border-radius: 9px; background: #b9c7b0; display: block; transition: height 0.4s ease; }
.lp-barcol i.over { background: #d8d0e5; }
.lp-barcol i.today { background: #283428; }
.lp-barcol i.empty { background: #eeebe1; }
.lp-barcol small { position: absolute; bottom: -22px; font-size: 11px; color: #7d827b; }
.lp-goal-line { position: absolute; left: 0; right: 0; border-top: 1.5px dashed #b6b2a6; z-index: 1; }
.lp-goal-line small { position: absolute; right: 0; top: -18px; font-size: 11px; color: #5d635c; }

/* toast */

.hop { animation: lp-hop 0.6s ease; }
@keyframes lp-hop { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-14px) scale(1.07) rotate(-5deg); } 100% { transform: translateY(0) scale(1); } }
@keyframes lp-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) {
  .hop, .lp-cell.miss { animation: none; }
  .lp-xpbar span, .lp-barcol i { transition: none; }
}

/* The round halo behind the phone and the sprig peeking out beside it */
.lp-holder { position: relative; isolation: isolate; }
.lp-halo { position: absolute; z-index: -2; left: 50%; top: 50%; width: calc(560px * var(--s)); aspect-ratio: 1; border-radius: 50%; background: var(--ivory); transform: translate(-50%, -50%); }
.lp-sprig { position: absolute; z-index: -1; left: calc(-120px * var(--s)); bottom: calc(60px * var(--s)); width: calc(170px * var(--s)); height: auto; transform: rotate(-12deg); transform-origin: bottom center; }
.lp-device { position: relative; }

@media (max-width: 1100px) { .lp-wrap { --s: 0.74; } }
@media (max-width: 400px) { .lp-wrap { --s: 0.7; } }
@media (max-width: 560px) { .lp-sprig { left: calc(-60px * var(--s)); width: calc(140px * var(--s)); } }
