@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,600&display=swap');

:root {
  --ink: #2a1a30;
  --ink-soft: #6e6072;
  --plum: #24152d;
  --plum-2: #33203e;
  --cream: #f7f1e9;
  --paper: #fffdf9;
  --peach: #f7c7a7;
  --peach-strong: #e99269;
  --lilac: #d7c7e7;
  --lilac-strong: #987cb5;
  --mint: #c9e3d2;
  --yellow: #f4c85b;
  --line: rgba(42, 26, 48, .11);
  --shadow: 0 24px 70px rgba(36, 21, 45, .11);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: 'DM Sans', 'Trebuchet MS', sans-serif; font-size: 15px; line-height: 1.5; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(152,124,181,.42); outline-offset: 3px; }
.app-noise { pointer-events: none; position: fixed; inset: 0; z-index: 10; opacity: .08; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }
.is-hidden { display: none !important; }
.eyebrow { margin: 0 0 11px; color: var(--ink-soft); font-size: 10px; font-weight: 700; letter-spacing: .19em; line-height: 1.2; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.04em; line-height: .98; }
h1, h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 500; }
h3 { font-size: 23px; }

/* Auth */
.auth-layout { display: grid; grid-template-columns: minmax(440px, 1.04fr) minmax(430px, .96fr); min-height: 100svh; background: var(--plum); }
.auth-visual { position: relative; display: flex; flex-direction: column; min-height: 100svh; padding: 42px clamp(36px, 6vw, 92px) 36px; overflow: hidden; color: #fff8f1; background: radial-gradient(circle at 25% 6%, #5c3c68 0, #34203f 32%, #24152d 70%); }
.auth-visual::before { content: ''; position: absolute; width: 600px; height: 600px; left: -230px; bottom: -280px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 50px rgba(255,255,255,.018), 0 0 0 100px rgba(255,255,255,.016), 0 0 0 150px rgba(255,255,255,.012); }
.brand-lockup { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; color: inherit; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; color: var(--yellow); font-size: 19px; }
.auth-visual-copy { position: relative; z-index: 1; max-width: 500px; margin-top: clamp(80px, 14vh, 160px); }
.auth-visual .eyebrow { color: #d0bcd8; }
.auth-visual h1 { margin-bottom: 22px; font-size: clamp(54px, 6.2vw, 94px); letter-spacing: -.065em; }
.auth-visual h1 em { color: #f2cfad; }
.lede { max-width: 350px; margin-bottom: 0; color: #cfbed3; font-size: 16px; }
.auth-pet-stage { position: absolute; right: clamp(15px, 7vw, 120px); bottom: 40px; width: min(54%, 390px); min-width: 285px; height: 45vh; min-height: 320px; }
.sun-disc { position: absolute; width: 280px; height: 280px; top: 4px; left: 20px; border: 1px solid rgba(247,199,167,.35); border-radius: 50%; background: radial-gradient(circle, rgba(247,199,167,.24), rgba(247,199,167,.03) 60%, transparent 61%); box-shadow: 0 0 50px rgba(247,199,167,.13); }
.auth-pet { position: absolute; z-index: 2; width: 360px; max-width: 100%; height: auto; right: 3%; bottom: 20px; filter: drop-shadow(0 24px 17px rgba(8, 2, 13, .25)); animation: pet-float 5s ease-in-out infinite; }
.ground-shadow { position: absolute; z-index: 1; left: 20%; right: 2%; bottom: 14px; height: 35px; border-radius: 50%; background: rgba(4,1,8,.32); filter: blur(11px); }
.star { position: absolute; color: #f6d475; z-index: 3; font-size: 23px; }
.star-one { top: 56px; right: 4%; animation: twinkle 2.8s ease-in-out infinite; }.star-two { top: 155px; left: 0; color: #f4c7aa; font-size: 38px; }.star-three { bottom: 155px; left: 10%; color: #c5a9d3; animation: twinkle 3.6s ease-in-out infinite .8s; }
.pet-caption { position: absolute; z-index: 4; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; color: #d5c2d9; font-size: 11px; letter-spacing: .04em; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #8bc7a0; box-shadow: 0 0 0 4px rgba(139,199,160,.13); }
.auth-footer-note { position: relative; z-index: 1; display: flex; justify-content: space-between; margin-top: auto; color: #9886a1; font-size: 11px; letter-spacing: .04em; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 50px clamp(34px, 7vw, 110px); background: var(--cream); }
.auth-panel-inner { width: min(100%, 410px); }
.mobile-brand { display: none; color: var(--ink); margin-bottom: 62px; }
.auth-heading { margin-bottom: 29px; }.auth-heading h2 { margin-bottom: 10px; font-size: 46px; }.auth-heading p:not(.eyebrow) { color: var(--ink-soft); margin-bottom: 0; }
.auth-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 27px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.5); }
.auth-tab { flex: 1; padding: 11px 8px; border: 0; border-radius: 9px; color: var(--ink-soft); background: transparent; font-size: 13px; font-weight: 600; transition: .2s ease; }.auth-tab:hover { color: var(--ink); }.auth-tab.is-active { color: var(--ink); background: #fff; box-shadow: 0 4px 12px rgba(36,21,45,.07); }
.auth-form { display: grid; gap: 16px; }.auth-form label, .modal-card label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 600; }.auth-form input, .modal-card input { width: 100%; padding: 13px 14px; border: 1px solid rgba(42,26,48,.14); border-radius: 10px; color: var(--ink); outline: 0; background: rgba(255,255,255,.6); transition: .2s ease; }.auth-form input::placeholder, .modal-card input::placeholder { color: #b7aebb; }.auth-form input:focus, .modal-card input:focus { border-color: var(--lilac-strong); background: #fff; box-shadow: 0 0 0 4px rgba(152,124,181,.12); }
.primary-button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 16px; border: 0; border-radius: 11px; color: #fff9f2; background: var(--plum); font-size: 13px; font-weight: 700; box-shadow: 0 7px 0 #160d1c; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }.primary-button:hover { transform: translateY(-2px); box-shadow: 0 9px 0 #160d1c; background: #34203d; }.primary-button:active { transform: translateY(2px); box-shadow: 0 3px 0 #160d1c; }.auth-submit { margin-top: 6px; }.form-helper { margin: -4px 0 0; color: #9a8b9c; font-size: 11px; text-align: center; }.form-error { min-height: 18px; margin: 14px 0 0; color: #af4d59; font-size: 12px; }

/* App shell */
.app-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100svh; background: var(--cream); }.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100svh; padding: 34px 18px 20px; color: #f7eee7; background: var(--plum); }.sidebar .brand-lockup { padding: 0 12px; margin-bottom: 52px; }.sidebar-profile { display: flex; align-items: center; gap: 9px; padding: 0 10px 27px; border-bottom: 1px solid rgba(255,255,255,.12); }.sidebar-profile strong { display: block; font-size: 13px; }.sidebar-muted { display: block; margin-top: 1px; color: #a895ac; font-size: 10px; }.icon-button { margin-left: auto; border: 0; color: #a895ac; background: transparent; font-size: 18px; transform: rotate(-45deg); }.icon-button:hover { color: #fff; }.avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 35px; height: 35px; border: 2px solid rgba(255,255,255,.3); border-radius: 50%; color: var(--plum); background: #f4c8ae; font-family: Georgia, serif; font-size: 15px; font-weight: 700; }.avatar-partner { color: #684f78; background: #d8c6e5; }.main-nav { display: grid; gap: 6px; padding-top: 25px; }.nav-item { display: flex; align-items: center; gap: 11px; padding: 12px 12px; border: 0; border-radius: 11px; color: #bca9c1; background: transparent; text-align: left; font-size: 13px; font-weight: 600; transition: .2s ease; }.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }.nav-item.is-active { color: #fff9f4; background: #4a3154; box-shadow: inset 3px 0 var(--peach); }.nav-icon { width: 20px; color: #deb59e; font-size: 19px; text-align: center; }.nav-count { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: auto; border-radius: 50%; color: var(--plum); background: var(--yellow); font-size: 10px; }.sidebar-bottom { margin-top: auto; }.mini-note { display: flex; gap: 10px; padding: 14px 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.055); }.note-spark { color: var(--yellow); font-size: 18px; }.mini-note strong { display: block; font-size: 11px; }.mini-note p { margin: 3px 0 0; color: #a896ad; font-size: 10px; line-height: 1.3; }.sidebar-legal { margin-top: 24px; color: #66526d; font-size: 9px; letter-spacing: .14em; text-align: center; }.app-content { min-width: 0; padding: 0 clamp(26px, 4.2vw, 68px) 56px; }.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 96px; border-bottom: 1px solid var(--line); }.mobile-menu-title { display: none; font-weight: 700; }.topbar-date { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 11px; }.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--peach-strong); }.topbar-actions { display: flex; align-items: center; gap: 19px; }.coins-pill { display: flex; align-items: center; gap: 6px; padding: 8px 11px; border: 1px solid rgba(42,26,48,.11); border-radius: 99px; color: var(--ink-soft); background: rgba(255,255,255,.42); font-size: 11px; }.coins-pill strong { color: var(--ink); font-size: 13px; }.coin-icon { display: inline-flex; color: #c08c13; font-size: 15px; }.topbar .avatar { width: 33px; height: 33px; }
.page { display: none; padding-top: 51px; animation: page-in .35s ease both; }.page.is-active { display: block; }.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }.page-heading h2 { margin-bottom: 0; font-size: clamp(37px, 4vw, 57px); }.home-heading { align-items: start; }.home-heading h2 { font-size: clamp(41px, 4vw, 59px); }.heading-stats, .shop-balance { display: grid; gap: 4px; justify-items: end; padding-bottom: 5px; }.tiny-label { color: var(--ink-soft); font-size: 9px; font-weight: 700; letter-spacing: .15em; }.heading-stats strong, .shop-balance strong { display: flex; align-items: center; gap: 5px; font-size: 22px; }.shop-balance { min-width: 105px; }.shop-balance > span { color: var(--ink-soft); font-size: 11px; }
.partner-chip { display: flex; align-items: center; gap: 9px; align-self: end; max-width: 260px; padding: 7px 11px 7px 7px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-soft); background: rgba(255,255,255,.4); font-size: 11px; }.partner-chip:hover { color: var(--ink); background: #fff; }.partner-avatars { display: flex; }.avatar-mini { width: 25px; height: 25px; border: 2px solid var(--cream); font-size: 11px; }.partner-avatars .avatar-partner { margin-left: -7px; }.home-grid { display: grid; grid-template-columns: minmax(300px, .92fr) minmax(370px, 1.08fr); gap: 21px; }.card-surface { border: 1px solid rgba(42,26,48,.09); border-radius: var(--radius); background: rgba(255,253,249,.66); box-shadow: 0 13px 35px rgba(42,26,48,.035); }.pet-card { position: relative; min-height: 484px; padding: 25px 26px 20px; overflow: hidden; background: #eee3d7; }.pet-card::before { content: ''; position: absolute; width: 360px; height: 360px; left: -70px; top: 130px; border: 1px solid rgba(121,89,76,.11); border-radius: 50%; box-shadow: 0 0 0 43px rgba(121,89,76,.025), 0 0 0 86px rgba(121,89,76,.022); }.pet-card-top, .pet-mood-row, .section-title-row { position: relative; z-index: 1; display: flex; align-items: start; justify-content: space-between; }.pet-card h3 { margin: 0 0 3px; font-size: 28px; }.pet-meta { margin: 0; color: #957f73; font-size: 11px; }.quiet-button { border: 0; color: #a18a7f; background: transparent; font-size: 18px; }.pet-stage { position: relative; display: flex; align-items: end; justify-content: center; height: 345px; margin-top: 9px; }.pet-image { position: relative; z-index: 2; width: min(83%, 315px); max-height: 335px; object-fit: contain; filter: drop-shadow(0 18px 12px rgba(103,75,60,.16)); animation: pet-float 5s ease-in-out infinite; }.pet-ground { position: absolute; z-index: 1; bottom: 9px; width: 67%; height: 25px; border-radius: 50%; background: rgba(92,68,56,.2); filter: blur(8px); }.pet-orbit { position: absolute; border: 1px solid rgba(128,99,90,.18); border-radius: 50%; }.orbit-one { width: 280px; height: 170px; transform: rotate(-22deg); }.orbit-two { width: 240px; height: 130px; transform: rotate(20deg); opacity: .55; }.pet-spark { position: absolute; z-index: 3; color: #bc805f; font-size: 22px; }.spark-a { right: 8%; top: 46px; }.spark-b { left: 6%; top: 99px; color: #a88abb; }.pet-mood-row { align-items: center; }.mood-chip { display: flex; align-items: center; gap: 9px; padding: 6px 10px 6px 8px; border-radius: 99px; color: #66554c; background: rgba(255,255,255,.58); font-size: 10px; }.pet-last-seen { color: #9a8276; font-size: 10px; }.care-card { padding: 28px 30px 25px; }.care-card h3 { margin-bottom: 0; font-size: 25px; }.date-stamp { padding: 8px 9px; border: 1px solid rgba(42,26,48,.11); border-radius: 8px; color: var(--ink-soft); font-size: 9px; font-weight: 700; letter-spacing: .13em; }.care-stats { display: grid; gap: 20px; margin: 36px 0 29px; }.care-stat { display: grid; gap: 8px; }.stat-head { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 11px; }.stat-head strong { margin-left: auto; color: var(--ink); font-size: 12px; }.stat-icon { width: 20px; color: var(--lilac-strong); font-size: 19px; text-align: center; }.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #eee8e3; }.progress-fill { display: block; height: 100%; border-radius: inherit; transition: width .6s cubic-bezier(.22,.8,.35,1); }.fill-peach { background: var(--peach-strong); }.fill-lilac { background: var(--lilac-strong); }.fill-mint { background: #87b899; }.care-stat small { color: #a2959c; font-size: 10px; }.care-button { margin-top: 3px; }.button-note { margin: 15px 0 0; color: #9d8e9b; font-size: 10px; text-align: center; }.home-lower { display: grid; grid-template-columns: 1.1fr .9fr; gap: 21px; margin-top: 21px; }.link-card { position: relative; display: flex; min-height: 252px; padding: 27px 30px; overflow: hidden; background: var(--plum); }.link-card .eyebrow { color: #ae98b7; }.link-card h3 { margin-bottom: 10px; color: #fff7ee; font-size: 27px; }.link-card h3 em { color: var(--peach); }.link-card-copy { position: relative; z-index: 2; width: min(100%, 340px); }.link-card p:not(.eyebrow):not(.link-status) { max-width: 315px; margin-bottom: 18px; color: #bfaec4; font-size: 11px; }.keycode-box { display: flex; align-items: center; justify-content: space-between; width: min(100%, 300px); padding: 6px 6px 6px 13px; border: 1px dashed rgba(247,199,167,.45); border-radius: 9px; color: #f8d4bd; background: rgba(255,255,255,.06); font-family: monospace; font-size: 13px; letter-spacing: .12em; }.copy-button { padding: 8px 9px; border: 0; border-radius: 6px; color: var(--plum); background: var(--peach); font-size: 10px; font-weight: 700; }.copy-button span { margin-left: 4px; font-size: 13px; }.link-status { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: #9b8aa3; font-size: 10px; }.status-dot-muted { background: #aa96b2; box-shadow: none; }.link-illustration { position: absolute; right: 0; top: 0; width: 42%; height: 100%; overflow: hidden; }.link-illustration::before, .link-illustration::after { content: ''; position: absolute; border: 1px solid rgba(247,199,167,.23); border-radius: 50%; }.link-illustration::before { width: 220px; height: 220px; top: 22px; right: -57px; }.link-illustration::after { width: 310px; height: 310px; top: -23px; right: -100px; }.link-ring { position: absolute; z-index: 1; top: 53px; right: 52px; display: grid; place-items: center; width: 85px; height: 85px; border: 1px solid rgba(247,199,167,.44); border-radius: 50%; color: var(--peach); font-size: 27px; }.link-heart { position: absolute; z-index: 2; top: 78px; right: 22px; color: #f4c4a9; font-size: 35px; }.link-dots { position: absolute; bottom: 27px; right: 36px; color: #c6a7c5; letter-spacing: 9px; }.activity-card { min-height: 252px; padding: 27px 28px; }.activity-card h3 { margin: 0; font-size: 23px; }.text-button { border: 0; color: var(--lilac-strong); background: transparent; font-size: 11px; }.text-button span { margin-left: 3px; }.activity-list { margin-top: 22px; }.empty-activity { display: flex; align-items: center; gap: 11px; padding: 18px 14px; border: 1px dashed rgba(42,26,48,.15); border-radius: 11px; color: #a0919e; background: rgba(255,255,255,.35); font-size: 11px; }.empty-activity span { color: var(--yellow); font-size: 20px; }.empty-activity p { margin: 0; }

/* Games */
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 19px; }.game-card { min-height: 390px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #f6d7c3; box-shadow: 0 13px 35px rgba(42,26,48,.035); }.game-card-lilac { background: #dfd4e9; }.game-card-mint { background: #d9e9dc; }.game-card-meta { display: flex; align-items: center; justify-content: space-between; color: #796660; font-size: 9px; font-weight: 700; letter-spacing: .13em; }.game-reward { padding: 5px 7px; border-radius: 99px; color: #6a4d25; background: rgba(255,255,255,.45); letter-spacing: .02em; }.game-visual { position: relative; display: flex; align-items: center; justify-content: center; height: 177px; margin: 16px 0 20px; border-radius: 15px; overflow: hidden; background: rgba(255,255,255,.24); }.visual-mimos::before, .visual-mimos::after { content: ''; position: absolute; border: 1px solid rgba(131,79,54,.2); border-radius: 50%; }.visual-mimos::before { width: 170px; height: 170px; }.visual-mimos::after { width: 240px; height: 240px; }.visual-sun { position: absolute; top: 25px; right: 34px; color: #d78655; font-size: 29px; }.visual-heart { z-index: 1; color: #ba674e; font-family: Georgia, serif; font-size: 82px; }.visual-star { position: absolute; bottom: 25px; left: 31px; color: #e0a25d; font-size: 23px; }.visual-memory { display: grid; grid-template-columns: repeat(2, 45px); gap: 9px; padding: 20px; }.visual-memory span { display: grid; place-items: center; width: 45px; height: 53px; border: 1px solid rgba(94,66,112,.15); border-radius: 8px; color: #80658e; background: rgba(255,255,255,.48); font-family: Georgia, serif; font-size: 21px; }.visual-memory span:nth-child(2), .visual-memory span:nth-child(3) { color: #ba826a; transform: translateY(-8px); }.visual-secret { background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.5), rgba(139,186,153,.05) 50%); }.secret-letter { display: grid; place-items: center; width: 79px; height: 79px; border: 1px solid rgba(75,115,83,.3); border-radius: 50%; color: #4d7c5a; background: rgba(255,255,255,.38); font-family: Georgia, serif; font-size: 45px; }.secret-spark { position: absolute; top: 28px; right: 40px; color: #d0a13c; font-size: 24px; }.game-card h3 { margin-bottom: 8px; font-size: 24px; }.game-card p { min-height: 42px; margin-bottom: 19px; color: #74666b; font-size: 11px; }.outline-button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 11px 13px; border: 1px solid rgba(42,26,48,.2); border-radius: 9px; color: var(--ink); background: rgba(255,255,255,.35); font-size: 11px; font-weight: 700; transition: .18s ease; }.outline-button:hover { background: rgba(255,255,255,.72); transform: translateY(-1px); }.games-tip { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 17px 20px; }.tip-icon { color: #c18a21; font-size: 24px; }.games-tip strong { font-size: 12px; }.games-tip p { margin: 2px 0 0; color: var(--ink-soft); font-size: 11px; }.tip-arrow { margin-left: auto; color: var(--lilac-strong); font-size: 24px; }

/* Shop */
.shop-layout { display: grid; grid-template-columns: minmax(270px, .75fr) minmax(470px, 1.25fr); gap: 21px; }.shop-preview { min-height: 530px; padding: 26px; background: #eee3d7; overflow: hidden; }.shop-pet-stage { position: relative; display: flex; align-items: end; justify-content: center; height: 408px; margin-top: 13px; }.shop-glow { position: absolute; width: 270px; height: 270px; border: 1px solid rgba(143,107,91,.17); border-radius: 50%; box-shadow: 0 0 0 34px rgba(143,107,91,.035), 0 0 0 67px rgba(143,107,91,.025); }.shop-pet { position: relative; z-index: 1; width: 90%; max-width: 300px; filter: drop-shadow(0 19px 13px rgba(103,75,60,.15)); }.equipped-badge { position: absolute; z-index: 3; right: 2px; top: 52px; padding: 6px 8px; border-radius: 99px; color: #705520; background: #f6d77a; font-size: 9px; font-weight: 700; }.preview-caption { display: flex; justify-content: space-between; padding-top: 16px; border-top: 1px solid rgba(42,26,48,.1); }.preview-caption span:first-child { font-family: Georgia, serif; font-size: 20px; }.preview-caption span:last-child { align-self: center; color: #8f7b72; font-size: 10px; }.shop-filter-row { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 12px; }.shop-count { color: var(--ink-soft); font-size: 11px; }.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }.shop-item { display: grid; align-content: space-between; min-height: 238px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,249,.72); transition: .18s ease; }.shop-item:hover { transform: translateY(-3px); box-shadow: 0 13px 27px rgba(42,26,48,.07); }.shop-item.is-owned { border-color: rgba(152,124,181,.46); }.shop-item-visual { display: grid; place-items: center; height: 108px; border-radius: 11px; background: #eee8ed; font-size: 54px; }.shop-item:nth-child(2n) .shop-item-visual { background: #f4e1d5; }.shop-item:nth-child(3n) .shop-item-visual { background: #e1eee2; }.shop-item-name { margin: 12px 0 3px; font-size: 12px; font-weight: 700; }.shop-item-category { color: var(--ink-soft); font-size: 9px; }.shop-action { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 11px; }.price-tag { display: flex; align-items: center; gap: 3px; color: #8b671e; font-size: 10px; font-weight: 700; }.item-button { padding: 6px 8px; border: 0; border-radius: 7px; color: var(--plum); background: #e4d7ec; font-size: 10px; font-weight: 700; }.item-button.buy { background: var(--plum); color: #fff; }.item-button:hover { filter: brightness(.97); transform: translateY(-1px); }

/* Modals + toast */
.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(34,19,40,.6); backdrop-filter: blur(8px); }.modal-card { position: relative; width: min(100%, 430px); padding: 31px; border: 1px solid rgba(255,255,255,.4); border-radius: 22px; background: var(--cream); box-shadow: 0 30px 100px rgba(15,4,20,.3); animation: modal-in .25s ease both; }.modal-close { position: absolute; top: 15px; right: 17px; width: 29px; height: 29px; border: 0; border-radius: 50%; color: var(--ink-soft); background: rgba(42,26,48,.06); font-size: 20px; line-height: 1; }.modal-card h2 { margin: 0 0 10px; font-size: 37px; }.modal-card > p:not(.eyebrow):not(.form-error) { color: var(--ink-soft); font-size: 12px; }.modal-card form { display: grid; gap: 16px; margin-top: 22px; }.game-modal-card { width: min(100%, 500px); }.game-content-header { margin-bottom: 19px; }.game-content-header h2 { margin-bottom: 6px; }.game-content-header p { margin: 0; color: var(--ink-soft); font-size: 12px; }.tap-game { display: grid; gap: 17px; text-align: center; }.tap-count { color: var(--lilac-strong); font-family: Georgia, serif; font-size: 54px; }.tap-arena { position: relative; display: grid; place-items: center; min-height: 190px; border-radius: 16px; overflow: hidden; background: #f4ddcf; }.tap-arena::after { content: '✦'; position: absolute; top: 18px; right: 29px; color: #ce9360; font-size: 22px; }.tap-button { width: 125px; height: 125px; border: 0; border-radius: 50%; color: #fff9ef; background: var(--plum); font-family: Georgia, serif; font-size: 24px; box-shadow: 0 9px 0 #160d1c, 0 15px 28px rgba(36,21,45,.18); transition: .12s ease; }.tap-button:active { transform: translateY(4px); box-shadow: 0 4px 0 #160d1c; }.tap-progress { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(42,26,48,.1); }.tap-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--peach-strong); transition: width .25s ease; }.memory-game { display: grid; gap: 18px; }.memory-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }.memory-card { height: 73px; border: 1px solid rgba(112,83,126,.2); border-radius: 10px; color: transparent; background: #e6dcef; font-family: Georgia, serif; font-size: 24px; transition: .18s ease; }.memory-card.is-flipped, .memory-card.is-matched { color: #725487; background: #fff; transform: rotateY(180deg); }.memory-card.is-matched { color: #ba7b61; background: #f8e6dc; transform: none; }.memory-message { min-height: 18px; margin: 0; color: var(--ink-soft); font-size: 11px; text-align: center; }.secret-game { display: grid; gap: 15px; }.secret-question { margin: 0; font-family: Georgia, serif; font-size: 22px; }.secret-options { display: grid; gap: 8px; }.secret-option { padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: rgba(255,255,255,.55); text-align: left; font-size: 12px; transition: .17s ease; }.secret-option:hover { border-color: var(--lilac-strong); background: #fff; }.secret-option.is-correct { border-color: #81b68e; background: #dceee0; }.secret-option.is-wrong { border-color: #d39088; background: #f7ded8; }.toast-region { position: fixed; z-index: 50; top: 22px; right: 22px; display: grid; gap: 9px; width: min(340px, calc(100vw - 44px)); }.toast { padding: 13px 15px; border: 1px solid rgba(255,255,255,.5); border-radius: 11px; color: #fff9f3; background: #33203e; box-shadow: 0 14px 30px rgba(36,21,45,.2); font-size: 12px; animation: toast-in .25s ease both; }.toast.is-error { color: #fff4ef; background: #9c4e58; }

@keyframes pet-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1deg); } }
@keyframes twinkle { 0%, 100% { opacity: .45; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1080px) {
  .auth-layout { grid-template-columns: minmax(390px, .95fr) minmax(390px, 1.05fr); }.auth-pet-stage { right: 5px; width: 55%; }.auth-pet { width: 310px; }
  .app-layout { grid-template-columns: 210px minmax(0, 1fr); }.home-grid { grid-template-columns: 1fr; }.pet-card { min-height: 430px; }.pet-stage { height: 300px; }.pet-card::before { top: 96px; }.home-lower { grid-template-columns: 1fr; }.shop-layout { grid-template-columns: minmax(240px, .72fr) 1.28fr; }.shop-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px) {
  .auth-layout { display: block; min-height: 100svh; }.auth-visual { min-height: 410px; height: 47svh; padding: 25px 24px; }.auth-visual-copy { margin-top: 55px; }.auth-visual h1 { font-size: clamp(45px, 13vw, 73px); }.auth-pet-stage { right: -7px; bottom: 6px; width: 46%; height: 67%; min-width: 205px; min-height: 210px; }.auth-pet { width: 220px; }.sun-disc { width: 180px; height: 180px; top: 10px; }.pet-caption { right: 13px; bottom: -1px; font-size: 9px; }.auth-footer-note { display: none; }.auth-panel { min-height: 53svh; padding: 37px 24px 48px; }.mobile-brand { display: flex; }.auth-panel-inner { width: min(100%, 400px); }.mobile-brand + .auth-heading { margin-top: 0; }.auth-heading h2 { font-size: 39px; }.app-layout { display: block; }.sidebar { position: fixed; z-index: 20; top: auto; bottom: 0; width: 100%; height: 66px; padding: 0 14px; border-top: 1px solid rgba(255,255,255,.14); }.sidebar > .brand-lockup, .sidebar-profile, .sidebar-bottom { display: none; }.main-nav { display: flex; justify-content: space-around; gap: 3px; height: 100%; padding: 6px 0 7px; }.nav-item { flex: 1; flex-direction: column; justify-content: center; gap: 1px; padding: 5px; border-radius: 8px; font-size: 9px; text-align: center; }.nav-item.is-active { box-shadow: inset 0 2px var(--peach); }.nav-icon { height: 23px; font-size: 18px; }.nav-count { position: absolute; margin: -27px 0 0 24px; width: 14px; height: 14px; font-size: 8px; }.app-content { padding: 0 18px 88px; }.topbar { min-height: 72px; }.mobile-menu-title { display: flex; align-items: center; gap: 5px; font-size: 14px; }.mobile-menu-title .brand-mark { width: 19px; font-size: 16px; }.topbar-date { display: none; }.topbar-actions { gap: 10px; }.coins-pill { padding: 6px 8px; font-size: 9px; }.coins-pill span:last-child { display: none; }.page { padding-top: 35px; }.page-heading { align-items: start; flex-direction: column; gap: 18px; margin-bottom: 25px; }.page-heading h2, .home-heading h2 { font-size: 42px; }.home-heading { gap: 20px; }.partner-chip { align-self: start; }.pet-card { min-height: 415px; padding: 21px 20px 17px; }.pet-stage { height: 285px; }.pet-image { width: min(81%, 270px); }.care-card { padding: 23px 20px; }.care-stats { margin: 28px 0 23px; }.home-lower { margin-top: 16px; gap: 16px; }.link-card { min-height: 285px; padding: 23px 20px; }.link-illustration { width: 34%; opacity: .65; }.activity-card { padding: 23px 20px; }.games-grid { grid-template-columns: 1fr; gap: 14px; }.game-card { min-height: auto; padding: 17px; }.game-visual { height: 140px; margin: 14px 0 16px; }.games-tip { margin-top: 14px; }.shop-layout { grid-template-columns: 1fr; gap: 16px; }.shop-preview { min-height: 410px; }.shop-pet-stage { height: 290px; }.shop-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }.shop-item { min-height: 205px; padding: 10px; }.shop-item-visual { height: 87px; font-size: 42px; }.modal-card { padding: 27px 21px 23px; }.modal-card h2 { font-size: 33px; }.memory-card { height: 65px; }
}
@media (max-width: 420px) {
  .auth-visual { min-height: 390px; }.auth-visual-copy { margin-top: 48px; }.auth-visual h1 { font-size: 45px; }.auth-pet-stage { width: 48%; min-width: 178px; }.auth-pet { width: 195px; }.auth-pet-stage .sun-disc { width: 160px; height: 160px; }.auth-panel { padding-top: 30px; }.auth-heading h2 { font-size: 36px; }.page-heading h2, .home-heading h2 { font-size: 37px; }.home-grid { gap: 14px; }.pet-card { min-height: 390px; }.pet-stage { height: 260px; }.pet-image { width: 76%; }.pet-last-seen { display: none; }.care-card h3 { font-size: 22px; }.link-card h3 { font-size: 24px; }.link-card-copy { width: 82%; }.link-illustration { width: 31%; }.keycode-box { font-size: 11px; }.shop-grid { grid-template-columns: 1fr 1fr; }.shop-item-name { font-size: 11px; }.shop-item-category { font-size: 8px; }.shop-action { display: grid; gap: 5px; }.item-button { width: 100%; }.memory-board { gap: 6px; }.memory-card { height: 58px; font-size: 19px; }
}

/* Dynamic states */
.activity-row { display: flex; align-items: center; gap: 9px; padding: 11px 3px; border-bottom: 1px solid rgba(42,26,48,.08); color: var(--ink-soft); font-size: 11px; }
.activity-row:last-child { border-bottom: 0; }
.activity-row strong { margin-left: auto; color: #9b7425; font-size: 10px; }
.activity-icon { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: #8a67a2; background: #e7dced; font-size: 12px; }
.secret-option:disabled { cursor: default; }
.game-result { display: grid; justify-items: center; gap: 6px; padding: 8px 10px 2px; text-align: center; }
.result-star { color: #d4a53c; font-size: 46px; }
.game-result strong { font-family: Georgia, serif; font-size: 28px; }
.game-result p { margin: 0 0 13px; color: var(--ink-soft); font-size: 11px; }
.game-result .primary-button { width: 100%; }
.primary-button:disabled, .item-button:disabled { cursor: default; opacity: .65; transform: none; box-shadow: none; }

/* Mobile-first polish: Pocket Pals is designed to feel natural one-handed. */
@media (max-width: 780px) {
  html, body { overflow-x: hidden; }
  body { min-width: 320px; font-size: 14px; }
  .auth-layout { min-height: 100svh; background: var(--cream); }
  .auth-visual { display: block; height: 34svh; min-height: 255px; padding: 21px 20px 14px; background: radial-gradient(circle at 30% 0%, #5c3c68 0, #34203f 42%, #24152d 90%); }
  .auth-visual .brand-lockup { font-size: 14px; }
  .auth-visual-copy { max-width: 59%; margin-top: 33px; }
  .auth-visual h1 { margin-bottom: 13px; font-size: clamp(38px, 11.5vw, 52px); line-height: .92; }
  .auth-visual .lede { max-width: 220px; color: #d7c6d9; font-size: 11px; line-height: 1.35; }
  .auth-pet-stage { right: -16px; bottom: -7px; width: 53%; min-width: 178px; height: 92%; min-height: 0; }
  .auth-pet { right: 0; bottom: 13px; width: min(190px, 100%); }
  .sun-disc { top: 4px; left: 18px; width: 170px; height: 170px; }
  .auth-pet-stage .star-one { top: 30px; right: 2px; font-size: 18px; }
  .auth-pet-stage .star-two { top: 80px; left: 0; font-size: 27px; }
  .auth-pet-stage .star-three { bottom: 96px; left: 2px; font-size: 19px; }
  .pet-caption { right: 13px; bottom: -1px; max-width: 150px; font-size: 8px; white-space: nowrap; }
  .auth-footer-note { display: none; }
  .auth-panel { min-height: 66svh; align-items: flex-start; padding: 24px 20px calc(34px + env(safe-area-inset-bottom)); background: var(--cream); }
  .mobile-brand { display: none; }
  .auth-panel-inner { width: min(100%, 430px); }
  .auth-heading { margin-bottom: 19px; }
  .auth-heading .eyebrow { margin-bottom: 8px; }
  .auth-heading h2 { margin-bottom: 7px; font-size: clamp(34px, 10vw, 43px); line-height: .98; }
  .auth-heading p:not(.eyebrow) { max-width: 280px; font-size: 12px; }
  .auth-tabs { margin-bottom: 19px; border-radius: 12px; }
  .auth-tab { min-height: 44px; font-size: 12px; }
  .auth-form { gap: 13px; }
  .auth-form label { gap: 6px; font-size: 11px; }
  .auth-form input, .modal-card input { min-height: 49px; padding: 13px 13px; border-radius: 11px; font-size: 14px; }
  .primary-button { min-height: 49px; padding: 13px 15px; border-radius: 11px; }
  .auth-submit { margin-top: 4px; }
  .form-helper { margin-top: -1px; font-size: 10px; line-height: 1.35; }
  .form-error { margin-top: 10px; }

  .sidebar { height: calc(66px + env(safe-area-inset-bottom)); padding: 0 10px env(safe-area-inset-bottom); }
  .main-nav { padding: 5px 0 5px; }
  .nav-item { min-height: 56px; gap: 2px; font-size: 9px; }
  .nav-icon { height: 23px; }
  .app-content { padding: 0 14px calc(84px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 64px; }
  .mobile-menu-title { font-size: 13px; }
  .topbar-actions { gap: 8px; }
  .coins-pill { min-height: 32px; padding: 5px 8px; }
  .topbar .avatar { width: 32px; height: 32px; }
  .page { padding-top: 23px; }
  .page-heading { gap: 15px; margin-bottom: 22px; }
  .page-heading h2, .home-heading h2 { font-size: clamp(34px, 10vw, 42px); line-height: .96; }
  .partner-chip { min-height: 39px; padding-right: 10px; font-size: 10px; }
  .card-surface { border-radius: 18px; }
  .home-grid, .home-lower { gap: 14px; }
  .pet-card { min-height: 385px; padding: 20px 18px 16px; }
  .pet-card h3 { font-size: 25px; }
  .pet-stage { height: 255px; }
  .pet-image { width: min(77%, 250px); max-height: 250px; }
  .pet-orbit.orbit-one { width: 235px; height: 145px; }
  .pet-orbit.orbit-two { width: 200px; height: 112px; }
  .pet-spark { font-size: 18px; }
  .mood-chip { max-width: 185px; font-size: 9px; }
  .care-card { padding: 21px 18px 18px; }
  .care-card h3 { font-size: 22px; }
  .care-stats { gap: 17px; margin: 25px 0 22px; }
  .care-stat small { font-size: 9px; }
  .link-card { min-height: 270px; padding: 22px 18px; }
  .link-card h3 { font-size: 24px; }
  .link-card p:not(.eyebrow):not(.link-status) { max-width: 230px; font-size: 10px; }
  .link-illustration { width: 30%; opacity: .6; }
  .keycode-box { width: min(100%, 270px); font-size: 10px; }
  .activity-card { min-height: 220px; padding: 21px 18px; }
  .games-grid { gap: 12px; }
  .game-card { min-height: 0; padding: 15px; border-radius: 17px; }
  .game-visual { height: 132px; margin: 12px 0 14px; }
  .game-card h3 { font-size: 22px; }
  .game-card p { min-height: 0; margin-bottom: 14px; }
  .outline-button, .item-button { min-height: 43px; }
  .games-tip { gap: 10px; margin-top: 13px; padding: 14px 16px; }
  .games-tip p { font-size: 10px; }
  .shop-preview { min-height: 365px; padding: 21px 18px; }
  .shop-pet-stage { height: 250px; }
  .shop-pet { max-width: 230px; }
  .shop-grid { gap: 9px; }
  .shop-item { min-height: 196px; padding: 9px; border-radius: 14px; }
  .shop-item-visual { height: 82px; font-size: 40px; }
  .shop-item-name { margin-top: 10px; }
  .shop-action { margin-top: 9px; }
  .modal-backdrop { align-items: end; padding: 10px; }
  .modal-card { width: 100%; max-height: calc(100svh - 20px); overflow-y: auto; padding: 25px 18px 19px; border-radius: 20px 20px 15px 15px; }
  .modal-card h2 { font-size: 32px; }
  .modal-card form { margin-top: 17px; }
  .game-modal-card { padding-bottom: 22px; }
  .tap-arena { min-height: 165px; }
  .tap-button { width: 112px; height: 112px; }
  .memory-card { height: 60px; }
  .toast-region { top: 13px; right: 13px; width: min(320px, calc(100vw - 26px)); }
}

@media (max-width: 390px) {
  .auth-visual { height: 31svh; min-height: 235px; padding-top: 18px; }
  .auth-visual-copy { margin-top: 27px; }
  .auth-visual h1 { font-size: 36px; }
  .auth-visual .lede { max-width: 170px; font-size: 10px; }
  .auth-pet-stage { width: 51%; min-width: 165px; }
  .auth-pet { width: 176px; bottom: 8px; }
  .sun-disc { width: 150px; height: 150px; }
  .auth-panel { min-height: 69svh; padding: 20px 17px calc(30px + env(safe-area-inset-bottom)); }
  .auth-heading h2 { font-size: 32px; }
  .auth-heading p:not(.eyebrow) { font-size: 11px; }
  .auth-tabs { margin-bottom: 16px; }
  .auth-form { gap: 11px; }
  .auth-form input { min-height: 47px; }
  .page-heading h2, .home-heading h2 { font-size: 34px; }
  .app-content { padding-left: 12px; padding-right: 12px; }
  .pet-card { min-height: 365px; }
  .pet-stage { height: 240px; }
  .pet-image { width: 74%; max-height: 230px; }
  .mood-chip { max-width: 160px; }
  .link-card h3 { font-size: 22px; }
  .link-card-copy { width: 86%; }
  .link-illustration { width: 26%; }
}
