:root {
  --ink: #2A1B30; --muted: #4A3A55; --soft: #5E5066; --faint: #8A7C93; --line: #E7DCEA;
  --accent: #D9487A; --accent-dk: #B8335F; --bg: #F5EFF5; --card: #FFFFFF; --night: #1C1424;
  --lilac: #EFE5FF; --pink: #FCE3EC; --sage: #E6F0E0; --navy: #E3E6F7;
  --r: 22px; --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: "Figtree", system-ui, sans-serif; font-size: 16px; -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.disp { font-family: "Bricolage Grotesque", system-ui, sans-serif; letter-spacing: -0.02em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--soft); }
.boot img { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 16px; border: 0; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; } .btn-primary:hover { background: var(--accent-dk); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-danger { background: #fff; color: #C62F3B; border: 1.5px solid #F2C4C8; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 0; background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink); flex: none; }
.icon-btn svg, .btn svg { width: 20px; height: 20px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--soft); }
.input, textarea.input { min-height: 52px; border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 16px; background: #fff; font-size: 17px; width: 100%; }
textarea.input { min-height: 220px; line-height: 1.6; resize: vertical; }
.input:focus { border-color: var(--accent); outline: none; }
.err { color: #C62F3B; font-size: 14px; min-height: 18px; }

/* ---------- Layout ---------- */
.shell { min-height: 100vh; display: flex; }
.side { display: none; }
.main { flex: 1; min-width: 0; padding: 20px 16px calc(100px + var(--safe-b)); max-width: 1180px; margin: 0 auto; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -6px 20px rgba(42,27,48,.07); display: grid; grid-template-columns: repeat(5, 1fr); align-items: start; padding: 10px 6px calc(10px + var(--safe-b)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--faint); text-decoration: none; padding: 4px 0; }
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 800; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar .talk { justify-self: center; margin-top: -30px; width: 64px; height: 64px; border-radius: 32px; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(217,72,122,.35); }
.tabbar .talk svg { width: 28px; height: 28px; }

@media (min-width: 900px) {
  .side { display: flex; flex-direction: column; gap: 6px; width: 260px; flex: none; background: #fff; border-right: 1px solid #EDE4F0; padding: 26px 18px; position: sticky; top: 0; height: 100vh; }
  .side .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; text-decoration: none; color: var(--ink); }
  .side .brand img { width: 40px; height: 40px; }
  .side .brand span { font-weight: 800; font-size: 22px; } .side .brand b { color: var(--accent); }
  .side nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: var(--soft); text-decoration: none; font-weight: 600; }
  .side nav a svg { width: 20px; height: 20px; }
  .side nav a[aria-current="page"] { background: #F3ECF8; color: var(--ink); font-weight: 700; }
  .side .me { margin-top: auto; background: var(--lilac); border-radius: 20px; padding: 12px; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
  .side .me .mini { width: 52px; height: 52px; border-radius: 50%; }
  .main { padding: 32px 40px 48px; }
  .tabbar { display: none; }
}

/* ---------- Auth & onboarding ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.auth .art { display: none; }
.auth .pane { padding: 40px 22px; max-width: 460px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.auth .pane .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 22px; }
.auth .pane .brand img { width: 40px; height: 40px; } .auth .pane .brand b { color: var(--accent); }
.auth h1 { margin: 12px 0 0; font-size: 34px; line-height: 1.08; font-weight: 800; }
.auth p.sub { margin: 0; color: var(--soft); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #EDE3F1; border-radius: 16px; padding: 4px; }
.seg button { border: 0; background: transparent; border-radius: 12px; min-height: 44px; font-weight: 700; cursor: pointer; color: var(--soft); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(42,27,48,.08); }
@media (min-width: 900px) {
  .auth { grid-template-columns: 1fr 1fr; }
  .auth .art { display: grid; place-items: center; background: radial-gradient(500px 500px at 50% 50%, #4B2E6E 0%, var(--night) 75%); padding: 40px; }
  .auth .art img { width: min(520px, 90%); border-radius: 40px; box-shadow: 0 30px 60px rgba(0,0,0,.35); }
  .auth .pane { justify-content: center; }
}
.friends { display: flex; flex-direction: column; gap: 12px; }
.friend-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border-radius: 22px; background: #fff; border: 2px solid transparent; cursor: pointer; text-align: left; width: 100%; box-shadow: 0 4px 14px rgba(42,27,48,.06); }
.friend-card[aria-pressed="true"] { box-shadow: none; }
.friend-card .av { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex: none; display: block; }
.friend-card .av img { width: 100%; height: 100%; display: block; }
.friend-card b { display: block; font-family: "Bricolage Grotesque", sans-serif; font-size: 20px; }
.friend-card small { display: block; font-size: 13px; font-weight: 600; color: var(--soft); }
.friend-card span.q { display: block; font-size: 14px; margin-top: 3px; line-height: 1.35; }
.f-daysy .av { background: var(--lilac); } .f-daysy[aria-pressed="true"] { background: var(--lilac); border-color: #B79BEF; }
.f-ivy .av { background: var(--navy); } .f-ivy[aria-pressed="true"] { background: var(--navy); border-color: #2E3150; }
.f-sage .av { background: var(--sage); } .f-sage[aria-pressed="true"] { background: var(--sage); border-color: #759E80; }

/* ---------- Home ---------- */
.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.head-row .date { color: var(--soft); font-size: 15px; }
.head-row h1 { margin: 4px 0 0; font-size: clamp(26px, 4vw, 38px); line-height: 1.1; font-weight: 800; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.home-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 1100px) { .home-grid { grid-template-columns: 3fr 2fr; align-items: start; } }
.card { background: var(--card); border-radius: 26px; padding: 18px; box-shadow: 0 8px 24px rgba(42,27,48,.05); }
.card h2 { margin: 0; font-size: 22px; font-weight: 700; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cal-head h2 { white-space: nowrap; }
.cal-head .streak { white-space: nowrap; }
@media (max-width: 520px) { .cal-head h2 { font-size: 22px; } .cal-head .streak { font-size: 12px; padding: 6px 10px; } .cal-head .icon-btn { width: 38px; height: 38px; } .dow, .days { gap: 3px; } .day { border-radius: 11px; font-size: 13px; } }
.cal-head .nav { display: flex; gap: 6px; }
.cal-head .icon-btn { background: #F6F0F8; }
.streak { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--pink); color: var(--accent-dk); font-size: 14px; font-weight: 700; }
.dow, .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--faint); margin-bottom: 6px; }
.day { position: relative; text-decoration: none; aspect-ratio: 1 / 1.08; border-radius: 14px; border: 0; background: #FAF6FB; display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--soft); font-weight: 600; font-size: 14px; line-height: 1; min-width: 0; }
.day .n { font-variant-numeric: tabular-nums; }
/* a written day: number sits neatly in the corner, the flower fills the box */
.day.has { background: #fff; box-shadow: inset 0 0 0 1px #EFE4F2; }
.day.has .n { position: absolute; top: 5px; left: 0; right: 0; text-align: center; font-size: 10.5px; font-weight: 700; color: var(--faint); }
.day.has img { width: 58%; max-width: 42px; margin-top: 22%; }
.day.tdy.has .n { color: var(--accent-dk); }
.day.tdy { background: var(--pink); box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent-dk); font-weight: 800; }
.day.future { color: #C4B8CB; cursor: default; background: transparent; }
.day.blank { visibility: hidden; }
.side-col { display: flex; flex-direction: column; gap: 16px; }
.memory { display: flex; gap: 12px; align-items: center; background: var(--lilac); border-radius: 22px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.memory img { width: 42px; height: 42px; flex: none; }
.memory .k { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: #7A57C9; }
.memory .t { margin-top: 3px; line-height: 1.35; }
.list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.row-link { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: #FAF6FB; text-decoration: none; color: var(--ink); }
.row-link img { width: 36px; height: 36px; flex: none; }
.row-link b { display: block; } .row-link span { font-size: 13px; color: var(--soft); }
.empty { color: var(--soft); line-height: 1.5; }
.today-cta { display: flex; align-items: center; gap: 14px; background: var(--night); color: #fff; border-radius: 26px; padding: 16px; }
.today-cta .mini { width: 72px; height: 72px; border-radius: 50%; flex: none; }
.today-cta p { margin: 0 0 10px; color: #E4D8EE; line-height: 1.4; }
.today-cta b { display: block; font-family: "Bricolage Grotesque", sans-serif; font-size: 20px; margin-bottom: 4px; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; min-height: calc(100vh - 140px); max-width: 760px; margin: 0 auto; }
.chat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-top .who { text-align: center; }
.chat-top .who b { display: block; font-family: "Bricolage Grotesque", sans-serif; font-size: 18px; }
.chat-top .who span { font-size: 13px; color: var(--soft); }
.stage { display: flex; align-items: flex-end; gap: 6px; margin-top: 8px; background: linear-gradient(180deg, #E9DCFF, #F1E8FB); border-radius: 28px; padding: 6px 12px 0; }
.stage .charbox { width: 150px; flex: none; }
.bubble { margin-bottom: 52px; background: #fff; border-radius: 20px 20px 20px 6px; padding: 12px 15px; font-size: 16px; line-height: 1.4; box-shadow: 0 6px 18px rgba(42,27,48,.08); min-height: 48px; }
.log { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px 2px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; line-height: 1.4; font-size: 15px; white-space: pre-wrap; }
.msg.a { align-self: flex-start; background: #fff; border-bottom-left-radius: 6px; }
.msg.u { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.msg.live { background: var(--pink); color: var(--ink); }
/* conversation rows: her bubbles carry her face, yours sit on the right */
.log .row { display: flex; align-items: flex-end; gap: 8px; animation: rowIn .35s cubic-bezier(.3,.7,.2,1) both; }
.log .row.u { justify-content: flex-end; }
.log .row .msg { max-width: min(82%, 560px); }
.log .row.a .msg { border-radius: 20px 20px 20px 6px; box-shadow: 0 2px 10px rgba(42,27,48,.05); }
.log .row.u .msg { border-radius: 20px 20px 6px 20px; }
.mav { width: 32px; height: 32px; border-radius: 50%; flex: none; background: #EFE4FB; }
.log .row.a + .row.a .mav { visibility: hidden; }
.log .row.speaking .msg { box-shadow: 0 0 0 2px rgba(226,82,138,.25), 0 6px 18px rgba(226,82,138,.12); }
.log .row.speaking .mav { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(226,82,138,.45); animation: speakRing 1.2s ease-in-out infinite; }
.log .row.note { justify-content: center; }
.msg.note { background: #FFF1F4; color: #A0294F; font-size: 14px; }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes speakRing { 50% { box-shadow: 0 0 0 3px #fff, 0 0 0 8px rgba(226,82,138,.15); } }
/* status pill under/next to the character */
.st-pill { display: inline-flex; align-items: center; gap: 8px; align-self: center; margin: 0 0 18px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.75); color: var(--soft); font-size: 14px; font-weight: 600; white-space: nowrap; }
.st-pill i { width: 8px; height: 8px; border-radius: 50%; background: #C9B8DA; flex: none; }
.st-pill.listen i { background: #5DBB86; animation: dotPulse 2s ease-in-out infinite; }
.st-pill.think i, .st-pill.talk i { background: var(--pink); animation: dotPulse 1s ease-in-out infinite; }
.st-pill.talk { color: var(--ink); }
.st-pill.err i { background: #D9534F; }
@keyframes dotPulse { 50% { box-shadow: 0 0 0 6px rgba(226,82,138,.0); transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .log .row, .st-pill i, .log .row.speaking .mav { animation: none !important; } }
.composer { position: sticky; bottom: calc(84px + var(--safe-b)); background: var(--bg); padding: 10px 0 6px; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 900px) { .composer { bottom: 0; } }
.composer form { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 52px; max-height: 140px; resize: none; border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px; background: #fff; font-size: 16px; }
.mic { width: 56px; height: 56px; border-radius: 28px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.mic svg { width: 26px; height: 26px; }
.mic.on { box-shadow: 0 0 0 8px rgba(217,72,122,.18); animation: ring 1.2s ease-in-out infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 14px rgba(217,72,122,.08); } }
.hint { font-size: 13px; color: var(--soft); text-align: center; }
.typing { display: inline-flex; gap: 4px; } .typing i { width: 7px; height: 7px; border-radius: 4px; background: var(--faint); animation: dot 1s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { opacity: .3; transform: translateY(-3px); } }

/* ---------- Video call ---------- */
.call { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; overflow: hidden;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(22px + var(--safe-b));
  background: radial-gradient(60vmax 60vmax at 50% 38%, #FFF4FB 0%, #EADCFF 45%, #C7B0F2 100%); }
.call.ivy { background: radial-gradient(60vmax 60vmax at 50% 38%, #F3F5FF 0%, #D9DEF6 45%, #A9B1E0 100%); }
.call.sage { background: radial-gradient(60vmax 60vmax at 50% 38%, #F6FBF2 0%, #DCEBD4 45%, #AFCDA6 100%); }
.call .bokeh i { position: absolute; border-radius: 50%; background: rgba(255,255,255,.45); filter: blur(2px); animation: drift 9s ease-in-out infinite; }
.call .bokeh i:nth-child(1) { width: 90px; height: 90px; left: 6%; top: 18%; }
.call .bokeh i:nth-child(2) { width: 40px; height: 40px; right: 12%; top: 30%; animation-delay: -2s; }
.call .bokeh i:nth-child(3) { width: 140px; height: 140px; right: -40px; bottom: 30%; animation-delay: -4s; opacity: .6; }
.call .bokeh i:nth-child(4) { width: 26px; height: 26px; left: 18%; bottom: 36%; animation-delay: -6s; }
.call .bokeh i:nth-child(5) { width: 60px; height: 60px; left: 44%; top: 8%; animation-delay: -3s; opacity: .5; }
@keyframes drift { 50% { transform: translate(10px, -16px); } }
.call .top { width: 100%; max-width: 720px; display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; position: relative; z-index: 1; }
.call .who { text-align: center; }
.call .who b { display: block; font-size: 22px; }
.call .who span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.7); font-size: 13px; font-weight: 700; color: var(--muted); }
.call .who span i { width: 8px; height: 8px; border-radius: 4px; background: #3FB57A; animation: live 1.6s infinite; }
@keyframes live { 50% { opacity: .35; } }
.call .self { justify-self: end; width: 64px; height: 84px; border-radius: 16px; background: linear-gradient(160deg, #3A2C48, #1C1424); border: 2px solid rgba(255,255,255,.85); color: #D8C8EE; font-size: 11px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 6px 16px rgba(42,27,48,.2); }
.call .self svg { width: 26px; height: 26px; }
.call .big { flex: 1; min-height: 0; width: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; z-index: 1; }
.call .big .charbox { height: 100%; max-height: 520px; aspect-ratio: 240 / 262; max-width: 100%; }
.call .big .charbox svg { width: 100%; height: 100%; display: block; }
.call .talk { width: 100%; max-width: 560px; min-height: 92px; display: flex; flex-direction: column; justify-content: flex-start; margin-top: 12px; position: relative; z-index: 1; }
.call .cap { padding: 12px 16px; border-radius: 20px; font-size: 17px; line-height: 1.4; box-shadow: 0 8px 22px rgba(42,27,48,.1); position: relative; }
.call .cap.a { background: #fff; color: var(--ink); align-self: center; text-align: center; }
.call .cap.a::before { content: ""; position: absolute; top: -8px; left: 50%; width: 16px; height: 16px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.call .cap.u { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; max-width: 90%; }
.call .cap.u .heard { display: block; }
.call .cap.u .fix-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.call .cap.u .fix { border: 0; border-radius: 999px; background: #fff; color: var(--accent-dk); font-weight: 800; font-size: 14px; padding: 7px 14px; cursor: pointer; }
.call .cap.u .bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.35); position: relative; overflow: hidden; }
.call .cap.u .bar::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: fillbar 2.6s linear forwards; }
@keyframes fillbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.call .state { margin-top: 10px; min-height: 20px; text-align: center; font-size: 14px; font-weight: 700; color: var(--ink); position: relative; z-index: 1; }
.call .typebar { width: 100%; max-width: 560px; margin-top: 8px; display: flex; gap: 8px; position: relative; z-index: 1; }
.call .typebar input { flex: 1; min-width: 0; height: 50px; border: 0; border-radius: 16px; padding: 0 16px; font-size: 16px; background: rgba(255,255,255,.95); box-shadow: 0 6px 16px rgba(42,27,48,.1); }
.call .typebar button { width: 50px; height: 50px; border: 0; border-radius: 16px; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; }
.call .typebar button svg { width: 22px; height: 22px; }
.call .ctrls { margin-top: 12px; display: flex; justify-content: center; align-items: center; gap: 22px; position: relative; z-index: 1; }
.call .ctrls .c { width: 58px; height: 58px; border-radius: 29px; border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; cursor: pointer; color: var(--ink); box-shadow: 0 6px 16px rgba(42,27,48,.12); }
.call .ctrls .c svg { width: 24px; height: 24px; }
.call .ctrls .c.mainmic { width: 78px; height: 78px; border-radius: 39px; background: var(--ink); color: #fff; }
.call .ctrls .c.mainmic.rec { background: var(--accent); box-shadow: 0 0 0 10px rgba(217,72,122,.2); animation: ring 1.2s ease-in-out infinite; }
.call .ctrls .c.end { background: #E5484D; color: #fff; }
.call .ctrls .c.mainmic.ready { animation: readyPulse 1.6s ease-in-out infinite; }
@keyframes readyPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(42,27,48,.35); } 50% { box-shadow: 0 0 0 14px rgba(42,27,48,0); } }
.call .ctrls .c:disabled { opacity: .5; }
@media (max-height: 640px) { .call .talk { min-height: 70px; } .call .cap { font-size: 15px; } .call .self { width: 52px; height: 66px; } }

/* ---------- Entry ---------- */
.entry-wrap { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.entry-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
@media (max-width: 520px) { .entry-bar .btn { min-height: 44px; padding: 0 14px; } }
.entry-bar .group { display: flex; gap: 8px; }
.paper { background: #FFFDF8; border-radius: 30px; box-shadow: 0 14px 36px rgba(42,27,48,.08); display: grid; grid-template-columns: 1fr; overflow: hidden; }
.paper .left { padding: 28px 22px; display: flex; flex-direction: column; gap: 14px; }
.paper .right { padding: 24px 22px; background: #FBF6FC; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 900px) { .paper { grid-template-columns: 3fr 2fr; } .paper .left { padding: 44px 48px; border-right: 1px dashed #E8DCEA; } .paper .right { padding: 44px 36px; } }
.paper .when { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.paper h1 { margin: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.06; font-weight: 800; }
.paper .body p { margin: 0 0 14px; font-size: 17px; line-height: 1.7; color: #3A2C40; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 6px 12px; border-radius: 999px; background: var(--lilac); font-size: 13px; font-weight: 600; }
.mood-big { display: flex; align-items: center; gap: 12px; }
.mood-big img { width: 60px; height: 60px; }
.mood-big .k { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--faint); }
.mood-big b { font-family: "Bricolage Grotesque", sans-serif; font-size: 24px; }
.moment { background: var(--pink); border-radius: 20px; padding: 16px 18px; }
.moment .k { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--accent-dk); }
.moment p { margin: 6px 0 0; font-family: "Bricolage Grotesque", sans-serif; font-weight: 600; font-size: 20px; line-height: 1.3; }
.note { display: flex; align-items: flex-end; gap: 10px; margin-top: auto; }
.note .mini { width: 64px; height: 64px; border-radius: 50%; flex: none; }
.note p { margin: 0; background: #fff; border-radius: 18px 18px 18px 6px; padding: 12px 14px; line-height: 1.45; box-shadow: 0 6px 18px rgba(42,27,48,.06); }
.flower-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.flower-pick button { border: 2px solid transparent; background: #fff; border-radius: 16px; padding: 8px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; }
.flower-pick button img { width: 38px; height: 38px; }
.flower-pick button[aria-pressed="true"] { border-color: var(--accent); background: var(--pink); }

/* ---------- Summary, letters, settings ---------- */
.page { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.page h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); font-weight: 800; }
.wrapped { background: radial-gradient(420px 360px at 50% 20%, #4B2E6E 0%, var(--night) 72%); color: #fff; border-radius: 30px; padding: 26px 22px; display: flex; flex-direction: column; gap: 14px; max-width: 460px; width: 100%; margin: 0 auto; }
.wrapped .k { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: #D8C8EE; }
.wrapped h2 { margin: 0; font-size: 34px; line-height: 1.05; font-weight: 800; }
.wrapped h2 em { font-style: normal; color: #F6C343; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats div { background: rgba(255,255,255,.08); border-radius: 18px; padding: 12px 14px; }
.stats b { display: block; font-family: "Bricolage Grotesque", sans-serif; font-size: 32px; }
.stats span { font-size: 14px; color: #D8C8EE; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; background: rgba(255,255,255,.08); border-radius: 18px; padding: 12px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: 12px; color: #D8C8EE; }
.bars i { display: block; width: 100%; border-radius: 6px; min-height: 4px; }
.bars img { width: 24px; height: 24px; }
.month-moment { background: var(--pink); color: var(--ink); border-radius: 18px; padding: 14px 16px; }
.letter { background: #fff; border-radius: 20px; padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start; }
.letter.locked { background: #F1EAF4; color: var(--soft); }
.letter svg { width: 26px; height: 26px; flex: none; }
.letter p { margin: 4px 0 0; white-space: pre-wrap; line-height: 1.5; }
.settings .card { display: flex; flex-direction: column; gap: 14px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { width: 52px; height: 32px; border-radius: 16px; border: 0; background: #DDD2E2; position: relative; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 12px; background: #fff; transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--accent); } .switch[aria-checked="true"]::after { transform: translateX(20px); }

.toast { position: fixed; left: 50%; bottom: calc(110px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; z-index: 100; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.writing { position: fixed; inset: 0; z-index: 60; background: rgba(245,239,245,.94); display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; }
.writing .charbox { width: 200px; }
.writing b { font-family: "Bricolage Grotesque", sans-serif; font-size: 22px; }

/* ---------- Today / streak ---------- */
.today { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.today-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.today-head .date { color: var(--soft); font-size: 15px; }
.pill-row { display: flex; gap: 8px; align-items: center; }
.pill-row .best { font-size: 13px; font-weight: 700; color: var(--soft); }
.streak-hero { background: linear-gradient(180deg, #F1EAF6, #FFFFFF); border-radius: 30px; padding: 24px 18px 20px; text-align: center; box-shadow: 0 10px 30px rgba(42,27,48,.06); }
.streak-hero.lit { background: linear-gradient(180deg, #FFE9D6 0%, #FFF8F1 100%); }
.streak-hero.risk { background: linear-gradient(180deg, #FFF0E3 0%, #FFFFFF 100%); }
.streak-hero h1 { margin: 6px 0 4px; font-size: 32px; font-weight: 800; }
.streak-hero p { margin: 0 auto; max-width: 420px; color: var(--muted); line-height: 1.45; }
.flame-wrap { display: inline-block; }
.flame-wrap.glow svg { filter: drop-shadow(0 8px 18px rgba(255,110,40,.45)); animation: flick 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flick { 50% { transform: scale(1.04) rotate(-1.5deg); } }
.streak-hero.risk .flame-wrap svg { animation: shake 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes shake { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-4deg); } 90% { transform: rotate(4deg); } 95% { transform: rotate(-2deg); } }
.week { margin-top: 18px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--soft); padding: 6px 0; border-radius: 14px; }
.wd.is-today { background: #fff; box-shadow: inset 0 0 0 2px #FFB13B; color: var(--ink); }
.wd.future { opacity: .45; }
.buddy { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: 26px; padding: 16px; box-shadow: 0 8px 24px rgba(42,27,48,.05); }
.buddy .av { width: 84px; height: 84px; border-radius: 50%; flex: none; }
.buddy .say { flex: 1; min-width: 0; }
.buddy .say b { font-family: "Bricolage Grotesque", sans-serif; font-size: 18px; }
.buddy .say p { margin: 4px 0 12px; background: #F6F0F8; border-radius: 6px 18px 18px 18px; padding: 10px 14px; line-height: 1.45; }
.buddy .head-actions .btn { min-height: 46px; padding: 0 16px; font-size: 15px; }
.goals { display: flex; flex-direction: column; gap: 12px; }
.goal-top { display: flex; align-items: baseline; justify-content: space-between; } .goal-top h2 { font-size: 19px; } .goal-top span { font-weight: 800; color: #FF6A2B; }
.bar { height: 12px; border-radius: 6px; background: #F1EAF4; overflow: hidden; } .bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #FFB13B, #FF5A36); }
.badges { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.badge { display: flex; flex-direction: column; align-items: center; font-size: 12px; font-weight: 800; color: var(--faint); }
.badge.got { color: #C2410C; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick .q { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.quick .q svg { width: 24px; height: 24px; color: var(--accent); } .quick .q span { font-size: 13px; color: var(--soft); }

/* ---------- Wide screens (web first) ---------- */
.today-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.quick { grid-template-columns: 1fr 1fr; }
@media (min-width: 1100px) {
  .today { max-width: 1180px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }
  .streak-hero { padding: 34px 28px 26px; }
  .streak-hero h1 { font-size: 38px; }
  .chat { max-width: 1180px; }
  .chat-body { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; flex: 1; }
  .chat-body .stage { position: sticky; top: 24px; margin-top: 0; flex-direction: column; align-items: center; justify-content: flex-end; padding: 22px 18px 0; height: calc(100vh - 150px); min-height: 520px; overflow: hidden; }
  .chat-body .stage::before { content: ""; position: absolute; left: 50%; bottom: 40px; width: 300px; height: 300px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.7), rgba(255,255,255,0) 70%); pointer-events: none; }
  .chat-body .stage .charbox { width: 300px; position: relative; order: 2; }
  .chat-body .stage .st-pill { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); margin: 0; }
  .chat-body .convo { display: flex; flex-direction: column; min-height: calc(100vh - 150px); background: #fff; border-radius: 28px; padding: 8px 18px 0; }
  .chat-body .composer { background: #fff; border-top: 1px solid #F0E8F3; }
  .chat-body .log { padding: 16px 0; }
  .chat-body .msg.a { background: #F6F0F8; }
}
@media (min-width: 1100px) and (max-height: 760px) { .chat-body .stage .charbox { width: 230px; } }
img[src$="av-daysy.svg"] { background: #EFE5FF; border-radius: 50%; }
img[src$="av-ivy.svg"] { background: #E3E6F7; border-radius: 50%; }
img[src$="av-sage.svg"] { background: #E6F0E0; border-radius: 50%; }

.pending { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: #FCE3EC; border-radius: 22px; padding: 16px 18px; }
.pending b { display: block; } .pending span { font-size: 14px; color: var(--muted); }

/* diary page: made for reading */
.paper .left { background: repeating-linear-gradient(180deg, transparent 0 33px, rgba(217,72,122,.06) 33px 34px); }
.paper .body p { font-family: "Lora", Georgia, serif; font-size: 18.5px; line-height: 1.85; color: #3A2C40; }
.paper .body p:first-child::first-letter { font-family: "Bricolage Grotesque", sans-serif; float: left; font-size: 3.1em; line-height: .9; font-weight: 800; color: var(--accent); margin: 6px 10px 0 0; }
.paper .body p:last-child { font-style: italic; }
.moment p { font-family: "Lora", Georgia, serif; font-style: italic; font-weight: 500; }

.voice-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vopt { text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; color: inherit; }
.vopt b { font-size: 16px; } .vopt span { font-size: 13px; color: var(--soft); line-height: 1.4; }
.vopt em { font-style: normal; align-self: flex-start; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--accent-dk); background: var(--pink); padding: 5px 12px; border-radius: 999px; }
.vopt[aria-checked="true"] { border-color: var(--accent); background: #FFF6FA; }
@media (max-width: 520px) { .voice-opts { grid-template-columns: 1fr; } }

/* phones: the character stays put at the top, only the conversation scrolls, composer at the bottom */
@media (max-width: 1099px) {
  .chat { height: calc(100dvh - 120px - var(--safe-b)); min-height: 0; }
  .chat-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .chat-body .stage { flex: none; }
  .convo { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .convo .log { flex: 1; min-height: 0; overflow-y: auto; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18px); mask-image: linear-gradient(180deg, transparent 0, #000 18px); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scroll-padding-bottom: 12px; }
  .convo .composer { position: static; flex: none; }
}
@media (min-width: 900px) and (max-width: 1099px) { .chat { height: calc(100dvh - 80px); } }

/* Mesajlaş header: on wide screens it sits on top of the conversation, like a messaging app */
.convo-head { display: none; }
@media (min-width: 1100px) {
  .chat-top { display: none; }
  .chat-body { margin-top: 0; }
  .convo-head { display: flex; align-items: center; gap: 12px; padding: 12px 4px 14px; border-bottom: 1px solid #F0E8F3; }
  .convo-head .av { width: 48px; height: 48px; border-radius: 50%; flex: none; }
  .convo-head .who { flex: 1; min-width: 0; }
  .convo-head .who b { display: block; font-family: "Bricolage Grotesque", sans-serif; font-size: 20px; }
  .convo-head .who span { font-size: 14px; color: var(--soft); }
  .convo-head .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
}

.blank-in .when, .paper .when { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.big-lock { width: 84px; height: 84px; border-radius: 50%; background: var(--pink); color: var(--accent); display: grid; place-items: center; }
.big-lock svg { width: 40px; height: 40px; }
.book-page.locked h1 { margin: 0; font-size: 30px; }
.lock-tag { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 3px 8px; border-radius: 999px; background: var(--pink); color: var(--accent-dk); font-size: 11px; vertical-align: 1px; }
.lock-tag svg { width: 12px; height: 12px; }
.lock-btn.on { background: var(--ink); color: #fff; }
.row-link b svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 5px; color: var(--accent); }
.writing-card { display: grid; justify-items: center; gap: 6px; padding: 40px 20px; text-align: center; }
.writing-card img { width: 96px; height: 96px; border-radius: 50%; animation: dotPulse 1.6s ease-in-out infinite; }
.writing-card span { color: var(--soft); }

/* ---------- Photo stickers ---------- */
.sticker { position: absolute; margin: 0; padding: 7px 7px 22px; background: #fff; border-radius: 6px; transform: rotate(var(--r)); cursor: grab; touch-action: none; user-select: none;
  box-shadow: 0 1px 2px rgba(42,27,48,.12), 0 10px 22px rgba(42,27,48,.14); transition: transform .18s, box-shadow .18s; }
.sticker img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 3px; background: #F1E8F3; }
.sticker .tape { position: absolute; top: -9px; left: 50%; width: 46%; height: 20px; transform: translateX(-50%) rotate(calc(var(--r) * -1.4));
  background: repeating-linear-gradient(45deg, rgba(252,227,236,.88) 0 6px, rgba(239,229,255,.88) 6px 12px); border-radius: 2px; box-shadow: 0 1px 2px rgba(42,27,48,.08); }
.sticker:nth-child(3n+2) .tape { background: repeating-linear-gradient(45deg, rgba(230,240,224,.9) 0 6px, rgba(255,247,214,.9) 6px 12px); }
.sticker:hover { transform: rotate(var(--r)) scale(1.03); z-index: 2; }
.sticker.lift { cursor: grabbing; z-index: 5; transform: rotate(0deg) scale(1.08); box-shadow: 0 2px 4px rgba(42,27,48,.12), 0 22px 40px rgba(42,27,48,.22); }
.add-photo { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  border: 1.5px dashed #D8C5DE; background: rgba(255,255,255,.8); color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.add-photo:hover { border-color: var(--accent); color: var(--accent); }
.add-photo svg { width: 20px; height: 20px; }
.stickers.empty .add-photo { position: static; transform: none; width: 100%; justify-content: center; padding: 16px; border-radius: 18px; }
.photo-ov { position: fixed; inset: 0; z-index: 80; background: rgba(28,20,36,.86); display: grid; grid-template-rows: 1fr auto; gap: 16px; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); animation: fadeIn .18s; }
.photo-ov figure { margin: 0; display: grid; place-items: center; min-height: 0; }
.photo-ov img { max-width: 100%; max-height: 100%; border-radius: 10px; border: 8px solid #fff; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.photo-acts { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- PIN keypad ---------- */
.pin-ov { position: fixed; inset: 0; z-index: 90; background: rgba(28,20,36,.5); backdrop-filter: blur(6px); display: grid; place-items: end center; animation: fadeIn .18s; }
@media (min-width: 600px) { .pin-ov { place-items: center; } }
.pin-ov.out { opacity: 0; transition: opacity .18s; }
.pin-sheet { width: min(100%, 380px); background: #fff; border-radius: 30px 30px 0 0; padding: 26px 26px calc(22px + env(safe-area-inset-bottom)); text-align: center; animation: sheetUp .26s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 600px) { .pin-sheet { border-radius: 30px; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.pin-lock { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; background: var(--pink); color: var(--accent); display: grid; place-items: center; }
.pin-lock svg { width: 26px; height: 26px; }
.pin-sheet h2 { margin: 0; font-size: 22px; }
.pin-sub { margin: 6px 0 0; color: var(--soft); font-size: 14px; }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 20px 0 18px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #D8C5DE; transition: all .15s; }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); transform: scale(1.1); }
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-keys button { height: 58px; border: 0; border-radius: 18px; background: #F6F0F8; color: var(--ink); font: 700 22px "Bricolage Grotesque", system-ui, sans-serif; cursor: pointer; }
.pin-keys button:active { background: var(--pink); transform: scale(.97); }
.pin-keys button.ghost { background: transparent; font: 600 15px "Figtree", system-ui, sans-serif; color: var(--soft); }
.pin-forgot { margin-top: 12px; border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .book-page, .pin-sheet, .photo-ov, .pin-ov { animation: none !important; } }

/* ---------- Diary notebook ---------- */
.nb-wrap { gap: 12px; }
.nb-stage { position: relative; margin: 0 auto; width: 100%; perspective: 2200px; user-select: none; -webkit-user-select: none; }
.nb-stage .nb-side { position: absolute; top: 0; bottom: 0; }
.nb-stage .nb-side.one { left: 50%; width: var(--pw); transform: translateX(-50%); }
.nb-stage.spread .nb-side.l, .nb-stage.spread .leaf.from-l { left: calc(50% - var(--pw)); width: var(--pw); }
.nb-stage.spread .nb-side.r, .nb-stage.spread .leaf.from-r { left: 50%; width: var(--pw); }
.nb-page { position: absolute; inset: 0; background-color: #FFFDF8; overflow: hidden;
  background-image: repeating-linear-gradient(180deg, transparent 0 29px, rgba(155,120,190,.16) 29px 30px);
  background-position: 0 28px; background-repeat: repeat-y; background-size: 100% 30px;
  box-shadow: 0 16px 40px rgba(42,27,48,.10), 0 2px 6px rgba(42,27,48,.05); }
/* the paper's top margin stays clean, a pink margin line runs down the side */
.nb-page::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 28px; background: #FFFDF8; }
.nb-page::after { content: ""; position: absolute; top: 0; bottom: 0; left: 46px; width: 1.5px; background: rgba(226,82,138,.28); }
.nb-page.single { border-radius: 8px 22px 22px 8px; }
.nb-page.single .nb-in { left: 60px; }
/* spiral holes on the single page's binding edge */
.nb-page.single { background-image: radial-gradient(circle at 16px 50%, #EDE3F0 0 6px, transparent 7px), repeating-linear-gradient(180deg, transparent 0 29px, rgba(155,120,190,.16) 29px 30px);
  background-size: 32px 44px, 100% 30px; background-repeat: repeat-y, repeat-y; background-position: 0 18px, 0 28px; }
.nb-page.left { border-radius: 22px 4px 4px 22px; }
.nb-page.right { border-radius: 4px 22px 22px 4px; }
.nb-page.left::after { left: auto; right: 34px; }
.nb-page.left .nb-in { left: 38px; right: 52px; }
.nb-page.right .nb-in { left: 62px; }
.nb-stage.spread .nb-side.l .nb-page, .leaf .face .nb-page.left { box-shadow: inset -26px 0 30px -24px rgba(42,27,48,.22), 0 16px 40px rgba(42,27,48,.10); }
.nb-stage.spread .nb-side.r .nb-page, .leaf .face .nb-page.right { box-shadow: inset 26px 0 30px -24px rgba(42,27,48,.22), 0 16px 40px rgba(42,27,48,.10); }
.spine { position: absolute; top: 6px; bottom: 6px; left: 50%; width: 18px; margin-left: -9px; z-index: 4; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #CDBBD6 0 4px, #fff 4.5px 6px, transparent 6.5px) 0 0 / 18px 36px repeat-y; }
.nb-page.empty-pg .pg-num { display: none; }
.nb-in { position: absolute; top: 28px; bottom: 40px; left: 58px; right: 24px; overflow: hidden; }
.pg-num { position: absolute; bottom: 12px; right: 22px; font: italic 13px/1 "Lora", Georgia, serif; color: var(--faint); }
.nb-page.left .pg-num { right: auto; left: 22px; }
.nb-in > * { margin: 0; }
.nb-in .pg-head .when, .nb-in .pg-cont { font: 700 12px/30px "Figtree", system-ui, sans-serif; letter-spacing: .08em; color: var(--accent); }
.nb-in .pg-cont { font-weight: 600; letter-spacing: .02em; color: var(--faint); text-transform: none; }
.nb-in .pg-head h1 { font-size: 26px; line-height: 30px; margin: 0 0 30px; font-weight: 800; }
.nb-in p { font: 17px/30px "Lora", Georgia, serif; color: #3A2C40; text-indent: 1.4em; }
.nb-in p.first { text-indent: 0; }
.nb-in p.first::first-letter { font-family: "Bricolage Grotesque", sans-serif; float: left; font-size: 54px; line-height: 54px; font-weight: 800; color: var(--accent); margin: 3px 8px 0 0; }
.nb-in p.cont { text-indent: 0; }
.nb-in .tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 7px; }
.nb-in .tags span { line-height: 1; padding: 4px 10px; font-size: 13px; }
.nb-in .pg-meta { display: flex; align-items: center; gap: 12px; height: 60px; margin-top: 30px; }
.nb-in .pg-meta img { width: 50px; height: 50px; }
.nb-in .k { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--faint); line-height: 1.2; }
.nb-in .pg-meta b { font-size: 18px; }
.nb-in .pg-moment { margin: 0 0 30px; padding: 0 12px; border-left: 3px solid var(--accent); }
.nb-in .pg-moment .k { line-height: 30px; }
.nb-in .pg-moment p { text-indent: 0; font-style: italic; }
.nb-in .pg-photos { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4%; padding: 12px 4% 18px; margin: 0; }
.nb-in .pg-photos.al-c { justify-content: center; } .nb-in .pg-photos.al-l { justify-content: flex-start; } .nb-in .pg-photos.al-r { justify-content: flex-end; }
.nb-in .pg-photos .sticker { position: relative; left: auto; top: auto; flex: none; }
.nb-stage { touch-action: pan-y pinch-zoom; }
.nb-stage .sticker { touch-action: none; }
.nb-menu { position: absolute; z-index: 20; width: 220px; background: #fff; border-radius: 18px; padding: 6px; box-shadow: 0 14px 40px rgba(42,27,48,.22); display: grid; gap: 4px; animation: sheetUp .18s ease; }
.nb-menu button { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; border: 0; border-radius: 12px; background: none; font: 600 15px "Figtree", system-ui, sans-serif; color: var(--ink); cursor: pointer; text-align: left; }
.nb-menu button:hover, .nb-menu button:active { background: #F6F0F8; }
.nb-menu svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.nb-write { position: absolute; left: 50px; right: 14px; z-index: 15; background: rgba(255,253,248,.97); border-radius: 12px; box-shadow: 0 10px 30px rgba(42,27,48,.16); padding: 6px 8px 8px; }
.nb-page.left .nb-write { left: 30px; right: 44px; }
.nb-write textarea { width: 100%; border: 0; outline: 0; resize: none; background: repeating-linear-gradient(180deg, transparent 0 29px, rgba(155,120,190,.25) 29px 30px); font: 17px/30px "Lora", Georgia, serif; color: #3A2C40; padding: 0 4px; user-select: text; -webkit-user-select: text; }
.nb-write .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.nb-write .btn { min-height: 40px; padding: 0 14px; }
.nb-hint { text-align: center; font-size: 13px; color: var(--faint); margin-top: -4px; }
.nb-in .pg-note { display: flex; gap: 10px; align-items: flex-start; padding-top: 6px; }
.nb-in .pg-note .mini { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.nb-in .pg-note p { text-indent: 0; font: 15px/1.5 "Figtree", system-ui, sans-serif; background: #fff; border-radius: 16px; padding: 8px 12px; box-shadow: 0 2px 10px rgba(42,27,48,.06); }
.pg-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 0 8px; }
.pg-center .when { font: 700 12px/1.4 "Figtree", system-ui, sans-serif; letter-spacing: .08em; color: var(--accent); }
.pg-center h1 { margin: 0; font-size: 26px; } .pg-center .empty { margin: 0; }
.pg-av { width: 110px; height: 110px; border-radius: 50%; }
.nb-nav { display: flex; align-items: center; justify-content: center; gap: 14px; }
.nb-nav span { font: italic 14px "Lora", Georgia, serif; color: var(--soft); min-width: 150px; text-align: center; }
.nb-nav .icon-btn:disabled { opacity: .35; cursor: default; }
/* turning pages */
.leaf { position: absolute; top: 0; bottom: 0; z-index: 6; transform-style: preserve-3d; }
.leaf.from-r { transform-origin: left center; animation: leafR .62s cubic-bezier(.45,.05,.3,1) forwards; }
.leaf.from-l { transform-origin: right center; animation: leafL .62s cubic-bezier(.45,.05,.3,1) forwards; }
.leaf .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.leaf .face.back { transform: rotateY(180deg); }
.leaf .face::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(42,27,48,.0), rgba(42,27,48,.18)); opacity: 0; animation: leafShade .62s ease forwards; }
@keyframes leafR { to { transform: rotateY(-180deg); } }
@keyframes leafL { to { transform: rotateY(180deg); } }
@keyframes leafShade { 50% { opacity: 1; } }
.nb-side.one .nb-page.leaf-out { z-index: 3; transform-origin: left center; animation: pageOut .5s cubic-bezier(.45,.05,.3,1) forwards; }
.nb-side.one .nb-page.leaf-in, .nb-side.one .nb-page.enter-prev { z-index: 3; transform-origin: left center; animation: pageIn .5s cubic-bezier(.45,.05,.3,1) both; }
.nb-side.one .nb-page.leaf-fade { animation: pageFade .5s ease forwards; }
@keyframes pageOut { to { transform: rotateY(-100deg); box-shadow: 30px 0 60px rgba(42,27,48,.25); opacity: .6; } }
@keyframes pageIn { from { transform: rotateY(-100deg); opacity: .6; } }
@keyframes pageFade { to { opacity: 0; transform: translateX(40px); } }
@media (max-width: 899px) { .nb-page.single .nb-in { left: 56px; right: 18px; } .nb-in .pg-head h1 { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .leaf, .nb-page { animation: none !important; } }
@media (max-width: 520px) { .nb-wrap .entry-bar { flex-wrap: nowrap; } .nb-wrap #editBtn .lbl { display: none; } .nb-wrap #editBtn { width: 44px; padding: 0; justify-content: center; } }

/* ---------- Month bouquet ---------- */
.vase-card { display: grid; gap: 4px; background: linear-gradient(180deg, #FFFFFF, #FBF6FC); }
.vase-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.vase-head h2 { margin: 0; font-size: 20px; }
.vase-head span { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.vase { width: 100%; max-width: 360px; justify-self: center; overflow: visible; }
.vase .heads image { transform-box: fill-box; transform-origin: center; animation: bloom .5s cubic-bezier(.3,1.5,.5,1) both; animation-delay: var(--d); filter: drop-shadow(0 2px 2px rgba(42,27,48,.12)); }
.vase .heads image.new { animation: dropIn .9s cubic-bezier(.3,1.4,.5,1) both; animation-delay: .3s; }
.vase a:hover image { filter: drop-shadow(0 0 6px rgba(226,82,138,.55)); }
.vase-empty { font: 600 14px "Figtree", system-ui, sans-serif; fill: var(--faint); }
.vase-note { margin: 0; text-align: center; font-size: 13px; color: var(--soft); }
@keyframes bloom { from { opacity: 0; scale: .3; } }
@keyframes dropIn { 0% { opacity: 0; translate: 0 -60px; scale: .6; } 60% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vase .heads image { animation: none; } }
@media (min-width: 900px) { .day.has .n { top: 7px; font-size: 12px; } .day.has img { max-width: 48px; } }

/* profile photo */
.pp-row { display: flex; align-items: center; gap: 16px; }
.pp { width: 84px; height: 84px; border-radius: 50%; flex: none; overflow: hidden; background: #F6F0F8; color: var(--faint); display: grid; place-items: center; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--pink); }
.pp svg { width: 30px; height: 30px; } .pp img { width: 100%; height: 100%; object-fit: cover; }
.pp-acts { display: grid; gap: 2px; min-width: 0; } .pp-acts b { font-size: 16px; } .pp-acts > span { font-size: 13px; color: var(--soft); }
.pp-acts .head-actions { margin-top: 8px; } .pp-acts .btn { min-height: 40px; padding: 0 14px; }
.call .self.has-photo { padding: 0; overflow: hidden; position: relative; justify-content: flex-end; }
.call .self.has-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.call .self.has-photo span { position: relative; z-index: 1; width: 100%; text-align: center; padding: 10px 0 4px; color: #fff; background: linear-gradient(180deg, transparent, rgba(28,20,36,.65)); }

/* free-floating photo stickers on notebook pages */
.nb-in .sticker.float { position: absolute; z-index: 3; margin: 0; }
.sticker.ghost { position: fixed; z-index: 95; pointer-events: none; transform: rotate(var(--r)) scale(1.06); box-shadow: 0 2px 4px rgba(42,27,48,.12), 0 24px 44px rgba(42,27,48,.28); }

/* "Buraya yaz" sheet: sits right above the phone keyboard */
.write-sheet { position: fixed; inset: 0; z-index: 90; background: rgba(28,20,36,.35); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .15s; }
@media (min-width: 700px) { .write-sheet { align-items: center; } }
.write-sheet .ws-in { width: min(100%, 560px); background: #FFFDF8; border-radius: 24px 24px 0 0; padding: 18px 18px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(42,27,48,.15); animation: sheetUp .22s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 700px) { .write-sheet .ws-in { border-radius: 24px; } }
.write-sheet .ws-k { font-size: 13px; color: var(--soft); margin-bottom: 8px; font-style: italic; }
.write-sheet textarea { width: 100%; box-sizing: border-box; border: 0; outline: 0; resize: none; min-height: 92px; background: repeating-linear-gradient(180deg, transparent 0 29px, rgba(155,120,190,.25) 29px 30px); font: 17px/30px "Lora", Georgia, serif; color: #3A2C40; padding: 0 4px; user-select: text; -webkit-user-select: text; }
.write-sheet .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* carrying a photo to the notebook's edge: the hint fills, then the page turns */
.edge-hint { position: fixed; z-index: 96; width: 56px; pointer-events: none; display: flex; align-items: center; justify-content: center; border-radius: 18px; background: linear-gradient(90deg, rgba(226,82,138,.22), rgba(226,82,138,0)); animation: fadeIn .12s; overflow: hidden; }
.edge-hint.r { background: linear-gradient(270deg, rgba(226,82,138,.22), rgba(226,82,138,0)); }
.edge-hint span { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #E2528A; font: 700 26px/38px system-ui, sans-serif; text-align: center; box-shadow: 0 6px 16px rgba(42,27,48,.18); position: relative; z-index: 1; }
.edge-hint i { position: absolute; left: 8px; right: 8px; bottom: 14px; height: 4px; border-radius: 4px; background: rgba(226,82,138,.2); overflow: hidden; }
.edge-hint i::after { content: ""; position: absolute; inset: 0; background: #E2528A; transform-origin: left; animation: edgeFill .7s linear forwards; }
.edge-hint.done i::after { animation: none; transform: scaleX(1); }
@keyframes edgeFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.sticker { -webkit-touch-callout: none; }

/* photos in the text: the lines part and the photo gets its own row */
.ph-row { position: relative; margin: 0; }
.nb-in .sticker.inrow { position: absolute; top: 12px; margin: 0; z-index: 2; }
.drop-gap { border-radius: 14px; background: rgba(226,82,138,.07); outline: 2px dashed rgba(226,82,138,.45); outline-offset: -6px; }
.ph-row.drop-join { background: rgba(226,82,138,.07); border-radius: 14px; outline: 2px dashed rgba(226,82,138,.45); outline-offset: -6px; }
