/* Little Joys: Florence's Provence garden (her mockups of 2026-11-11).
   Frosted pink glass over her paintings, script for feelings, Nunito to read. */
:root {
  --rose: #D23F7A;
  --rose-deep: #A9275C;
  --wine: #7A2050;
  --text: #4B2F46;
  --soft: #806278;
  --lavender: #A88BD8;
  --glass: rgba(255, 246, 250, .8);
  --glass-strong: rgba(255, 248, 251, .93);
  --glass-line: rgba(255, 255, 255, .9);
  --gold: #F6C453;
  --script: 'Great Vibes', 'Brush Script MT', cursive;
  --title: 'Dancing Script', 'Brush Script MT', cursive;
  --body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; background: #F7D9E6; -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--lavender); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* her garden painting behind everything */
.backdrop { position: fixed; inset: 0; z-index: 0; background: #F7D9E6 center 40% / cover no-repeat; transition: background-image .8s; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 240, 246, 0) 35%, rgba(255, 236, 244, .6) 100%); }
.backdrop.dawn { background-image: url(art/backdrop-dawn.webp); }
.backdrop.sunset { background-image: url(art/backdrop-sunset.webp); }
.backdrop.night { background-image: url(art/backdrop-night.webp); }
.backdrop.night::after { background: linear-gradient(180deg, rgba(30, 16, 46, 0) 30%, rgba(40, 20, 54, .55) 100%); }
canvas.petals { position: fixed; inset: 0; z-index: 1; pointer-events: none; width: 100%; height: 100%; }

/* ---- the welcome / join screens ---- */
.gate { position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-left, 0px)); }
.gate-card { width: min(460px, 100%); background: var(--glass-strong); border: 1.5px solid var(--glass-line); border-radius: 34px; padding: 26px 24px 22px; text-align: center; box-shadow: 0 24px 60px rgba(122, 32, 80, .2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.gate-card img.logo { width: min(340px, 90%); height: auto; }
.gate-card h1 { font-family: var(--title); color: var(--wine); font-size: 32px; line-height: 1.15; margin: 8px 0 6px; text-wrap: balance; }
.gate-card p { margin: 6px 0; }
.gate-card .small { font-size: 14px; color: var(--soft); }
.field { width: 100%; border: 1.5px solid #F0C3D5; border-radius: 16px; background: #fff; padding: 12px 14px; min-height: 48px; font-size: 16px; }
.btn { border: 0; border-radius: 999px; background: linear-gradient(180deg, #E9629A, var(--rose)); color: #fff; font-weight: 800; padding: 12px 22px; min-height: 48px; box-shadow: 0 8px 18px rgba(210, 63, 122, .32); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.full { width: 100%; }
.btn.quiet { background: rgba(255, 255, 255, .85); color: var(--wine); box-shadow: none; border: 1.5px solid #F0C3D5; }
.btn.small { padding: 8px 16px; min-height: 40px; font-size: 14.5px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.err { color: #B0244F; font-weight: 700; font-size: 14.5px; min-height: 20px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- the app ---- */
.shell { position: relative; z-index: 2; display: flex; gap: 22px; padding-block: 18px 30px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 1320px; margin: 0 auto; }
.menu { flex: none; width: 236px; align-self: flex-start; position: sticky; top: 18px; background: var(--glass); border: 1.5px solid var(--glass-line); border-radius: 34px; padding: 18px 12px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 18px 40px rgba(169, 39, 92, .12); }
.menu .logo { display: block; width: 100%; height: auto; margin: 0 auto 10px; }
.menu nav { display: flex; flex-direction: column; gap: 2px; }
.menu nav button { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; text-align: left; font-weight: 700; color: var(--text); min-height: 44px; font-size: 15.5px; position: relative; }
.menu nav button:hover { background: rgba(210, 63, 122, .08); }
.menu nav button.on { background: linear-gradient(90deg, #F7B9CF, #F6CADA); color: var(--wine); }
.menu nav img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.menu nav svg { width: 26px; height: 26px; flex: none; color: var(--rose-deep); }
.badge { margin-left: auto; background: var(--rose); color: #fff; font-size: 12px; font-weight: 800; border-radius: 999px; min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.topbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.topbar .mlogo { display: none; height: 46px; width: auto; margin-right: auto; }
.round { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--glass-line); background: var(--glass); display: grid; place-items: center; position: relative; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--wine); font-weight: 800; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(122, 32, 80, .18); flex: none; }
.avatar.sm { width: 38px; height: 38px; font-size: 15px; border-width: 2px; }

.card { border: 1.5px solid var(--glass-line); background: var(--glass); border-radius: 30px; padding: 18px 20px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 14px 30px rgba(169, 39, 92, .1); min-width: 0; }
.card h2 { font-family: var(--title); color: var(--wine); font-weight: 700; font-size: 29px; line-height: 1.1; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.room-title { font-family: var(--script); font-weight: 400; color: #fff; font-size: clamp(46px, 7vw, 70px); line-height: 1; margin: 4px 0 0; text-shadow: 0 3px 18px rgba(122, 32, 80, .45); }
.room-sub { color: #fff; font-weight: 700; margin: 6px 0 0; text-shadow: 0 2px 10px rgba(122, 32, 80, .5); }

/* home */
.hello { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.1fr); gap: 18px; align-items: center; }
.greet h1 { font-family: var(--script); font-weight: 400; color: #fff; font-size: clamp(44px, 6vw, 70px); line-height: 1; margin: 0; text-shadow: 0 3px 18px rgba(122, 32, 80, .5); text-wrap: balance; }
.greet .spark { color: #fff; font-weight: 800; font-size: 19px; margin: 10px 0 12px; text-shadow: 0 2px 12px rgba(122, 32, 80, .55); }
.share { background: rgba(255, 255, 255, .94); border-radius: 26px; padding: 10px; box-shadow: 0 10px 30px rgba(122, 32, 80, .2); display: flex; flex-direction: column; gap: 8px; }
.share textarea { border: 0; outline: none; resize: none; min-height: 52px; max-height: 180px; padding: 6px 8px; background: transparent; font-size: 16px; }
.share-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kinds { display: flex; gap: 2px; flex-wrap: wrap; }
.kinds button { border: 2px solid transparent; background: transparent; border-radius: 14px; width: 44px; height: 44px; padding: 2px; }
.kinds button.on { border-color: #F3A6C3; background: #FDE9F1; }
.kinds img { width: 100%; height: 100%; object-fit: contain; }
.toggle { border: 1.5px solid #F0C3D5; background: #fff; border-radius: 999px; padding: 6px 12px; min-height: 40px; font-size: 14px; font-weight: 700; color: var(--wine); }
.send { margin-left: auto; width: 48px; height: 48px; border-radius: 50%; border: 0; background: linear-gradient(135deg, #E9629A, var(--rose)); color: #fff; display: grid; place-items: center; flex: none; }

.jar { position: relative; width: min(300px, 100%); margin: 0 auto; aspect-ratio: 1161 / 1354; cursor: pointer; border: 0; background: transparent; padding: 0; }
.jar img { position: absolute; pointer-events: none; user-select: none; }
.jar .back { inset: 0; width: 100%; height: 100%; }
.jar .front { left: 3%; top: 1.9%; width: 86.5%; opacity: .92; }
.jar .stars { position: absolute; inset: 0; }
.jar .stars img { width: 15%; transition: transform .25s; }
.jar.shaking { animation: shake .55s; }
@keyframes shake { 20% { transform: rotate(-6deg); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(3deg); } }
.jar-glow { position: absolute; inset: 12% 6% 4%; border-radius: 40%; background: radial-gradient(closest-side, rgba(255, 226, 150, .55), rgba(255, 226, 150, 0)); pointer-events: none; }

.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tile { border: 1.5px solid var(--glass-line); background: var(--glass); border-radius: 26px; padding: 12px 8px; text-align: center; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 24px rgba(169, 39, 92, .1); transition: transform .2s; color: var(--text); }
.tile:hover { transform: translateY(-3px); }
.tile img { width: 62px; height: 62px; object-fit: contain; display: block; margin: 0 auto 4px; }
.tile b { display: block; color: var(--wine); font-size: 16px; }
.tile span { font-size: 13.5px; color: var(--soft); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.joy { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(210, 63, 122, .14); }
.joy:first-child { border-top: 0; }
.joy .who { font-weight: 800; }
.joy .when { color: var(--soft); font-size: 13px; margin-left: 6px; font-weight: 600; }
.joy .text { margin: 2px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.joy .kindflower { width: 36px; height: 36px; object-fit: contain; flex: none; margin-left: auto; }
.acts { display: flex; gap: 16px; color: var(--soft); font-size: 14px; align-items: center; flex-wrap: wrap; }
.acts button { border: 0; background: transparent; display: inline-flex; gap: 5px; align-items: center; color: inherit; padding: 4px 0; min-height: 34px; font-weight: 700; }
.acts button.loved { color: var(--rose); }
.private-tag { font-size: 12px; font-weight: 800; color: #6B4C9A; background: #EEE6FA; border-radius: 999px; padding: 2px 8px; }
.comments { margin-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.comment { background: rgba(255, 255, 255, .7); border-radius: 14px; padding: 6px 10px; font-size: 14.5px; }
.comment b { color: var(--wine); }
.comment-form { display: flex; gap: 8px; }
.comment-form input { flex: 1; min-width: 0; border: 1.5px solid #F0C3D5; border-radius: 999px; padding: 8px 14px; min-height: 40px; background: #fff; }
.empty { color: var(--soft); text-align: center; padding: 18px 8px; }

.count-row { display: flex; align-items: center; gap: 12px; }
.tagcount { position: relative; width: 150px; flex: none; }
.tagcount img { width: 100%; height: auto; display: block; }
.tagcount b { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-size: 30px; line-height: 1; color: var(--wine); }
.tagcount span { position: absolute; left: 0; right: 0; top: 60%; text-align: center; font-family: var(--title); color: var(--wine); font-size: 17px; }
.garden-mini { position: relative; height: 150px; border-radius: 22px; overflow: hidden; background: url(art/garden-scene.webp) center 55% / cover; }
.garden-mini img { position: absolute; bottom: 6px; width: 46px; height: auto; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); }
.big { font-size: 24px; font-weight: 800; color: var(--wine); }
.center { text-align: center; }

/* the garden room */
.garden-scene { position: relative; border-radius: 30px; overflow: hidden; min-height: 460px; background: url(art/garden-scene.webp) center / cover; border: 1.5px solid var(--glass-line); }
.garden-scene .bed { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; }
.flower { position: absolute; transform: translate(-50%, -100%); border: 0; background: transparent; padding: 0; width: 70px; }
.flower img { width: 100%; height: auto; display: block; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .3)); transform-origin: 50% 100%; animation: sway 5s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(3deg); } }
.legend { display: flex; flex-wrap: wrap; gap: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .8); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 700; font-size: 14px; }
.legend img { width: 30px; height: 30px; object-fit: contain; }

/* chat */
.chat { display: flex; flex-direction: column; height: min(72vh, 760px); padding: 0; overflow: hidden; }
.chat-head { padding: 14px 20px 8px; display: flex; align-items: center; gap: 10px; }
.chat-head .live { width: 10px; height: 10px; border-radius: 50%; background: #BBB; }
.chat-head .live.on { background: #5CC48A; box-shadow: 0 0 8px rgba(92, 196, 138, .8); }
.chat-list { flex: 1; overflow-y: auto; padding: 4px 16px 10px; display: flex; flex-direction: column; gap: 4px; }
.msg { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.msg.mine { flex-direction: row-reverse; }
.msg .bubble { background: #fff; border-radius: 20px 20px 20px 6px; padding: 8px 13px; max-width: min(78%, 520px); box-shadow: 0 3px 10px rgba(122, 32, 80, .08); overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.mine .bubble { background: linear-gradient(135deg, #F7B9CF, #F3A6C3); border-radius: 20px 20px 6px 20px; }
.msg .name { font-size: 12.5px; font-weight: 800; color: var(--wine); margin: 0 0 2px 4px; }
.msg .meta { font-size: 11.5px; color: var(--soft); margin: 2px 6px 0; display: flex; gap: 8px; align-items: center; }
.msg .quote { font-size: 13px; color: var(--soft); border-left: 3px solid #F3A6C3; padding-left: 8px; margin-bottom: 4px; }
.msg .reacts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.msg .reacts button { border: 1px solid #F0C3D5; background: #fff; border-radius: 999px; font-size: 13px; padding: 1px 8px; min-height: 26px; }
.msg .reacts button.mine { background: #FDE9F1; border-color: var(--rose); }
.msg .tools { display: none; gap: 2px; }
.msg:hover .tools, .msg.tapped .tools { display: flex; }
.msg .tools button { border: 0; background: rgba(255, 255, 255, .85); border-radius: 999px; min-width: 30px; height: 30px; font-size: 15px; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(210, 63, 122, .14); align-items: flex-end; background: rgba(255, 255, 255, .55); }
.chat-form textarea { flex: 1; min-width: 0; border: 1.5px solid #F0C3D5; border-radius: 22px; padding: 10px 14px; resize: none; min-height: 46px; max-height: 140px; background: #fff; }
.replying { font-size: 13px; color: var(--soft); padding: 4px 16px; display: flex; gap: 8px; align-items: center; }
.day-sep { text-align: center; font-size: 12px; font-weight: 800; color: var(--soft); margin: 10px 0 2px; }

/* lists */
.rows { display: flex; flex-direction: column; }
.rowi { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(210, 63, 122, .12); flex-wrap: wrap; }
.rowi:first-child { border-top: 0; }
.rowi .grow { flex: 1; min-width: 160px; }
.linkbox { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: #fff; border-radius: 16px; padding: 10px; border: 1.5px dashed #F3A6C3; word-break: break-all; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 20; background: #fff; color: var(--wine); font-weight: 800; padding: 12px 22px; border-radius: 999px; box-shadow: 0 12px 30px rgba(122, 32, 80, .25); max-width: calc(100% - 32px); text-align: center; }
.modal { position: fixed; inset: 0; z-index: 15; background: rgba(60, 20, 50, .35); display: grid; place-items: center; padding: 16px; }
.modal .card { width: min(520px, 100%); max-height: 86vh; overflow: auto; background: var(--glass-strong); }
.steps { margin: 6px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 1080px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .shell { flex-direction: column; padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .menu { position: fixed; z-index: 8; left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: 24px 24px 0 0; padding: 6px max(8px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)); }
  .menu .logo { display: none; }
  .menu nav { flex-direction: row; overflow-x: auto; gap: 0; scrollbar-width: none; }
  .menu nav button { flex-direction: column; gap: 1px; font-size: 11px; padding: 4px 9px; border-radius: 16px; white-space: nowrap; min-width: 64px; }
  .menu nav button .badge { position: absolute; top: 0; right: 8px; margin: 0; min-width: 18px; height: 18px; font-size: 10px; }
  .topbar .mlogo { display: block; }
  .hello, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .jar { width: min(220px, 70%); }
  .chat { height: calc(100dvh - 190px); }
}
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card { padding: 16px; border-radius: 26px; } }
@media (prefers-reduced-motion: reduce) { .flower img, .jar.shaking { animation: none; } .tile { transition: none; } }
