/* Ojakhi - family social network. One stylesheet for the elder space, public pages and shared
   components (manage.css adds the dashboard bits).
   Sizes are in em so the whole interface follows the text-size setting (body --fs). */

:root {
	--blue: #3b6fb6;
	--blue-dark: #2c5894;
	--blue-soft: #e7eff9;
	--green: #2f7d4b;
	--green-soft: #e3f2e8;
	--orange: #c8722a;
	--orange-soft: #fcefe2;
	--red: #b5443c;
	--bg: #f5f2ec;
	--card: #ffffff;
	--text: #2a2b2e;
	--muted: #5c6168;
	--border: #e3ddd2;
	--shadow: 0 1px 2px rgba(60, 50, 30, .06), 0 2px 8px rgba(60, 50, 30, .05);
	--radius: 14px;
	--focus: #e8925a;
	--top-h: 4em;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: "Noto Sans Georgian", "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: calc(18px * var(--fs, 1));
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--blue-dark); }
a:hover { color: var(--blue); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6em; }
h2 { font-size: 1.25em; }
h3 { font-size: 1.08em; }
p { margin: 0 0 .75em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5em; background: #fff; padding: .6em 1em; z-index: 100; border-radius: 8px; }
.skip:focus { left: .5em; }
.muted { color: var(--muted); }
.small, small { font-size: .85em; }
.lead { font-size: 1.12em; }
.center { text-align: center; }

/* ---------- icons ---------- */
.ic { width: 1.3em; height: 1.3em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.logo-mark { width: 2.2em; height: 2.2em; flex: none; }

/* ---------- buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 2.75em; padding: .45em 1.1em; border-radius: 12px; border: 1.5px solid transparent;
	font-weight: 600; text-decoration: none; line-height: 1.2; background: none; transition: background-color .15s, border-color .15s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-soft { background: var(--blue-soft); color: var(--blue-dark); }
.btn-soft:hover { background: #d8e5f5; }
.btn-light { background: #fff; border-color: var(--border); color: var(--text); }
.btn-light:hover { border-color: #c9c1b3; background: #fbfaf7; color: var(--text); }
.btn-big { min-height: 3.2em; font-size: 1.05em; padding: .5em 1.5em; }
.btn-wide { width: 100%; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.6em; height: 2.6em; border-radius: 50%; border: 0; background: transparent; color: var(--muted); }
.btn-icon:hover { background: var(--blue-soft); color: var(--blue-dark); }
.btn-icon.on { color: var(--orange); }
.btn-row { display: flex; flex-wrap: wrap; gap: .6em; align-items: center; margin-top: .6em; }
.linklike { background: none; border: 0; padding: 0; color: var(--blue-dark); text-decoration: underline; font-size: inherit; }
.btn[disabled], .btn.busy { opacity: .6; pointer-events: none; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--blue); color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.topbar-in { max-width: 1320px; margin: 0 auto; height: var(--top-h); display: flex; align-items: center; gap: .6em; padding: 0 1em; min-width: 0; }
.brand { display: flex; align-items: center; gap: .55em; color: inherit; text-decoration: none; font-weight: 700; font-size: 1.2em; white-space: nowrap; }
.brand:hover { color: inherit; }
.brand small { font-weight: 500; opacity: .85; font-size: .7em; margin-left: .3em; }
.topbar .logo-mark rect { fill: #fff; }
.topbar .logo-mark path:first-of-type { fill: var(--blue); }
.topnav { display: flex; gap: .25em; margin: 0 auto; min-width: 0; overflow: hidden; }
.topnav a, .tb-btn {
	position: relative; display: flex; align-items: center; gap: .45em; color: #fff; text-decoration: none; white-space: nowrap;
	padding: .5em .9em; border-radius: 10px; font-weight: 600; min-height: 2.8em;
}
.topnav a:hover, .tb-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.topnav a.on { background: rgba(255,255,255,.22); box-shadow: inset 0 -3px 0 #fff; }
.topbar-right { display: flex; align-items: center; gap: .3em; margin-left: auto; }
.topnav + .topbar-right { margin-left: 0; }
.tb-btn.on { background: rgba(255,255,255,.22); }
.tb-me .av { border: 2px solid #fff; }
.count {
	display: inline-flex; align-items: center; justify-content: center; min-width: 1.45em; height: 1.45em; padding: 0 .35em;
	border-radius: 1em; background: var(--red); color: #fff; font-size: .75em; font-weight: 700; line-height: 1;
}
.topnav .count, .tb-btn .count { position: absolute; top: .1em; right: .1em; }

.preview-bar { display: flex; align-items: center; gap: .8em; flex-wrap: wrap; justify-content: center; background: #fff3d6; color: #5a3d00; padding: .6em 1em; font-weight: 600; border-bottom: 1px solid #ecd9a8; }

/* ---------- three-column shell ---------- */
.shell { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; padding: 1.25em 1em 2em; align-items: start; }
.shell.with-right { grid-template-columns: 270px minmax(0, 1fr) 300px; }
main { min-width: 0; outline: none; }
.shell > main { max-width: 42em; width: 100%; justify-self: center; }
.leftnav { position: sticky; top: calc(var(--top-h) + 1em); }
.leftnav ul { list-style: none; margin: 0; padding: 0; }
.leftnav a {
	display: flex; align-items: center; gap: .75em; padding: .55em .7em; margin-bottom: .15em; border-radius: 12px;
	color: var(--text); text-decoration: none; font-weight: 600; font-size: .98em; min-height: 2.8em; line-height: 1.25;
}
.leftnav a .ic { color: var(--blue); width: 1.45em; height: 1.45em; }
.leftnav a:hover { background: #ebe6dc; }
.leftnav a.on { background: var(--blue-soft); color: var(--blue-dark); }
.leftnav a .count { margin-left: auto; }
.leftnav-small { margin-top: .8em !important; padding-top: .8em !important; border-top: 1px solid var(--border) !important; }
.leftnav-small a { font-weight: 500; font-size: .95em; }
.leftnav-note { margin-top: 1em; font-size: .82em; color: var(--muted); display: flex; gap: .5em; }
.me-chip { display: flex !important; gap: .7em; align-items: center; padding: .5em .6em !important; margin-bottom: .6em !important; }
.me-chip span { display: flex; flex-direction: column; line-height: 1.25; }
.me-chip small { color: var(--muted); font-weight: 500; }
.rightcol { position: sticky; top: calc(var(--top-h) + 1em); display: flex; flex-direction: column; gap: 1em; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1em 1.2em; margin-bottom: 1em; }
.card > :last-child { margin-bottom: 0; }
.page-head { margin: .25em 0 1em; }
.page-head h1 { display: flex; align-items: center; gap: .45em; }
.page-head h1 .ic { color: var(--blue); }
.page-head.row { display: flex; align-items: center; justify-content: space-between; gap: 1em; flex-wrap: wrap; }
.page-head.row h1 { margin: 0; }
.section-title { margin: 1.25em 0 .6em; }
.back { margin: 0 0 1em; }
.hint { display: flex; gap: .6em; align-items: flex-start; background: var(--blue-soft); color: #22446f; padding: .7em .9em; border-radius: 10px; font-size: .92em; }
.hint .ic { margin-top: .1em; }
.empty { text-align: center; padding: 2.5em 1em; color: var(--muted); }
.empty > .ic { width: 3em; height: 3em; color: var(--blue); opacity: .7; margin-bottom: .5em; }
.empty h3 { color: var(--text); font-size: 1.2em; }

/* ---------- avatars ---------- */
.av { border-radius: 50%; object-fit: cover; flex: none; background: #ddd; }
.av-sm { width: 2.2em; height: 2.2em; }
.av-md { width: 2.8em; height: 2.8em; }
.av-lg { width: 3.8em; height: 3.8em; }
.av-xl { width: 5.5em; height: 5.5em; }
.av-xxl { width: 8em; height: 8em; border: 4px solid #fff; box-shadow: var(--shadow); }
.av-ini { display: inline-flex; align-items: center; justify-content: center; background: hsl(var(--h, 210) 42% 44%); color: #fff; font-weight: 700; letter-spacing: .02em; }
.av-ini > span { line-height: 1; }
.av-sm.av-ini > span { font-size: .85em; }
.av-lg.av-ini > span { font-size: 1.3em; }
.av-xl.av-ini > span { font-size: 1.9em; }
.av-xxl.av-ini > span { font-size: 2.8em; }
.av-system { display: inline-flex; align-items: center; justify-content: center; background: var(--orange-soft); color: var(--orange); }

/* ---------- home: greeting, composer, on this day, chips ---------- */
.hello { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #fff 55%, #fdf3e8); }
.hello h1 { margin: 0; }
.hello p { margin: .2em 0 0; color: var(--muted); font-size: 1.05em; }
.hello-ic { width: 3em; height: 3em; color: var(--orange); }
.composer-top { display: flex; gap: .75em; align-items: flex-start; }
.composer textarea, .comment-form textarea, .chat-form textarea {
	flex: 1; width: 100%; resize: vertical; min-height: 2.8em; padding: .65em .9em; border-radius: 22px; border: 1.5px solid var(--border); background: #faf8f4; font-size: 1.05em;
}
.composer textarea:focus, .comment-form textarea:focus, .chat-form textarea:focus { background: #fff; border-color: var(--blue); outline: none; }
.composer-actions { display: flex; justify-content: space-between; gap: .6em; flex-wrap: wrap; margin-top: .8em; padding-top: .8em; border-top: 1px solid var(--border); }
.composer-files { display: flex; flex-wrap: wrap; gap: .5em; margin-top: .7em; }
.composer-files img, .composer-files .cf-file { width: 5em; height: 5em; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.composer-files .cf-file { display: flex; align-items: center; justify-content: center; font-size: .75em; text-align: center; padding: .3em; background: #f2efe9; }
.onthisday h2 { display: flex; gap: .4em; align-items: center; color: var(--orange); }
.otd-row { display: flex; gap: .7em; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .3em; }
.otd-item { flex: 0 0 9em; scroll-snap-align: start; text-decoration: none; color: var(--text); }
.otd-item img { width: 9em; height: 9em; object-fit: cover; border-radius: 12px; }
.otd-item span { display: block; font-weight: 600; font-size: .9em; margin-top: .3em; }
.chips { display: flex; flex-wrap: wrap; gap: .5em; margin: 0 0 1em; }
.chip {
	display: inline-flex; align-items: center; gap: .35em; padding: .45em 1em; min-height: 2.5em; border-radius: 2em;
	background: #fff; border: 1.5px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; font-size: .92em;
}
.chip:hover { border-color: var(--c, var(--blue)); color: var(--text); }
.chip.on { background: var(--c, var(--blue)); border-color: var(--c, var(--blue)); color: #fff; }
.more-wrap { margin: 1em 0; }
.feed-end { text-align: center; color: var(--muted); display: flex; gap: .5em; justify-content: center; align-items: center; padding: 1em; }

/* ---------- post card ---------- */
.post { padding: 0; overflow: hidden; }
.post > * { padding-left: 1.1em; padding-right: 1.1em; }
.post-head { display: flex; gap: .7em; align-items: flex-start; padding-top: 1em; position: relative; }
.post-who { flex: 1; min-width: 0; }
.post-who strong { font-size: 1.05em; }
.post-rel { display: inline-block; font-size: .8em; color: var(--muted); background: #f1ede6; padding: .05em .55em; border-radius: 1em; font-weight: 600; }
.post-meta { display: block; color: var(--muted); font-size: .88em; }
.post-meta a { color: inherit; text-decoration: none; }
.post-meta a:hover { text-decoration: underline; }
.origin-label { display: inline-flex; align-items: center; gap: .3em; font-weight: 600; padding: 0 .5em; border-radius: 6px; }
.origin-label .ic { width: 1.05em; height: 1.05em; }
.origin-scheduled { background: var(--blue-soft); color: var(--blue-dark); }
.origin-system { background: var(--orange-soft); color: #8a4a12; }
.post-badges { display: flex; gap: .35em; flex-wrap: wrap; justify-content: flex-end; max-width: 45%; }
.badge { display: inline-flex; align-items: center; gap: .25em; font-size: .78em; font-weight: 700; padding: .15em .6em; border-radius: 1em; color: #fff; background: var(--c, var(--blue)); white-space: nowrap; }
.badge .ic { width: 1em; height: 1em; }
.badge-pin { background: var(--orange); }
.badge-lock { background: #6b6f76; }
.post-tools { display: flex; }
.post-type { display: flex; align-items: center; gap: .5em; margin-top: .8em; padding-top: .45em !important; padding-bottom: .45em !important; font-weight: 700; color: var(--blue-dark); background: var(--blue-soft); }
.post-question .post-type { background: #f1eaf9; color: #5b3a87; }
.post-birthday .post-type, .post-holiday .post-type { background: #fbe9e7; color: #92332b; }
.post-greeting .post-type { background: #fdf4dc; color: #7a5300; }
.post-memory .post-type { background: var(--orange-soft); color: #87460f; }
.post-event .post-type { background: var(--green-soft); color: #1f5a35; }
.post-body { font-size: 1.1em; line-height: 1.6; padding-top: .7em; padding-bottom: .4em; overflow-wrap: anywhere; }
.is-pinned { border-color: #e9c9a6; }
.media-grid { display: grid; gap: 3px; margin-top: .6em; padding: 0 !important; }
.mg-1 { grid-template-columns: 1fr; }
.mg-2 { grid-template-columns: 1fr 1fr; }
.mg-3 { grid-template-columns: 1fr 1fr; }
.mg-3 .mg-item:first-child { grid-column: span 2; }
.mg-4 { grid-template-columns: 1fr 1fr; }
.mg-item { position: relative; display: block; background: #eee; overflow: hidden; }
.mg-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .3s; }
.mg-1 .mg-item img { aspect-ratio: auto; max-height: 34em; object-fit: contain; background: #f0ede7; }
.mg-item:hover img { transform: scale(1.02); }
.mg-video video { width: 100%; max-height: 32em; background: #000; }
.mg-audio { padding: 1em; background: #f5f2ec; }
.mg-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); color: #fff; font-size: 2em; font-weight: 700; }
.event-card { display: flex; gap: 1em; align-items: flex-start; margin: .6em 1.1em 0; padding: .9em !important; border-radius: 12px; background: var(--green-soft); }
.event-card p { margin: .4em 0 0; }
.ev-info { display: flex; flex-direction: column; }
.ev-date { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex: none; width: 3.6em; height: 3.8em; background: #fff; border-radius: 10px; box-shadow: var(--shadow); line-height: 1.1; }
.ev-date.small { width: 3em; height: 3.2em; }
.ev-m { font-size: .72em; text-transform: uppercase; font-weight: 700; color: var(--red); }
.ev-d { font-size: 1.4em; font-weight: 700; }
.shared-card { display: block; margin: .6em 1.1em 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--text); background: #faf8f4; }
.shared-card img { width: 100%; max-height: 22em; object-fit: cover; }
.shared-cap { display: flex; gap: .4em; align-items: flex-start; padding: .7em .9em; }
.post-stats { display: flex; justify-content: space-between; color: var(--muted); font-size: .92em; padding-top: .7em; padding-bottom: .5em; min-height: 1em; }
.stat-likes { display: inline-flex; gap: .35em; align-items: center; }
.stat-likes .ic { background: var(--blue); color: #fff; border-radius: 50%; padding: .18em; width: 1.4em; height: 1.4em; }
.post-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: .25em .5em !important; }
.pa { display: flex; align-items: center; justify-content: center; gap: .45em; min-height: 3em; border: 0; background: none; border-radius: 10px; font-weight: 600; color: var(--muted); padding: .3em .4em; }
.pa:hover { background: #f1ede6; color: var(--text); }
.pa.on { color: var(--blue); }
.pa.on .ic { fill: currentColor; fill-opacity: .15; }
.pa[data-act="favorite"].on { color: var(--orange); }
.comments { padding-top: .5em !important; }
.comments-more { display: inline-block; margin: .2em 0 .5em; font-weight: 600; }
.comment { display: grid; grid-template-columns: auto 1fr; gap: .1em .6em; margin-bottom: .7em; }
.comment .av { grid-row: span 2; }
.comment-bubble { background: #f1ede6; border-radius: 16px; padding: .5em .9em; justify-self: start; max-width: 100%; overflow-wrap: anywhere; }
.comment-meta { font-size: .8em; color: var(--muted); padding-left: .9em; }
.voice-note { display: flex; align-items: center; gap: .5em; margin-top: .3em; }
.voice-note audio { height: 2.5em; max-width: 15em; }
.comment-form { display: flex; gap: .6em; align-items: flex-start; padding-bottom: 1em !important; }
.cf-box { flex: 1; }
.cf-actions { display: flex; justify-content: flex-end; gap: .5em; margin-top: .45em; }
.cf-actions .btn { min-height: 2.5em; padding: .35em .9em; }
.btn-voice.recording { background: var(--red); color: #fff; animation: pulse 1.2s infinite; }
.voice-ready { display: flex; align-items: center; gap: .5em; margin-top: .4em; font-size: .9em; }
@keyframes pulse { 50% { opacity: .7; } }
.feed { min-height: 4em; }

/* ---------- right column ---------- */
.side-card h2 { font-size: 1.05em; }
.side-contacts, .side-events { list-style: none; margin: 0; padding: 0; }
.side-contacts li { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .3em .5em; padding: .35em 0; }
.side-contacts .sc-person { flex: 1 1 10em; }
.sc-person { display: flex; align-items: center; gap: .6em; color: var(--text); text-decoration: none; min-width: 0; }
.sc-person span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sc-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-person small { color: var(--muted); }
.btn-call { background: var(--green); color: #fff; min-height: 2.4em; padding: .3em .8em; border-radius: 2em; font-size: .9em; }
.btn-call:hover { background: #256b3e; color: #fff; }
.side-events li { display: flex; gap: .7em; align-items: center; padding: .4em 0; }
.side-events li > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.side-events small { color: var(--muted); }
.side-more { display: inline-block; margin-top: .6em; font-weight: 600; }

/* ---------- bottom navigation (phones) ---------- */
.bottomnav { display: none; }

/* ---------- friends ---------- */
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5em, 1fr)); gap: 1em; }
.friend { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3em; text-decoration: none; color: var(--text); margin: 0; padding: 1.3em .8em; transition: transform .15s, box-shadow .15s; }
.friend:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(60,50,30,.12); color: var(--text); }
.friend strong { font-size: 1.1em; margin-top: .3em; }
.friend-rel { color: var(--muted); font-weight: 600; }
.friend-ways { display: flex; gap: .4em; color: var(--green); margin-top: .2em; }
.profile-head { padding: 0; overflow: hidden; }
.profile-cover { height: 7em; background: linear-gradient(120deg, #c9dcf2, #f6dcc2); }
.profile-main { display: flex; gap: 1.2em; align-items: flex-end; padding: 0 1.3em 1.2em; margin-top: -3.5em; flex-wrap: wrap; }
.profile-main h1 { margin: 0; font-size: 1.8em; }
.profile-rel { font-weight: 600; color: var(--muted); font-size: 1.1em; margin: 0; }
.profile-bday { display: flex; gap: .4em; align-items: center; margin: .2em 0 0; color: var(--orange); font-weight: 600; }
.contact-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(12em, 1fr)); gap: .7em; }
.btn-contact { justify-content: flex-start; min-height: 3.6em; color: #fff; font-size: 1.08em; padding: .5em 1em; border-radius: 14px; }
.btn-contact .ic { width: 1.6em; height: 1.6em; }
.btn-contact span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.btn-contact small { font-weight: 500; opacity: .9; font-size: .8em; }
.btn-contact:hover { color: #fff; filter: brightness(.93); }
.contact-phone { background: var(--green); }
.contact-whatsapp { background: #1f8a4c; }
.contact-viber { background: #6a4bab; }
.contact-messenger { background: #2a64c5; }
.contact-external { background: #5d6470; }
.contact-ojakhi { background: var(--blue); }
.hint + .hint { margin-top: .5em; }
.contact-actions + .hint { margin-top: .9em; }

/* ---------- photos ---------- */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13em, 1fr)); gap: 1em; }
.album { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; color: var(--text); margin: 0; }
.album:hover { color: var(--text); box-shadow: 0 6px 18px rgba(60,50,30,.12); }
.album-cover { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: #ebe6dc; color: var(--muted); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-cover .ic { width: 3em; height: 3em; }
.album-info { display: flex; flex-direction: column; padding: .7em .9em; }
.album-info small { color: var(--muted); }
.album-meta { display: flex; flex-wrap: wrap; gap: .4em 1.2em; color: var(--muted); }
.album-meta span { display: inline-flex; gap: .35em; align-items: center; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8em, 1fr)); gap: .5em; }
.photo-grid.big { grid-template-columns: repeat(auto-fill, minmax(11em, 1fr)); gap: .8em; }
.photo-grid a { display: block; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.photo-grid figure { margin: 0; position: relative; }
.photo-grid figcaption { font-size: .88em; margin-top: .3em; }
.year { display: inline-block; background: var(--orange-soft); color: #87460f; font-weight: 700; font-size: .85em; padding: 0 .5em; border-radius: 6px; }
.ph-comments { position: absolute; top: .4em; right: .4em; display: inline-flex; gap: .2em; align-items: center; background: rgba(255,255,255,.92); color: var(--text); padding: .1em .45em; border-radius: 1em; font-size: .8em; text-decoration: none; }
.photo-page { padding: 0; overflow: hidden; }
.photo-page > * { padding-left: 1.1em; padding-right: 1.1em; }
.photo-stage { background: #1f1f1f; padding: 0 !important; }
.photo-stage img { margin: 0 auto; max-height: 75vh; object-fit: contain; }
.photo-nav { display: flex; justify-content: space-between; align-items: center; gap: .5em; padding-top: .8em; padding-bottom: .5em; }
.photo-pos { color: var(--muted); font-weight: 600; text-align: center; }
.photo-info { padding-top: .5em; }
.upload-card .btn-wide { margin: .4em 0; }

/* ---------- memory lane ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1em; border-left: 4px solid #e4d6c3; }
.tl-year { position: relative; padding-left: 1.5em; margin-bottom: 1.2em; scroll-margin-top: calc(var(--top-h) + 1em); }
.tl-marker { position: absolute; left: -1.75em; top: .6em; }
.tl-marker span { display: inline-block; background: var(--orange); color: #fff; font-weight: 700; padding: .2em .6em; border-radius: 1em; font-size: .85em; box-shadow: 0 0 0 4px var(--bg); }
.tl-card h2 { color: #87460f; }
.tl-photos { display: grid; gap: .7em; grid-template-columns: repeat(auto-fill, minmax(10em, 1fr)); }
.tl-photos.n1 { grid-template-columns: 1fr; }
.tl-photos figure { margin: 0; }
.tl-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; filter: sepia(.08); }
.tl-photos.n1 img { aspect-ratio: auto; max-height: 26em; object-fit: contain; background: #f2ede4; }
.tl-photos figcaption { font-size: .92em; margin-top: .3em; }

/* ---------- games ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13em, 1fr)); gap: 1em; }
.game-tile { position: relative; margin: 0; padding: 0; border-top: 6px solid var(--c); }
.gt-main { display: flex; flex-direction: column; gap: .3em; padding: 1.1em; text-decoration: none; color: var(--text); height: 100%; }
.gt-main:hover { color: var(--text); background: #fcfbf8; }
.gt-main strong { font-size: 1.15em; }
.gt-main > span:not(.gt-icon) { color: var(--muted); font-size: .92em; }
.gt-icon { display: inline-flex; width: 3em; height: 3em; align-items: center; justify-content: center; border-radius: 14px; background: var(--c); color: #fff; margin-bottom: .3em; flex: none; }
.gt-icon .ic { width: 1.7em; height: 1.7em; }
.gt-progress { display: inline-flex; gap: .3em; align-items: center; color: var(--green); font-weight: 600; }
.gt-fav { position: absolute; top: .5em; right: .5em; }
.game-card { border-top: 6px solid var(--c); }
.game-head { display: flex; gap: 1em; align-items: center; margin-bottom: 1em; }
.game-head h1 { margin: 0; font-size: 1.4em; }
.game-head p { margin: 0; color: var(--muted); }
.fav-games { display: flex; flex-wrap: wrap; gap: .6em; }

/* ---------- events / calendar ---------- */
.event-list { list-style: none; padding: 0; margin: 0; }
.event-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .4em .7em; padding: .55em 0; border-bottom: 1px solid #f0ebe3; }
.event-list li:last-child { border-bottom: 0; }
.event-list li > p { flex-basis: 100%; margin: 0; color: var(--muted); }
.event-list.big li { flex-wrap: nowrap; gap: 1em; }
.ev-text { display: flex; flex-direction: column; }
.ev-text small { display: flex; gap: .3em; align-items: center; color: var(--muted); flex-wrap: wrap; }
.ev-when { font-style: normal; font-weight: 700; color: var(--green); }
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: .5em; margin-bottom: .8em; }
.cal-head h2 { margin: 0; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-dow { text-align: center; font-weight: 700; color: var(--muted); font-size: .8em; padding: .3em 0; text-transform: uppercase; }
.cal-cell { min-height: 4.6em; background: #faf8f4; border-radius: 8px; padding: .25em .35em; font-size: .85em; overflow: hidden; }
.cal-cell.empty { background: transparent; }
.cal-cell.today { background: var(--blue-soft); box-shadow: inset 0 0 0 2px var(--blue); }
.cal-cell.has { background: #fff7ec; }
.cal-n { font-weight: 700; display: block; }
.cal-ev { display: flex; gap: .2em; align-items: center; font-size: .82em; line-height: 1.2; margin-top: .15em; color: #7a4310; }
.cal-ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev .ic { width: 1em; height: 1em; }
.cal-list-title { margin-top: 1.2em; }

/* ---------- messages ---------- */
.messages-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1em; }
.messages-wrap.in-thread { grid-template-columns: 17em minmax(0, 1fr); }
.shell > main:has(.messages-wrap.in-thread) { max-width: 62em; }
.conv-list h1 { display: flex; gap: .4em; align-items: center; font-size: 1.35em; }
.conv-list h2 { font-size: 1em; margin-top: 1em; color: var(--muted); }
.conv-list ul { list-style: none; margin: 0; padding: 0; }
.conv { display: flex; align-items: center; gap: .65em; padding: .55em; border-radius: 12px; text-decoration: none; color: var(--text); }
.conv:hover { background: #f4f0e9; color: var(--text); }
.conv.on { background: var(--blue-soft); }
.conv.unread strong { color: var(--blue-dark); }
.conv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.conv-text small { color: var(--muted); }
.conv-last { color: var(--muted); font-size: .9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: .3em; align-items: center; }
.chat { display: flex; flex-direction: column; padding: 0; height: calc(100vh - var(--top-h) - 3em); min-height: 26em; }
.chat-head { display: flex; align-items: center; gap: .7em; padding: .8em 1em; border-bottom: 1px solid var(--border); }
.chat-head div { display: flex; flex-direction: column; line-height: 1.25; }
.chat-head small { color: var(--muted); }
.chat-back { display: none; }
.chat-body { flex: 1; overflow-y: auto; padding: 1em; display: flex; flex-direction: column; gap: .2em; background: #fbfaf7; }
.chat-empty { margin: auto; color: var(--muted); font-size: 1.1em; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg-bubble { background: #ece7de; padding: .6em 1em; border-radius: 18px 18px 18px 6px; font-size: 1.08em; overflow-wrap: anywhere; }
.msg.mine .msg-bubble { background: var(--blue); color: #fff; border-radius: 18px 18px 6px 18px; }
.msg.mine .msg-bubble a { color: #fff; }
.msg-bubble img { border-radius: 12px; max-height: 16em; margin: .2em 0; }
.msg-meta { font-size: .78em; color: var(--muted); margin: .15em .5em .6em; }
.chat-form { border-top: 1px solid var(--border); padding: .8em; }
.chat-form textarea { border-radius: 14px; }
.chat-tools { display: flex; gap: .5em; justify-content: flex-end; margin-top: .5em; flex-wrap: wrap; }
.chat-closed { padding: 1em; }

/* ---------- my space / settings / notifications ---------- */
.people-list { list-style: none; margin: 0; padding: 0; }
.people-list > li { display: flex; gap: .8em; align-items: flex-start; padding: .7em 0; border-bottom: 1px solid #f0ebe3; }
.people-list > li:last-child { border-bottom: 0; }
.people-list > li > div { flex: 1; min-width: 0; }
.people-list p { margin: .2em 0 0; }
.role-chip { display: inline-block; font-size: .75em; font-weight: 700; padding: .1em .6em; border-radius: 1em; background: #eceae5; color: #484b50; vertical-align: .1em; }
.role-owner { background: #fde8d4; color: #874009; }
.role-manager { background: var(--blue-soft); color: var(--blue-dark); }
.role-contributor { background: var(--green-soft); color: #1f5a35; }
.role-elder { background: #f1eaf9; color: #5b3a87; }
.facts { list-style: none; padding: 0; margin: 0 0 .8em; }
.facts li { display: flex; gap: .6em; align-items: flex-start; padding: .45em 0; }
.facts .ic { color: var(--blue); margin-top: .1em; }
.req-list, .activity, .device-list, .note-list { list-style: none; padding: 0; margin: 0; }
.req-list li, .activity li { padding: .55em 0; border-bottom: 1px solid #f0ebe3; }
.req-list li:last-child, .activity li:last-child { border-bottom: 0; }
.req-list small, .activity small { color: var(--muted); }
.answer { display: flex; gap: .4em; align-items: flex-start; background: #f4f0e9; padding: .5em .8em; border-radius: 10px; margin: .4em 0 0; }
.status { display: inline-block; font-size: .78em; font-weight: 700; padding: .1em .6em; border-radius: 1em; background: #eceae5; }
.status-open, .status-pending, .status-scheduled, .status-trialing { background: #fff1d1; color: #7a5300; }
.status-done, .status-paid, .status-published, .status-active { background: var(--green-soft); color: #1f5a35; }
.status-declined, .status-failed, .status-canceled, .status-expired, .status-past_due { background: #fbe4e2; color: #8e2f28; }
.status-draft { background: #eceae5; color: #484b50; }
.device-list li { display: flex; flex-wrap: wrap; gap: .4em .7em; align-items: center; padding: .5em 0; }
.device-list li > span { min-width: 8em; }
.device-list li > span { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.device-list small { color: var(--muted); }
.note-list { padding: .3em 0; }
.note-list li a, .note-list li > span { display: flex; gap: .8em; align-items: center; padding: .7em .4em; text-decoration: none; color: var(--text); border-bottom: 1px solid #f0ebe3; }
.note-list li.unread a { background: var(--blue-soft); border-radius: 10px; }
.note-list li span:last-child { display: flex; flex-direction: column; }
.note-list small { color: var(--muted); }
.note-ic { display: inline-flex; width: 2.6em; height: 2.6em; border-radius: 50%; align-items: center; justify-content: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.size-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(7em, 1fr)); gap: .7em; }
.size-choice { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2em; min-height: 6em; border: 2px solid var(--border); border-radius: 14px; cursor: pointer; background: #fff; text-align: center; padding: .5em; }
.size-choice input { position: absolute; opacity: 0; }
.size-choice span { font-weight: 700; line-height: 1; }
.size-choice:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 2px var(--blue) inset; }
.size-choice:has(input:focus-visible) { outline: 3px solid var(--focus); }
.lang-choices .size-choice { min-height: 3.6em; }
.sticky-save { position: sticky; bottom: 1em; z-index: 5; display: flex; justify-content: flex-end; margin: 0 0 1em; }

/* ---------- forms ---------- */
.stack > * + * { margin-top: .9em; }
.field { display: flex; flex-direction: column; gap: .3em; }
.field > span { font-weight: 600; display: flex; gap: .4em; align-items: center; }
.field small { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], input[type=tel], input[type=url], select, textarea {
	width: 100%; min-height: 2.75em; padding: .5em .8em; border: 1.5px solid #d6cfc2; border-radius: 10px; background: #fff; font-size: 1em;
}
textarea { min-height: 4em; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(59,111,182,.2); outline-offset: 0; }
input[type=file] { max-width: 100%; }
input[type=color] { width: 3em; height: 2.75em; padding: .2em; border: 1.5px solid #d6cfc2; border-radius: 10px; background: #fff; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; margin-bottom: .4em; padding: 0; }
.switch { display: flex; align-items: center; gap: .8em; cursor: pointer; min-height: 2.6em; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .sw { position: relative; flex: none; width: 3.2em; height: 1.8em; background: #c9c2b5; border-radius: 1em; transition: background .2s; }
.switch .sw::after { content: ""; position: absolute; top: .2em; left: .2em; width: 1.4em; height: 1.4em; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + .sw { background: var(--green); }
.switch input:checked + .sw::after { transform: translateX(1.4em); }
.switch input:focus-visible + .sw { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch input:disabled + .sw { opacity: .5; }
.check { display: flex; gap: .6em; align-items: flex-start; }
.check input { width: 1.4em; height: 1.4em; flex: none; margin-top: .15em; }
.choice-list { display: flex; flex-direction: column; gap: .5em; }
.choice { display: flex; align-items: center; gap: .7em; padding: .6em .9em; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; background: #fff; }
.choice input { width: 1.3em; height: 1.3em; flex: none; accent-color: var(--blue); }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.choice.disabled { opacity: .6; cursor: not-allowed; }
.choice span { display: flex; flex-direction: column; }
.choice-list.compact .choice { padding: .4em .7em; }
.grid2, .grid3 { display: grid; gap: .9em; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inline-form { display: flex; flex-wrap: wrap; gap: .6em; align-items: flex-end; }
.inline-form .field { flex: 1 1 12em; }
.inline-form input[type=text] { flex: 1 1 10em; width: auto; }
.link-box { margin-top: .8em; padding: .8em; border-radius: 10px; background: var(--green-soft); }
.link-box input { margin-bottom: .5em; font-family: ui-monospace, Consolas, monospace; font-size: .85em; }
details > summary { cursor: pointer; font-weight: 600; color: var(--blue-dark); padding: .4em 0; }
.avatar-edit { display: flex; gap: 1em; align-items: center; flex-wrap: wrap; }

/* ---------- full-screen photo viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 80; background: rgba(15,15,15,.96); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5em 1em 5.5em; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.viewer-cap { color: #eee; text-align: center; margin-top: .6em; font-size: 1.05em; max-width: 40em; }
.viewer-bar { position: absolute; bottom: 1em; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 1em; }
.viewer-count { color: #ddd; font-weight: 600; min-width: 5em; text-align: center; }
.vbtn { display: inline-flex; align-items: center; gap: .4em; min-height: 3.2em; padding: .5em 1.2em; border: 0; border-radius: 2em; background: rgba(255,255,255,.16); color: #fff; font-weight: 700; font-size: 1em; }
.vbtn:hover { background: rgba(255,255,255,.28); }
.viewer-close { position: absolute; top: .8em; right: .8em; }

/* ---------- toast & dialogs ---------- */
.toast { position: fixed; left: 50%; bottom: 1.5em; transform: translateX(-50%); z-index: 90; background: #2a2b2e; color: #fff; padding: .8em 1.4em; border-radius: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: calc(100% - 2em); text-align: center; }
.toast.error { background: var(--red); }
.dialog { position: fixed; inset: 0; z-index: 85; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); padding: 1em; }
.dialog-box { background: #fff; border-radius: 16px; padding: 1.4em; width: 100%; max-width: 28em; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.dialog-box p { font-size: 1.1em; font-weight: 600; }
.dialog-box textarea { margin-bottom: .8em; }

/* ---------- public pages ---------- */
.pub-top { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: .9em 1.2em; max-width: 1180px; margin: 0 auto; flex-wrap: wrap; }
.pub-top .brand { color: var(--text); }
.pub-top nav { display: flex; gap: .6em; align-items: center; flex-wrap: wrap; }
.pub-lang { font-weight: 600; padding: .4em .6em; }
.pub { max-width: 1180px; margin: 0 auto; padding: 1em 1.2em 3em; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5em; align-items: center; padding: 2em 0 3em; }
.hero h1 { font-size: 2.2em; }
.hero .lead { font-size: 1.2em; color: #44474d; }
.demo-card { background: #fff; border-radius: 18px; box-shadow: 0 12px 40px rgba(60,50,30,.15); padding: 1.2em; transform: rotate(-1.5deg); }
.demo-head { display: flex; gap: .7em; align-items: center; margin-bottom: .6em; }
.demo-head span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.demo-head small { color: var(--muted); }
.demo-photo { height: 13em; border-radius: 12px; background: linear-gradient(180deg, #9cc7ea 0%, #cfe6f6 45%, #e9d3a8 46%, #dcbf8c 100%); position: relative; overflow: hidden; }
.demo-photo::after { content: ""; position: absolute; width: 3.5em; height: 3.5em; border-radius: 50%; background: #ffd77a; top: 1.2em; right: 2em; }
.demo-actions { display: flex; justify-content: space-around; margin-top: .7em; color: var(--muted); font-weight: 600; }
.demo-actions span { display: flex; gap: .3em; align-items: center; }
.pub-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(18em, 1fr)); gap: 1em; }
.feature .ic { width: 2.2em; height: 2.2em; color: var(--blue); margin-bottom: .4em; }
.feature h2 { font-size: 1.15em; }
.feature p { color: #4d5157; margin: 0; }
.pub-plans { margin-top: 2.5em; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(16em, 1fr)); gap: 1em; }
.plan { border-top: 6px solid var(--blue); }
.plan-trial { border-top-color: #9aa0a6; }
.plan-family_plus { border-top-color: var(--orange); }
.plan.current { box-shadow: 0 0 0 3px var(--blue); }
.plan .price { font-size: 1.5em; font-weight: 700; }
.plan .price small { font-size: .55em; color: var(--muted); font-weight: 500; }
.plan ul { padding-left: 1.2em; }
.pub-foot { text-align: center; color: var(--muted); padding: 2em 1em; }
.auth-wrap { display: flex; justify-content: center; padding-top: 2em; }
.auth-card { width: 100%; max-width: 32em; padding: 1.8em; }
.auth-card fieldset { border-top: 1px solid var(--border); padding-top: .8em; margin-top: 1em; }
.auth-card fieldset > * + * { margin-top: .8em; }
.auth-card.center { text-align: center; }
.auth-card.center .logo-mark { width: 4em; height: 4em; margin: 0 auto 1em; }

/* ---------- responsive ---------- */
/* the left navigation repeats every section with its label, so the top bar keeps icons only here */
.tb-label { display: none; }
@media (max-width: 1180px) {
	.shell.with-right { grid-template-columns: 230px minmax(0, 1fr); }
	.shell { grid-template-columns: 230px minmax(0, 1fr); }
	.rightcol { display: none; }
}
@media (max-width: 900px) {
	:root { --top-h: 3.6em; }
	.topnav { display: none; }
	.topbar-right { margin-left: auto; }
	.tb-label { display: none; }
	.shell, .shell.with-right { grid-template-columns: minmax(0, 1fr); padding: .8em .7em calc(5.5em + env(safe-area-inset-bottom)); gap: 0; }
	.leftnav { display: none; }
	.leftnav.open {
		display: block; position: fixed; inset: var(--top-h) 0 calc(4.6em + env(safe-area-inset-bottom)) 0; z-index: 40; overflow-y: auto;
		background: var(--bg); padding: 1em; border-top: 1px solid var(--border);
	}
	.leftnav.open a { font-size: 1.12em; min-height: 3.2em; }
	.bottomnav {
		display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
		background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -2px 10px rgba(0,0,0,.06); padding-bottom: env(safe-area-inset-bottom);
	}
	.bottomnav a, .bottomnav button {
		position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1em;
		min-height: 4.4em; min-width: 0; color: var(--muted); text-decoration: none; font-size: .78em; font-weight: 700; background: none; border: 0; padding: .3em 2px;
	}
	/* labels stay on one line whatever the text size: the icons carry the size, the words stay legible */
	.bottomnav a > span, .bottomnav button > span:not(.count) { font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.bottomnav .ic { width: 1.9em; height: 1.9em; max-width: 34px; max-height: 34px; }
	.bottomnav .on { color: var(--blue); }
	.bottomnav .on::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--blue); }
	.bottomnav .count { position: absolute; top: .3em; left: calc(50% + .5em); }
	.toast { bottom: 6em; }
	.messages-wrap.in-thread { grid-template-columns: minmax(0, 1fr); }
	.messages-wrap.in-thread .conv-list { display: none; }
	.chat-back { display: inline-flex; }
	.chat { height: auto; min-height: 0; }
	.chat-body { min-height: 14em; max-height: 58vh; max-height: 58dvh; }
	.chat-form textarea { min-height: 2.6em; }
	.chat-tools { flex-wrap: wrap; }
	.chat-tools .btn { padding: .35em .7em; font-size: .92em; flex: 1 1 auto; }
	.chat-tools .btn-primary { flex: 1 1 100%; }
	.hero { grid-template-columns: 1fr; padding-top: 1em; }
	.hero h1 { font-size: 1.7em; }
	.card { padding: 1em; border-radius: 12px; }
	.post > * { padding-left: .9em; padding-right: .9em; }
	.post-badges { max-width: 40%; }
	.grid3 { grid-template-columns: minmax(0, 1fr); }
	.sticky-save { bottom: 5.5em; }
}
@media (max-width: 560px) {
	body { font-size: calc(17px * var(--fs, 1)); }
	.grid2 { grid-template-columns: minmax(0, 1fr); }
	.pa span { font-size: .85em; }
	.pa { flex-direction: column; gap: .1em; min-height: 3.4em; }
	.friend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6em; }
	.album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6em; }
	.photo-grid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.game-grid { grid-template-columns: minmax(0, 1fr); }
	.cal-cell { min-height: 3.2em; }
	.cal-ev span { display: none; }
	.photo-nav .btn span { display: none; }
	.vbtn span { display: none; }
	.profile-main { margin-top: -4em; }
	.post-badges { display: none; }
	.contact-actions { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- accessibility preferences ---------- */
body.hc { --text: #000; --muted: #1f1f1f; --border: #2b2b2b; --bg: #fff; --blue: #1d4f94; --blue-dark: #143a6e; --shadow: none; }
body.hc .card, body.hc .chip, body.hc .choice, body.hc .size-choice { border-width: 2px; }
body.hc a:not(.btn):not(.chip):not(.conv):not(.friend):not(.album):not(.gt-main):not(.sc-person) { text-decoration: underline; }
body.hc .comment-bubble, body.hc .msg-bubble { border: 1.5px solid #000; }
body.hc .pa, body.hc .btn-light { border: 2px solid #000; }
body.hc .post-rel, body.hc .role-chip, body.hc .status { border: 1px solid #000; }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- games (templates/files/js/games.js) ---------- */
.game-area { min-height: 12em; }
.g-help { font-size: 1.1em; background: #f6f2eb; border-radius: 12px; padding: .7em 1em; }
.g-count { color: var(--muted); font-weight: 700; }
.g-q { font-size: 1.45em; margin: .4em 0 .8em; }
.g-options { display: grid; grid-template-columns: 1fr; gap: .7em; }
.g-options.four { grid-template-columns: 1fr 1fr; }
.g-option { min-height: 3.6em; font-size: 1.15em; background: #fff; border: 2px solid var(--border); color: var(--text); border-radius: 14px; }
.g-option:hover:not(:disabled) { border-color: var(--c, var(--blue)); background: #fbfaf7; }
.g-option.right { background: var(--green-soft); border-color: var(--green); color: #1f5a35; opacity: 1; }
.g-option.wrong { background: #fdf0e4; border-color: #e3b07c; opacity: 1; }
.g-option:disabled { opacity: .65; }
.g-feedback { margin-top: 1em; font-size: 1.2em; font-weight: 700; min-height: 1.5em; display: flex; flex-direction: column; align-items: flex-start; gap: .6em; }
.g-feedback.good { color: var(--green); }
.g-feedback.soft { color: #87460f; }
.g-note { font-weight: 500; color: var(--text); font-size: .9em; }
.g-finish { text-align: center; padding: 1.5em 0; }
.g-star { font-size: 4em; color: #f0b429; line-height: 1; }
.g-emoji { font-size: 3.2em; line-height: 1.2; }
.g-emoji.big { font-size: 6em; text-align: center; margin: .1em 0 .3em; }
.g-word { display: flex; align-items: center; gap: .5em; justify-content: center; margin: .5em 0 1em; flex-wrap: wrap; }
.g-letters { font-size: 2.4em; font-weight: 700; letter-spacing: .1em; }
.g-photo { width: 100%; max-height: 24em; object-fit: contain; border-radius: 12px; background: #f0ede7; margin: .4em 0 1em; }
.g-memory { display: grid; gap: .6em; grid-template-columns: repeat(4, 1fr); max-width: 34em; margin: 0 auto; }
.g-memory.cols5 { grid-template-columns: repeat(5, 1fr); max-width: 40em; }
.g-card { position: relative; aspect-ratio: 3 / 4; border: 0; border-radius: 14px; background: var(--c, var(--blue)); color: #fff; font-size: 1em; padding: 0; box-shadow: var(--shadow); }
.g-card .back { font-size: 2em; font-weight: 700; opacity: .8; }
.g-card .face { display: none; font-size: 2.4em; }
.g-card.open { background: #fff; border: 2px solid var(--border); }
.g-card.open .back { display: none; }
.g-card.open .face { display: inline; }
.g-card.matched { background: var(--green-soft); border-color: var(--green); }
.g-puzzle-wrap { display: flex; flex-direction: column; align-items: center; gap: .8em; }
.g-puzzle { display: grid; gap: 3px; width: min(100%, 30em); aspect-ratio: 1; background: #ddd; padding: 3px; border-radius: 10px; }
.g-puzzle.done { gap: 0; padding: 0; }
.g-tile { border: 0; padding: 0; background-repeat: no-repeat; border-radius: 4px; outline-offset: -3px; }
.g-tile.sel { outline: 4px solid var(--orange); z-index: 1; transform: scale(.94); }
.g-puzzle.done .g-tile { border-radius: 0; }
.g-ref { width: min(100%, 14em); border-radius: 10px; }
.g-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2em, 1fr)); gap: .7em; }
.g-pc { aspect-ratio: 5 / 7; border-radius: 12px; background: #fff; border: 2px solid #cfc8bc; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1em; box-shadow: var(--shadow); padding: 0; }
.g-pc .pc-r { font-size: 2em; font-weight: 700; line-height: 1; }
.g-pc .pc-s { font-size: 1.8em; line-height: 1; }
.g-pc.red { color: #b3261e; }
.g-pc.black { color: #1f1f1f; }
.g-pc.sel { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange); transform: translateY(-4px); }
.g-pc.gone { visibility: hidden; }
@media (max-width: 560px) {
	.g-options.four { grid-template-columns: 1fr; }
	.g-memory.cols5 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- installable app card ---------- */
.install-card { display: flex; gap: 1em; align-items: flex-start; border: 2px solid #c9dcf2; background: linear-gradient(135deg, #fff 60%, #eef4fb); }
.install-icon { width: 4em; height: 4em; border-radius: 22%; flex: none; box-shadow: var(--shadow); }
.install-text { flex: 1; min-width: 0; }
.install-text h2 { margin-bottom: .25em; }
.install-steps { margin: .6em 0 0; padding-left: 1.3em; font-size: 1.05em; }
.install-steps li { margin-bottom: .45em; }
.ios-share { display: inline-flex; vertical-align: middle; background: var(--blue-soft); color: var(--blue); border-radius: 8px; padding: .1em .25em; }
.auth-two { flex-direction: column; align-items: center; gap: 0; }
.auth-two .auth-card + .auth-card { margin-top: .4em; }
@media (max-width: 560px) { .install-card { flex-direction: column; } }
