/* ==========================================================================
   JUMBO Web — design system
   Brand: navy #002264 + orange #FE8600 + white (sampled from the logo).
   Buttons use deep orange #C84B05 so white text meets WCAG AA (4.7:1).
   ========================================================================== */

:root {
    --navy-950: #000f33;
    --navy-900: #00174a;
    --navy-800: #002264;
    --navy-700: #0a2f84;
    --navy-600: #1a43a8;
    --navy-200: #c9d5ee;
    --navy-100: #e5ebf7;
    --navy-50: #f3f6fc;

    --orange-500: #fe8600;
    --orange-600: #e86a00;
    --orange-700: #c84b05;
    --orange-800: #a63d03;
    --orange-100: #ffe8cc;
    --orange-50: #fff6eb;

    --ink: #0e1a33;
    --text: #2b3550;
    --muted: #5d6882;
    --line: #e2e7f1;
    --surface: #ffffff;
    --surface-soft: #f6f8fc;

    --success: #138a43;
    --success-bg: #e8f7ee;
    --danger: #c42b2b;
    --danger-bg: #fdecec;
    --warning-bg: #fff6e0;
    --info-bg: #eaf1ff;

    --font-display: "Prompt", "Anuphan", system-ui, sans-serif;
    --font-body: "Anuphan", "Prompt", system-ui, -apple-system, "Segoe UI", sans-serif;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --shadow-sm: 0 1px 2px rgba(0, 23, 74, .06), 0 1px 3px rgba(0, 23, 74, .08);
    --shadow: 0 8px 24px rgba(0, 23, 74, .08), 0 2px 6px rgba(0, 23, 74, .05);
    --shadow-lg: 0 24px 60px rgba(0, 23, 74, .16);
    --ring: 0 0 0 4px rgba(254, 134, 0, .28);

    --header-h: 72px;
    --container: 1180px;

    --paw-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='%23ffffff'%3E%3Cg transform='translate(20 22) rotate(-18 24 24)'%3E%3Cellipse cx='10' cy='14' rx='6' ry='7.5'/%3E%3Cellipse cx='24' cy='7' rx='6' ry='7.5'/%3E%3Cellipse cx='38' cy='14' rx='6' ry='7.5'/%3E%3Cpath d='M24 22c-10 0-17 10-17 17 0 6 6 7 10 6 3-1 5-2 7-2s4 1 7 2c4 1 10 0 10-6 0-7-7-17-17-17z'/%3E%3C/g%3E%3Cg transform='translate(84 84) rotate(16 20 20) scale(.75)'%3E%3Cellipse cx='10' cy='14' rx='6' ry='7.5'/%3E%3Cellipse cx='24' cy='7' rx='6' ry='7.5'/%3E%3Cellipse cx='38' cy='14' rx='6' ry='7.5'/%3E%3Cpath d='M24 22c-10 0-17 10-17 17 0 6 6 7 10 6 3-1 5-2 7-2s4 1 7 2c4 1 10 0 10-6 0-7-7-17-17-17z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.3; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--navy-700); text-decoration: none; font-weight: 500; }
a:hover { color: var(--orange-700); }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.main { flex: 1; }
.text-orange { color: var(--orange-500); }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .875rem; margin: .75rem 0 0; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--navy-800); color: #fff; padding: 8px 16px; border-radius: 8px; }
.skip-link:focus { left: 8px; color: #fff; }

/* ---------- Boot splash & loading ---------- */

.splash {
    position: fixed; inset: 0; z-index: 1000;
    display: grid; place-content: center; justify-items: center; gap: 20px;
    background: radial-gradient(circle at 50% 40%, var(--navy-700), var(--navy-900) 70%);
    transition: opacity .35s ease;
}
.splash img { width: 96px; height: 96px; animation: bob 1.6s ease-in-out infinite; filter: drop-shadow(0 12px 24px rgba(0,0,0,.3)); }
.splash__bar { width: 140px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.15); overflow: hidden; }
.splash__bar span { display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--orange-500); animation: slide 1.1s ease-in-out infinite; }
.splash--hide { opacity: 0; pointer-events: none; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }

.spinner {
    display: inline-block; width: 20px; height: 20px; border-radius: 50%;
    border: 2.5px solid var(--navy-100); border-top-color: var(--orange-500);
    animation: spin .8s linear infinite; vertical-align: middle;
}
.spinner--light { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.page-loading { display: grid; place-items: center; min-height: 50vh; }

#blazor-error-ui {
    display: none; position: fixed; inset: auto 16px 16px 16px; z-index: 1000;
    padding: 14px 48px 14px 18px; border-radius: var(--radius); background: var(--danger); color: #fff; box-shadow: var(--shadow-lg);
}
#blazor-error-ui a { color: #fff; text-decoration: underline; }
#blazor-error-ui .dismiss { position: absolute; right: 14px; top: 10px; background: none; border: 0; color: #fff; font-size: 1.1rem; cursor: pointer; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 2px solid transparent;
    font-family: var(--font-display); font-weight: 600; font-size: .975rem; line-height: 1.2;
    cursor: pointer; text-align: center; white-space: nowrap;
    transition: background-color .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.btn--lg { min-height: 52px; padding: 12px 28px; font-size: 1.05rem; }
.btn--block { width: 100%; }

.btn--primary { background: var(--orange-700); color: #fff; box-shadow: 0 8px 20px rgba(200, 75, 5, .28); }
.btn--primary:hover:not(:disabled) { background: var(--orange-800); color: #fff; box-shadow: 0 10px 24px rgba(200, 75, 5, .36); }
.btn--navy { background: var(--navy-800); color: #fff; }
.btn--navy:hover { background: var(--navy-900); color: #fff; }
.btn--outline { border-color: var(--navy-200); color: var(--navy-800); background: #fff; }
.btn--outline:hover { border-color: var(--navy-800); color: var(--navy-800); background: var(--navy-50); }
.btn--ghost { color: var(--navy-800); background: transparent; }
.btn--ghost:hover { background: var(--navy-50); color: var(--navy-800); }
.btn--light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn--light:hover { background: rgba(255,255,255,.22); color: #fff; }
.btn--white { background: #fff; color: var(--orange-700); box-shadow: var(--shadow); }
.btn--white:hover { color: var(--orange-800); transform: translateY(-1px); }
.btn--danger-outline { border-color: #f3c2c2; color: var(--danger); background: #fff; }
.btn--danger-outline:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }

.link-button { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px; color: var(--orange-700); font-weight: 600; cursor: pointer; }
.link-button:disabled { color: var(--muted); cursor: default; }

/* ---------- Pills, chips, eyebrows ---------- */

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.pill--soon { background: var(--orange-100); color: var(--orange-800); }
.pill--navy { background: var(--navy-100); color: var(--navy-800); }
.pill--success { background: var(--success-bg); color: var(--success); }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
    font-family: var(--font-display); font-size: .85rem; font-weight: 500;
    background: rgba(254, 134, 0, .16); color: var(--orange-100); border: 1px solid rgba(254, 134, 0, .35);
}
.eyebrow--soft { background: var(--orange-50); color: var(--orange-700); border-color: var(--orange-100); }
.eyebrow--light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.2); }

.chip { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-family: var(--font-display); font-weight: 500; color: var(--ink); }
.chip__emoji { font-size: 1.4rem; line-height: 1; }
.chip--species { transition: transform .2s, box-shadow .2s, border-color .2s; }
.chip--species:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--orange-100); }
.chip--skeleton { width: 120px; height: 50px; border: 0; background: linear-gradient(90deg, var(--navy-50) 0, #fff 40%, var(--navy-50) 80%) var(--navy-50); background-size: 400px 100%; animation: shimmer 1.2s infinite linear; }

/* ---------- Header ---------- */

.header {
    position: sticky; top: 0; z-index: 50; height: var(--header-h);
    background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(226, 231, 241, .8);
}
.header__inner { display: flex; align-items: center; gap: 24px; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand__badge { width: 40px; height: 40px; }
.brand__wordmark { height: 30px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; flex: 1; }
.nav__link {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
    color: var(--text); font-weight: 500; transition: background-color .2s, color .2s;
}
.nav__link .icon { color: var(--muted); }
.nav__link:hover { background: var(--navy-50); color: var(--navy-800); }
.nav__link.active { color: var(--navy-800); background: var(--navy-50); }
.nav__link.active .icon { color: var(--orange-600); }
.nav__link--button { background: none; border: 0; cursor: pointer; width: 100%; text-align: left; }
.nav__mobile-only { display: none; }

.header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header__toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--navy-800); cursor: pointer; align-items: center; justify-content: center; }
.nav-backdrop { display: none; }

.avatar {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--orange-500), var(--orange-700)); color: #fff;
    font-family: var(--font-display); font-weight: 600; flex-shrink: 0;
}
.avatar--xl { width: 76px; height: 76px; font-size: 2rem; box-shadow: 0 10px 24px rgba(200, 75, 5, .3); }

.user-menu { position: relative; }
.user-menu__button { display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); }
.user-menu__button:hover { border-color: var(--navy-200); }
.user-menu__name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.user-menu__backdrop { position: fixed; inset: 0; z-index: 60; }
.user-menu__panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 61; min-width: 240px; padding: 8px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.user-menu__who { display: flex; align-items: center; gap: 12px; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-menu__who > div { display: grid; min-width: 0; }
.user-menu__who strong { color: var(--ink); font-family: var(--font-display); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__who span { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.user-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: none; color: var(--text); cursor: pointer; font-weight: 500; text-align: left; }
.user-menu__item:hover { background: var(--navy-50); color: var(--navy-800); }

/* ---------- Hero ---------- */

.hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(900px 500px at 85% 20%, rgba(254, 134, 0, .30), transparent 60%),
        radial-gradient(700px 400px at 10% 90%, rgba(26, 67, 168, .55), transparent 60%),
        linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 70%);
    padding: 72px 0 120px;
}
.hero__pattern, .auth__side-pattern, .footer__pattern { position: absolute; inset: 0; background-image: var(--paw-pattern); opacity: .06; pointer-events: none; }
.hero__grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero__title { color: #fff; font-size: clamp(2.4rem, 5.4vw, 4.2rem); font-weight: 700; line-height: 1.15; margin: 20px 0 18px; letter-spacing: -.01em; }
.hero__lead { font-size: 1.125rem; color: rgba(255,255,255,.82); max-width: 560px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }
.hero__points { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; color: rgba(255,255,255,.8); font-size: .95rem; }
.hero__points li { display: inline-flex; align-items: center; gap: 6px; }
.hero__points .icon { color: var(--orange-500); }

.hero__art { position: relative; display: grid; place-items: center; min-height: 420px; }
.hero__halo { position: absolute; width: min(420px, 90%); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,.04) 62%, transparent 70%); border: 1px solid rgba(255,255,255,.12); }
.hero__mascot { position: relative; width: min(400px, 88%); height: auto; filter: drop-shadow(0 30px 40px rgba(0, 10, 40, .45)); animation: float 5s ease-in-out infinite; }
.float-chip {
    position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
    background: #fff; color: var(--navy-800); font-family: var(--font-display); font-weight: 600; font-size: .9rem;
    box-shadow: var(--shadow-lg); animation: float 4s ease-in-out infinite;
}
.float-chip .icon { color: var(--orange-600); }
.float-chip--1 { top: 12%; left: 0; }
.float-chip--2 { top: 46%; right: -4%; animation-delay: -1.3s; }
.float-chip--3 { bottom: 8%; left: 8%; animation-delay: -2.6s; }
.float-chip--3 .icon { color: var(--success); }
.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 80px; fill: #fff; }

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section--soft { background: var(--surface-soft); }
.section__head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section__title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; margin-top: 16px; }
.section__lead { color: var(--muted); font-size: 1.075rem; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.step {
    position: relative; padding: 28px 22px 24px; border-radius: var(--radius-lg); background: #fff;
    border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--orange-100); }
.step h3 { font-size: 1.15rem; margin: 18px 0 8px; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }
.step__num { position: absolute; top: 18px; right: 20px; font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--navy-100); }
.step__icon, .role-card__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; }
.step__icon--navy, .role-card__icon--navy { background: var(--navy-100); color: var(--navy-800); }
.step__icon--orange, .role-card__icon--orange { background: var(--orange-100); color: var(--orange-700); }

.species { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.species__copy .section__title { margin-top: 16px; }
.species__list { display: flex; flex-wrap: wrap; gap: 12px; }

.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.role-card { padding: 28px 24px; border-radius: var(--radius-lg); background: linear-gradient(180deg, #fff, var(--navy-50)); border: 1px solid var(--line); transition: transform .25s, box-shadow .25s; }
.role-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.role-card h3 { font-size: 1.15rem; margin: 18px 0 8px; }
.role-card p { color: var(--muted); font-size: .95rem; margin: 0; }

.cta { padding: 0 0 88px; }
.cta__inner {
    position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px;
    padding: 32px 48px; border-radius: var(--radius-xl); overflow: hidden; color: #fff;
    background: radial-gradient(500px 240px at 90% 0%, rgba(255,255,255,.18), transparent 70%), linear-gradient(120deg, var(--orange-600), var(--orange-700) 60%, var(--orange-800));
    box-shadow: 0 24px 50px rgba(200, 75, 5, .3);
}
.cta__inner::after { content: ""; position: absolute; inset: 0; background-image: var(--paw-pattern); opacity: .08; pointer-events: none; }
.cta__mascot { width: 180px; margin: -24px 0 -40px; filter: drop-shadow(0 16px 24px rgba(80, 20, 0, .35)); }
.cta__copy h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 6px; }
.cta__copy p { margin: 0; color: rgba(255,255,255,.9); }
.cta .btn { position: relative; z-index: 1; }

/* ---------- Page heads (inner pages) ---------- */

.page-head {
    position: relative; overflow: hidden; color: #fff; padding: 48px 0 40px;
    background: radial-gradient(600px 300px at 90% 10%, rgba(254, 134, 0, .25), transparent 60%), linear-gradient(160deg, var(--navy-800), var(--navy-900));
}
.page-head::before { content: ""; position: absolute; inset: 0; background-image: var(--paw-pattern); opacity: .06; }
.page-head__inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.page-head h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; margin: 14px 0 6px; }
.page-head p { color: rgba(255,255,255,.8); margin: 0; max-width: 620px; }
.page-head__mascot { width: 160px; margin-bottom: -48px; filter: drop-shadow(0 20px 24px rgba(0, 10, 40, .4)); }
.page-head--tall { padding: 64px 0 56px; }
.page-head--tall .page-head__mascot { width: 220px; margin-bottom: -64px; }

/* ---------- Cards & account ---------- */

.card { padding: 28px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.card__title { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; margin-bottom: 6px; }
.card__title .icon { color: var(--orange-600); }
.card--soon { display: flex; align-items: center; gap: 20px; background: linear-gradient(135deg, var(--orange-50), #fff); border-color: var(--orange-100); }
.card--soon .mascot { width: 120px; flex-shrink: 0; }
.card--plain { box-shadow: none; }

.account { padding: 40px 20px 80px; }
.account__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.profile-card__head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.profile-card__head h2 { font-size: 1.4rem; margin: 0; }
.profile-card__head .muted { margin: 0 0 8px; }
.profile-card__roles { display: flex; flex-wrap: wrap; gap: 6px; }

.info-list { display: grid; gap: 4px; margin: 0; }
.info-list > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.info-list dt { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.info-list dt .icon { color: var(--navy-600); }
.info-list dd { margin: 0; color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; word-break: break-all; }

.skeleton { border-radius: 12px; background: linear-gradient(90deg, var(--navy-50) 0, #fff 40%, var(--navy-50) 80%) var(--navy-50); background-size: 400px 100%; animation: shimmer 1.2s infinite linear; }
.skeleton--avatar { width: 76px; height: 76px; border-radius: 50%; margin-bottom: 16px; }
.skeleton--line { height: 16px; margin-bottom: 12px; }
.skeleton--short { width: 60%; }

/* ---------- Timeline (rescue coming soon) ---------- */

.timeline { position: relative; max-width: 760px; margin: 0 auto; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 23px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--orange-500), var(--navy-200)); }
.timeline__item { position: relative; display: flex; gap: 20px; padding-bottom: 28px; }
.timeline__dot { position: relative; z-index: 1; flex-shrink: 0; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 2px solid var(--orange-500); color: var(--orange-700); box-shadow: 0 0 0 6px #fff; }
.timeline__body { padding: 16px 20px; flex: 1; border-radius: var(--radius); background: var(--surface-soft); border: 1px solid var(--line); }
.timeline__body h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 4px; }
.timeline__body p { margin: 0; color: var(--muted); }
.soon-cta { max-width: 760px; margin: 24px auto 0; padding: 28px; text-align: center; border-radius: var(--radius-lg); background: var(--navy-50); }
.soon-cta p { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); }

/* ---------- Empty / prose ---------- */

.empty-state { display: grid; justify-items: center; text-align: center; padding: 64px 20px 96px; }
.empty-state .mascot { width: 240px; margin-bottom: 8px; }
.empty-state__code { font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: .3em; color: var(--orange-600); }
.empty-state h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 8px 0; }
.empty-state p { color: var(--muted); max-width: 460px; margin-bottom: 28px; }
.prose { max-width: 820px; padding-block: 40px 80px; }

/* ---------- Forms ---------- */

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field__label { font-weight: 600; color: var(--ink); font-size: .95rem; }
.field__optional { color: var(--muted); font-weight: 400; font-size: .85rem; }
.field__star { color: var(--danger); font-weight: 700; }
.field__link { font-size: .875rem; }
.field__error { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--danger); font-size: .875rem; }
.field__hint { display: block; margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.doc-privacy { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--orange-50); color: var(--text); font-size: .86rem; line-height: 1.55; }
.doc-privacy .icon { flex-shrink: 0; margin-top: 3px; color: var(--orange-700); }

.input-wrap { position: relative; }
.input-wrap__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-wrap .input { padding-left: 44px; }
.input-wrap__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.input-wrap__toggle:hover { background: var(--navy-50); color: var(--navy-800); }
.input-wrap:has(.input-wrap__toggle) .input { padding-right: 48px; }

.input {
    width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line);
    background: #fff; color: var(--ink); font: inherit; font-size: 1rem;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.input::placeholder { color: #9aa3b8; }
.input:hover { border-color: var(--navy-200); }
.input:focus { outline: none; border-color: var(--orange-500); box-shadow: var(--ring); }
.input.invalid { border-color: var(--danger); background: #fffafa; }
.input.invalid:focus { box-shadow: 0 0 0 4px rgba(196, 43, 43, .15); }

.otp { text-align: center; font-family: "Prompt", monospace; font-size: 1.9rem; font-weight: 600; letter-spacing: .55em; padding-left: calc(16px + .55em); min-height: 64px; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .95rem; color: var(--text); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--orange-700); flex-shrink: 0; cursor: pointer; }

.strength { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 2px; }
.strength span { height: 5px; border-radius: 99px; background: var(--line); transition: background-color .2s; }
.strength[data-level="1"] span:nth-child(-n+1) { background: var(--danger); }
.strength[data-level="2"] span:nth-child(-n+2) { background: var(--orange-500); }
.strength[data-level="3"] span { background: var(--success); }

.resend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin-top: 20px; color: var(--muted); }

/* ---------- Alerts ---------- */

.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; font-size: .95rem; border: 1px solid transparent; }
.alert__icon { flex-shrink: 0; margin-top: 2px; }
.alert__body { display: grid; gap: 4px; }
.alert__title { font-family: var(--font-display); font-weight: 600; }
.alert__action { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.alert--error { background: var(--danger-bg); color: #8f1f1f; border-color: #f6d0d0; }
.alert--error .alert__icon { color: var(--danger); }
.alert--success { background: var(--success-bg); color: #0f5e31; border-color: #c9ecd7; }
.alert--success .alert__icon { color: var(--success); }
.alert--info { background: var(--info-bg); color: var(--navy-800); border-color: var(--navy-100); }
.alert--warning { background: var(--warning-bg); color: #7a4a00; border-color: #ffe2a8; }

/* ---------- Auth layout ---------- */

.auth { display: grid; grid-template-columns: minmax(380px, 44%) 1fr; min-height: 100vh; }
.auth__side {
    position: sticky; top: 0; height: 100vh; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between; padding: 36px 48px; color: #fff;
    background: radial-gradient(600px 400px at 80% 15%, rgba(254, 134, 0, .32), transparent 60%), radial-gradient(500px 400px at 0% 100%, rgba(26, 67, 168, .55), transparent 60%), linear-gradient(165deg, var(--navy-800), var(--navy-950));
}
.auth__side > * { position: relative; }
.auth__side-content { display: grid; justify-items: center; text-align: center; }
.auth__side-content .mascot { width: min(300px, 80%); filter: drop-shadow(0 24px 34px rgba(0, 0, 0, .35)); animation: float 5s ease-in-out infinite; }
.auth__side-content h2 { color: #fff; font-size: 1.8rem; margin: 18px 0 8px; }
.auth__side-content p { color: rgba(255,255,255,.78); max-width: 360px; }
.auth__perks { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; text-align: left; }
.auth__perks li { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.85); }
.auth__perks .icon { color: var(--orange-500); }
.auth__side-foot { font-family: var(--font-display); font-weight: 600; margin: 0; color: #fff; }
.auth__side-foot span { color: var(--orange-500); }

.auth__main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; background: var(--surface-soft); }
.auth__mobile-brand { display: none; }
.auth__card { width: 100%; max-width: 460px; padding: 40px; border-radius: var(--radius-xl); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.auth__title { font-size: 1.9rem; font-weight: 700; margin: 0 0 6px; }
.auth__subtitle { color: var(--muted); margin-bottom: 24px; }
.auth__subtitle--center { text-align: center; margin: 20px 0 0; }
.auth__back { display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; color: var(--muted); font-size: .95rem; }

.done { display: grid; gap: 12px; text-align: center; }
.done__icon { display: inline-grid; place-items: center; width: 80px; height: 80px; margin: 0 auto 8px; border-radius: 50%; background: var(--success-bg); color: var(--success); }
.done .auth__subtitle { margin-bottom: 12px; }

/* ---------- Footer ---------- */

.footer { position: relative; overflow: hidden; background: var(--navy-950); color: rgba(255,255,255,.72); padding-top: 64px; }
.footer__grid { position: relative; display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; gap: 40px; padding-bottom: 40px; }
.footer__tagline { font-family: var(--font-display); font-weight: 600; color: #fff; font-size: 1.15rem; margin: 18px 0 6px; }
.footer__tagline span { color: var(--orange-500); }
.footer__about { max-width: 340px; font-size: .95rem; }
.footer__col { display: grid; align-content: start; gap: 10px; }
.footer__col h2 { color: #fff; font-size: 1rem; margin-bottom: 4px; letter-spacing: .02em; }
.footer__col a { color: rgba(255,255,255,.72); font-weight: 400; }
.footer__col a:hover { color: var(--orange-500); }
.footer__mascot .mascot { width: 140px; opacity: .95; }
.footer__bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 20px 28px; border-top: 1px solid rgba(255,255,255,.1); font-size: .875rem; }
.footer__phase { color: var(--orange-500); font-weight: 500; }

/* ---------- Sprint 2: avatars, account, profile, network ---------- */

.avatar--img { object-fit: cover; background: var(--navy-100); }
.avatar--ring { box-shadow: 0 0 0 4px #fff, 0 14px 30px rgba(0, 23, 74, .28); }
.btn--sm { min-height: 36px; padding: 6px 14px; font-size: .875rem; }
.btn--icon { width: 44px; padding: 0; }
.link-button--light { color: rgba(255,255,255,.85); }
.link-button--light:hover { color: #fff; }
.link-button--sm { font-size: .85rem; }

.page-head--account { padding: 40px 0 36px; }
.account-hero { display: flex; align-items: center; gap: 28px; }
.account-hero__photo { display: grid; justify-items: center; gap: 8px; }
.account-hero__text h1 { margin: 12px 0 0; }
.account-hero__username { color: rgba(255,255,255,.72) !important; margin: 0 0 10px !important; }
.account-hero__stats { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 16px; }
.account-hero__stats a { color: rgba(255,255,255,.82); font-weight: 400; }
.account-hero__stats a:hover { color: #fff; }
.account-hero__stats strong { color: #fff; font-family: var(--font-display); font-size: 1.1rem; margin-right: 4px; }
.account__col { display: grid; gap: 24px; align-content: start; }
.account__grid > .account__col .card { margin: 0; }
.profile-card__roles { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }

.avatar-uploader { position: relative; width: 112px; height: 112px; }
.avatar-uploader__button {
    position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 40px; height: 40px;
    border-radius: 50%; border: 3px solid #fff; background: var(--orange-700); color: #fff; cursor: pointer; box-shadow: var(--shadow);
    transition: background-color .2s, transform .15s;
}
.avatar-uploader__button:hover { background: var(--orange-800); transform: scale(1.05); }
.avatar-uploader__button:focus-within { box-shadow: var(--ring); }
.avatar-uploader__button input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.avatar-uploader__button.is-busy { cursor: progress; }
.avatar-uploader__error { display: flex; gap: 6px; max-width: 200px; margin: 0; color: #ffd6d6; font-size: .85rem; }

.input--area { min-height: 100px; resize: vertical; line-height: 1.6; }
select.input { cursor: pointer; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field__counter { color: var(--muted); font-size: .8rem; }

.choice-group { display: grid; gap: 10px; margin-top: 16px; }
.choice {
    display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 14px;
    border: 1.5px solid var(--line); background: #fff; text-align: left; cursor: pointer; transition: border-color .2s, background-color .2s;
}
.choice:hover:not(:disabled) { border-color: var(--navy-200); }
.choice:disabled { cursor: progress; }
.choice--selected, .choice--selected:hover:not(:disabled) { border-color: var(--orange-500); background: var(--orange-50); }
.choice__icon { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: var(--navy-100); color: var(--navy-800); }
.choice--selected .choice__icon { background: var(--orange-100); color: var(--orange-700); }
.choice__text { display: grid; flex: 1; }
.choice__text strong { color: var(--ink); font-family: var(--font-display); font-weight: 600; }
.choice__text span { color: var(--muted); font-size: .9rem; }
.choice__check { display: grid; place-items: center; width: 24px; color: var(--orange-700); }

.profile-cover {
    position: relative; height: 190px; overflow: hidden;
    background: radial-gradient(600px 260px at 85% 0%, rgba(254, 134, 0, .35), transparent 65%), linear-gradient(160deg, var(--navy-800), var(--navy-950));
}
.profile-cover::before { content: ""; position: absolute; inset: 0; background-image: var(--paw-pattern); opacity: .07; }
.profile { padding-bottom: 80px; }
.profile-card {
    position: relative; display: flex; align-items: flex-start; gap: 28px; margin-top: -84px; padding: 28px 32px;
    border-radius: var(--radius-xl); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.profile-card__avatar { flex-shrink: 0; margin-top: -60px; }
.profile-card--loading { display: grid; gap: 12px; }
.profile-card__body { flex: 1; min-width: 0; }
.profile-card__body h1 { font-size: clamp(1.6rem, 3vw, 2rem); margin: 0; }
.profile-card__username { margin: 0 0 12px; color: var(--muted); }
.profile-card__bio { max-width: 640px; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.profile-card__stats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-bottom: 18px; }
.profile-card__stats strong { color: var(--ink); font-family: var(--font-display); font-size: 1.1rem; margin-right: 4px; }
.profile-card__stats .muted { display: inline-flex; align-items: center; gap: 6px; }
.profile-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.profile-private, .profile-empty { margin-top: 24px; padding: 32px; border-radius: var(--radius-lg); background: var(--surface-soft); border: 1px dashed var(--navy-200); }
.profile-private { text-align: center; }
.profile-private h2 { font-size: 1.3rem; margin: 0 0 4px; }
.profile-private__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 12px; border-radius: 50%; background: var(--navy-100); color: var(--navy-800); }
.profile-empty { display: flex; align-items: center; gap: 24px; border-style: solid; }
.profile-empty .mascot { width: 130px; flex-shrink: 0; }
.profile-empty h2 { font-size: 1.25rem; margin: 0 0 4px; }

.menu { position: relative; }
.menu__backdrop { position: fixed; inset: 0; z-index: 60; }
.menu__panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 61; min-width: 210px; padding: 6px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--text); font-weight: 500; text-align: left; cursor: pointer; }
.menu__item:hover { background: var(--navy-50); }
.menu__item--danger { color: var(--danger); }
.menu__item--danger:hover { background: var(--danger-bg); }

.connections { max-width: 760px; padding-block: 32px 80px; }
.tabs { display: flex; width: fit-content; max-width: 100%; gap: 6px; margin-bottom: 20px; padding: 6px; border-radius: 999px; background: var(--navy-50); }
.tabs__tab { padding: 10px 20px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-family: var(--font-display); font-weight: 600; white-space: nowrap; cursor: pointer; }
.tabs__tab:hover { color: var(--navy-800); }
.tabs__tab.active { background: #fff; color: var(--navy-800); box-shadow: var(--shadow-sm); }
.user-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.user-row__who { display: flex; align-items: center; gap: 14px; min-width: 0; color: inherit; font-weight: 400; }
.user-row__text { display: grid; min-width: 0; }
.user-row__text strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.user-row__text .muted { font-size: .875rem; }
.skeleton--sm { width: 48px; height: 48px; margin: 0; flex-shrink: 0; }
.user-row .skeleton--line { flex: 1; margin: 0; }
.load-more { display: grid; place-items: center; margin-top: 20px; }
.empty-state--compact { padding: 32px 16px; }
.empty-state--compact .mascot { width: 170px; }
.empty-state--compact h2 { font-size: 1.4rem; margin: 8px 0; }

/* ---------- Media library & admin ---------- */

.media-page { padding-block: 32px 80px; }
.uploader { display: grid; gap: 12px; margin-bottom: 24px; }
.uploader__drop {
    position: relative; display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: var(--radius-lg);
    border: 2px dashed var(--navy-200); background: var(--navy-50); cursor: pointer; transition: border-color .2s, background-color .2s;
}
.uploader__drop:hover, .uploader__drop:focus-within { border-color: var(--orange-500); background: var(--orange-50); }
.uploader__drop.is-busy { cursor: progress; opacity: .8; }
.uploader__drop input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.uploader__icon { display: grid; place-items: center; flex-shrink: 0; width: 56px; height: 56px; border-radius: 18px; background: var(--orange-700); color: #fff; box-shadow: 0 8px 20px rgba(200, 75, 5, .28); }
.uploader__text { display: grid; gap: 2px; }
.uploader__text strong { color: var(--ink); font-family: var(--font-display); font-size: 1.1rem; }
.uploader__text span { color: var(--muted); font-size: .9rem; }

.upload-task { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.upload-task--error { border-color: #f6d0d0; background: var(--danger-bg); }
.upload-task__icon { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--navy-100); color: var(--navy-800); }
.upload-task__body { flex: 1; min-width: 0; display: grid; gap: 8px; }
.upload-task__row { display: flex; justify-content: space-between; gap: 12px; }
.upload-task__row strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.upload-task__row .muted { flex-shrink: 0; font-size: .875rem; }
.upload-task__error { display: flex; gap: 6px; align-items: center; margin: 0; color: #8f1f1f; font-size: .9rem; }
.progress { height: 8px; border-radius: 99px; background: var(--navy-100); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange-500), var(--orange-700)); transition: width .2s; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.media-tile {
    position: relative; aspect-ratio: 1; overflow: hidden; padding: 0; border: 0; border-radius: var(--radius);
    background: var(--navy-100); cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.media-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.media-tile img { width: 100%; height: 100%; object-fit: cover; }
.media-tile.skeleton { cursor: default; }
.media-tile__overlay {
    position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 12px;
    background: rgba(0, 23, 74, .72); color: #fff; font-size: .85rem; text-align: center;
}
.media-tile__overlay--error { background: rgba(140, 25, 25, .82); }
.media-tile__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 48px; height: 48px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; padding-left: 3px; }
.media-tile__badge { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 99px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .78rem; font-weight: 600; }

.viewer { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.viewer__backdrop { position: absolute; inset: 0; background: rgba(0, 10, 30, .85); }
.viewer__panel { position: relative; display: grid; gap: 12px; width: min(960px, 100%); max-height: 100%; }
.viewer__close { position: absolute; top: -6px; right: -6px; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--navy-800); cursor: pointer; box-shadow: var(--shadow); }
.viewer__media { display: grid; place-items: center; overflow: hidden; border-radius: var(--radius-lg); background: #000; }
.viewer__media img, .viewer__media video { display: block; max-width: 100%; max-height: 72vh; object-fit: contain; }
.viewer__placeholder { display: grid; justify-items: center; gap: 10px; padding: 64px 24px; color: #fff; text-align: center; }
.viewer__info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 12px 16px; border-radius: var(--radius); background: #fff; color: var(--text); font-size: .9rem; }
.viewer__info span { display: inline-flex; align-items: center; gap: 6px; }
.viewer__info .btn { margin-left: auto; }

.admin-page { max-width: 820px; padding-block: 32px 80px; }
.admin-card .form { margin-top: 18px; }
.input-suffix { display: flex; align-items: center; gap: 10px; }
.input-suffix .input { max-width: 180px; }
.input-suffix span { color: var(--muted); font-weight: 500; }
.info-box { display: flex; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--info-bg); color: var(--navy-800); font-size: .92rem; }
.info-box .icon { flex-shrink: 0; margin-top: 2px; }

/* ==========================================================================
   Rescue cases — list, form, detail
   ========================================================================== */

[hidden] { display: none !important; }

.page-head__cta { margin-top: 18px; }
.page-head--compact { padding: 32px 0 28px; }
.page-head--compact .page-head__mascot { width: 130px; margin-bottom: -36px; }

.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-family: var(--font-display); font-size: .78rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.status-pill--lg { padding: 5px 14px; font-size: .875rem; }
.status--open { background: var(--orange-500); color: #1d0e00; }
.status--progress { background: #ffd24d; color: #3d2a00; }
.status--done { background: #2fb36a; color: #fff; }
.status--closed { background: #7c879e; color: #fff; }
.status--urgent { background: var(--danger); color: #fff; }

/* list */
.rescue-page { padding-block: 28px 80px; }
.rescue-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.rescue-toolbar .tabs { margin: 0; }
.tabs--scroll { overflow-x: auto; scrollbar-width: none; }
.tabs--scroll::-webkit-scrollbar { display: none; }
.tabs__tab .icon { vertical-align: -3px; margin-right: 2px; }
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search .input { padding-left: 44px; min-height: 46px; border-radius: 999px; }
.search__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.filter-chips { display: flex; gap: 8px; margin-bottom: 24px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips--wrap { flex-wrap: wrap; overflow: visible; margin-bottom: 0; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--text); font: inherit; font-size: .9rem; font-weight: 500; white-space: nowrap; cursor: pointer; transition: border-color .2s, background-color .2s, color .2s; }
.filter-chip:hover { border-color: var(--navy-200); }
.filter-chip.active { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }
.rescue-count { margin: -8px 0 14px; font-size: .9rem; }

.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.case-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: inherit; font-weight: 400; transition: transform .2s, box-shadow .2s; }
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: inherit; }
.case-card--closed .case-card__media img { filter: saturate(.55); }
.case-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--navy-50); overflow: hidden; }
.case-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.case-card:hover .case-card__media img { transform: scale(1.04); }
.case-card__placeholder { display: grid; place-items: center; height: 100%; color: var(--navy-200); background: linear-gradient(160deg, var(--navy-50), var(--orange-50)); }
.case-card__media .status-pill { position: absolute; left: 12px; top: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.case-card__urgent { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--danger); color: #fff; font-family: var(--font-display); font-size: .78rem; font-weight: 600; animation: pulse 2s infinite; }
.case-card__count { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 15, 51, .7); color: #fff; font-size: .75rem; }
.case-card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 16px 18px 18px; }
.case-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: .825rem; }
.case-type { display: inline-flex; align-items: center; gap: 4px; color: var(--orange-700); font-weight: 600; }
.case-card__code { margin-left: auto; font-family: var(--font-display); font-size: .75rem; letter-spacing: .02em; }
.case-card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-size: 1.08rem; }
.case-card__place { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: .875rem; }
.case-card__place span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-card__place strong { margin-left: auto; color: var(--navy-700); font-weight: 600; white-space: nowrap; }
.case-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .825rem; color: var(--muted); }
.case-card__who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.case-card__who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-card__stats { display: flex; gap: 10px; flex-shrink: 0; }
.case-card__stats span { display: inline-flex; align-items: center; gap: 4px; }
.case-card__stats .icon { color: var(--orange-600); }
.case-card--skeleton { pointer-events: none; }
.case-card--skeleton .case-card__body { gap: 0; }

@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(196, 43, 43, .5); } 50% { box-shadow: 0 0 0 6px rgba(196, 43, 43, 0); } }

/* home: latest cases */
.latest-cases__more { display: flex; justify-content: center; margin-top: 32px; }

/* form */
.case-form-page { max-width: 820px; padding-block: 28px 80px; }
/* A page title over a form: as wide as the form and lined up with it (Paws clip, product). */
.shop-head.case-form-page__head { max-width: 820px; margin-bottom: 0; }
.case-form-page__head + .case-form-page { padding-top: 18px; }
.case-form-page__head h1 { display: flex; align-items: center; gap: 10px; }
.case-form-page__head h1 .icon { color: var(--orange-600); }
.stepper { display: flex; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.stepper__item { flex: 1; }
.stepper__item button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px; background: var(--navy-50); color: var(--muted); font-family: var(--font-display); font-weight: 600; cursor: pointer; text-align: left; }
.stepper__item button:disabled { cursor: default; }
.stepper__num { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--navy-800); font-size: .875rem; }
.stepper__item.is-current button { background: var(--navy-800); color: #fff; }
.stepper__item.is-current .stepper__num { background: var(--orange-500); color: #1d0e00; }
.stepper__item.is-done .stepper__num { background: var(--success); color: #fff; }
.case-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.case-form__step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.form-block { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.form-block__title { padding: 0; margin-bottom: 4px; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.form-block .muted { margin: -6px 0 0; font-size: .9rem; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.type-option { display: grid; justify-items: start; gap: 4px; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; color: var(--muted); font: inherit; font-size: .8rem; line-height: 1.4; text-align: left; cursor: pointer; transition: border-color .2s, background-color .2s, transform .15s; }
.type-option:hover { border-color: var(--navy-200); transform: translateY(-2px); }
.type-option strong { color: var(--ink); font-family: var(--font-display); font-size: .95rem; }
.type-option__hint { color: var(--muted); font-size: .75rem; line-height: 1.35; }
.type-option__icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: 12px; background: var(--navy-100); color: var(--navy-800); }
.type-option.is-selected { border-color: var(--orange-500); background: var(--orange-50); }
.type-option.is-selected .type-option__icon { background: var(--orange-500); color: #fff; }
.severity { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.severity__option { display: grid; justify-items: center; gap: 6px; padding: 10px 6px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; color: var(--text); font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer; }
.severity__dots { display: flex; gap: 3px; }
.severity__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.severity__dots i.on { background: var(--orange-500); }
.severity__option--4 .severity__dots i.on, .severity__option--5 .severity__dots i.on { background: var(--danger); }
.severity__option.is-selected { border-color: var(--navy-800); background: var(--navy-50); color: var(--navy-800); font-weight: 600; }
.toggle { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line); cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle__track { position: relative; flex-shrink: 0; width: 48px; height: 28px; border-radius: 99px; background: var(--navy-200); transition: background-color .2s; }
.toggle__thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.toggle input:checked + .toggle__track { background: var(--danger); }
.toggle input:checked + .toggle__track .toggle__thumb { transform: translateX(20px); }
.toggle input:focus-visible + .toggle__track { box-shadow: var(--ring); }
.toggle__text { display: grid; }
.toggle__text strong { color: var(--ink); font-family: var(--font-display); }
.toggle__text span { color: var(--muted); font-size: .875rem; }
.locate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.locate__info { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: .9rem; font-weight: 500; }
.review { padding: 18px 20px; border-radius: 16px; background: var(--surface-soft); border: 1px solid var(--line); }
.review h3 { font-size: 1.05rem; }
.review dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.review dt { color: var(--muted); }
.review dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.review dd .icon { vertical-align: -3px; color: var(--orange-600); }
.case-form__nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line); }

/* media picker */
.picker__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.picker__item, .picker__add { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 14px; }
.picker__item { background: var(--navy-900); }
.picker__item img, .picker__item video { width: 100%; height: 100%; object-fit: cover; }
.picker__item--error { outline: 2px solid var(--danger); }
.picker__overlay { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 6px; padding: 8px; background: rgba(0, 15, 51, .55); color: #fff; font-size: .78rem; text-align: center; }
.picker__overlay--error { background: rgba(120, 10, 10, .72); }
.picker__bar { width: 80%; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.picker__bar span { display: block; height: 100%; background: var(--orange-500); transition: width .2s; }
.picker__tag, .picker__cover, .picker__video { position: absolute; padding: 1px 7px; border-radius: 99px; font-size: .7rem; font-weight: 600; }
.picker__cover { left: 6px; bottom: 6px; background: var(--orange-500); color: #1d0e00; }
.picker__tag { left: 6px; top: 6px; background: rgba(0, 15, 51, .75); color: #fff; }
.picker__video { right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 2px; background: rgba(0, 15, 51, .75); color: #fff; }
.picker__actions { position: absolute; right: 4px; top: 4px; display: flex; gap: 4px; }
.picker__actions button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--navy-800); cursor: pointer; box-shadow: var(--shadow-sm); }
.picker__actions button:hover { background: #fff; color: var(--orange-700); }
.picker__add { display: grid; align-content: center; justify-items: center; gap: 4px; padding: 10px 8px; text-align: center; line-height: 1.3; border: 2px dashed var(--navy-200); background: var(--navy-50); color: var(--navy-700); font-family: var(--font-display); font-size: .85rem; font-weight: 600; cursor: pointer; transition: border-color .2s, background-color .2s; }
.picker__add:hover { border-color: var(--orange-500); background: var(--orange-50); color: var(--orange-700); }
.picker__add small { color: var(--muted); font-weight: 400; font-size: .72rem; line-height: 1.35; }
/* Paws: one vertical clip — a tall tile like the clip itself */
.picker--clip .picker__grid { grid-template-columns: repeat(auto-fill, 160px); }
.picker--clip .picker__item, .picker--clip .picker__add { aspect-ratio: 9 / 14; }
.picker--clip .picker__add { gap: 8px; padding: 14px; font-size: .95rem; }
.picker--clip .picker__add small { font-size: .76rem; }
.picker__add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.picker__add.is-busy { opacity: .7; }

/* map */
.map-embed { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); }
.map-embed iframe { display: block; width: 100%; height: 240px; border: 0; }
.map-embed__open { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: #fff; box-shadow: var(--shadow); font-size: .825rem; }

/* detail */
.case-hero { position: relative; overflow: hidden; padding: 28px 0 34px; color: #fff; background: radial-gradient(600px 300px at 90% 0%, rgba(254, 134, 0, .25), transparent 60%), linear-gradient(160deg, var(--navy-800), var(--navy-900)); }
.case-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--paw-pattern); opacity: .06; }
.case-hero .container { position: relative; }
.case-hero--loading .skeleton { max-width: 520px; opacity: .2; }
.case-hero__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.case-hero__code { font-family: var(--font-display); font-size: .9rem; letter-spacing: .04em; color: var(--navy-200); }
.case-hero h1 { max-width: 860px; margin: 12px 0 10px; color: #fff; font-size: clamp(1.5rem, 3.6vw, 2.3rem); }
.case-hero__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--navy-100); font-size: .925rem; }
.case-hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.severity-tag { padding: 0 10px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.severity-tag--4, .severity-tag--5 { background: rgba(196, 43, 43, .85); color: #fff; }
.case-hero__reporter { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; color: #fff; }
.case-hero__reporter:hover { color: var(--orange-100); }
.case-hero__reporter small { display: block; color: var(--navy-200); font-size: .75rem; line-height: 1.2; }
.case-hero__reporter strong { font-family: var(--font-display); }

.case-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; padding-block: 28px 96px; }
.case-main { display: grid; gap: 24px; min-width: 0; }
.case-side { display: grid; gap: 16px; }
.case-side .card { padding: 22px; }

.gallery { display: grid; gap: 10px; }
.gallery__main { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--navy-950); cursor: zoom-in; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__play { position: absolute; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: rgba(254, 134, 0, .92); color: #fff; box-shadow: var(--shadow-lg); }
.gallery__processing { display: flex; align-items: center; gap: 10px; color: #fff; }
.gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.gallery__thumb { position: relative; flex: 0 0 76px; height: 76px; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 12px; background: var(--navy-100); cursor: pointer; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-active { border-color: var(--orange-500); }
.gallery__thumb-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .25); }

.case-section .card__title { margin-bottom: 12px; }
.case-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.case-subtitle { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 1.05rem; }
.case-subtitle .icon { color: var(--orange-600); }
.case-section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.case-section__head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.35rem; }
.case-section__head h2 .icon { color: var(--orange-600); }

.composer { display: grid; gap: 12px; margin-bottom: 22px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.composer__bar { display: flex; justify-content: space-between; gap: 10px; }

.case-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.case-timeline::before { content: ""; position: absolute; left: 17px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.case-timeline__item { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.case-timeline__dot { position: relative; z-index: 1; display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 2px solid var(--navy-200); color: var(--navy-700); }
.case-timeline__item--status .case-timeline__dot { border-color: var(--orange-500); background: var(--orange-500); color: #fff; }
.case-timeline__item--volunteer .case-timeline__dot { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }
.case-timeline__item--created .case-timeline__dot { border-color: var(--orange-500); color: var(--orange-700); }
.case-timeline__body { flex: 1; min-width: 0; padding: 12px 16px; border-radius: var(--radius); background: var(--surface-soft); border: 1px solid var(--line); }
.case-timeline__body p { margin: 4px 0 0; }
.case-timeline__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .875rem; }
.case-timeline__who { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.case-timeline__delete { margin-left: auto; color: var(--muted); }
.case-timeline__media { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.case-timeline__media button { aspect-ratio: 1; overflow: hidden; padding: 0; border: 0; border-radius: 12px; background: var(--navy-900); cursor: zoom-in; }
.case-timeline__media img { width: 100%; height: 100%; object-fit: cover; }

.case-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 18px; text-align: center; }
.case-stats strong { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); line-height: 1.2; }
.case-stats span { color: var(--muted); font-size: .75rem; }
.case-actions__buttons { display: grid; gap: 10px; }
.btn--supported { background: var(--orange-50); color: var(--orange-700); border-color: var(--orange-100); }
.btn--supported:hover { background: var(--orange-100); color: var(--orange-800); }
.btn--supported .icon { fill: currentColor; }
.case-actions__note { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; color: var(--muted); font-size: .875rem; }
.case-closed { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; background: var(--success-bg); color: var(--success); font-weight: 500; font-size: .9rem; }
.case-contact p { margin: 0; font-size: .9rem; }
.case-manage .muted { margin: 0 0 12px; font-size: .9rem; }
.case-manage > .input { margin: 12px 0 10px; }
.status-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.status-option { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--text); font: inherit; font-size: .85rem; text-align: left; cursor: pointer; }
.status-option small { margin-left: auto; color: var(--muted); font-size: .7rem; }
.status-option.is-current { background: var(--navy-50); }
.status-option.is-selected { border-color: var(--orange-500); background: var(--orange-50); color: var(--orange-800); font-weight: 600; }
.case-manage__links { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.volunteer-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.volunteer { display: grid; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); }
.volunteer--accepted, .volunteer--completed { border-color: #b9e6cb; background: var(--success-bg); }
.volunteer--declined { opacity: .6; }
.volunteer__who { display: flex; align-items: center; gap: 10px; color: inherit; }
.volunteer__who span { display: grid; line-height: 1.3; }
.volunteer__who strong { color: var(--ink); }
.volunteer__who small { color: var(--muted); }
.volunteer__help { display: flex; flex-wrap: wrap; gap: 4px; }
.volunteer__note { margin: 0; font-size: .875rem; color: var(--text); }
.volunteer__actions { display: flex; gap: 8px; }

.card__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* bottom sheet / dialog */
.sheet { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 16px; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0, 10, 30, .6); animation: fade-in .2s; }
.sheet__panel { position: relative; display: grid; gap: 14px; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 26px; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-lg); animation: rise .25s ease-out; }
.sheet__panel h2 { margin: 0; padding-right: 40px; font-size: 1.3rem; }
.sheet__panel > .muted { margin: -6px 0 0; font-size: .9rem; }
.sheet__close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--navy-50); color: var(--navy-800); cursor: pointer; }
.sheet__actions { display: flex; justify-content: flex-end; gap: 10px; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
/* Facebook on a phone: "paste the link" how-to, under the share options. */
.share-fb-help { grid-column: 1 / -1; order: 1; display: grid; gap: 8px; justify-items: start; padding: 12px 14px; border-radius: 14px; background: #e7f0ff; color: var(--ink); font-size: .9rem; }
.share-fb-help ol { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.share-option { display: grid; justify-items: center; gap: 8px; padding: 14px 8px; border-radius: 16px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: .875rem; cursor: pointer; }
.share-option:hover { border-color: var(--navy-200); color: var(--ink); background: var(--surface-soft); }
.share-option__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--navy-800); color: #fff; font-family: Arial, sans-serif; font-weight: 700; font-size: 1.2rem; }
.share-option--facebook .share-option__icon { background: #1877f2; font-size: 1.6rem; }
.share-option--line .share-option__icon { background: #06c755; font-size: .72rem; }
.share-option--x .share-option__icon { background: #000; }
.share-link { display: flex; gap: 8px; }
.share-link .input { min-height: 46px; font-size: .875rem; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.help-grid .choice { padding: 10px 12px; gap: 10px; }
.help-grid .choice__icon { width: 36px; height: 36px; }
.help-grid .choice__text span { font-size: .78rem; line-height: 1.35; }
.next-help__thanks { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--orange-50); font-size: 1.7rem; animation: rise .35s ease-out; }
.next-help__list { margin-top: 0; }
.next-help__list .choice { text-decoration: none; color: inherit; }
.next-help__time { flex-shrink: 0; padding: 3px 9px; border-radius: 999px; background: var(--navy-100); color: var(--navy-800); font-size: .72rem; font-weight: 600; white-space: nowrap; }

.viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--navy-800); cursor: pointer; }
.viewer__nav--prev { left: 10px; }
.viewer__nav--next { right: 10px; }
.media-viewer__media { position: relative; touch-action: pan-y pinch-zoom; user-select: none; }
.media-viewer__dots { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.media-viewer__count { margin-right: 6px; color: #fff; font-size: .9rem; font-weight: 600; }
.media-viewer__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .45); cursor: pointer; transition: width .2s, background-color .2s; }
.media-viewer__dot.is-active { width: 22px; border-radius: 999px; background: var(--orange-500); }

@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

@media (max-width: 1000px) {
    .case-layout { grid-template-columns: minmax(0, 1fr); }
    .case-side { position: static; }
}

@media (max-width: 700px) {
    .rescue-toolbar { flex-direction: column; align-items: stretch; }
    .search { max-width: none; }
    .rescue-toolbar .search { flex: 0 0 auto; }
    .case-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .stepper__label { display: none; }
    .stepper__item.is-current .stepper__label { display: inline; }
    .stepper__item { flex: 0 0 auto; }
    .stepper__item.is-current { flex: 1; }
    .severity { grid-template-columns: repeat(3, 1fr); }
    .case-form { padding: 20px; }
    .review dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .review dd { margin-bottom: 8px; }
    .case-layout { padding-bottom: 120px; }
    .gallery__main { aspect-ratio: 4 / 3; border-radius: var(--radius); }
    .help-grid { grid-template-columns: minmax(0, 1fr); }
    .status-options { grid-template-columns: minmax(0, 1fr); }
    .case-stats strong { font-size: 1.15rem; }
    .sheet { place-items: end stretch; padding: 0; }
    .sheet__panel { width: 100%; max-height: 88vh; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

/* ==========================================================================
   Pet profiles
   ========================================================================== */

.pet-photo { flex-shrink: 0; border-radius: 50%; object-fit: cover; background: var(--navy-50); }
.pet-photo--empty { display: grid; place-items: center; background: linear-gradient(150deg, var(--orange-50), var(--navy-50)); line-height: 1; }
.sex { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .85rem; font-weight: 700; line-height: 1; }
.sex--male { background: #e3efff; color: #2563eb; }
.sex--female { background: #ffe4f0; color: #d9467f; }
.sex--lg { width: 32px; height: 32px; font-size: 1.15rem; }
.pet-status { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-family: var(--font-display); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pet-status--good { background: var(--success-bg); color: var(--success); }
.pet-status--care { background: #fff4d6; color: #8a5a00; }
.pet-status--lost { background: var(--danger); color: #fff; }
.pet-status--muted { background: var(--navy-100); color: var(--muted); }
.pet-status--adopt { background: #16a34a; color: #fff; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); vertical-align: -2px; }

.pets-page { padding-block: 28px 80px; }
.pet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pet-card { position: relative; display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: inherit; font-weight: 400; transition: transform .2s, box-shadow .2s; }
.pet-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.pet-card__body { display: grid; gap: 4px; flex: 1; min-width: 0; }
.pet-card__name { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.15rem; }
.pet-card__verified { color: var(--success); display: inline-flex; }
.pet-card__meta { margin: 0; color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pet-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .825rem; }
.pet-card__foot .icon { vertical-align: -2px; }
.pet-card__go { color: var(--navy-200); flex-shrink: 0; }
.pet-card--add { justify-content: center; flex-direction: column; gap: 8px; min-height: 120px; border: 2px dashed var(--navy-200); background: var(--navy-50); box-shadow: none; color: var(--navy-700); font-family: var(--font-display); }
.pet-card--add:hover { border-color: var(--orange-500); background: var(--orange-50); color: var(--orange-700); }
.pet-card__plus { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); }
.pet-card--skeleton .skeleton--avatar { width: 88px; height: 88px; margin: 0; }

/* add / edit form */
.species-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.species-option { display: grid; justify-items: center; gap: 6px; padding: 18px 10px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; font: inherit; cursor: pointer; transition: border-color .2s, background-color .2s, transform .15s; }
.species-option:hover { border-color: var(--navy-200); transform: translateY(-2px); }
.species-option__emoji { font-size: 2.4rem; line-height: 1; }
.species-option strong { color: var(--ink); font-family: var(--font-display); }
.species-option.is-selected { border-color: var(--orange-500); background: var(--orange-50); }
.segmented { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 16px; background: var(--navy-50); width: fit-content; max-width: 100%; }
.segmented__option { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 0; border-radius: 12px; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.segmented__option.is-selected { background: #fff; color: var(--navy-800); box-shadow: var(--shadow-sm); }
.age-inputs { display: flex; flex-wrap: wrap; gap: 12px; }
.age-inputs .input { max-width: 110px; }
.more-details { border-radius: 16px; border: 1px solid var(--line); background: var(--surface-soft); }
.more-details > summary { display: flex; align-items: center; gap: 8px; padding: 14px 18px; font-family: var(--font-display); font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; }
.more-details > summary::-webkit-details-marker { display: none; }
.more-details[open] > summary { border-bottom: 1px solid var(--line); }
.more-details > .form-block { padding: 18px; gap: 18px; }
.trait-add { display: flex; gap: 8px; margin-top: 8px; }
.trait-add .input { min-height: 44px; }
.choice-group--tight { margin-top: 4px; gap: 8px; }
.choice-group--tight .choice { padding: 10px 14px; }
.pet-form__photo { display: grid; justify-items: center; gap: 6px; }
.pet-form__photo-step .form-block { justify-items: center; text-align: center; }
.pet-form__preview-name { margin: 6px 0 0; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--ink); }
.pet-photo-picker { position: relative; width: fit-content; }
.pet-done { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 40px 24px; }
.pet-done__check { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--success); color: #fff; box-shadow: 0 0 0 10px var(--success-bg); }
.pet-done h2 { margin: 6px 0 0; }
.pet-done__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

/* profile */
.pet-cover { height: 150px; }
.pet-profile { display: grid; gap: 20px; margin-top: -90px; padding-bottom: 80px; position: relative; }
.lost-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px; border-radius: var(--radius-lg); background: var(--danger); color: #fff; box-shadow: var(--shadow); }
.lost-banner > div { display: grid; flex: 1; min-width: 200px; }
.lost-banner strong { font-family: var(--font-display); font-size: 1.1rem; }
.pet-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
.pet-hero__title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pet-hero__title h1 { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.pet-hero__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; color: var(--muted); }
.pet-hero__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pet-hero__owners { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.pet-owner { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: .9rem; }
.pet-hero__actions { display: grid; gap: 8px; align-self: start; }
.pet-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pet-stats > div { display: grid; justify-items: center; gap: 2px; padding: 16px 8px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-align: center; }
.pet-stats__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--orange-50); color: var(--orange-700); margin-bottom: 4px; }
.pet-stats strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.pet-stats small { color: var(--muted); }
.reaction-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.reaction { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--text); font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; transition: transform .15s, border-color .2s, background-color .2s; }
.reaction:hover { transform: translateY(-2px); border-color: var(--orange-100); }
.reaction__emoji { font-size: 1.15rem; line-height: 1; }
.reaction small { padding: 0 6px; border-radius: 99px; background: var(--navy-50); color: var(--navy-800); font-weight: 600; }
.reaction.is-mine { border-color: var(--orange-500); background: var(--orange-50); color: var(--orange-800); }
.pet-tabs { margin: 4px 0 0; }
.pet-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.card__head .card__title { margin: 0; }
.trait-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.trait { padding: 4px 12px; border-radius: 999px; background: var(--orange-50); color: var(--orange-800); font-size: .875rem; font-weight: 500; }
.pet-info { display: grid; gap: 0; margin: 0; }
.pet-info > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.pet-info > div:last-child { border-bottom: 0; }
.pet-info dt { color: var(--muted); }
.pet-info dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; }

.activity-list { display: grid; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.activity { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.activity-list--compact .activity { padding: 8px 0; border: 0; border-bottom: 1px dashed var(--line); border-radius: 0; }
.activity-list--compact .activity:last-child { border-bottom: 0; }
.activity__icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 12px; background: var(--navy-100); color: var(--navy-800); }
.activity__icon--walk, .activity__icon--play { background: #e3f6ec; color: #138a43; }
.activity__icon--feeding { background: var(--orange-50); color: var(--orange-700); }
.activity__icon--grooming { background: #eaf1ff; color: #2563eb; }
.activity__icon--vet { background: #fdecec; color: var(--danger); }
.activity__icon--milestone { background: #ffe4f0; color: #d9467f; }
.activity__text { display: grid; flex: 1; min-width: 0; }
.activity__text strong { color: var(--ink); }
.activity__date { flex-shrink: 0; font-size: .825rem; }
.activity-day { margin: 18px 0 8px; font-size: 1rem; color: var(--muted); }
.activity-composer { display: grid; gap: 14px; margin-bottom: 20px; }
.activity-types { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.activity-types::-webkit-scrollbar { display: none; }
.activity-type { display: grid; justify-items: center; gap: 4px; flex: 0 0 auto; min-width: 76px; padding: 8px 6px; border-radius: 14px; border: 1.5px solid transparent; background: none; color: var(--muted); font: inherit; font-size: .78rem; cursor: pointer; }
.activity-type.is-selected { border-color: var(--orange-500); background: var(--orange-50); color: var(--orange-800); font-weight: 600; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.inline-form > .input { flex: 1 1 180px; min-height: 46px; }
.inline-form .input-suffix .input { max-width: 130px; min-height: 46px; }
.inline-form--wrap { margin-top: 0; }
.inline-form > .input[type="date"] { flex: 0 1 190px; }
.week-summary { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; gap: 6px 24px; align-items: center; margin-bottom: 20px; }
.week-summary .card__title { grid-column: 1 / -1; }
.week-summary__ring { display: grid; place-items: center; align-content: center; width: 116px; height: 116px; border-radius: 50%; background: conic-gradient(var(--orange-500) calc(var(--pct) * 1%), var(--navy-100) 0); position: relative; }
.week-summary__ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #fff; }
.week-summary__ring strong, .week-summary__ring small { position: relative; line-height: 1.1; }
.week-summary__ring strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); }
.week-summary__ring small { color: var(--muted); }
.week-summary__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.week-summary__list li { display: flex; align-items: center; gap: 10px; }
.week-summary__list strong { margin-left: auto; color: var(--ink); }
.week-summary__list .activity__icon { width: 28px; height: 28px; border-radius: 9px; }

.health-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; }
.health-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--navy-700); }
.health-card > div { display: grid; }
.health-card small { color: var(--muted); }
.health-card strong { font-family: var(--font-display); color: var(--ink); }
.health-card span { color: var(--muted); font-size: .85rem; }
.health-card--good { background: var(--success-bg); border-color: #b9e6cb; color: var(--success); }
.health-card--attention, .health-card--vacc-overdue { background: var(--danger-bg); border-color: #f3c2c2; color: var(--danger); }
.health-card--vacc-due_soon { background: #fff4d6; border-color: #f5dc9a; color: #8a5a00; }
.health-section { margin-bottom: 20px; }
.weight-now { display: flex; align-items: baseline; gap: 10px; }
.weight-now strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); }
.weight-change { font-size: .85rem; font-weight: 600; }
.weight-change.up { color: var(--orange-700); }
.weight-change.down { color: #2563eb; }
.weight-chart { display: block; width: 100%; height: auto; }
.weight-chart__grid { stroke: var(--line); stroke-dasharray: 3 4; }
.weight-chart__axis { fill: var(--muted); font-size: 12px; font-family: var(--font-body); }
.weight-chart__area { fill: rgba(254, 134, 0, .12); }
.weight-chart__line { fill: none; stroke: var(--orange-600); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.weight-chart__dot { fill: #fff; stroke: var(--orange-600); stroke-width: 2; }
.weight-chart__dot.is-last { fill: var(--orange-600); }
.weight-chart__empty { margin: 8px 0; }
.record-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.record { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-soft); }
.record--tall { align-items: flex-start; }
.record__icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 12px; background: #fff; color: var(--navy-700); }
.record__body { display: grid; flex: 1; min-width: 0; gap: 2px; }
.record__body strong { color: var(--ink); }
.record__body .muted { font-size: .85rem; }
.record__side { display: grid; justify-items: end; gap: 2px; text-align: right; }
.record__files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.record__files img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.vacc-status { padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.vacc-status--up_to_date { background: var(--success-bg); color: var(--success); }
.vacc-status--due_soon { background: #fff4d6; color: #8a5a00; }
.vacc-status--overdue { background: var(--danger-bg); color: var(--danger); }
.vacc-status--completed { background: var(--navy-100); color: var(--muted); }
.icon-button { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.icon-button:hover:not(:disabled) { background: var(--danger-bg); color: var(--danger); }
.icon-button:disabled { opacity: .35; cursor: default; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.doc { position: relative; display: grid; gap: 4px; }
.doc__thumb { display: grid; place-items: center; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 12px; background: var(--navy-50); color: var(--navy-200); border: 1px solid var(--line); }
.doc__thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc strong { font-size: .9rem; color: var(--ink); line-height: 1.3; }
.doc small { font-size: .78rem; }
.doc__delete { position: absolute; top: 6px; right: 6px; background: rgba(255, 255, 255, .9); }
.quick-dates { display: flex; gap: 10px; }
.gallery-add { margin-bottom: 20px; display: grid; gap: 12px; }

.qr-sheet { justify-items: stretch; }
.qr-card { display: grid; justify-items: center; gap: 4px; padding: 22px; border-radius: var(--radius-lg); background: #fff; border: 2px dashed var(--navy-200); text-align: center; }
.qr-card img { width: 220px; height: 220px; image-rendering: pixelated; }
.qr-card strong { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .06em; color: var(--navy-800); }
.qr-card span { color: var(--muted); font-size: .875rem; }

.profile-section { display: grid; gap: 14px; margin-top: 28px; }
.profile-section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profile-section__head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.3rem; }
.profile-section__head h2 .icon { color: var(--orange-600); }

@media print {
    body:has(.qr-card) * { visibility: hidden; }
    .qr-card, .qr-card * { visibility: visible; }
    .qr-card { position: fixed; left: 0; top: 0; border: 0; }
}

@media (max-width: 700px) {
    .pet-grid { grid-template-columns: minmax(0, 1fr); }
    .pet-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
    .pet-hero__title, .pet-hero__meta, .pet-hero__tags, .pet-hero__owners { justify-content: center; }
    .pet-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; }
    .pet-stats { grid-template-columns: repeat(2, 1fr); }
    .pet-overview { grid-template-columns: minmax(0, 1fr); }
    .reaction span:not(.reaction__emoji) { display: none; }
    .reaction { padding: 8px 12px; }
    .week-summary { grid-template-columns: minmax(0, 1fr); justify-items: center; }
    .week-summary__list { width: 100%; }
    .inline-form > * { flex: 1 1 100%; }
    .inline-form .input-suffix .input { max-width: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
    .steps { grid-template-columns: repeat(3, 1fr); }
    .roles { grid-template-columns: repeat(2, 1fr); }
    .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
    .footer__mascot { display: none; }
}

/* Desktops: keep the menu on one line inside the 1180px container (text-only links, the avatar without the name;
   "หน้าแรก" (the logo goes home) and "เกี่ยวกับ JUMBO" (also in the footer) make way on narrow screens). */
.nav__link { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1180px) {
    .nav > .nav__link--roomy { display: none; }
}
@media (min-width: 901px) and (max-width: 1000px) {
    .header__inner { gap: 12px; }
    .nav { margin-left: 0; gap: 2px; }
}
@media (min-width: 901px) {
    .nav__link { padding: 8px 10px; }
    .nav > .nav__link .icon { display: none; }
    .user-menu__name { display: none; }
    .user-menu__button { padding: 3px; }
    .user-menu__button > .icon { display: none; }
}

@media (max-width: 900px) {
    :root { --header-h: 64px; }

    /* Header: slide-down menu */
    .header__toggle { display: inline-flex; }
    .header__desktop-only { display: none; }
    .user-menu__name { display: none; }
    .user-menu__button { padding: 3px; }
    .user-menu__button > .icon { display: none; }
    .nav {
        position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 49; margin: 0;
        flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 20px;
        background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
        transform: translateY(-110%); opacity: 0; visibility: hidden; transition: transform .25s ease, opacity .2s ease, visibility .25s;
    }
    .nav--open { transform: none; opacity: 1; visibility: visible; }
    .nav__link { padding: 14px 12px; border-radius: 12px; font-size: 1.05rem; }
    .nav__mobile-only { display: grid; gap: 2px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
    .nav__mobile-actions { gap: 10px; padding-top: 16px; }
    .nav-backdrop { display: block; position: fixed; inset: var(--header-h) 0 0 0; z-index: 48; background: rgba(0, 15, 51, .4); }

    /* Hero */
    .hero { padding: 40px 0 96px; }
    .hero__grid { grid-template-columns: minmax(0, 1fr); text-align: center; gap: 12px; }
    .hero__copy { display: grid; justify-items: center; }
    .hero__lead { margin-inline: auto; }
    .hero__actions, .hero__points { justify-content: center; }
    .hero__title { margin-top: 16px; }
    .hero__art { min-height: 0; margin-top: 8px; }
    .hero__mascot { width: min(260px, 64vw); }
    .hero__halo { width: min(260px, 64vw); }
    .float-chip { font-size: .8rem; padding: 8px 12px; }
    .float-chip--1 { left: 2%; top: 8%; }
    .float-chip--2 { right: 0; }

    .section { padding: 64px 0; }
    .species { grid-template-columns: minmax(0, 1fr); text-align: center; gap: 28px; }
    .species__list { justify-content: center; }

    .cta__inner { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 36px 24px 32px; gap: 16px; }
    .cta__mascot { width: 160px; margin: 0; }

    .account__grid { grid-template-columns: minmax(0, 1fr); }
    .page-head__mascot, .page-head--tall .page-head__mascot { width: 120px; margin-bottom: -36px; }

    /* Auth: form first, brand panel hidden */
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth__side { display: none; }
    .auth__main { justify-content: flex-start; padding: 24px 16px 40px; }
    .auth__mobile-brand { display: block; margin: 8px 0 24px; }
    .auth__card { padding: 28px 22px; border-radius: var(--radius-lg); }

    .footer__grid { grid-template-columns: 1fr 1fr; }
    .footer__brand { grid-column: 1 / -1; }

    .account-hero { flex-direction: column; text-align: center; gap: 12px; }
    .account-hero__stats { justify-content: center; }
    .page-head--account .page-head__mascot { display: none; }
    .page-head--account .page-head__inner { justify-content: center; }
    .profile-card { flex-direction: column; align-items: center; text-align: center; padding: 24px 20px; }
    .profile-card__stats, .profile-card__actions { justify-content: center; }
    .profile-card__bio { margin-inline: auto; }
    .profile-empty { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
    .container { padding-inline: 16px; }
    .brand__wordmark { height: 24px; }
    .brand__badge { width: 34px; height: 34px; }
    .hero__actions .btn { width: 100%; }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .step { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; padding: 20px; }
    .step__icon { grid-row: span 2; width: 48px; height: 48px; border-radius: 14px; }
    .step h3 { margin: 0 0 2px; }
    .step__num { top: 14px; right: 16px; font-size: 1.5rem; }
    .roles { grid-template-columns: minmax(0, 1fr); }
    .chip { padding: 10px 16px; }
    .card { padding: 22px; }
    .card--soon { flex-direction: column; text-align: center; }
    .page-head__inner { align-items: flex-end; }
    .page-head__mascot, .page-head--tall .page-head__mascot { width: 96px; margin-bottom: -28px; }
    .auth__title { font-size: 1.6rem; }
    .otp { font-size: 1.6rem; letter-spacing: .45em; }
    .footer__grid { gap: 28px; }
    .field-grid { grid-template-columns: minmax(0, 1fr); }
    .profile-cover { height: 150px; }
    .user-row { padding: 10px 12px; gap: 10px; }
    .user-row .pill { display: none; }
    .tabs { width: 100%; }
    .tabs__tab { flex: 1; text-align: center; padding: 10px 12px; }
    .media-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .media-tile { border-radius: 10px; }
    .media-tile__play { width: 36px; height: 36px; }
    .uploader__drop { padding: 16px; gap: 14px; }
    .uploader__icon { width: 48px; height: 48px; }
    .viewer { padding: 8px; }
    .viewer__info .btn { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Location picker (Leaflet) & admin site settings ---------- */

.location-picker { display: grid; gap: 10px; }
.location-picker__bar { display: flex; flex-wrap: wrap; gap: 8px; }
.location-picker__search { position: relative; flex: 1 1 220px; }
.location-picker__search .input { min-height: 40px; padding-left: 40px; border-radius: 999px; }
.location-picker__search .search__icon { left: 14px; }
.location-picker__results { display: grid; gap: 2px; margin: 0; padding: 6px; list-style: none; border-radius: 14px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.location-picker__results button { display: flex; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: .875rem; text-align: left; cursor: pointer; }
.location-picker__results button:hover { background: var(--navy-50); }
.location-picker__results .icon { flex-shrink: 0; margin-top: 3px; color: var(--orange-600); }
.location-picker__map { position: relative; z-index: 0; height: 300px; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: var(--navy-50); }
.location-picker__fallback { display: grid; place-items: center; height: 100%; margin: 0; padding: 20px; color: var(--muted); text-align: center; }
.location-picker__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-height: 24px; }
.map-pin { background: none; border: 0; }
.map-pin span { position: absolute; left: 3px; top: 0; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; background: var(--orange-600); border: 3px solid #fff; transform: rotate(-45deg); box-shadow: 0 4px 10px rgba(0, 0, 0, .35); }
.map-pin span::after { content: ""; position: absolute; left: 7px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.leaflet-container { font-family: var(--font-body); }
.nearby-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -6px 0 18px; padding: 12px 16px; border-radius: var(--radius); background: var(--navy-50); color: var(--text); font-size: .9rem; }
.nearby-bar > .icon { color: var(--orange-600); }
.nearby-bar > span { flex: 1 1 220px; }
.nearby-bar strong { margin-left: 4px; color: var(--ink); }
.sheet__panel--wide { width: min(720px, 100%); }
.admin-page { display: grid; gap: 20px; }
.admin-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-card code { padding: 1px 6px; border-radius: 6px; background: var(--navy-50); font-size: .85em; }

@media (max-width: 700px) {
    .location-picker__map { height: 260px; }
}

/* ---------- Notifications ---------- */

.bell { position: relative; }
.bell__button { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--navy-800); cursor: pointer; }
.bell__button:hover { background: var(--navy-50); }
.bell__count { position: absolute; top: 4px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-family: var(--font-display); font-size: .72rem; font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.bell__backdrop { position: fixed; inset: 0; z-index: 90; }
.bell__panel { position: absolute; right: -60px; top: calc(100% + 10px); z-index: 100; display: grid; grid-template-rows: auto 1fr auto; width: min(400px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 100px)); overflow: hidden; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.bell__head, .bell__foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.bell__head { border-bottom: 1px solid var(--line); font-family: var(--font-display); }
.bell__foot { border-top: 1px solid var(--line); font-size: .9rem; }
.bell__foot a { display: inline-flex; align-items: center; gap: 4px; }
.bell__list { overflow-y: auto; padding: 6px; }
.bell__empty { display: grid; justify-items: center; gap: 8px; padding: 36px 16px; color: var(--muted); }
.toast { position: fixed; right: 20px; top: calc(var(--header-h) + 12px); z-index: 300; width: min(380px, calc(100vw - 24px)); border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: toast-in .3s ease-out; }
.toast__close { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--navy-50); color: var(--muted); cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }

.notif { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 14px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.notif:hover { background: var(--surface-soft); }
.notif--unread { background: var(--orange-50); }
.notif--unread:hover { background: var(--orange-100); }
.notif--compact { padding: 10px 34px 10px 10px; }
.notif__visual { position: relative; flex-shrink: 0; }
.notif__image { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.notif--compact .notif__image { width: 40px; height: 40px; }
.notif__icon { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--navy-100); color: var(--navy-800); }
.notif__icon--rescue { background: #fdecec; color: var(--danger); }
.notif__icon--pet { background: var(--orange-50); color: var(--orange-700); }
.notif__icon--social { background: #eaf1ff; color: #2563eb; }
.notif__icon--reminder { background: #fff4d6; color: #8a5a00; }
.notif__icon--security { background: var(--success-bg); color: var(--success); }
.notif__icon--system { background: #f1e8ff; color: #7c3aed; }
.notif__badge { position: absolute; right: -4px; bottom: -2px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: var(--navy-800); color: #fff; }
.notif__badge--rescue { background: var(--danger); }
.notif__badge--pet { background: var(--orange-600); }
.notif__badge--social { background: #2563eb; }
.notif__badge--reminder { background: #d99a00; }
.notif__badge--security { background: var(--success); }
.notif__badge--system { background: #7c3aed; }
.notif__text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.notif__text strong { color: var(--ink); font-weight: 600; line-height: 1.4; }
.notif__body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); font-size: .9rem; }
.notif__text small { color: var(--muted); font-size: .78rem; }
.notif__dot { position: absolute; right: 12px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: #2563eb; }

.inbox-page { max-width: 820px; padding-block: 28px 80px; }
.inbox-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.inbox-toolbar .tabs { margin: 0; }
.inbox-toolbar__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.inbox-toolbar__actions .is-active { border-color: var(--orange-500); color: var(--orange-700); }
.tabs__count { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .72rem; line-height: 18px; }
.inbox-permission { align-items: center; margin-bottom: 16px; }
.inbox-permission span { flex: 1; }
.inbox-section { margin: 18px 0 8px; font-size: .95rem; color: var(--muted); }
.inbox-list { display: grid; gap: 4px; padding: 6px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.inbox-row { position: relative; }
.inbox-row .notif { padding-right: 70px; }
.inbox-row__delete { position: absolute; right: 30px; top: 12px; opacity: 0; transition: opacity .15s; }
.inbox-row:hover .inbox-row__delete, .inbox-row__delete:focus-visible { opacity: 1; }
.inbox-clear { display: grid; justify-items: center; gap: 4px; margin-top: 24px; }

.settings-page { max-width: 760px; display: grid; gap: 18px; padding-block: 28px 80px; }
.settings-card { display: grid; gap: 4px; }
.settings-card .card__title { margin-bottom: 8px; }
.settings-card[aria-disabled="true"] { opacity: .6; }
.settings-card__inline { justify-self: start; margin: 0 0 6px 58px; }
.toggle--plain { border: 0; border-radius: 12px; padding: 10px 6px; gap: 14px; }
.toggle--plain:hover { background: var(--surface-soft); }
.toggle--plain .toggle__text { flex: 1; }
.toggle--plain.is-locked { cursor: default; }
.toggle input:checked + .toggle__track--on { background: var(--orange-600); }
.toggle input:disabled + .toggle__track { opacity: .55; }
.quiet-hours { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 6px; }
.quiet-hours label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.quiet-hours .input { width: 130px; min-height: 42px; }

.reminder-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.reminder { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "icon body when" "icon actions actions"; align-items: center; gap: 6px 14px; padding: 14px 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.reminder > img, .reminder > .notif__icon { grid-area: icon; align-self: start; }
.reminder__pet { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.reminder__body { grid-area: body; display: grid; min-width: 0; }
.reminder__body strong { color: var(--ink); }
.reminder__body .muted { font-size: .85rem; }
.reminder__when { grid-area: when; display: grid; justify-items: end; gap: 2px; text-align: right; }
.reminder__when strong { font-family: var(--font-display); color: var(--navy-800); }
.reminder__actions { grid-area: actions; display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.reminder--overdue { border-color: #f3c2c2; background: #fffafa; }
.reminder--completed, .reminder--dismissed { opacity: .75; }

@media (max-width: 700px) {
    .bell__panel { position: fixed; right: 12px; left: 12px; top: calc(var(--header-h) + 6px); width: auto; }
    .toast { right: 12px; left: 12px; width: auto; }
    .inbox-row__delete { opacity: 1; }
    .reminder { grid-template-areas: "icon body" "icon when" "actions actions"; grid-template-columns: auto 1fr; }
    .reminder__when { justify-items: start; text-align: left; }
}

/* ---------- Reporting ---------- */

.btn--danger { background: var(--danger); color: #fff; box-shadow: 0 8px 20px rgba(196, 43, 43, .22); }
.btn--danger:hover:not(:disabled) { background: #a51f1f; color: #fff; }
.btn--muted { color: var(--muted); background: transparent; }
.btn--muted:hover { color: var(--danger); background: var(--danger-bg); }
.report-done { display: grid; justify-items: center; gap: 10px; padding: 12px 0 4px; text-align: center; }
.report-done h2 { padding: 0 !important; }
.small { font-size: .85rem; }
.d-block { display: block; }
.nowrap { white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Home banners ---------- */

.home-banners { padding: 28px 0 0; }
.home-banners__track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.home-banners__track::-webkit-scrollbar { display: none; }
.home-banners__track:has(> :nth-child(2)) { grid-auto-columns: min(88%, 900px); }
.home-banner { position: relative; display: flex; align-items: flex-end; aspect-ratio: 3 / 1; min-height: 140px; padding: 22px 26px; border-radius: var(--radius-lg); overflow: hidden; background: var(--navy-800) center / cover no-repeat; color: #fff; scroll-snap-align: start; text-decoration: none; box-shadow: var(--shadow); }
.home-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 15, 51, .72), rgba(0, 15, 51, .1) 70%); }
.home-banner--plain { background: linear-gradient(120deg, var(--navy-800), var(--orange-700)); }
.home-banner__text { position: relative; display: grid; gap: 4px; max-width: 560px; }
.home-banner__text strong { font-family: var(--font-display); font-size: clamp(1.15rem, 2.6vw, 1.7rem); line-height: 1.3; }
.home-banner__text span { opacity: .9; }
.home-banner:hover { color: #fff; }

/* ---------- Admin console ---------- */

.admin-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: var(--surface-soft); }
.admin-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 18px; height: 100vh; padding: 20px 14px; background: var(--navy-900); color: #fff; overflow-y: auto; }
.admin-side__brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: #fff; text-decoration: none; }
.admin-side__brand span { display: grid; line-height: 1.2; }
.admin-side__brand strong { font-family: var(--font-display); letter-spacing: .08em; }
.admin-side__brand small { color: rgba(255,255,255,.65); font-size: .78rem; }
.admin-side__brand:hover { color: #fff; }
.admin-side__back { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 10px 12px; border-radius: 12px; color: rgba(255,255,255,.75); font-size: .9rem; text-decoration: none; }
.admin-side__back:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav { display: grid; gap: 2px; }
.admin-nav__group { margin: 14px 12px 6px; color: rgba(255,255,255,.45); font-size: .75rem; font-weight: 700; letter-spacing: .08em; }
.admin-nav__link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: rgba(255,255,255,.82); font-weight: 500; text-decoration: none; }
.admin-nav__link:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav__link.active { background: var(--orange-700); color: #fff; }
.admin-nav__badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--orange-500); color: #fff; font-size: .75rem; font-weight: 700; text-align: center; }
.admin-nav__link.active .admin-nav__badge { background: #fff; color: var(--orange-700); }
.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.admin-top__menu { display: none; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--navy-800); cursor: pointer; }
.admin-top__title { font-family: var(--font-display); font-weight: 600; color: var(--navy-800); }
.admin-top__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.admin-content { display: grid; align-content: start; gap: 18px; width: 100%; max-width: 1200px; padding: 28px 24px 80px; }
.admin-content .admin-page { max-width: 820px; padding: 0; display: grid; gap: 18px; }
.admin-shell__backdrop { display: none; }
.admin-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-head h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.admin-head p { margin: 4px 0 0; }
.admin-back { display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: var(--muted); font-weight: 500; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.admin-toolbar .tabs { margin: 0; overflow-x: auto; }
.admin-toolbar__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.admin-search { position: relative; display: flex; align-items: center; flex: 1; min-width: 220px; max-width: 420px; }
.admin-search > .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.admin-search .input { padding-left: 36px; width: 100%; }
.input--sm { min-height: 40px; padding: 8px 12px; font-size: .9rem; width: auto; }

.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.admin-stat { display: grid; gap: 6px; padding: 18px; }
.admin-stat__top { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; }
.admin-stat__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--orange-50); color: var(--orange-700); }
.admin-stat__value { font-family: var(--font-display); font-size: 1.9rem; color: var(--ink); line-height: 1.1; }
.admin-stat__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .82rem; }
.admin-stat__bottom .sparkline { color: var(--orange-600); flex-shrink: 0; }
.admin-stat__change { font-style: normal; font-weight: 700; }
.admin-stat__change.is-up { color: var(--success); }
.admin-stat__change.is-down { color: var(--danger); }

.admin-queue { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.admin-queue__item { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: .88rem; text-decoration: none; }
.admin-queue__item strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--navy-800); }
.admin-queue__item:hover { border-color: var(--navy-200); color: var(--muted); }
.admin-queue__item.is-hot { border-color: var(--orange-500); background: var(--orange-50); }
.admin-queue__item.is-hot strong { color: var(--orange-700); }

.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-panel { display: grid; align-content: start; gap: 12px; padding: 20px; }
.admin-panel--wide { grid-column: 1 / -1; }
.admin-panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.admin-panel__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.admin-donut { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; color: var(--ink); }
.admin-legend { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.admin-legend li { display: flex; align-items: center; gap: 8px; }
.admin-legend strong { margin-left: auto; padding-left: 12px; }
.admin-legend__dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.admin-health { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.admin-health__item { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-soft); }
.admin-health__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); }
.admin-health__item--warn .admin-health__dot { background: #eab308; }
.admin-health__item--error .admin-health__dot { background: var(--danger); }
.admin-health__name { font-weight: 600; color: var(--ink); }
.admin-health__detail { color: var(--muted); font-size: .85rem; text-align: right; overflow-wrap: anywhere; }
.admin-feed { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.admin-feed li { display: flex; align-items: flex-start; gap: 12px; }
.admin-feed li > .admin-legend__dot { margin-top: 7px; }
.admin-feed p { margin: 0; overflow-wrap: anywhere; }
.admin-feed .is-expired { opacity: .55; }

.admin-table-wrap { overflow-x: auto; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th { padding: 12px 14px; background: var(--surface-soft); color: var(--muted); font-size: .8rem; font-weight: 600; text-align: left; white-space: nowrap; }
.admin-table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.admin-table tbody tr:hover { background: #fbfcfe; }
.admin-table__entity { display: flex; align-items: center; gap: 12px; min-width: 240px; color: inherit; text-decoration: none; }
.admin-table__entity > div { display: grid; min-width: 0; }
.admin-table__entity img { width: 56px; height: 42px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.admin-table__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 150px; }
.admin-table--audit td { vertical-align: top; }
.audit-action { padding: 2px 6px; border-radius: 6px; background: var(--navy-50); color: var(--navy-800); font-size: .8rem; }
.audit-diff summary { color: var(--orange-700); font-size: .82rem; cursor: pointer; }
.audit-diff pre { max-width: 460px; max-height: 240px; margin: 6px 0 0; padding: 8px 10px; overflow: auto; border-radius: 8px; background: var(--surface-soft); font-size: .78rem; }
.report-count { display: inline-flex; align-items: center; gap: 4px; color: var(--danger); font-weight: 700; }

.report-list { display: grid; gap: 12px; }
.report-item { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 18px; }
.report-item__entity { display: flex; gap: 14px; min-width: 0; }
.report-item__entity img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.report-item__entity h3 { margin: 2px 0; font-size: 1rem; overflow-wrap: anywhere; }
.report-item__entity .eyebrow { padding: 2px 8px; font-size: .72rem; }
.report-item__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: var(--navy-50); color: var(--navy-800); flex-shrink: 0; }
.report-item__icon--sm { width: 32px; height: 32px; border-radius: 8px; }
.report-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.report-item__body p { margin: 0 0 6px; }
.report-reason { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--danger-bg); color: var(--danger); font-weight: 600; font-size: .85rem; }
.report-item__more { margin-left: 6px; color: var(--orange-700); font-size: .82rem; font-weight: 600; }
.report-item__quote { margin: 0 0 8px; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--text); font-size: .92rem; }
.report-item__actions { display: grid; gap: 6px; justify-items: stretch; }

.mod-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mod-action { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 99px; background: #fff; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.mod-action:hover { border-color: var(--navy-200); }
.mod-action.is-selected { border-color: var(--navy-800); background: var(--navy-50); color: var(--navy-800); }
.mod-action__dot { width: 10px; height: 10px; border-radius: 50%; }

.admin-user { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: start; }
.admin-user__info h1 { margin: 0; font-size: 1.5rem; }
.admin-user__info > p { margin: 2px 0 8px; overflow-wrap: anywhere; }
.admin-user__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-user__reason { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); font-size: .9rem; }
.admin-user__stats { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 16px 0 0; }
.admin-user__stats div { display: grid; }
.admin-user__stats dt { color: var(--muted); font-size: .8rem; }
.admin-user__stats dd { margin: 0; font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.admin-user__actions { display: grid; gap: 8px; }
.admin-roles { display: flex; flex-wrap: wrap; gap: 20px; }
.admin-contact .check { font-size: .88rem; }
.admin-contact__actions { display: flex; justify-content: flex-end; gap: 10px; }
.admin-danger { border-color: #f3c2c2; }
.admin-danger .admin-panel__title { color: var(--danger); }
.role-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.role-badge { padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 700; background: var(--navy-100); color: var(--navy-800); }
.role-badge--admin { background: var(--navy-800); color: #fff; }
.role-badge--moderator { background: var(--orange-100); color: var(--orange-800); }
.strike-dots { display: inline-flex; gap: 3px; margin-top: 6px; }
.strike-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

.banner-admin-list { display: grid; gap: 12px; }
.banner-admin { display: grid; grid-template-columns: 210px 1fr auto; gap: 18px; align-items: center; padding: 14px; }
.banner-admin__image { display: grid; place-items: center; aspect-ratio: 3 / 1; border-radius: 12px; background: var(--navy-50) center / cover no-repeat; color: var(--navy-200); }
.banner-admin__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.banner-admin__title h3 { margin: 0; font-size: 1.05rem; }
.banner-admin__body p { margin: 4px 0 0; }
.banner-admin__actions { display: flex; gap: 4px; }
.banner-upload { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; aspect-ratio: 3 / 1; padding: 12px; border-radius: 14px; border: 1.5px dashed var(--navy-200); background: var(--navy-50) center / cover no-repeat; }
.banner-upload__button { position: relative; overflow: hidden; cursor: pointer; }
.banner-upload__button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.banner-upload__remove { background: #fff; }
.check--field { align-self: end; padding-bottom: 10px; }

@media (max-width: 1100px) {
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-queue { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .report-item { grid-template-columns: minmax(0, 1fr); }
    .report-item__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 900px) {
    .admin-shell { grid-template-columns: minmax(0, 1fr); }
    .admin-side { position: fixed; inset: 0 auto 0 0; z-index: 120; width: 260px; transform: translateX(-100%); transition: transform .2s ease-out; }
    .admin-shell--nav-open .admin-side { transform: none; }
    .admin-shell--nav-open .admin-shell__backdrop { display: block; position: fixed; inset: 0; z-index: 110; background: rgba(0, 10, 30, .5); }
    .admin-top { padding: 0 12px; }
    .admin-top__menu { display: grid; }
    .admin-content { padding: 20px 16px 64px; }
    .admin-grid { grid-template-columns: minmax(0, 1fr); }
    .admin-user { grid-template-columns: minmax(0, 1fr); justify-items: start; }
    .admin-user__actions { display: flex; flex-wrap: wrap; }
    .banner-admin { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
    .admin-stats { gap: 10px; }
    .admin-stat__value { font-size: 1.5rem; }
    .admin-stat__bottom .sparkline { display: none; }
    .admin-queue { grid-template-columns: 1fr 1fr; }
    .home-banner { aspect-ratio: auto; min-height: 150px; padding: 18px; }
}

/* ---------- Case comments ---------- */

.case-comments { scroll-margin-top: calc(var(--header-h) + 16px); }
.case-comments h2 { display: flex; align-items: center; gap: 8px; }
.comment-count { padding: 1px 10px; border-radius: 99px; background: var(--navy-100); color: var(--navy-800); font-size: .85rem; font-weight: 700; }
.comment-composer { display: grid; gap: 8px; margin-bottom: 18px; }
.comment-composer .input--area { min-height: 64px; }
.comment-composer__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.comment-composer__bar .field__counter { margin-right: auto; }
.comment-composer--reply { margin: 4px 0 0; }
.comment-signin { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 18px; padding: 14px; border-radius: var(--radius); border: 1.5px dashed var(--navy-200); color: var(--navy-800); font-weight: 600; text-decoration: none; }
.comment-signin:hover { background: var(--navy-50); color: var(--navy-800); }
.comment-loading { display: grid; place-items: center; padding: 24px; }
.comment-empty { padding: 8px 0 4px; }
.comment-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.comment-list--replies { gap: 10px; margin: 10px 0 0 50px; }
.comment { display: flex; align-items: flex-start; gap: 10px; scroll-margin-top: calc(var(--header-h) + 24px); }
.comment:target .comment__bubble { box-shadow: 0 0 0 3px var(--orange-100); }
.comment__avatar { flex-shrink: 0; }
.comment__main { flex: 1; min-width: 0; }
.comment__bubble { display: grid; gap: 4px; width: fit-content; max-width: 100%; padding: 10px 14px; border-radius: 4px 18px 18px 18px; background: var(--surface-soft); border: 1px solid var(--line); }
.comment__bubble:has(textarea) { width: 100%; }
.comment__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .92rem; }
.comment__head a { color: var(--ink); text-decoration: none; }
.comment__head a:hover { text-decoration: underline; }
.comment__badge { padding: 0 8px; border-radius: 99px; background: var(--success-bg); color: var(--success); font-size: .72rem; font-weight: 700; }
.comment__badge--reporter { background: var(--orange-100); color: var(--orange-800); }
.comment__text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.comment__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin: 4px 0 0 6px; color: var(--muted); font-size: .8rem; }
.comment__action { display: inline-flex; align-items: center; gap: 4px; padding: 2px 0; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.comment__action:hover { color: var(--orange-700); }
.comment__action--report:hover { color: var(--danger); }
.comment--hidden .comment__bubble { opacity: .6; border-style: dashed; }
.comment__notice { display: flex; align-items: center; gap: 6px; margin: 4px 0 0 6px; color: var(--danger); font-size: .8rem; }

@media (max-width: 600px) {
    .comment-list--replies { margin-left: 26px; }
}

/* ---------- Pet colours (several per pet) ---------- */

.filter-chip:disabled { opacity: .45; cursor: not-allowed; }
.filter-chip__order { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--orange-500); color: #fff; font-size: .72rem; font-weight: 700; }
.pet-colors { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.pet-colors__item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }

/* ---------- Kindness level ---------- */

.level-badge { display: inline-block; flex-shrink: 0; vertical-align: middle; line-height: 0; }
.level-badge svg { width: 100%; height: 100%; overflow: visible; }
.comment__head .level-badge, .case-hero__reporter .level-badge { margin-left: 2px; }

.profile-level { display: inline-flex; align-items: center; gap: 10px; margin: 2px 0 12px; padding: 6px 14px 6px 6px; border-radius: 99px; background: var(--orange-50); border: 1px solid var(--orange-100); color: var(--ink); text-decoration: none; }
.profile-level > span:not(.level-badge) { display: grid; line-height: 1.3; text-align: left; }
.profile-level small { color: var(--muted); font-size: .8rem; }
.profile-level:hover { border-color: var(--orange-500); color: var(--ink); }

.kindness-page { display: grid; gap: 20px; padding-block: 28px 80px; }
.kindness-me { display: flex; align-items: center; gap: 28px; position: relative; overflow: hidden; background: linear-gradient(120deg, #fff 55%, color-mix(in srgb, var(--tier, var(--orange-500)) 14%, #fff)); }
.kindness-me--loading { justify-content: center; min-height: 180px; }
.kindness-me__badge { filter: drop-shadow(0 8px 18px rgba(0, 23, 74, .18)); }
.kindness-me__body { display: grid; gap: 6px; flex: 1; min-width: 0; }
.kindness-me__level { width: fit-content; padding: 2px 12px; border-radius: 99px; background: var(--tier, var(--orange-500)); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: .85rem; }
.kindness-me__body h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.kindness-me__points { margin: 0; }
.kindness-me__points strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); }
.kindness-me__week { margin-left: 8px; padding: 1px 8px; border-radius: 99px; background: var(--success-bg); color: var(--success); font-size: .8rem; font-weight: 700; }
.kindness-me__progress { height: 12px; max-width: 520px; }
.kindness-me__progress span { background: linear-gradient(90deg, var(--orange-500), var(--tier, var(--orange-700))); }
.kindness-me__max { margin: 0; font-weight: 600; color: var(--navy-800); }
.kindness-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.kindness-cta > div { flex: 1; min-width: 220px; }
.kindness-cta h2 { margin: 0 0 4px; }

.kindness-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.kindness-rules__group { margin: 16px 0 6px; font-size: .95rem; color: var(--navy-800); }
.kindness-rules, .kindness-history { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.kindness-rules li, .kindness-history li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kindness-rules strong, .kindness-history strong { font-family: var(--font-display); color: var(--success); white-space: nowrap; }
.kindness-rules strong.is-minus, .kindness-history strong.is-minus { color: var(--danger); }
.kindness-history__label { display: grid; }
.kindness-periods { margin-bottom: 12px; }

.leaderboard { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.leaderboard__row { display: grid; grid-template-columns: 32px 1fr auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; }
.leaderboard__row:nth-child(odd) { background: var(--surface-soft); }
.leaderboard__rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy-100); color: var(--navy-800); font-weight: 700; font-size: .85rem; }
.leaderboard__row.is-top1 .leaderboard__rank { background: linear-gradient(135deg, #fff3b0, #f5c242); color: #6b4e00; }
.leaderboard__row.is-top2 .leaderboard__rank { background: linear-gradient(135deg, #f7f9fb, #b8c1cc); color: #3d4652; }
.leaderboard__row.is-top3 .leaderboard__rank { background: linear-gradient(135deg, #f5cfa8, #cd7f32); color: #4f2a08; }
.leaderboard__who { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.leaderboard__who span { display: grid; min-width: 0; }
.leaderboard__who strong, .leaderboard__who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard__who small { color: var(--muted); font-size: .78rem; }
.leaderboard__points { font-family: var(--font-display); font-weight: 700; color: var(--navy-800); }

.kindness-tiers__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; margin-top: 12px; }
.kindness-tiers__grid.is-all { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.kindness-tier { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 16px; text-align: center; border: 1.5px solid transparent; }
.kindness-tier strong { font-size: .9rem; color: var(--ink); }
.kindness-tier small { font-size: .74rem; line-height: 1.3; }
.kindness-tier.is-current { border-color: var(--orange-500); background: var(--orange-50); }
.kindness-tier.is-locked .level-badge { filter: grayscale(.85) opacity(.55); }

/* ---------- Stray / community pets ---------- */

.stray-block { border-top: 1px dashed var(--line); padding-top: 18px; }
.stray-block__toggle { margin-top: 14px; }
.pet-last-edit { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; }
.pet-location p { margin: 0 0 10px; }

@media (max-width: 800px) {
    .kindness-grid { grid-template-columns: minmax(0, 1fr); }
    .kindness-me { flex-direction: column; text-align: center; }
    .kindness-me__body { justify-items: center; }
    .kindness-me__level { margin: 0 auto; }
}

/* ---------- Community feed ---------- */

.community { max-width: 720px; padding-block: 24px 80px; }
.community-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.community__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.community__bar .tabs { margin: 0; }
.community__kinds { margin: 0; }
.feed { display: grid; gap: 18px; }

.feed-card { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.feed-card--hot { border-color: var(--orange-100); box-shadow: 0 0 0 3px var(--orange-50), var(--shadow-sm); }
.feed-card--skeleton { min-height: 340px; }
.feed-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feed-card__who { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.feed-card__who > span { display: grid; min-width: 0; }
/* Name first, then "โดย …" — the pair wraps as a whole instead of squeezing a long name onto two lines. */
.feed-card__who strong { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; row-gap: 0; min-width: 0; color: var(--ink); line-height: 1.35; }
.feed-card__who strong > a:first-child { overflow: hidden; max-width: 100%; white-space: nowrap; text-overflow: ellipsis; }
.feed-card__who small { color: var(--muted); font-size: .82rem; }
.feed-card__hot { flex-shrink: 0; padding: 3px 10px; border-radius: 99px; background: linear-gradient(90deg, var(--orange-500), #ef4444); color: #fff; font-family: var(--font-display); font-size: .78rem; font-weight: 700; white-space: nowrap; }
@media (max-width: 560px) {
    /* Phones: just the flame, so the name keeps its room (the card already has the "hot" border). */
    .feed-card__hot { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1.5px solid var(--orange-300); background: var(--orange-50); font-size: 1rem; }
    .feed-card__hot-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.feed-card__media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; margin-inline: -16px; overflow: hidden; background: var(--navy-50); color: #fff; }
.feed-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.feed-card__media:hover img { transform: scale(1.03); }
.feed-card__media--empty { aspect-ratio: 16 / 6; background: linear-gradient(135deg, var(--navy-50), var(--orange-50)); }
.feed-card__placeholder { font-size: 3rem; }
.feed-card__tags { position: absolute; top: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.feed-card__tags .status-pill, .feed-card__tags .pet-status { box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.feed-card__count { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; background: rgba(0, 15, 51, .6); color: #fff; font-size: .78rem; }

.feed-card__body { display: grid; gap: 4px; }
.feed-card__kind { display: inline-flex; align-items: center; gap: 5px; color: var(--orange-700); font-size: .85rem; font-weight: 600; }
.feed-card__body h3 { margin: 0; font-size: 1.15rem; line-height: 1.4; }
.feed-card__body h3 a { color: var(--ink); text-decoration: none; }
.feed-card__body h3 a:hover { color: var(--orange-700); }
.feed-card__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; color: var(--text); white-space: pre-line; }
.feed-card__place { display: flex; align-items: center; gap: 4px; margin: 0; color: var(--muted); font-size: .85rem; }

.feed-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.feed-card__stats { display: flex; gap: 16px; color: var(--muted); font-size: .9rem; }
.feed-card__stats > * { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; }
.feed-card__stats a:hover { color: var(--orange-700); }
.feed-card__comment { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface-soft); color: var(--text); font-size: .9rem; text-decoration: none; }
.feed-card__comment > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-card__comment strong { color: var(--ink); margin-right: 4px; }
.feed-card__comment:hover { background: var(--navy-50); color: var(--text); }

@media (max-width: 600px) {
    .feed-card { border-radius: var(--radius); padding: 14px; }
    .feed-card__media { margin-inline: -14px; }
    .feed-card__foot .btn { display: none; }
}

/* ---------- Community: three columns, sidebars ---------- */

.community-layout { display: grid; grid-template-columns: 250px minmax(0, 680px) 290px; justify-content: center; gap: 24px; align-items: start; padding-block: 24px 80px; }
.community-layout .community { max-width: none; padding: 0; }
.community-side { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 14px; max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 8px; }
.side-card { display: grid; gap: 10px; padding: 16px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.side-card h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 1rem; }
.side-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-card .hint { margin: 0; font-size: .78rem; }

.side-me__who { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.side-me__who span { display: grid; min-width: 0; }
.side-me__who strong { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me__who small { color: var(--muted); font-size: .8rem; }
.side-me__level { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--tier, var(--orange-500)) 10%, #fff); color: inherit; text-decoration: none; }
.side-me__level > span:not(.level-badge) { display: grid; gap: 3px; flex: 1; min-width: 0; }
.side-me__level strong { color: var(--ink); font-size: .9rem; }
.side-me__level small { font-size: .76rem; }
.side-me__level .progress { height: 6px; }

.side-pets, .side-list, .side-leaders { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.side-pets a, .side-list a { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; color: inherit; text-decoration: none; }
.side-pets a:hover, .side-list a:hover { background: var(--surface-soft); }
.side-pets span, .side-list a > span:last-child { display: grid; min-width: 0; }
.side-pets strong, .side-list strong { color: var(--ink); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-pets small, .side-list small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-list__thumb { display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 40px; border-radius: 10px; overflow: hidden; background: var(--navy-50); }
.side-list__thumb img { width: 100%; height: 100%; object-fit: cover; }

.side-join { justify-items: center; text-align: center; }
.side-join .mascot { width: 110px; }
.side-join p { margin: 0; }
.side-links { gap: 2px; padding: 8px; }
.side-links a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--text); font-weight: 500; text-decoration: none; }
.side-links a:hover { background: var(--orange-50); color: var(--orange-800); }

.side-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-stats > * { display: grid; gap: 2px; padding: 10px; border-radius: 12px; background: var(--surface-soft); color: inherit; text-decoration: none; }
.side-stats strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--navy-800); }
.side-stats small { color: var(--muted); font-size: .74rem; line-height: 1.3; }
.side-stats a:hover { background: var(--orange-50); }
.side-leaders li { display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 8px; }
.side-leaders__rank { color: var(--muted); font-weight: 700; font-size: .85rem; text-align: center; }
.side-leaders a { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); font-size: .88rem; text-decoration: none; }
.side-leaders a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-leaders small { color: var(--success); font-weight: 700; }
.side-foot { margin: 0; padding: 0 6px; }

/* ---------- Acting as a pet; who-did-it lists ---------- */

.pet-act { display: block; }
.pet-act__button { gap: 8px; }
.pet-act__faces { display: inline-flex; }
.pet-act__faces > * + * { margin-left: -8px; }
.pet-act__faces .pet-photo, .pet-act__faces .avatar { box-shadow: 0 0 0 2px #fff; }
.pet-act__count { min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--orange-500); color: #fff; font-size: .75rem; font-weight: 700; }
.pet-act__panel { min-width: 240px; }
.pet-act__hint { margin: 2px 6px 6px; color: var(--muted); font-size: .8rem; }
.pet-act__item { gap: 10px; }
.pet-act__item span:nth-child(2) { flex: 1; }
.pet-act__item.is-on { background: var(--orange-50); color: var(--orange-800); font-weight: 600; }
.pet-act__check { display: grid; place-items: center; width: 22px; color: var(--orange-700); }
.case-actions__buttons .pet-act { width: 100%; }
.case-actions__buttons .pet-act__button { width: 100%; justify-content: center; }

.case-stats__link, .pet-stats__link { display: grid; justify-items: center; gap: 2px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; border-radius: 12px; }
.case-stats__link:hover, .pet-stats__link:hover { background: var(--orange-50); }
.case-stats__pets, .pet-stats__pets { color: var(--orange-700); font-size: .72em; font-weight: 700; }
.pet-hero__following { padding: 0; margin: 2px 0 6px; }

.actor-sheet { gap: 12px; }
.actor-sheet__tabs { margin: 0; }
.actor-sheet__count { margin-left: 4px; padding: 0 7px; border-radius: 99px; background: var(--navy-100); font-size: .75rem; }
.actor-list { display: grid; gap: 2px; max-height: 60vh; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.actor-list__row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; color: inherit; text-decoration: none; }
.actor-list__row:hover { background: var(--surface-soft); }
.actor-list__who { display: grid; flex: 1; min-width: 0; }
.actor-list__who strong { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.actor-list__who small { color: var(--muted); font-size: .8rem; }

.comment-as { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.comment-as__label { color: var(--muted); font-size: .82rem; }
.comment-as__option { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 4px; border: 1.5px solid var(--line); border-radius: 99px; background: #fff; color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; }
.comment-as__option:first-of-type { padding-left: 10px; }
.comment-as__option.is-selected { border-color: var(--orange-500); background: var(--orange-50); color: var(--orange-800); font-weight: 600; }
.comment__by { color: var(--muted) !important; font-size: .8rem; }

@media (max-width: 1180px) {
    .community-layout { grid-template-columns: minmax(0, 680px) 280px; }
    .community-side--left { display: none; }
}

@media (max-width: 900px) {
    .community-layout { grid-template-columns: minmax(0, 1fr); }
    .community-side--right { position: static; max-height: none; overflow: visible; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

.container.community-layout { max-width: calc(250px + 680px + 290px + 48px + 2 * 24px); }

/* ---------- Community posts ---------- */

.post-composer { margin-bottom: 16px; gap: 10px; }
.post-composer__text { min-height: 0; resize: vertical; }
.post-composer.is-open .post-composer__text { min-height: 110px; }
.post-composer__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.post-composer__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.post-composer__tools .btn.is-on { background: var(--orange-50); color: var(--orange-800); }
.post-composer__place { display: grid; gap: 8px; }

.post-card__by { min-width: 0; color: var(--muted) !important; font-size: .8rem; font-weight: 400; overflow-wrap: anywhere; }
.post-card .feed-card__who a { color: inherit; text-decoration: none; }
.post-card__text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); line-height: 1.65; }
.post-card__text.is-clamped { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__more { justify-self: start; padding: 0; }
.post-card--hidden { opacity: .75; border-style: dashed; }

.post-card__grid { display: grid; gap: 3px; margin-inline: -16px; overflow: hidden; background: var(--navy-50); }
.post-card__grid--1 { grid-template-columns: minmax(0, 1fr); }
.post-card__grid--2 { grid-template-columns: 1fr 1fr; }
.post-card__grid--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.post-card__grid--3 .post-card__tile:first-child { grid-row: span 2; }
.post-card__grid--4 { grid-template-columns: 1fr 1fr; }
.post-card__tile { position: relative; display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; padding: 0; border: 0; background: var(--navy-50); cursor: zoom-in; }
.post-card__open { display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: zoom-in; }
.post-card__grid--1 .post-card__tile { aspect-ratio: auto; max-height: 560px; }
.post-card__grid--3 .post-card__tile:first-child { aspect-ratio: auto; }
.post-card__tile img { width: 100%; height: 100%; object-fit: cover; }
.post-card__grid--1 .post-card__tile img { height: auto; max-height: 560px; object-fit: contain; }
.post-card__plus { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 15, 51, .55); color: #fff; font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; }
.post-card__media-full { display: grid; gap: 8px; margin-inline: -16px; }
.post-card__media-full img, .post-card__media-full video { width: 100%; max-height: 80vh; object-fit: contain; background: #000; }

.post-card__foot { flex-wrap: wrap; }
.post-card__actions { display: flex; align-items: center; gap: 6px; }
.post-card__paw { font-weight: 700; }
.post-card__count { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; cursor: pointer; }
.post-card__count:hover:not(:disabled) { background: var(--orange-50); color: var(--orange-800); }
.post-card__count:disabled { cursor: default; }
.post-card__count small { color: var(--orange-700); font-weight: 700; }

.post-page { max-width: 720px; display: grid; gap: 16px; padding-block: 24px 80px; }
.profile-posts .post-composer { margin-bottom: 14px; }

@media (max-width: 600px) {
    .post-card__grid, .post-card__media-full { margin-inline: -14px; }
    .post-card__foot .feed-card__stats { width: 100%; justify-content: flex-end; }
}

/* ---------- About JUMBO ---------- */

.about-intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 40px; align-items: start; }
.about-intro__copy .section__title { margin: 12px 0 16px; }
.about-intro__copy p { line-height: 1.8; }
.about-note { display: flex; gap: 12px; margin-top: 20px; padding: 16px 18px; border-radius: var(--radius); background: var(--orange-50); border: 1px solid var(--orange-100); }
.about-note > span { font-size: 1.5rem; line-height: 1.2; }
.about-note p { margin: 0; color: var(--ink); }
.about-stats { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 14px; padding: 22px; border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #fff; box-shadow: var(--shadow); }
.about-stats h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: #fff; font-size: 1.05rem; }
.about-stats h3 .icon { color: var(--orange-500); }
.about-stats__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.about-stat { display: grid; gap: 2px; padding: 14px; border-radius: var(--radius); background: rgba(255, 255, 255, .08); }
.about-stat strong { font-family: var(--font-display); font-size: 1.8rem; line-height: 1.1; color: #fff; }
.about-stat span { color: rgba(255, 255, 255, .75); font-size: .85rem; }
.about-stat--orange strong { color: var(--orange-500); }
.about-stat--green strong { color: #6ee7a8; }
.about-stats .muted { color: rgba(255, 255, 255, .6); margin: 0; }
.about-stats a { color: #fff; }

.about-problems { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.about-problem { position: relative; display: grid; align-content: start; gap: 8px; padding: 22px 18px 18px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.about-problem__num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy-800); color: #fff; font-family: var(--font-display); font-weight: 700; }
.about-problem h3 { margin: 0; font-size: 1.02rem; }
.about-problem p { margin: 0; color: var(--muted); font-size: .9rem; }
.about-problem .about-problem__fix { display: flex; gap: 6px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--success); font-weight: 600; }
.about-problem__fix .icon { flex-shrink: 0; margin-top: 3px; }

.about-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.about-feature { display: grid; align-content: start; gap: 10px; padding: 22px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.about-feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.about-feature__emoji { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--orange-50); font-size: 1.7rem; }
.about-feature h3 { margin: 0; font-size: 1.12rem; }
.about-feature ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; color: var(--text); font-size: .92rem; }
.about-feature li::marker { color: var(--orange-600); }
.about-feature__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--orange-700); font-weight: 700; text-decoration: none; }
.about-feature__link:hover { text-decoration: underline; }

.about-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.about-value { display: flex; gap: 14px; padding: 18px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.about-value__emoji { font-size: 1.8rem; line-height: 1.2; }
.about-value h3 { margin: 0 0 4px; font-size: 1.02rem; }
.about-value h3 small { display: block; color: var(--orange-700); font-family: var(--font-body); font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.about-value p { margin: 0; color: var(--muted); font-size: .9rem; }
.about-not { max-width: 760px; margin: 32px auto 0; padding: 24px 28px; border-radius: var(--radius-lg); background: var(--navy-900); color: rgba(255, 255, 255, .85); text-align: center; }
.about-not h3 { color: #fff; margin: 0 0 12px; }
.about-not ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 0 0 14px; padding: 0; list-style: none; font-size: .9rem; }
.about-not p { margin: 0; }
.about-not strong { color: var(--orange-500); }


@media (max-width: 1080px) {
    .about-problems { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .about-features, .about-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .about-intro { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .about-stats { position: static; }
}
@media (max-width: 600px) {
    .about-problems, .about-features, .about-values { grid-template-columns: minmax(0, 1fr); }
    .about-head .page-head__mascot { display: none; }
}

/* ---------- Feedback ---------- */

.feedback-page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; padding-block: 28px 80px; }
.feedback-page__main { display: grid; gap: 24px; min-width: 0; }
.feedback-page__side { display: grid; gap: 14px; position: sticky; top: calc(var(--header-h) + 16px); }
.feedback-form { display: grid; gap: 22px; }
.feedback-form__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.feedback-form__group legend { margin-bottom: 10px; font-weight: 600; color: var(--ink); }
.feedback-cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.feedback-cat { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border-radius: var(--radius); border: 1.5px solid var(--line); background: #fff; color: var(--text); font: inherit; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.feedback-cat:hover { border-color: var(--navy-200); }
.feedback-cat.is-selected { border-color: var(--orange-500); background: var(--orange-50); }
.feedback-cat__emoji { font-size: 1.7rem; line-height: 1.2; }
.feedback-cat strong { color: var(--ink); font-size: .95rem; }
.feedback-cat small { color: var(--muted); font-size: .75rem; line-height: 1.3; }
.feedback-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.feedback-rating__paw { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--navy-50); font-size: 1.35rem; cursor: pointer; filter: grayscale(1); opacity: .45; transition: transform .12s, opacity .12s, filter .12s; }
.feedback-rating__paw:hover { transform: scale(1.1); opacity: .8; }
.feedback-rating__paw.is-on { filter: none; opacity: 1; background: var(--orange-50); }
.feedback-rating__label { margin-left: 8px; color: var(--muted); font-size: .9rem; }
.feedback-form__page { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: .88rem; }
.feedback-form__page code { padding: 2px 8px; border-radius: 6px; background: var(--navy-50); color: var(--navy-800); overflow-wrap: anywhere; }
.feedback-form__attach { justify-self: start; }
.feedback-form__submit { display: flex; justify-content: flex-end; }
.feedback-thanks { display: flex; align-items: center; gap: 24px; background: linear-gradient(135deg, var(--orange-50), #fff); border-color: var(--orange-100); }
.feedback-thanks .mascot { flex-shrink: 0; width: 150px; }
.feedback-thanks h2 { margin: 0 0 6px; }
.feedback-thanks__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.feedback-tips { display: grid; gap: 6px; margin: 0; padding-left: 18px; color: var(--text); font-size: .88rem; }
.feedback-urgent { border-color: var(--orange-100); background: var(--orange-50); }
.feedback-urgent .btn { justify-self: start; }

.feedback-mine { display: grid; gap: 12px; }
.feedback-mine h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.25rem; }
.feedback-mine h2 .icon { color: var(--orange-600); }
.feedback-public { margin-top: 12px; }
.feedback-public > p { margin: -4px 0 0; }
.feedback-form__public { padding: 12px 14px; border-radius: var(--radius); background: var(--navy-50); }
.feedback-form__public span { display: grid; gap: 2px; }
.feedback-item__public { padding: 2px 8px; border-radius: 999px; background: var(--navy-100); color: var(--navy-800); font-weight: 600; }
.feedback-item { display: grid; gap: 8px; padding: 16px 18px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
.feedback-item__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.feedback-item__cat { font-weight: 700; color: var(--ink); }
.feedback-item__text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.feedback-item__media { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback-item__media img { width: 88px; height: 88px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.feedback-item__reply { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--navy-50); }
.feedback-item__reply img { flex-shrink: 0; align-self: flex-start; width: 28px; height: 28px; object-fit: cover; border-radius: 50%; }
.feedback-item__reply p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.feedback-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feedback-summary__bars { gap: 4px; }
.feedback-bar { display: grid; grid-template-columns: 22px 1fr 28px; align-items: center; gap: 6px; font-size: .85rem; }
.feedback-bar small { color: var(--muted); text-align: right; }
.feedback-bar__track { height: 8px; border-radius: 99px; background: var(--navy-50); overflow: hidden; }
.feedback-bar__track span { display: block; height: 100%; border-radius: inherit; background: var(--orange-500); }
.feedback-summary__cats { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: .9rem; }
.feedback-summary__cats li { display: flex; justify-content: space-between; gap: 8px; }
.admin-feedback { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 18px; }
.admin-feedback__main { display: grid; gap: 8px; min-width: 0; }
.admin-feedback__meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.admin-feedback__ua { margin: 0; }
.admin-feedback__note { display: flex; gap: 6px; margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--warning-bg); color: var(--ink); }
.admin-feedback__edit { display: grid; gap: 12px; width: min(420px, 100%); }
.admin-feedback__buttons { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 1000px) {
    .feedback-page { grid-template-columns: minmax(0, 1fr); }
    .feedback-page__side { position: static; }
    .feedback-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .feedback-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .feedback-thanks { flex-direction: column; text-align: center; }
    .feedback-thanks__actions { justify-content: center; }
    .admin-feedback { grid-template-columns: minmax(0, 1fr); }
    .admin-feedback__edit { width: 100%; }
}
@media (max-width: 420px) {
    .feedback-cats { grid-template-columns: 1fr 1fr; gap: 8px; }
    .feedback-cat { grid-template-columns: auto 1fr; justify-items: start; align-items: center; gap: 0 8px; padding: 10px 12px; text-align: left; }
    .feedback-cat__emoji { font-size: 1.4rem; }
    .feedback-cat small { display: none; }
    .feedback-summary { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Friends & quick actions on feed cards ---------- */

.btn--friend { background: linear-gradient(135deg, #fff4d6, #ffe3ec); color: #9a3d00; border: 1px solid #ffd27a; }
.btn--friend:hover:not(:disabled) { background: linear-gradient(135deg, #ffecc0, #ffd6e4); color: #7a2f00; }
.btn--follow-back { animation: follow-back-glow 2.2s ease-in-out infinite; }
@keyframes follow-back-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(254, 134, 0, .35); } 50% { box-shadow: 0 0 0 6px rgba(254, 134, 0, 0); } }
.pill--friend { background: linear-gradient(135deg, #fff4d6, #ffe3ec); color: #9a3d00; border: 1px solid #ffd27a; font-weight: 600; }
.profile-card__username .pill { margin-left: 8px; vertical-align: middle; }

.feed-card__stats--line { flex-wrap: wrap; gap: 14px; }
.feed-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.feed-card__action { flex: 1 1 auto; justify-content: center; }
.feed-card__actions .pet-act { flex: 0 0 auto; }
.feed-card__action.is-popped, .post-card__paw.is-popped { animation: card-pop .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes card-pop { 0% { transform: scale(1); } 35% { transform: scale(1.14); } 100% { transform: scale(1); } }
.share-sheet__preview { margin: -4px 0 14px; font-size: .9rem; }

/* "เป็นเพื่อนกันแล้ว!" celebration */
.friend-party { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(0, 15, 51, .45); backdrop-filter: blur(3px); animation: party-fade .25s ease-out; cursor: pointer; }
.friend-party__confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.friend-party__confetti span { position: absolute; bottom: -40px; left: var(--x); font-size: calc(1.6rem * var(--s)); opacity: 0; animation: party-float var(--d) ease-out var(--delay) forwards; }
.friend-party__card { position: relative; display: grid; justify-items: center; gap: 6px; width: min(380px, 100%); padding: 28px 24px 22px; border-radius: 28px; background: radial-gradient(260px 160px at 50% 0%, #fff1d6, transparent 70%), #fff; box-shadow: 0 30px 80px rgba(0, 15, 51, .35); text-align: center; cursor: default; animation: party-card .55s cubic-bezier(.2, 1.5, .4, 1); }
.friend-party__faces { position: relative; display: flex; align-items: center; justify-content: center; height: 100px; margin-bottom: 6px; }
.friend-party__face { display: grid; place-items: center; border-radius: 50%; padding: 4px; background: #fff; box-shadow: 0 8px 20px rgba(0, 15, 51, .18); }
.friend-party__face .avatar, .friend-party__face .pet-photo { border-radius: 50%; }
.friend-party__face--left { animation: face-left .9s cubic-bezier(.3, 1.4, .5, 1) both; }
.friend-party__face--right { animation: face-right .9s cubic-bezier(.3, 1.4, .5, 1) both; }
.friend-party__heart { position: relative; z-index: 1; margin: 0 -14px; font-size: 2.4rem; filter: drop-shadow(0 4px 8px rgba(254, 134, 0, .45)); animation: heart-pop .7s cubic-bezier(.3, 1.8, .5, 1) .55s both, heart-beat 1.1s ease-in-out 1.3s infinite; }
.friend-party__card h2 { margin: 4px 0 0; font-size: 1.5rem; color: var(--ink); }
.friend-party__card p { margin: 0; color: var(--muted); }
.friend-party__actions { display: flex; gap: 8px; margin-top: 12px; }

@keyframes party-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes party-card { from { opacity: 0; transform: translateY(24px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes face-left { from { opacity: 0; transform: translateX(-70px) rotate(-18deg); } 70% { transform: translateX(6px) rotate(4deg); } to { opacity: 1; transform: none; } }
@keyframes face-right { from { opacity: 0; transform: translateX(70px) rotate(18deg); } 70% { transform: translateX(-6px) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes heart-pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes heart-beat { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.2); } 40% { transform: scale(.95); } }
@keyframes party-float {
    0% { opacity: 0; transform: translateY(0) rotate(0); }
    15% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-105vh) rotate(var(--r)); }
}

@media (prefers-reduced-motion: reduce) {
    .friend-party, .friend-party__card, .friend-party__face--left, .friend-party__face--right, .friend-party__heart,
    .btn--follow-back, .feed-card__action.is-popped { animation: none; }
    .friend-party__confetti { display: none; }
}
@media (max-width: 480px) {
    .feed-card__action { padding-inline: 8px; white-space: nowrap; }
    .feed-card__actions .pet-act { order: 5; } /* "ในนามน้อง" drops to its own line, the three main buttons stay together */
    .feed-card__action--comment { flex: 0 0 auto; }
    .feed-card__action--comment span { display: none; }
}

/* ---------- ❤️ / 🐾 buttons on cards (as you or your pets) ---------- */

.react { display: inline-flex; align-items: center; gap: 2px; }
.react__button { gap: 6px; }
.react__button.is-popped { animation: card-pop .55s cubic-bezier(.3, 1.6, .5, 1); }
.react__emoji { font-size: 1.05rem; line-height: 1; }
.react__button:not(.is-on) .react__emoji { filter: grayscale(.35); }
.react__faces { display: inline-flex; }
.react__faces .pet-photo { border: 2px solid #fff; border-radius: 50%; margin-left: -6px; }
.react__faces .pet-photo:first-child { margin-left: 0; }
.react__count { padding: 4px 6px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.react__count:hover:not(:disabled) { background: var(--orange-50); color: var(--orange-800); }
.react__count:disabled { cursor: default; }
.react__count small { color: var(--orange-700); font-weight: 700; }
.react__panel { left: 0; right: auto; min-width: 260px; max-width: calc(100vw - 32px); }
.react__panel .pet-act__hint small { display: block; color: var(--muted); font-weight: 400; }
.feed-card__action--icon { flex: 0 0 auto; gap: 5px; }
.feed-card__action--icon small { color: var(--muted); font-weight: 600; }
.feed-card__actions .react:last-of-type { margin-right: auto; }

@media (max-width: 480px) {
    .react__label, .feed-card__action-label, .react__faces, .react__button > .icon { display: none; }
    /* the "ในนามใคร" panel opens under the whole action bar, from the card's left edge */
    .feed-card__actions { position: relative; }
    .react.menu { position: static; }
    .react__panel { left: 0; right: auto; }
    .feed-card__actions { gap: 2px; }
    .react__button { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .react__button.is-popped { animation: none; }
}
.react__empty { display: grid; justify-items: center; gap: 8px; padding: 10px 8px 6px; text-align: center; }
.react__empty > span { font-size: 1.8rem; line-height: 1; }
.react__empty p { margin: 0; color: var(--muted); font-size: .88rem; }
.react__empty strong { color: var(--ink); }
.react__button .spinner { width: 16px; height: 16px; }

/* ==========================================================================
   Phase 2 — partners, groups, events, campaigns
   ========================================================================== */

/* Small labels (the base .chip is the big home-page pill). */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; background: var(--navy-50); color: var(--text); font-size: .78rem; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.tag--soft { background: var(--orange-50); color: var(--orange-800); }
.tag--ok { background: var(--success-bg); color: var(--success); }
.tag--warn { background: var(--warning-bg); color: #8a5a00; }
.tag--danger { background: var(--danger-bg); color: var(--danger); }
.verified { display: inline-flex; align-items: center; color: #1d9bf0; vertical-align: -2px; }
.verified--badge { gap: 4px; padding: 2px 10px; border-radius: 99px; background: #e8f5fe; font-size: .8rem; font-weight: 700; font-family: var(--font-body); vertical-align: middle; }
.open-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--danger); font-size: .82rem; font-weight: 600; }
.open-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.open-dot.is-open { color: var(--success); }
.pre-line { white-space: pre-line; overflow-wrap: anywhere; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; }
.filter-chips--small .filter-chip { padding: 5px 12px; font-size: .84rem; }
.type-grid--3 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.type-grid--3 .type-option__icon { font-size: 1.3rem; }
.btn--danger-text { color: var(--danger); }
.user-inline { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.user-inline > span { display: grid; min-width: 0; }
.user-inline small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-stack { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }

/* Community sub-navigation */
.community-tabs { position: sticky; top: var(--header-h); z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.community-tabs__inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.community-tabs__inner::-webkit-scrollbar { display: none; }
.community-tabs__tab { display: inline-flex; align-items: center; gap: 6px; padding: 14px 16px 12px; border-bottom: 3px solid transparent; color: var(--muted); font-family: var(--font-display); font-weight: 600; text-decoration: none; white-space: nowrap; }
.community-tabs__tab:hover { color: var(--navy-800); }
.community-tabs__tab.active { color: var(--navy-800); border-bottom-color: var(--orange-500); }
.community-tabs__tab.active .icon { color: var(--orange-600); }
.gather-page, .partners-page, .manage-page { padding-top: 24px; padding-bottom: 64px; }
.gather-page .tabs, .partners-page .tabs { margin-bottom: 0; }

/* Stars: grey outline, gold fill clipped to the score */
.stars { display: inline-flex; align-items: center; gap: 1px; }
.stars__star { position: relative; display: inline-flex; color: var(--navy-200); }
.stars__star--ro { color: var(--navy-100); }
.stars__star--ro .icon { fill: var(--navy-100); }
.stars__fill { position: absolute; top: 0; left: 0; bottom: 0; display: inline-flex; overflow: hidden; color: #f5a524; }
.stars__fill .icon { flex-shrink: 0; fill: #f5a524; }
.stars__num { margin-left: 5px; color: var(--ink); font-size: .9rem; }
.stars small { margin-left: 3px; }
.stars--pick { gap: 4px; flex-wrap: wrap; }
.stars--pick .stars__star { padding: 2px; border: 0; background: none; cursor: pointer; transition: transform .15s, color .15s; }
.stars--pick .stars__star:hover { transform: scale(1.12); }
.stars--pick .stars__star.is-on { color: #f5a524; }
.stars--pick .stars__star.is-on .icon { fill: #f5a524; }
.stars__label { margin-left: 8px; color: var(--ink); font-weight: 600; }

/* Image upload box */
.image-box { position: relative; display: grid; place-items: center; width: 120px; aspect-ratio: 1; overflow: hidden; border-radius: 20px; border: 1.5px dashed var(--navy-200); background: var(--navy-50); }
.image-box--wide { width: 100%; aspect-ratio: 3 / 1; }
.image-box--doc { width: 100%; max-width: 360px; aspect-ratio: 4 / 3; }
.image-box:not(.is-empty) { border-style: solid; border-color: var(--line); }
.image-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.image-box--doc img { object-fit: contain; background: #fff; }
.image-box__placeholder { display: grid; justify-items: center; gap: 4px; color: var(--muted); }
.image-box__button { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: rgba(0, 23, 74, .78); color: #fff; font-size: .82rem; font-weight: 600; cursor: pointer; }
.image-box__button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.image-box__button .spinner { width: 14px; height: 14px; }
.image-box__clear { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; }

/* Partner cards & directory */
.partner-card { display: flex; gap: 14px; padding: 14px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .15s; }
.partner-card:hover { border-color: var(--navy-200); box-shadow: var(--shadow); transform: translateY(-1px); }
.partner-card.is-selected { border-color: var(--orange-500); box-shadow: 0 0 0 3px var(--orange-50); }
.partner-card--skeleton { min-height: 96px; }
.partner-card__logo { display: grid; place-items: center; flex-shrink: 0; width: 64px; height: 64px; overflow: hidden; border-radius: 16px; background: var(--orange-50); font-size: 1.8rem; }
.partner-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.partner-card__logo--sm { width: 44px; height: 44px; border-radius: 12px; font-size: 1.3rem; }
.partner-card__body { display: grid; gap: 5px; align-content: start; min-width: 0; }
.partner-card__name { display: flex; align-items: center; gap: 6px; color: var(--ink); font-family: var(--font-display); font-size: 1.02rem; line-height: 1.3; }
.partner-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .85rem; }
.partner-card__summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: .88rem; }
.partners-toolbar__right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.partners-sort { display: inline-flex; flex-shrink: 0; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: .88rem; white-space: nowrap; }
.partners-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; margin-top: 16px; align-items: start; }
.partners-list { display: grid; gap: 12px; align-content: start; }
.partners-list .muted.small { margin: 0; }
.partners-map { position: sticky; top: calc(var(--header-h) + 64px); }
.browse-map { position: relative; z-index: 0; height: calc(100vh - var(--header-h) - 96px); min-height: 360px; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--navy-50); }
.partners-toolbar__right .segmented { display: none; }
.map-popup { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 500; display: flex; align-items: center; gap: 10px; padding: 12px 40px 12px 12px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-lg); }
.map-popup__body { display: flex; flex: 1; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.map-popup__body > span:last-child { display: grid; gap: 2px; min-width: 0; }
.map-popup__close { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--navy-50); cursor: pointer; }
.map-pin--verified span { background: #1d9bf0; }
.map-pin--event span { background: var(--navy-700); }
.my-partner { display: flex; align-items: center; gap: 10px; }
.my-partner .partner-card { flex: 1; }
.partners-list--mine { margin-bottom: 16px; }

/* Partner / group hero */
.partner-hero { background: #fff; border-bottom: 1px solid var(--line); }
.partner-hero__cover { height: 220px; background: linear-gradient(135deg, var(--navy-800), var(--navy-600) 55%, var(--orange-500)) center / cover; }
.partner-hero__inner { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 20px; padding-bottom: 20px; margin-top: -56px; }
.partner-hero__logo { display: grid; place-items: center; flex-shrink: 0; width: 120px; height: 120px; overflow: hidden; border-radius: 28px; border: 5px solid #fff; background: var(--orange-50); box-shadow: var(--shadow); font-size: 3.2rem; }
.partner-hero__logo img { width: 100%; height: 100%; object-fit: cover; }
.partner-hero__text { flex: 1 1 280px; min-width: 0; }
.partner-hero__text h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; font-size: clamp(1.4rem, 3vw, 2rem); }
.partner-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .92rem; }
.partner-hero__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.partner-page { padding-top: 20px; padding-bottom: 64px; }
.partner-info { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.partner-info__main, .partner-info__side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.partner-info .card, .partner-reviews .card, .group-body .card { padding: 22px; }
.service-list, .hours-list, .review-list, .doc-list { list-style: none; margin: 0; padding: 0; }
.service-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.service-list li:first-child { border-top: 0; padding-top: 0; }
.service-list li > span:first-child { display: grid; gap: 2px; }
.service-list__price { display: grid; justify-items: end; color: var(--orange-800); font-weight: 700; white-space: nowrap; }
.hours-list li { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 10px; }
.hours-list li.is-today { background: var(--orange-50); font-weight: 700; }
.branch { display: grid; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
.branch:first-of-type { border-top: 0; padding-top: 0; }
.contact-card { display: grid; gap: 8px; }
.contact-card .card__title { margin-bottom: 4px; }

/* Reviews */
.partner-reviews { display: grid; gap: 16px; max-width: 820px; }
.rating-summary { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }
.rating-summary__score { display: grid; justify-items: center; gap: 4px; }
.rating-summary__score > strong { font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--ink); }
.rating-summary__bars { flex: 1 1 240px; display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.rating-summary__bars li { display: grid; grid-template-columns: 36px 1fr 32px; align-items: center; gap: 10px; font-size: .88rem; }
.rating-summary__bars .progress span { background: #f5a524; }
.review-form { display: grid; gap: 12px; }
.review-form__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.review-list { display: grid; gap: 12px; }
.review { display: grid; gap: 10px; padding: 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.review p { margin: 0; }
.review__head { display: flex; align-items: center; gap: 10px; }
.review__head > div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.review__head a { color: var(--ink); text-decoration: none; }
.review__meta { display: flex; align-items: center; gap: 8px; }
.review__photos { display: flex; flex-wrap: wrap; gap: 8px; }
.review__photos img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; }
.review__reply { display: grid; gap: 4px; margin-left: 12px; padding: 12px 14px; border-left: 3px solid var(--orange-500); border-radius: 0 12px 12px 0; background: var(--orange-50); font-size: .92rem; }
.review__reply-form { display: grid; gap: 8px; }

/* Apply & manage */
.partner-steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0; }
.partner-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: .88rem; font-weight: 600; }
.partner-steps li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy-50); color: var(--navy-800); font-size: .8rem; }
.partner-steps li.is-current { border-color: var(--orange-500); color: var(--ink); }
.partner-steps li.is-current span { background: var(--orange-500); color: #fff; }
.partner-apply__head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.partner-apply__name { flex: 1 1 260px; }
.partner-apply__images { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: start; }
.manage-checklist { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.manage-checklist span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--navy-50); color: var(--muted); font-size: .85rem; font-weight: 600; }
.manage-checklist span.is-done { background: var(--success-bg); color: var(--success); }
.manage-page .card { display: grid; gap: 14px; }
.manage-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.manage-row > span:first-child { display: grid; gap: 2px; min-width: 0; }
.manage-row.is-muted { opacity: .65; }
.manage-row__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; }
.manage-form { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--surface-soft); }
.manage-form h3 { margin: 0; }
.manage-form--inline { display: flex; flex-wrap: wrap; gap: 8px; }
.manage-form--inline .input { flex: 1 1 180px; width: auto; }
.manage-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.manage-actions > :first-child:not(:last-child) { margin-right: auto; }
.hours-editor { display: grid; gap: 6px; }
.hours-editor__row { display: grid; grid-template-columns: 90px 70px 1fr 14px 1fr; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: var(--surface-soft); }
.hours-editor__row.is-closed { opacity: .6; }
.hours-editor__row .input { width: 100%; }
.hours-editor__row .check input { margin: 0; }
.doc-list { display: grid; gap: 10px; }
.doc-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; background: var(--surface-soft); }
.doc-list img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: #fff; }
.doc-list li > span { display: grid; gap: 3px; justify-items: start; }

/* Admin partners */
.admin-partner { display: grid; gap: 12px; margin-bottom: 14px; padding: 20px; }
.admin-partner__head { display: flex; gap: 12px; align-items: center; }
.admin-partner__head a { color: var(--ink); }
.admin-partner__facts { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0; font-size: .9rem; }
.admin-partner__facts dt { color: var(--muted); font-size: .78rem; }
.admin-partner__facts dd { margin: 0; }
.admin-partner__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Groups */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 16px; }
.group-card, .campaign-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); color: inherit; text-decoration: none; transition: box-shadow .2s, transform .15s; }
.group-card:hover, .campaign-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.group-card__cover, .campaign-card__cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 7; background: linear-gradient(135deg, var(--navy-50), var(--orange-50)) center / cover; font-size: 2.6rem; }
.group-card__body, .campaign-card__body { display: grid; gap: 6px; align-content: start; justify-items: start; padding: 14px 16px 16px; }
.group-card__body strong, .campaign-card__body strong { color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; line-height: 1.35; }
.group-card__meta, .campaign-card__meta { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); font-size: .86rem; }
.group-card__summary, .campaign-card__summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); font-size: .9rem; }
.group-hero .partner-hero__logo { font-size: 3.4rem; }
.group-body { display: grid; gap: 16px; max-width: 760px; }
.post-card__group { display: inline-flex; align-items: center; gap: 4px; color: var(--orange-800); font-size: .8rem; font-weight: 600; text-decoration: none; }

/* Events */
.event-list { display: grid; gap: 12px; margin-top: 16px; }
.event-card { display: flex; gap: 14px; align-items: stretch; padding: 14px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: inherit; text-decoration: none; transition: box-shadow .2s, border-color .2s; }
.event-card:hover { border-color: var(--navy-200); box-shadow: var(--shadow); }
.event-card.is-cancelled { opacity: .7; }
.event-card.is-cancelled .event-card__title { text-decoration: line-through; }
.event-card__date { display: grid; place-content: center; justify-items: center; flex-shrink: 0; width: 58px; padding: 6px 0; border-radius: 14px; background: var(--orange-50); color: var(--orange-800); line-height: 1.1; }
.event-card__date small { font-size: .78rem; font-weight: 700; }
.event-card__date strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); }
.event-card__date--lg { width: 76px; background: #fff; box-shadow: var(--shadow); }
.event-card__date--lg strong { font-size: 2.1rem; }
.event-card__body { flex: 1; display: grid; gap: 4px; align-content: start; min-width: 0; font-size: .88rem; }
.event-card__title { color: var(--ink); font-family: var(--font-display); font-size: 1.04rem; }
.event-card__when { color: var(--orange-800); font-weight: 600; }
.event-card__where { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); }
.event-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.event-card__cover { flex-shrink: 0; width: 120px; border-radius: 12px; object-fit: cover; }
.event-hero { position: relative; padding: 28px 0 32px; color: #fff; background: linear-gradient(180deg, rgba(0, 15, 51, .35), rgba(0, 15, 51, .85)), var(--cover) center / cover, var(--navy-800); }
.event-hero--plain { background: linear-gradient(135deg, var(--navy-800), var(--navy-600) 60%, var(--orange-600)); }
.event-hero__inner { display: grid; gap: 14px; justify-items: start; }
.event-hero__row { display: flex; align-items: center; gap: 18px; }
.event-hero h1 { margin: 6px 0 4px; color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.3rem); }
.event-hero p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0; color: rgba(255, 255, 255, .9); }
.event-hero .tag { background: rgba(255, 255, 255, .2); color: #fff; }
.event-page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; padding-top: 24px; padding-bottom: 64px; }
.event-page__main, .event-page__side { display: grid; gap: 16px; }
.event-page .card { padding: 22px; }
.rsvp-card { display: grid; gap: 12px; }
.rsvp-card p { margin: 0; }
.rsvp-card__counts { display: flex; gap: 20px; color: var(--muted); }
.rsvp-card__counts strong { color: var(--ink); font-family: var(--font-display); font-size: 1.3rem; }
.rsvp-card__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.event-facts { display: grid; gap: 12px; }
.event-facts > div { display: flex; gap: 10px; align-items: flex-start; }
.event-facts > div > .icon { flex-shrink: 0; margin-top: 2px; color: var(--orange-600); }
.event-actions { display: grid; gap: 8px; }
.side-list__date { display: grid; align-content: center; justify-items: center; background: var(--orange-50); color: var(--ink); font-family: var(--font-display); font-weight: 700; line-height: 1; }
.side-list__date small { color: var(--orange-800); font-size: .65rem; }

/* Campaigns */
.campaign-card__phase { position: absolute; top: 10px; left: 10px; background: #fff; box-shadow: var(--shadow-sm); }
.campaign-card--active .campaign-card__phase { background: var(--success); color: #fff; }
.campaign-card--ended { opacity: .8; }
.campaign-hero .campaign-card__phase { position: static; }
.campaign-goal { background: linear-gradient(135deg, var(--orange-50), #fff); border-color: var(--orange-100); }
.campaign-goal p { margin: 0; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }

@media (min-width: 901px) {
    .nav > .nav__link--sub { display: none; }
}

@media (max-width: 900px) {
    .partners-layout { grid-template-columns: minmax(0, 1fr); }
    .partners-toolbar__right .segmented { display: flex; }
    .partners-layout.is-list .partners-map { display: none; }
    .partners-layout.is-map .partners-list { display: none; }
    .partners-map { position: relative; top: 0; }
    .browse-map { height: calc(100vh - var(--header-h) - 140px); }
    .partners-sort { margin-left: 0; }
    .partner-info, .event-page { grid-template-columns: minmax(0, 1fr); }
    .partner-hero__cover { height: 150px; }
    .partner-hero__inner { margin-top: -44px; }
    .partner-hero__logo { width: 92px; height: 92px; border-radius: 22px; font-size: 2.4rem; }
    .partner-hero__actions { width: 100%; }
    .partner-hero__actions .btn { flex: 1 1 auto; }
    .hours-editor__row { grid-template-columns: 1fr auto; }
    .hours-editor__row > span { display: none; }
    .partner-apply__images { grid-template-columns: minmax(0, 1fr); }
    .event-card__cover { display: none; }
    .community-tabs__tab { padding: 12px 12px 10px; font-size: .92rem; }
}

/* Admin: species (ชนิดสัตว์) */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.admin-table tr.is-muted td { opacity: .6; }
.admin-table tr.is-muted td.admin-table__actions { opacity: 1; }
.species-name { display: flex; align-items: center; gap: 10px; }
.species-name > span:last-child { display: grid; }
.species-name__emoji { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--orange-50); font-size: 1.35rem; line-height: 1; }
.species-form { display: grid; gap: 14px; margin-top: 8px; }
.emoji-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.emoji-pick__item { display: grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; transition: border-color .15s, transform .15s; }
.emoji-pick__item:hover { transform: translateY(-1px); border-color: var(--navy-200); }
.emoji-pick__item.is-selected { border-color: var(--orange-500); background: var(--orange-50); }
.emoji-pick__custom { width: 130px; }
.species-preview { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-soft); }

/* Admin: system email account */
.email-source { margin-bottom: 14px; }
.email-source--admin, .email-source--server { background: var(--success-bg); color: var(--success); }
.email-source--log { background: var(--warning-bg); color: #8a5a00; }
.email-source code { overflow-wrap: anywhere; }
.email-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.admin-card .form-grid { align-items: start; margin-bottom: 14px; }
.email-test { display: grid; gap: 6px; margin: 4px 0 16px; padding: 14px; border-radius: 14px; background: var(--surface-soft); }
.email-test__row { display: flex; flex-wrap: wrap; gap: 8px; }
.email-test__row .input { flex: 1 1 220px; width: auto; }

/* Infinite scroll sentinel (end of a list) */
.infinite { display: grid; place-items: center; min-height: 48px; margin-top: 16px; }
.infinite__loading { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.infinite__end { margin: 8px 0 0; color: var(--muted); font-size: .88rem; }

/* ==========================================================================
   Chat
   ========================================================================== */

.chat-badge { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--navy-800); }
.chat-badge:hover { background: var(--navy-50); }
.chat-badge__count { position: absolute; top: 4px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-family: var(--font-display); font-size: .72rem; font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.start-chat__error { margin: 4px 0 0; }

.chat-page { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100dvh - var(--header-h) - 40px); min-height: 480px; margin-top: 20px; margin-bottom: 20px; overflow: hidden; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

/* list */
.chat-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.chat-list__head { padding: 16px 18px 8px; }
.chat-list__head h1 { margin: 0; font-size: 1.4rem; }
.chat-list__tabs { margin: 0 12px 8px; width: auto; }
.chat-list__tabs .tabs__tab { flex: 1; padding: 8px 10px; font-size: .9rem; }
.chat-list__empty { padding: 24px 18px; text-align: center; }
.chat-items { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 0 8px 8px; }
.chat-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; color: inherit; text-decoration: none; }
.chat-item:hover { background: var(--navy-50); }
.chat-item.is-active { background: var(--orange-50); }
.chat-item__body { flex: 1; display: grid; gap: 2px; min-width: 0; }
.chat-item__top, .chat-item__bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.chat-item__top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.chat-item__top time { flex-shrink: 0; color: var(--muted); font-size: .78rem; }
.chat-item__preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .88rem; }
.chat-item.is-unread .chat-item__preview { color: var(--ink); font-weight: 600; }
.chat-item__count { flex-shrink: 0; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--orange-600); color: #fff; font-size: .75rem; font-weight: 700; line-height: 22px; text-align: center; }

/* thread */
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface-soft); }
.chat-empty { display: grid; place-content: center; justify-items: center; gap: 8px; height: 100%; padding: 24px; text-align: center; }
.chat-empty h2 { margin: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.chat-head__back { display: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--navy-800); }
.chat-head__back:hover { background: var(--navy-50); }
.chat-head__who { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.chat-head__who > span { display: grid; min-width: 0; }
.chat-head__who strong { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.chat-head__who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 8px; display: flex; flex-direction: column; gap: 6px; }
.chat-safety { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-bottom: 6px; border-radius: 12px; background: var(--warning-bg); color: #6b4a00; font-size: .85rem; }
.chat-safety .icon { flex-shrink: 0; margin-top: 2px; }
.chat-safety span { flex: 1; }
.chat-older, .chat-start { display: grid; place-items: center; margin: 4px 0; }
.chat-day { display: grid; place-items: center; margin: 10px 0 4px; }
.chat-day span { padding: 2px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: .75rem; }

.chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: min(78%, 520px); }
.chat-msg--mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.is-sending { opacity: .65; }
.chat-bubble { display: grid; gap: 6px; padding: 9px 13px; border-radius: 18px 18px 18px 6px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.chat-msg--mine .chat-bubble { border-radius: 18px 18px 6px 18px; background: var(--orange-600); border-color: var(--orange-600); color: #fff; }
.chat-bubble--media { padding: 4px; }
.chat-bubble--muted, .chat-msg--mine .chat-bubble--muted { background: transparent; border-style: dashed; border-color: var(--line); color: var(--muted); }
.chat-text { white-space: pre-wrap; }
.chat-media { display: block; max-width: min(320px, 100%); max-height: 360px; border-radius: 14px; background: var(--navy-50); object-fit: cover; }
.chat-media--wait { display: inline-flex; align-items: center; gap: 8px; padding: 18px 16px; color: var(--muted); font-size: .88rem; }
.chat-expired { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; opacity: .85; }
.chat-meta { display: flex; align-items: center; gap: 6px; margin: 2px 4px 0; color: var(--muted); font-size: .72rem; }
.chat-read { color: var(--success); font-weight: 600; }
.chat-action { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s; }
.chat-msg:hover .chat-action, .chat-action:focus-visible { opacity: 1; }
.chat-action:hover { background: var(--navy-50); color: var(--ink); }

.chat-request { padding: 12px 16px; background: #fff; border-top: 1px solid var(--line); }
.chat-request p { margin: 0 0 8px; font-size: .9rem; }
.chat-request__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-note { margin: 0; padding: 8px 16px; background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

/* composer */
.chat-composer { position: relative; display: grid; gap: 6px; padding: 10px 12px 12px; background: #fff; border-top: 1px solid var(--line); }
.chat-composer__row { display: flex; align-items: flex-end; gap: 6px; }
.chat-composer__btn { position: relative; display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--navy-800); font-size: 1.25rem; cursor: pointer; }
.chat-composer__btn:hover, .chat-composer__btn.is-active { background: var(--navy-50); }
.chat-composer__btn.is-disabled, .chat-composer__btn:disabled { opacity: .45; cursor: not-allowed; }
.chat-composer__btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chat-composer__input { flex: 1; min-height: 42px; max-height: 140px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 22px; background: var(--surface-soft); color: var(--ink); font: inherit; resize: none; field-sizing: content; }
.chat-composer__input:focus { outline: none; border-color: var(--orange-500); background: #fff; box-shadow: var(--ring); }
.chat-composer__send { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--orange-700); color: #fff; cursor: pointer; }
.chat-composer__send:disabled { background: var(--navy-100); color: var(--muted); cursor: not-allowed; }
.chat-composer__hint { margin: 0; color: var(--muted); font-size: .74rem; text-align: center; }
.chat-composer__error { margin: 0; }
.chat-uploads { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chat-upload { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 12px; background: var(--surface-soft); border: 1px solid var(--line); max-width: 260px; }
.chat-upload.is-error { border-color: var(--danger); }
.chat-upload img, .chat-upload video { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--navy-50); }
.chat-upload__info { display: grid; gap: 4px; min-width: 110px; font-size: .78rem; }
.chat-upload__info .progress { height: 5px; }
.chat-upload__remove { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; }

/* emoji */
.emoji-panel { position: absolute; left: 12px; bottom: calc(100% - 4px); z-index: 20; width: min(340px, calc(100% - 24px)); border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; }
.emoji-panel__tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.emoji-panel__tab { flex: 1; height: 34px; border: 0; border-radius: 10px; background: none; font-size: 1.15rem; cursor: pointer; }
.emoji-panel__tab.active { background: #fff; box-shadow: var(--shadow-sm); }
.emoji-panel__grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; max-height: 220px; overflow-x: hidden; overflow-y: auto; padding: 8px; }
.emoji-panel__item { min-width: 0; height: 36px; padding: 0; border: 0; border-radius: 8px; background: none; font-size: 1.35rem; line-height: 1; cursor: pointer; }
.emoji-panel__item:hover { background: var(--navy-50); }

/* admin */
.chat-settings__toggle { margin-bottom: 14px; }
.chat-settings__group { margin: 16px 0 8px; font-size: 1rem; }

@media (max-width: 900px) {
    .chat-page { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--header-h)); margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; max-width: none; }
    .chat-page.is-list .chat-main { display: none; }
    .chat-page.is-thread .chat-list { display: none; }
    .chat-list { border-right: 0; }
    .chat-head__back { display: grid; }
    .chat-msg { max-width: 86%; }
    .chat-action { opacity: .6; }
}

/* ==========================================================================
   Share to the feed ("แชร์ไปที่ฟีด") + the card under a shared post
   ========================================================================== */

.share-feed-option { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 14px; padding: 12px 14px; border: 1.5px solid var(--orange-500); border-radius: 16px; background: var(--orange-50); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.share-feed-option:hover { background: var(--orange-100); }
.share-feed-option:focus-visible { outline: none; box-shadow: var(--ring); }
.share-feed-option__icon { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--orange-600); color: #fff; }
.share-feed-option__text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.share-feed-option__text small { color: var(--muted); font-size: .8rem; }
.share-feed-option > .icon:last-child { flex-shrink: 0; color: var(--orange-700); }

.share-feed { display: grid; gap: 12px; }
.share-feed__text { min-height: 84px; resize: vertical; }
.share-feed__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-feed__bar select { width: auto; min-width: 150px; }
.share-feed__spacer { flex: 1; }
.share-feed__state { display: grid; justify-items: center; gap: 10px; padding: 12px 0 4px; text-align: center; }
.share-feed__state p { margin: 0; }
.share-feed__emoji { font-size: 2.6rem; line-height: 1; }
.share-feed__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.share-feed .comment-as { margin: 0; }

.shared-card { display: flex; gap: 0; margin: 10px 0 4px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s; }
a.shared-card[href]:hover { border-color: var(--navy-200); background: #fff; color: var(--ink); }
.shared-card.is-urgent { border-color: #f3b4b4; }
.shared-card__media { position: relative; flex: 0 0 132px; min-height: 112px; background: var(--navy-50); }
.shared-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shared-card__media .media-tile__play { width: 36px; height: 36px; }
.shared-card__icon { display: grid; place-items: center; flex: 0 0 72px; background: var(--navy-50); font-size: 1.8rem; }
.shared-card__body { flex: 1; display: grid; align-content: center; gap: 3px; min-width: 0; padding: 12px 14px; }
.shared-card__kind { display: flex; align-items: center; gap: 6px; color: var(--orange-700); font-family: var(--font-display); font-size: .74rem; font-weight: 600; }
.shared-card__urgent { padding: 1px 8px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .7rem; }
.shared-card.is-urgent .shared-card__kind { color: var(--danger); }
.shared-card__title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-family: var(--font-display); font-size: 1rem; line-height: 1.35; }
.shared-card__meta { display: flex; align-items: center; gap: 4px; overflow: hidden; color: var(--muted); font-size: .8rem; white-space: nowrap; text-overflow: ellipsis; }
.shared-card__text { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--text); font-size: .86rem; line-height: 1.5; }
.shared-card--gone { align-items: center; gap: 10px; padding: 14px 16px; border-style: dashed; color: var(--muted); font-size: .88rem; }
.shared-card--gone .icon { flex-shrink: 0; }
/* A pet that has passed away: opens its memorial. */
.shared-card.is-memorial { border-color: transparent; background: linear-gradient(160deg, #2a1f5c 0%, #1b2a6b 60%, #0d1b4a 100%); color: #fff; }
a.shared-card.is-memorial[href]:hover { border-color: transparent; background: linear-gradient(160deg, #35287a 0%, #22347f 60%, #13235a 100%); color: #fff; }
.shared-card.is-memorial .shared-card__kind { color: #f3d9a4; }
.shared-card.is-memorial .shared-card__meta { color: rgba(255,255,255,.72); }
.shared-card.is-memorial .shared-card__text { color: rgba(255,255,255,.9); font-style: italic; }
.shared-card.is-memorial .shared-card__media { background: #2a1f5c; }
.shared-card__cta { justify-self: start; margin-top: 6px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); font-family: var(--font-display); font-size: .84rem; font-weight: 600; }

@media (max-width: 520px) {
    .shared-card:not(.is-text) { flex-direction: column; }
    .shared-card:not(.is-text) .shared-card__media { flex-basis: auto; aspect-ratio: 16 / 9; min-height: 0; }
}

/* ==========================================================================
   Group pictures: camera buttons on the page, group picture on cards
   ========================================================================== */

.photo-button { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; background: rgba(0, 23, 74, .78); color: #fff; font-size: .85rem; font-weight: 600; cursor: pointer; }
.photo-button:hover { background: rgba(0, 23, 74, .92); }
.photo-button:focus-within { box-shadow: var(--ring); }
.photo-button input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.photo-button.is-busy { pointer-events: none; opacity: .8; }
.photo-button .spinner { width: 14px; height: 14px; }

.partner-hero__cover { position: relative; }
/* The cover is positioned (for the camera buttons), so lift the logo / name row above it again. */
.partner-hero__inner { position: relative; z-index: 1; pointer-events: none; }
.partner-hero__inner > * { pointer-events: auto; }
.group-hero__cover-tools { position: absolute; left: 0; right: 0; top: 14px; display: flex; justify-content: flex-end; }
.group-hero__logo { position: relative; }
.group-hero__logo > span { display: grid; place-items: center; width: 100%; height: 100%; }
.group-hero__logo-button { position: absolute; right: 4px; bottom: 4px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 2px solid #fff; }

.group-card__avatar { position: absolute; left: 12px; bottom: 10px; width: 56px; height: 56px; border-radius: 16px; border: 3px solid #fff; object-fit: cover; background: #fff; box-shadow: var(--shadow-sm); }

@media (max-width: 640px) {
    .group-hero__cover-tools { top: 10px; }
    .group-hero__cover-tools .photo-button { padding: 6px 12px; font-size: .8rem; }
    .group-hero__logo-button { width: 32px; height: 32px; }
}

/* ==========================================================================
   Phones: app-style tab bar at the bottom
   ========================================================================== */

:root { --tabbar-h: 0px; }
.tabbar { display: none; }

@media (max-width: 900px) {
    :root { --tabbar-h: 62px; }

    body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }

    .tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
        display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); /* 5 tabs, fewer when features are off */
        height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom);
        background: rgba(255, 255, 255, .94); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
        border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0, 23, 74, .06);
    }
    .tabbar__item {
        display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 0; padding: 6px 2px;
        color: var(--muted); font-family: var(--font-display); font-size: .68rem; font-weight: 500; line-height: 1.2; text-align: center;
        user-select: none; -webkit-user-select: none;
    }
    .tabbar__item:hover { color: var(--navy-800); }
    .tabbar__icon { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 99px; transition: background-color .2s, transform .12s; }
    .tabbar__item:active .tabbar__icon { transform: scale(.88); }
    .tabbar__item.is-active { color: var(--orange-700); font-weight: 600; }
    .tabbar__item.is-active .tabbar__icon { background: var(--orange-100); }
    .tabbar__item .avatar { box-shadow: 0 0 0 2px #fff; font-size: .75rem; }
    .tabbar__item.is-active .avatar { box-shadow: 0 0 0 2px var(--orange-600); }
    .tabbar__label { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

    /* Things fixed to the bottom of the screen sit on top of the tab bar. */
    #blazor-error-ui { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); }

    /* The slide-down menu scrolls instead of running under the tab bar. */
    .nav { max-height: calc(100dvh - var(--header-h) - var(--tabbar-h) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
    .nav-backdrop { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
    .bell__panel { max-height: calc(100dvh - var(--header-h) - var(--tabbar-h) - env(safe-area-inset-bottom) - 20px); }

    /* While typing, the keyboard needs the room (set by jumbo.js). */
    body.is-typing .tabbar { display: none; }

    /* Chat: the list stops above the tab bar; an open conversation uses the whole screen. */
    .chat-page.is-list { height: calc(100dvh - var(--header-h) - var(--tabbar-h) - env(safe-area-inset-bottom)); }
    body:has(.chat-page.is-thread) { padding-bottom: 0; }
    body:has(.chat-page.is-thread) .tabbar { display: none; }
    .chat-page.is-thread { height: calc(100dvh - var(--header-h)); }
    body:has(.chat-page) .footer { display: none; }
}

@media (max-width: 360px) {
    .tabbar__item { font-size: .62rem; }
    .tabbar__icon { width: 44px; }
}

/* Opened from the home screen (installed): no browser bar, so leave room for the phone's status bar. */
@media (display-mode: standalone) {
    .header { padding-top: env(safe-area-inset-top); height: calc(var(--header-h) + env(safe-area-inset-top)); }
}

@media (max-width: 900px) {
    /* The tab bar has "บัญชี" (with the avatar) and the ☰ menu has every account link, so the phone header stays narrow. */
    .header__inner { gap: 12px; }
    .header__actions { gap: 2px; }
    .header .user-menu { display: none; }
}

/* ==========================================================================
   Search ("ค้นหา")
   ========================================================================== */

.header-search { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--navy-800); }
.header-search:hover { background: var(--navy-50); color: var(--navy-800); }

.search-page { max-width: 780px; padding-top: 20px; padding-bottom: 40px; }
.search-box {
    position: sticky; top: calc(var(--header-h) + 10px); z-index: 30;
    display: flex; align-items: center; gap: 8px; height: 54px; padding: 0 8px 0 18px;
    border: 1.5px solid var(--line); border-radius: 99px; background: #fff; box-shadow: var(--shadow-sm);
}
.search-box:focus-within { border-color: var(--orange-500); box-shadow: var(--ring); }
.search-box__icon { flex-shrink: 0; color: var(--muted); }
.search-box__input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 1rem; }
.search-box__input::-webkit-search-cancel-button { display: none; }
.search-box__clear { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--navy-50); color: var(--navy-800); cursor: pointer; }
.search-page__types { margin: 14px 0 18px; }
.search-page__types .filter-chip small { margin-left: 2px; opacity: .7; font-weight: 600; }

.search-page__start { display: grid; gap: 20px; }
.search-page__group h2, .search-section__head h2 { margin: 0 0 10px; font-size: 1.02rem; }
.search-page__group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.search-page__hint { margin: 0; font-size: .875rem; }
.search-page__count { margin: 0 0 10px; font-size: .875rem; }
.search-page__empty { display: grid; justify-items: center; gap: 4px; padding: 28px 0; text-align: center; }
.search-page__empty p { margin: 0; }

.search-section { margin-bottom: 22px; }
.search-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.search-section__head small { margin-left: 4px; color: var(--muted); font-size: .8rem; font-weight: 500; }

.search-list { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.search-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: inherit; }
.search-row:last-child { border-bottom: 0; }
.search-row:hover { background: var(--surface-soft); color: inherit; }
.search-row__media { display: grid; place-items: center; flex: 0 0 48px; height: 48px; overflow: hidden; border-radius: 12px; background: var(--navy-50); }
.search-row__media img { width: 100%; height: 100%; object-fit: cover; }
.search-row--user .search-row__media, .search-row--pet .search-row__media { border-radius: 50%; background: none; }
.search-row__emoji { font-size: 1.5rem; }
.search-row__body { flex: 1; display: grid; gap: 1px; min-width: 0; }
.search-row__top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.search-row__top strong { overflow: hidden; color: var(--ink); white-space: nowrap; text-overflow: ellipsis; }
.search-row__badge { flex-shrink: 0; padding: 1px 8px; border-radius: 99px; background: var(--orange-50); color: var(--orange-700); font-size: .72rem; font-weight: 600; white-space: nowrap; }
.search-row.is-urgent .search-row__badge { background: var(--danger-bg); color: var(--danger); }
.search-row__meta { display: flex; align-items: center; gap: 4px; overflow: hidden; color: var(--muted); font-size: .8rem; white-space: nowrap; text-overflow: ellipsis; }
.search-row__text { overflow: hidden; color: var(--text); font-size: .85rem; white-space: nowrap; text-overflow: ellipsis; }
.search-row__go { flex-shrink: 0; color: var(--muted); }

@media (max-width: 900px) {
    .search-page { padding-top: 12px; }
    .search-box { top: calc(var(--header-h) + 8px); height: 50px; }
    .search-page__types { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
    .search-page__types::-webkit-scrollbar { display: none; }
    .search-page__types .filter-chip { flex-shrink: 0; }
}

@media (max-width: 420px) {
    /* Phone header: logo + 🔎 + chat + bell + ☰ must fit. */
    .header-search, .chat-badge, .bell__button { width: 40px; height: 40px; }
    .header__toggle { width: 40px; height: 40px; }
    .search-row { padding: 10px 12px; gap: 10px; }
    .search-row__go { display: none; }
}

/* ==========================================================================
   Acting as a partner page ("ในนามพาร์ทเนอร์")
   ========================================================================== */

.partner-logo { display: inline-grid; place-items: center; flex-shrink: 0; overflow: hidden; border-radius: 28%; border: 1px solid var(--line); background: var(--orange-50); line-height: 1; vertical-align: middle; }
.partner-logo img { width: 100%; height: 100%; object-fit: cover; }
.comment-as__option--partner .partner-logo { border-radius: 6px; }
.comment-as__verified, .partner-act__verified { color: var(--success); font-weight: 700; }
.post-card__verified, .comment__badge--verified {
    display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 99px;
    background: var(--success-bg); color: var(--success); font-size: .72rem; font-weight: 600; vertical-align: middle;
}
.partner-act .pet-act__faces .partner-logo { margin-left: -6px; border: 2px solid #fff; }
.partner-act .pet-act__faces .partner-logo:first-child { margin-left: 0; }
.case-stats__extra { margin-top: -2px; color: var(--orange-700); font-size: .72rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }

/* ==========================================================================
   "สัตว์" — animal directory (grid on computers, one swipe card per screen on phones)
   ========================================================================== */

.animals-head__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.animals-page { padding-top: 24px; padding-bottom: 48px; }
.animals-filters { display: grid; gap: 10px; margin-bottom: 18px; }
.animals-filters__row { display: flex; gap: 10px; }
.animals-search { flex: 1; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 99px; background: #fff; color: var(--muted); }
.animals-search:focus-within { border-color: var(--orange-500); box-shadow: var(--ring); }
.animals-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 1rem; }
.animals-search input::-webkit-search-cancel-button { display: none; }
.animals-sort { width: auto; min-width: 150px; border-radius: 99px; }
.animals-filters__chips { margin-bottom: 0; }
.filter-chip--lost.active { border-color: var(--danger); background: var(--danger); color: #fff; }
.animals-count { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; font-size: .9rem; }
.animals-nav { display: none; }
.animals-empty { display: grid; justify-items: center; gap: 4px; padding: 32px 0; text-align: center; }
.animals-empty p { margin: 0; }

.animals-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.animals-list > .infinite { grid-column: 1 / -1; }

.animal-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.animal-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.animal-card.is-lost { border-color: #f3b4b4; }
.animal-card__photo { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, var(--navy-50), var(--orange-50)); }
.animal-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.animal-card__emoji { font-size: 4rem; }
.animal-card__tags { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.animal-card__tag { padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .94); color: var(--ink); font-size: .75rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.animal-card__tag--lost { background: var(--danger); color: #fff; }
.animal-card__tag--memorial { background: linear-gradient(90deg, #fde2f3, #e4e9ff, #dff7ee); color: #5b3f8c; }
.animal-card.is-memorial .animal-card__avatar { filter: saturate(.75); }
.animal-card__passed { margin: 0; color: #6b4fa0; font-size: .85rem; font-weight: 600; }
.animal-card__flower { background: #fde2f3; color: #9d2a6b; border: 1px solid #f6bfdf; }
.animal-card__flower:hover { background: #fbd0ea; color: #861f5a; }
.animal-card__photos { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .75rem; }
.animal-card__body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }
.animal-card__name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.animal-card__name h3 { overflow: hidden; margin: 0; font-size: 1.15rem; white-space: nowrap; text-overflow: ellipsis; }
.animal-card__name h3 a { color: var(--ink); }
.animal-card__verified { display: inline-grid; color: var(--navy-600); }
.animal-card__sex { font-weight: 700; }
.animal-card__sex--male { color: #1a6fd6; }
.animal-card__sex--female { color: #d6336c; }
.animal-card__kind { margin: 0; color: var(--muted); font-size: .875rem; }
.animal-card__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.animal-card__facts div { min-width: 0; padding: 6px 8px; border-radius: 10px; background: var(--surface-soft); }
.animal-card__facts dt { color: var(--muted); font-size: .68rem; line-height: 1.3; }
.animal-card__facts dd { display: flex; align-items: center; gap: 4px; overflow: hidden; margin: 0; color: var(--ink); font-size: .85rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.animal-card__swatch { flex-shrink: 0; width: 10px; height: 10px; border: 1px solid rgba(0, 0, 0, .15); border-radius: 50%; }
.animal-card__place { display: flex; align-items: center; gap: 4px; margin: 0; color: var(--text); font-size: .85rem; }
.animal-card.is-lost .animal-card__place { color: var(--danger); font-weight: 600; }
.animal-card__bio { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 0; color: var(--text); font-size: .875rem; line-height: 1.55; }
.animal-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.animal-card__by { overflow: hidden; min-width: 0; color: var(--muted); font-size: .8rem; white-space: nowrap; text-overflow: ellipsis; }

@media (max-width: 640px) {
    /* Room for the cards: a short head without the long text and the mascot. */
    .animals-head p, .animals-head .page-head__mascot { display: none; }
    .animals-head .page-head__inner { padding-block: 18px; }
    .animals-head h1 { margin: 0; }
    .animals-page { padding-top: 14px; padding-bottom: 16px; }
    .animals-sort { min-width: 0; max-width: 130px; }
    .animals-filters__chips { flex-wrap: nowrap; margin-inline: -16px; padding-inline: 16px; }
    .animals-filters__chips .filter-chip { flex-shrink: 0; }
    .animals-nav { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
    .animals-nav__btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--navy-800); cursor: pointer; }

    /* One card per screen, swiped up / down (like Paws): the list scrolls on its own and snaps to each card. */
    .animals-list {
        display: flex; flex-direction: column; gap: 12px; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain;
        flex: 1 1 0; min-height: 300px;
        padding: 0 0 2px; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .animals-list::-webkit-scrollbar { display: none; }
    .animals-list > .animal-card { flex: 0 0 auto; min-height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
    .animals-list > .animal-card:hover { transform: none; }
    .animals-list > .infinite { flex: 0 0 auto; align-self: stretch; min-height: 64px; scroll-snap-align: end; }
    /* The arrows step up / down. */
    .animals-nav__btn .icon { transform: rotate(90deg); }
    .animal-card__photo { flex: 1 1 auto; aspect-ratio: auto; min-height: 180px; }
    .animal-card__name h3 { font-size: 1.35rem; }
    .animal-card__bio { -webkit-line-clamp: 3; }
}

.animals-chipset { display: grid; gap: 10px; }
.animals-search { min-width: 0; }
.animals-quick { display: none; }

@media (max-width: 640px) {
    /* The tab bar already says "สัตว์": no page head, so the first card starts high and fills the screen. */
    .animals-head { display: none; }
    .animals-page { padding-top: 12px; }
    .animals-filters { gap: 8px; margin-bottom: 10px; }
    .animals-filters__row { gap: 6px; }
    .animals-search { height: 42px; padding: 0 12px; }
    .animals-sort { height: 42px; max-width: 112px; padding-inline: 10px; font-size: .85rem; }
    .animals-quick { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border: 1.5px solid var(--line); border-radius: 50%; background: #fff; color: var(--navy-800); }
    .animals-quick--add { border-color: var(--orange-600); background: var(--orange-600); color: #fff; }
    .animals-chipset { display: flex; align-items: center; gap: 8px; overflow-x: auto; margin-inline: -16px; padding: 0 16px 2px; scrollbar-width: none; }
    .animals-chipset::-webkit-scrollbar { display: none; }
    .animals-chipset > .filter-chips { display: contents; }
    .animals-count { margin-bottom: 8px; }
    /* search + chips + count + gaps ≈ 160px above the list (besides the header): the list fills the rest of the screen */
    .animal-card__body { gap: 6px; padding: 12px 14px 14px; }
    .animal-card__bio { -webkit-line-clamp: 2; }
}
.animals-filters, .animals-chipset { grid-template-columns: minmax(0, 1fr); }

/* Animal cards: the profile photo as a circle (the same square crop as the pet profile), centred on a soft backdrop. */
.animal-card__photo {
    aspect-ratio: auto; height: 210px; container-type: size;
    background: radial-gradient(circle at 50% 45%, #fff 0, var(--orange-50) 45%, var(--navy-50) 100%);
}
.animal-card__photo img.animal-card__avatar, .animal-card__avatar {
    width: min(72cqh, 62cqw, 240px); height: min(72cqh, 62cqw, 240px); border-radius: 50%; object-fit: cover;
    border: 5px solid #fff; background: #fff; box-shadow: 0 10px 28px rgba(0, 23, 74, .16);
}
.animal-card__avatar--empty { display: grid; place-items: center; font-size: min(30cqh, 4.5rem); line-height: 1; }
.animal-card.is-lost .animal-card__avatar { box-shadow: 0 0 0 3px var(--danger), 0 10px 28px rgba(196, 43, 43, .2); }
.animal-card__photos { right: 12px; bottom: 12px; }

@media (max-width: 640px) {
    .animal-card__photo { height: auto; min-height: 230px; }
}

/* Shared partner / group cards: their profile picture as a rounded square (like the page's own avatar), not a cover crop. */
.shared-card--partner .shared-card__media, .shared-card--group .shared-card__media {
    display: grid; place-items: center; flex-basis: 112px; background: radial-gradient(circle at 50% 45%, #fff 0, var(--orange-50) 60%, var(--navy-50) 100%);
}
.shared-card--partner .shared-card__media img, .shared-card--group .shared-card__media img {
    position: static; width: 76px; height: 76px; border: 3px solid #fff; border-radius: 22px; background: #fff; box-shadow: var(--shadow-sm);
}
@media (max-width: 520px) {
    .shared-card--partner:not(.is-text), .shared-card--group:not(.is-text) { flex-direction: row; }
    .shared-card--partner:not(.is-text) .shared-card__media, .shared-card--group:not(.is-text) .shared-card__media { flex-basis: 96px; aspect-ratio: auto; min-height: 104px; }
    .shared-card--partner .shared-card__media img, .shared-card--group .shared-card__media img { width: 64px; height: 64px; border-radius: 18px; }
}

@media (max-width: 640px) {
    /* Long text must never push "ดูโปรไฟล์" out of the card: the photo area gives way first (the circle scales with it),
       and the parts that can grow are capped — breed / place one line, introduction two. */
    .animals-list > .animal-card .animal-card__photo { flex: 1 1 0; min-height: 140px; }
    .animals-list > .animal-card .animal-card__body { flex: 0 0 auto; }
    .animal-card__kind, .animal-card__place { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .animal-card__place .icon { vertical-align: -2px; }
    .animal-card__foot { padding-top: 2px; }
}
@media (max-width: 640px) {
    /* At least the list's height — and taller only when the text really doesn't fit (tiny phones), so nothing is ever cut. */
    .animals-list > .animal-card { height: auto; min-height: 100%; }
    .animals-list > .animal-card .animal-card__photo { min-height: 120px; }
}
@media (max-width: 640px) and (max-height: 700px) {
    /* Short phones: the introduction and the second row of basics stay on the profile, so the card still fits one screen. */
    .animal-card__bio, .animal-card__facts div:nth-child(n + 4) { display: none; }
}

/* ---------- feature switches (admin/features) and pages of a switched-off feature ---------- */
.pill--muted { background: var(--navy-50); color: var(--muted); }
.feature-summary { display: flex; gap: 8px; margin: 0 0 16px; }
.feature-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.feature .toggle__text strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.feature--child { margin-left: 22px; padding-left: 14px; border-left: 2px solid var(--line); border-radius: 0 12px 12px 0; }
.feature.is-off .toggle__text > span:first-of-type { opacity: .8; }
.feature__note { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; color: var(--orange-800); font-size: .8rem; }
.feature-off-note {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 12px auto 0; padding: 10px 14px; max-width: min(1200px, calc(100% - 32px));
    border: 1px dashed var(--orange-500); border-radius: 12px; background: var(--orange-50, #fff7ed); color: var(--orange-800); font-size: .875rem;
}
.feature-off-note a { margin-left: auto; font-weight: 600; }
.feature-off { margin: 48px auto; max-width: 560px; padding-inline: 16px; }

/* ---------- shop: products, cart, checkout, orders ---------- */
.shop-page { padding-block: 24px 80px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.shop-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-block: 28px 20px; }
.shop-head h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 0 0 4px; }
.shop-head p { margin: 0; }
.shop-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-search { display: flex; gap: 10px; }
.shop-search__box { position: relative; flex: 1; min-width: 0; }
.shop-search__box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.shop-search__box .input { padding-left: 42px; min-width: 0; width: 100%; }
.shop-search__sort { width: auto; flex: 0 0 auto; }
.shop-page__cats { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; }
.shop-page__cats::-webkit-scrollbar { display: none; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.product-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.product-card__photo { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: var(--surface-soft); overflow: hidden; }
.product-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.product-card__emoji { font-size: 3rem; }
.product-card__flag { position: absolute; left: 8px; top: 8px; padding: 2px 10px; border-radius: 99px; background: rgba(0, 23, 74, .78); color: #fff; font-size: .72rem; font-weight: 600; }
.product-card__flag.is-out { background: var(--danger); }
/* affiliate: where it is sold (brand colours of each shop) */
.product-card__platform { position: absolute; right: 8px; top: 8px; padding: 2px 10px; border-radius: 99px; background: #333; color: #fff; font-size: .72rem; font-weight: 700; }
.product-card__platform--shopee { background: #ee4d2d; }
.product-card__platform--lazada { background: #0f146d; }
.product-card__platform--tiktok { background: #111; }
.product-affiliate { display: grid; gap: 10px; }
.product-price__was { margin-left: 8px; color: var(--muted); font-size: .6em; font-weight: 500; }
.product-card__price .product-price__was { font-size: .78em; margin-left: 4px; }
.product-price__off { margin-left: 6px; padding: 2px 8px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .5em; vertical-align: middle; }
.product-card__flag.is-promo { background: var(--danger); }
.product-promo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.product-promo__code { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 2px dashed var(--orange-600); border-radius: 10px; background: var(--orange-50, #fff4e6); color: var(--ink); cursor: pointer; font: inherit; }
.product-promo__code strong { font-family: var(--font-display); letter-spacing: .04em; }
.product-promo__copy { display: inline-flex; align-items: center; gap: 4px; color: var(--orange-700); font-size: .8rem; font-weight: 600; }
.product-promo__ends { color: var(--danger); font-size: .9rem; font-weight: 600; }
.product-form__code { text-transform: uppercase; }
.product-form__checked { display: flex; gap: 8px; }
.product-form__checked .input { flex: 1; min-width: 0; }
.product-affiliate__interest { margin: 0; color: var(--orange-700); font-weight: 700; }
.product-affiliate__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.product-affiliate__buy { flex: 1 1 180px; justify-content: center; background: #333; color: #fff; border-color: transparent; }
.product-affiliate__buy:hover { filter: brightness(1.08); color: #fff; }
.product-affiliate__buy--shopee { background: #ee4d2d; }
.product-affiliate__buy--lazada { background: #0f146d; }
.product-affiliate__buy--tiktok { background: #111; }
.product-recommend { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-soft); border-left: 4px solid var(--orange-600); }
.product-recommend__photo { flex: 0 0 76px; height: 76px; padding: 0; overflow: hidden; border: 0; border-radius: 12px; background: var(--surface-soft); cursor: zoom-in; }
.product-recommend__photo img { width: 100%; height: 100%; object-fit: cover; }
.product-recommend figcaption { display: grid; gap: 4px; min-width: 0; }
.product-recommend__by { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--navy-800); }
.product-recommend blockquote { margin: 0; white-space: pre-line; overflow-wrap: anywhere; color: var(--ink); line-height: 1.5; }
.product-card__recommended { color: var(--navy-800); font-size: .78rem; font-weight: 600; }
.product-card__interest { color: var(--orange-700); font-weight: 600; }
.product-form__more-link + .product-form__more-link { margin-top: 6px; }
.variants-editor__photo-row-pick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.product-card.is-sold-out .product-card__photo img { filter: grayscale(.7); opacity: .7; }
.product-card__body { display: grid; gap: 4px; padding: 10px 12px 12px; }
.product-card__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--font-display); font-size: .95rem; line-height: 1.35; }
.product-card__price { color: var(--orange-700); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.product-card__shop { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: .8rem; }
.product-card__shop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-card__stats { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: .75rem; }
.product-card__stats .icon { vertical-align: -2px; }
.shop-team-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; margin-bottom: 16px; }

.product-page { padding-block: 20px 80px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: .875rem; }
.product-page__top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.product-gallery { display: grid; gap: 10px; min-width: 0; }
.product-gallery__frame { position: relative; }
.product-gallery__main { display: flex; aspect-ratio: 1; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: var(--radius-lg); background: var(--surface-soft); border: 1px solid var(--line); }
.product-gallery__main::-webkit-scrollbar { display: none; }
.product-gallery__main > .product-gallery__emoji { margin: auto; }
.product-gallery__slide { flex: 0 0 100%; display: grid; place-items: center; scroll-snap-align: start; scroll-snap-stop: always; }
.product-gallery__slide img, .product-gallery__slide video { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.product-gallery__count { position: absolute; right: 10px; bottom: 10px; padding: 2px 10px; border-radius: 99px; background: rgba(0, 23, 74, .7); color: #fff; font-size: .78rem; font-weight: 600; pointer-events: none; }
.product-gallery__emoji { font-size: 5rem; }
.product-gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.product-gallery__thumb { flex: 0 0 64px; height: 64px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 12px; background: var(--surface-soft); cursor: pointer; }
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__thumb.is-active { border-color: var(--orange-600); }
.product-info { display: grid; gap: 12px; align-content: start; }
.product-info h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.3; }
.product-info .pill { justify-self: start; }
.product-info__price { margin: 0; color: var(--orange-700); font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; }
.product-info__stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; }
.product-info__stats .icon { vertical-align: -2px; }
.product-info__stock { color: var(--orange-800); font-weight: 600; }
.product-info__stock.is-out { color: var(--danger); }
.product-info__shop { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.product-info__shop > span { display: grid; flex: 1; min-width: 0; }
.product-info__shop:hover { background: var(--surface-soft); color: var(--ink); }
.product-info__note { display: flex; gap: 8px; margin: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--info-bg); color: var(--navy-800); }
.product-info__delivery { display: grid; gap: 6px; margin: 0; padding: 12px 14px; list-style: none; border-radius: var(--radius); background: var(--surface-soft); font-size: .9rem; }
.product-info__delivery .icon { vertical-align: -3px; color: var(--orange-600); margin-right: 4px; }
.product-info__policy { white-space: pre-line; }
.product-info__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.product-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.product-buy .btn { flex: 1 1 140px; }
.product-buy__added { margin: 0; color: var(--success); font-weight: 600; }
.product-desc p { white-space: pre-line; margin: 0; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty__btn { width: 40px; height: 40px; border: 0; background: none; color: var(--navy-800); font-size: 1.2rem; cursor: pointer; }
.qty__btn:disabled { opacity: .35; cursor: default; }
.qty__value { min-width: 32px; text-align: center; font-family: var(--font-display); font-weight: 700; }
.qty--sm .qty__btn { width: 32px; height: 32px; }

.cart-page, .checkout-page, .orders-page, .order-page, .partner-shop { padding-bottom: 80px; }
.cart-shop { display: grid; gap: 12px; margin-bottom: 16px; padding: 20px; }
.cart-lines { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cart-line { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cart-line__photo { flex: 0 0 56px; height: 56px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--surface-soft); font-size: 1.4rem; }
.cart-line__photo img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__info { display: grid; flex: 1; min-width: 0; }
.cart-line__info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-line__total { font-family: var(--font-display); font-weight: 700; white-space: nowrap; }
.cart-line.has-problem { opacity: .75; }
.cart-lines--compact .cart-line__photo { flex-basis: 44px; height: 44px; }
.cart-shop__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }

.checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.checkout__summary { display: grid; gap: 14px; padding: 20px; position: sticky; top: calc(var(--header-h) + 16px); }
.checkout__totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; }
.checkout__totals dd { margin: 0; text-align: right; font-family: var(--font-display); }
.checkout__grand { font-weight: 700; font-size: 1.1rem; color: var(--navy-800); padding-top: 6px; border-top: 1px solid var(--line); }
dd.checkout__grand { color: var(--orange-700); }

.order-list { display: grid; gap: 10px; margin-top: 12px; }
.order-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); min-width: 0; }
.order-row:hover { background: var(--surface-soft); color: var(--ink); }
.order-row__photo { flex: 0 0 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--surface-soft); font-size: 1.3rem; }
.order-row__photo img { width: 100%; height: 100%; object-fit: cover; }
.order-row__info { display: grid; gap: 2px; flex: 1; min-width: 0; }
.order-row__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.order-row__items { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-row__total { font-family: var(--font-display); font-weight: 700; color: var(--orange-700); white-space: nowrap; }
.order-page__status { font-size: .9rem; padding: 6px 14px; }
.order-steps { display: flex; gap: 0; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: step; overflow-x: auto; scrollbar-width: none; }
.order-steps__item { position: relative; flex: 1 0 88px; padding-top: 34px; text-align: center; color: var(--muted); font-size: .8rem; counter-increment: step; }
.order-steps__item::before { content: counter(step); position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy-50); color: var(--muted); font-weight: 700; }
.order-steps__item::after { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.order-steps__item:first-child::after { display: none; }
.order-steps__item.is-done { color: var(--navy-800); font-weight: 600; }
.order-steps__item.is-done::before { background: var(--orange-600); color: #fff; content: "✓"; }
.order-steps__item.is-done::after { background: var(--orange-600); }
.order-steps__item.is-current::before { box-shadow: 0 0 0 4px var(--orange-100); }
.order-page__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.order-page__main, .order-page__side { display: grid; gap: 16px; }
.order-pay { display: grid; gap: 14px; }
.order-pay__qr { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px; border-radius: var(--radius); background: var(--surface-soft); }
.order-pay__qr img { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 6px; }
.order-pay__qr > div { flex: 1 1 200px; display: grid; gap: 6px; justify-items: start; }
.order-pay__text { white-space: pre-line; margin: 0; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--radius); }
.order-pay__slip { display: grid; gap: 10px; justify-items: start; }
.order-slip { max-width: 100%; max-height: 360px; border-radius: 12px; border: 1px solid var(--line); }
.order-actions { display: grid; gap: 12px; }
.order-actions__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.order-contact p { margin: 0 0 6px; }
.order-contact__address { white-space: pre-line; }
.order-page__cancel { justify-self: start; color: var(--danger); }
.shop-settings { margin-bottom: 20px; }
.shop-settings summary { cursor: pointer; list-style: none; flex-wrap: wrap; }
.shop-settings summary::-webkit-details-marker { display: none; }
.shop-settings[open] summary { margin-bottom: 16px; }
.partner-shop__orders h2 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; }

@media (max-width: 860px) {
    .product-page__top, .checkout, .order-page__grid { grid-template-columns: minmax(0, 1fr); }
    .checkout__summary { position: static; }
}
@media (max-width: 560px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .product-card__body { padding: 8px 10px 10px; }
    .shop-search { flex-wrap: wrap; }
    .shop-search__sort { width: 100%; }
    .cart-line { flex-wrap: wrap; }
    .cart-line__info { flex-basis: calc(100% - 68px); }
    .cart-shop { padding: 16px; }
    .order-pay__qr img { width: 180px; height: 180px; }
    .order-row__total { align-self: flex-start; }
    .order-steps__item { flex: 1 1 0; min-width: 0; font-size: .7rem; }
}

/* ---------- tap a profile picture / logo to see it full size ---------- */
.photo-open { display: inline-grid; padding: 0; border: 0; border-radius: 50%; background: none; cursor: zoom-in; transition: transform .15s, filter .15s; }
.photo-open:hover { filter: brightness(1.04); transform: scale(1.02); }
.photo-open:focus-visible { outline: 3px solid var(--orange-500); outline-offset: 3px; }
.photo-open--fill { display: block; width: 100%; height: 100%; border-radius: inherit; }
.photo-open--fill img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.photo-viewer { z-index: 300; }
.photo-viewer__panel { width: auto; max-width: min(960px, 100%); justify-items: center; }
.photo-viewer__media { background: transparent; }
.photo-viewer__media img { max-height: 80vh; border-radius: var(--radius-lg); background: #fff; }
.photo-viewer__caption { margin: 0; color: #fff; font-family: var(--font-display); font-weight: 600; text-align: center; }

/* ---------- clinic / hospital detail ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-row .chip { gap: 4px; padding: 4px 12px; box-shadow: none; background: var(--surface-soft); font-size: .85rem; font-weight: 500; }
.chip-row .chip--sm { padding: 2px 9px; font-size: .75rem; }
.clinic-info__emergency { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; padding: 12px 16px; border-radius: var(--radius); background: var(--danger-bg); color: var(--danger); }
.clinic-info__emergency > span:first-child { font-size: 1.6rem; }
.clinic-info__emergency strong { display: block; }
.clinic-info__emergency a { color: var(--danger); font-weight: 700; }
.clinic-info__list { display: grid; gap: 14px; margin: 0; }
.clinic-info__list dt { margin-bottom: 4px; color: var(--muted); font-size: .85rem; }
.clinic-info__list dd { margin: 0; }
.service-section__animals { margin: 4px 0 12px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.service-group + .service-group { margin-top: 16px; }
.service-group__title { margin: 0 0 6px; font-size: 1rem; color: var(--navy-800); }
.service-item { align-items: flex-start; }
.service-item__main { display: grid; gap: 4px; min-width: 0; }
.service-item__main strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.service-item__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: .8rem; }
.service-item__meta .icon { vertical-align: -2px; }
.service-item__includes { margin: 2px 0 0; padding-left: 18px; color: var(--text); font-size: .85rem; }
.service-list__price small { display: block; }
.vet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.vet-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.vet-card__body { display: grid; gap: 5px; min-width: 0; }
.vet-card__body small .icon { vertical-align: -2px; }
.vet-card__bio { margin: 2px 0 0; font-size: .875rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.vet-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vet-row > span { display: grid; min-width: 0; }
.vet-form__top { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.vet-form__top .image-box { width: 120px; flex: 0 0 auto; }
.vet-form__names { display: grid; gap: 10px; flex: 1 1 240px; }
.partners-species { width: auto; }

/* ---------- Paws: vertical clip feed ---------- */
/* Pinned between the header and the bottom tab bar (and the phone's home-indicator area), so nothing hides the clip. */
.paws-page {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    z-index: 30; display: flex; justify-content: center; background: #000;
}
html.paws-open, html.paws-open body { overflow: hidden; overscroll-behavior: none; }
html.paws-open .footer, html.paws-open .site-footer { display: none; }
.paws-feed {
    position: relative; width: min(100%, 480px); height: 100%;
    overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; background: #000;
}
.paws-feed::-webkit-scrollbar { display: none; }
.paws-toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; height: 0; padding: 0 12px; }
.paws-toolbar > * { transform: translateY(26px); }
.paws-toolbar__brand { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.paws-toolbar__actions { display: flex; gap: 8px; }
.paws-toolbar__btn { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(0,0,0,.45); color: #fff; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; backdrop-filter: blur(6px); }
.paws-toolbar__btn:hover { color: #fff; background: rgba(0,0,0,.6); }
.paws-toolbar__new { background: var(--orange-600); }
.paws-item { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000; color: #fff; }
.paws-item__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; cursor: pointer; }
.paws-item__video.is-fill { object-fit: cover; }
.paws-item__processing { position: absolute; inset: 0; isolation: isolate; }
.paws-item__poster { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.paws-item__processing small { opacity: .8; }
.paws-item__processing, .paws-item--empty, .paws-item--end { display: grid; place-items: center; align-content: center; gap: 12px; padding: 24px; text-align: center; }
.paws-item--empty h2, .paws-item--empty p, .paws-item--end p { color: #fff; margin: 0; }
.paws-item__side { position: absolute; right: 8px; bottom: 120px; z-index: 2; display: grid; justify-items: center; gap: 14px; }
.paws-item__who { border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.paws-item__action { display: grid; justify-items: center; gap: 2px; padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.paws-item__action:hover { color: #fff; }
.paws-item__action small { font-size: .75rem; font-weight: 600; }
.paws-item__react .react { position: relative; flex-direction: column; gap: 2px; }
/* "in whose name?" opens to the left of the button, not below it (off the bottom of the clip). */
.paws-item__react .menu__panel {
    top: 50%; bottom: auto; left: auto; right: calc(100% + 10px); transform: translateY(-50%); min-width: 240px; max-width: calc(100vw - 90px);
    max-height: min(60vh, 420px); overflow-y: auto; color: var(--text);
}
.paws-item__react .react__button { width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 50%; background: rgba(0,0,0,.35); border: 0; color: #fff; }
.paws-item__react .react__button.is-on { background: rgba(254, 134, 0, .85); }
.paws-item__react .react__emoji { font-size: 1.35rem; }
.paws-item__react .react__label, .paws-item__react .react__faces, .paws-item__react .react__button .icon { display: none; }
.paws-item__react .react__count { color: #fff; font-size: .75rem; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.6); background: none; }
.paws-item__info {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: grid; gap: 8px; padding: 60px 72px 28px 14px;
    background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
}
.paws-item__name { color: #fff; font-family: var(--font-display); font-weight: 700; }
.paws-item__name small { font-weight: 500; opacity: .85; }
.paws-item__name:hover { color: #fff; }
.paws-item__caption { margin: 0; color: #fff; font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.paws-item__error { color: #ffd2d2; }
.paws-item--case { display: grid; place-items: center; padding: 70px 16px 24px; background: radial-gradient(500px 300px at 50% 20%, rgba(254,134,0,.35), transparent 70%), #0b1430; }
.paws-feed .infinite-scroll, .paws-feed .infinite { color: #fff; }

/* ---------- a rescue case pinned to a clip / post ---------- */
.pinned-case { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: 14px; }
.pinned-case--overlay { background: rgba(255,255,255,.95); color: var(--ink); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.pinned-case--inline { margin: 4px 0 10px; border: 1px solid var(--orange-100); background: var(--orange-50, #fff7ed); }
.pinned-case.is-urgent { border-left: 4px solid var(--danger); }
.pinned-case__thumb { flex: 0 0 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: var(--surface-soft); font-size: 1.4rem; }
.pinned-case__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pinned-case__text { display: grid; flex: 1; min-width: 0; color: var(--ink); }
.pinned-case__text:hover { color: var(--ink); }
.pinned-case__text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.pinned-case__text small { color: var(--muted); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinned-case__text small:first-child { color: var(--orange-700); font-weight: 700; }
.pinned-case__help { flex-shrink: 0; }
.pinned-case__error { flex-basis: 100%; color: var(--danger); }
.pinned-case--full {
    flex-direction: column; align-items: stretch; gap: 12px; width: 100%; max-width: 420px; padding: 18px; border-radius: 22px;
    background: #fff; color: var(--ink); box-shadow: 0 20px 50px rgba(0,0,0,.4);
}
.pinned-case--full .pinned-case__cover { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 16px; background: var(--surface-soft); font-size: 3rem; }
.pinned-case--full .pinned-case__cover img { width: 100%; height: 100%; object-fit: cover; }
.pinned-case__eyebrow { color: var(--orange-700); font-family: var(--font-display); font-weight: 700; }
.pinned-case--full .pinned-case__text strong { white-space: normal; font-size: 1.15rem; }
.pinned-case--full .pinned-case__help { width: 100%; justify-content: center; padding: 12px; font-size: 1rem; }
.pin-pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-soft); }
.pin-pick > span { display: grid; min-width: 0; }
.pin-search { display: flex; gap: 8px; }
.pin-search .input { flex: 1; min-width: 0; }
.pin-results { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.pin-results button { display: grid; width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; font: inherit; }
.pin-results button:hover { border-color: var(--orange-500); }

/* ---------- รอบตัวฉัน ---------- */
.nearby-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 24px 80px; }
.nearby-bar { display: grid; gap: 10px; padding: 16px; }
.nearby-bar__where { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; }
.nearby-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nearby-bar__radius { flex-wrap: wrap; }
.nearby-map { height: 320px; border-radius: var(--radius-lg); overflow: hidden; }
.nearby-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.nearby-section { padding: 18px; }
.nearby-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.nearby-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; color: var(--ink); min-width: 0; }
.nearby-row:hover { background: var(--surface-soft); color: var(--ink); }
.nearby-row.is-urgent { background: var(--danger-bg); }
.nearby-row__img { flex: 0 0 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--surface-soft); font-size: 1.4rem; }
.nearby-row__img img { width: 100%; height: 100%; object-fit: cover; }
.nearby-row__text { display: grid; flex: 1; min-width: 0; }
.nearby-row__text strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nearby-row__text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nearby-row__km { flex-shrink: 0; color: var(--orange-700); font-family: var(--font-display); font-weight: 700; font-size: .85rem; }
.nearby-alerts { display: grid; gap: 10px; }
.map-pin--lost span { background: var(--danger); }
.map-pin--case span { background: var(--orange-600); }
.map-pin--clinic span { background: var(--success); }

/* ---------- ภารกิจพลังเล็กๆ ---------- */
.home-missions { margin-block: 24px; }
.missions { display: grid; gap: 12px; padding: 18px; }
.missions--community { margin-bottom: 16px; }
.missions__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.missions__title { margin: 0; font-size: 1.1rem; }
.missions__streak { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--navy-50); color: var(--muted); font-family: var(--font-display); font-weight: 700; }
.missions__streak.is-on { background: var(--orange-100); color: var(--orange-700); }
.missions__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mission { display: flex; align-items: center; gap: 12px; }
.mission__emoji { flex: 0 0 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-soft); font-size: 1.2rem; }
.mission__text { display: grid; gap: 3px; flex: 1; min-width: 0; }
.mission__text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mission__bar { display: block; height: 6px; overflow: hidden; border-radius: 99px; background: var(--navy-50); }
.mission__bar span { display: block; height: 100%; border-radius: inherit; background: var(--orange-500); transition: width .4s; }
.mission.is-done .mission__bar span { background: var(--success); }
.mission.is-done strong { color: var(--muted); text-decoration: line-through; }
.mission__count { flex-shrink: 0; color: var(--success); font-weight: 700; }
.missions__impact { display: flex; gap: 8px; margin: 0; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--text); font-size: .9rem; }
.missions--impact { justify-items: start; }
.missions.is-done { background: linear-gradient(135deg, #f0fdf4, #fff); }
.missions.is-celebrating { animation: missions-pop .9s ease-out; }
@keyframes missions-pop { 0% { transform: scale(.97); box-shadow: 0 0 0 0 rgba(254,134,0,.5); } 50% { transform: scale(1.02); box-shadow: 0 0 0 14px rgba(254,134,0,0); } 100% { transform: none; } }

@media (max-width: 560px) {
    .nearby-map { height: 240px; }
    .pin-search { flex-wrap: wrap; }
}

/* ---- Case: help from partner pages (services / products) */
.partner-offers { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.partner-offer { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft, #fff); }
.partner-offer--declined, .partner-offer--withdrawn { opacity: .6; }
.partner-offer--delivered { border-color: var(--success); }
.partner-offer__item { display: flex; align-items: center; gap: 12px; }
.partner-offer__image { flex: none; width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--navy-50); }
.partner-offer__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; background: var(--navy-50); color: var(--navy-800); }
.partner-offer__text { display: grid; gap: 4px; min-width: 0; flex: 1; }
.partner-offer__text strong { overflow-wrap: anywhere; }
.partner-offer__terms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.partner-offer__status { flex: none; font-size: .75rem; }
.partner-offer--accepted .partner-offer__status { background: var(--navy-100); color: var(--navy-800); }
.partner-offer--delivered .partner-offer__status { background: var(--success-bg); color: var(--success); }
.partner-offer__who { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); }
.partner-offer__note { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--navy-50); font-size: .9rem; white-space: pre-line; }
.partner-offer__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.partner-help__label { margin: 12px 0 6px; font-weight: 600; }
.partner-help__tabs { margin: 14px 0 10px; }
.partner-help__options { display: grid; gap: 8px; max-height: 40vh; overflow-y: auto; margin-bottom: 12px; }
.partner-help__options .partner-offer__image { width: 40px; height: 40px; }
.partner-help__row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.partner-help__row .field { margin: 0; }
.partner-help__row input[type=number] { width: 90px; }
.partner-help__percent { display: inline-flex; align-items: center; gap: 4px; }
.partner-help__percent .input { width: 70px; padding: 4px 8px; }
.chip-row .chip.is-on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* ---- Partner help: address, steps, history; partner level and "การช่วยเหลือ" tab */
.offer-address { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--navy-50); font-size: .9rem; }
.offer-address--missing { background: var(--orange-50); color: var(--orange-800); }
.offer-steps { display: flex; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; }
.offer-steps__step { position: relative; flex: 1 1 0; min-width: 0; display: grid; justify-items: center; gap: 4px; text-align: center; font-size: .72rem; color: var(--muted); }
.offer-steps__step::before { content: ""; position: absolute; top: 10px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.offer-steps__step:first-child::before { display: none; }
.offer-steps__step.is-done::before { background: var(--success); }
.offer-steps__dot { position: relative; z-index: 1; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: #fff; color: #fff; }
.offer-steps__step.is-done .offer-steps__dot { border-color: var(--success); background: var(--success); }
.offer-steps__step.is-current .offer-steps__dot { box-shadow: 0 0 0 4px var(--success-bg); }
.offer-steps__step.is-done .offer-steps__label { color: var(--ink); font-weight: 600; }
.offer-detail { display: flex; gap: 8px; margin: 0; font-size: .88rem; overflow-wrap: anywhere; }
.offer-deliver { display: grid; gap: 2px; padding: 8px 10px; border: 1px dashed var(--navy-100); border-radius: 10px; font-size: .88rem; overflow-wrap: anywhere; }
.offer-history { font-size: .85rem; }
.offer-history summary { cursor: pointer; color: var(--muted); }
.offer-history ol { display: grid; gap: 8px; margin: 8px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); list-style: none; }
.offer-history li { display: grid; gap: 1px; overflow-wrap: anywhere; }
.offer-history__step { font-weight: 600; }
.offer-history__note { font-style: italic; }
.partner-hero__level { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 4px; border-radius: 999px; background: var(--navy-50); color: var(--navy-800); font-size: .85rem; font-weight: 600; }
.partner-level { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.partner-level__text { display: grid; gap: 4px; flex: 1; min-width: 0; }
.partner-level .progress > span { background: var(--tier, var(--orange-500)); }
.partner-help-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.partner-help-stats div { display: grid; justify-items: center; padding: 10px 4px; border-radius: 12px; background: var(--surface-soft, #fff); border: 1px solid var(--line); text-align: center; }
.partner-help-stats strong { font-size: 1.3rem; }
.partner-help-stats span { font-size: .78rem; color: var(--muted); }
.partner-help-list { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.partner-help-case { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.partner-help-case__head { display: flex; align-items: center; gap: 12px; color: inherit; }
.partner-help-case__head img, .partner-help-case__placeholder { flex: none; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--navy-50); display: grid; place-items: center; color: var(--navy-800); }
.partner-help-case__text { display: grid; gap: 2px; min-width: 0; }
.partner-help-case__text strong { overflow-wrap: anywhere; }
.partner-help-case__offers { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: .88rem; }
.partner-help-case__offers li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.partner-help-case__support { margin: 0; font-size: .88rem; color: var(--muted); }
@media (max-width: 560px) { .partner-help-stats { grid-template-columns: repeat(2, 1fr); } }
.offer-steps__label { line-height: 1.25; overflow-wrap: anywhere; }
.uploader__choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.profile-tabs { margin-top: 20px; }
.thai-address { display: grid; gap: 4px; }

/* ---- Appointments ("นัดหมาย") */
.appointments-page { padding-top: 20px; padding-bottom: 80px; }
.container.narrow { max-width: 760px; padding-top: 20px; padding-bottom: 80px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; color: var(--muted); font-weight: 600; }
.pill--warning { background: var(--orange-100); color: var(--orange-800); }
.appointment-list { display: grid; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.appointment-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: inherit; transition: border-color .2s, box-shadow .2s; }
.appointment-card:hover { border-color: var(--orange-500); box-shadow: var(--shadow-sm); color: inherit; }
.appointment-card--scheduled { border-color: var(--orange-100); background: var(--orange-50); }
.appointment-card--cancelled, .appointment-card--no_show { opacity: .65; }
.appointment-card__date { flex: none; display: grid; justify-items: center; width: 56px; padding: 6px 0; border-radius: 12px; background: var(--navy-800); color: #fff; line-height: 1.15; }
.appointment-card__date strong { font-size: 1.45rem; font-family: var(--font-display); }
.appointment-card__date small { font-size: .72rem; opacity: .85; }
.appointment-card__date--lg { width: 76px; padding: 10px 0; }
.appointment-card__date--lg strong { font-size: 2rem; }
.appointment-card__body { display: grid; gap: 4px; min-width: 0; flex: 1; }
.appointment-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.appointment-card__top strong { overflow-wrap: anywhere; }
.appointment-card__top .pill { flex: none; font-size: .72rem; }
.appointment-card__line { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.appointment-form h1, .appointment-detail h1 { margin: 4px 0; }
.appointment-form .form-card { display: grid; gap: 4px; padding: 20px; margin-top: 14px; }
.appointment-form__sub { margin-top: 8px; }
.appointment-sheet { display: grid; gap: 16px; padding: 20px; }
.appointment-sheet__head { display: flex; gap: 16px; align-items: flex-start; }
.appointment-sheet__head h1 { font-size: 1.35rem; overflow-wrap: anywhere; }
.appointment-sheet__head .pill { margin-right: 6px; }
.appointment-sheet__time { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; font-weight: 600; }
.appointment-sheet__facts { display: grid; gap: 10px; margin: 0; }
.appointment-sheet__facts > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; }
.appointment-sheet__facts dt { color: var(--muted); }
.appointment-sheet__facts dd { margin: 0; overflow-wrap: anywhere; }
.appointment-sheet__facts a { display: inline-flex; align-items: center; gap: 6px; }
.appointment-sheet__reminders { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.appointment-sheet__reminders h2 { font-size: 1rem; margin: 0; }
.appointment-sheet__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.reminder-chips .chip { cursor: pointer; }
.partner-appointments { display: grid; gap: 10px; }
.partner-appointments__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.partner-appointments__day { margin: 10px 0 0; font-size: .95rem; color: var(--navy-800); }
.partner-appointments__item { display: grid; gap: 6px; }
.partner-appointments__actions { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 70px; }
.chosen-person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.chosen-person span { display: grid; flex: 1; min-width: 0; }
.pick-list { display: grid; gap: 2px; margin: 6px 0 0; padding: 4px; list-style: none; border: 1px solid var(--line); border-radius: 12px; max-height: 240px; overflow-y: auto; }
.pick-list__item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; text-align: left; font: inherit; cursor: pointer; }
.pick-list__item:hover { background: var(--navy-50); }
@media (max-width: 560px) { .partner-appointments__actions { padding-left: 0; } }
.pet-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.pet-choice { display: grid; justify-items: center; gap: 4px; width: 84px; padding: 8px 4px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-size: .82rem; cursor: pointer; text-align: center; }
.pet-choice span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pet-choice.is-on { border-color: var(--orange-500); background: var(--orange-50); font-weight: 600; }
.pet-choice__plus { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy-50); color: var(--navy-800); }
.pick-list__text { display: grid; gap: 1px; min-width: 0; }
.pick-list__text .pill { font-size: .7rem; padding: 1px 8px; }
.service-choices { margin-bottom: 4px; }
.client-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.client-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.client-card__head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 0; background: none; text-align: left; font: inherit; cursor: pointer; }
.client-card__text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.client-card__text small { overflow-wrap: anywhere; }
.client-card__next { color: var(--orange-700); font-weight: 600; }
.client-card__history { display: grid; gap: 10px; padding: 0 12px 12px; }
.pet-appointments { display: grid; gap: 10px; }
.partner-appointments .segmented__option { padding: 8px 12px; }
.animal-card__open { display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; cursor: zoom-in; }

/* ---- Paws: sheets above the tab bar, round profile pictures, comments in a sheet */
.paws-page:has(.sheet) { z-index: 220; }
.paws-item__who { display: grid; place-items: center; width: 46px; height: 46px; flex: none; overflow: hidden; border-radius: 50%; background: #fff; }
.paws-item__who > *, .paws-item__who img { width: 100% !important; height: 100% !important; border-radius: 50% !important; object-fit: cover; }
.paws-item__who .partner-logo img { object-fit: cover; }
.paws-comments .sheet__panel { width: min(560px, 100%); max-height: min(78vh, 720px); align-content: start; }
.paws-comments__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding-right: 36px; }

/* ---- Partner map on phones: the map fits above the tab bar; the selected place's card stacks (info, then actions) */
@media (max-width: 900px) {
    .browse-map { height: calc(100dvh - var(--header-h) - var(--tabbar-h, 64px) - 32px); min-height: 320px; }
    .map-popup { flex-wrap: wrap; gap: 10px; padding: 12px; bottom: 10px; left: 10px; right: 10px; }
    .map-popup__body { flex: 1 1 100%; padding-right: 30px; }
    .map-popup__body strong { overflow-wrap: anywhere; }
    .map-popup > .btn { flex: 1 1 0; justify-content: center; }
}
.empty-state .btn, .empty-state--compact .btn { max-width: 100%; white-space: normal; text-align: center; }
/* Any tab bar scrolls sideways rather than widening the page on phones. */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__tab { flex: none; }
/* People lists: the name shrinks (ellipsis) before the button can push past the screen. */
.user-row__who { flex: 1 1 auto; }
.user-row > .btn, .user-row > button, .user-row > div:last-child { flex: none; }
@media (max-width: 420px) { .user-row { gap: 10px; padding: 10px 12px; } }
.user-list { grid-template-columns: minmax(0, 1fr); }
.admin-content { grid-template-columns: minmax(0, 1fr); }
.admin-table-wrap { position: relative; }
.photo-viewer .viewer__backdrop { background: rgba(0, 8, 24, .88); }

/* ---- moderation: ready-made messages for the person affected */
.mod-notices { display: flex; flex-wrap: wrap; gap: 6px; }
.mod-notice { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 99px; background: #fff; color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; text-align: left; max-width: 100%; }
.mod-notice:hover { border-color: var(--navy-200); }
.mod-notice.is-on { border-color: var(--navy-800); background: var(--navy-50); color: var(--navy-800); font-weight: 600; }
.mod-preview { margin: 4px 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--navy-50); border: 1px solid var(--line); overflow-wrap: anywhere; }
.mod-preview p { margin: 4px 0 0; white-space: pre-line; }
.mod-preview__label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.mod-preview.is-over { border-color: #c42b2b; }
.mod-preview.is-over .mod-preview__label { color: #c42b2b; }
.admin-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.admin-card__head .card__title { margin: 0; }
.notice-form { margin: 12px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--navy-50); }
.notice-form__active { align-self: end; padding-bottom: 10px; }
.notice-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.notice-row { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.notice-row.is-off { opacity: .6; }
.notice-row__body { min-width: 0; overflow-wrap: anywhere; }
.notice-row__body p { margin: 2px 0 4px; }
.notice-row__off { margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--line); font-size: .75rem; }
.notice-row__actions { display: flex; gap: 4px; flex-shrink: 0; align-items: center; }

/* ---- admin › ตัวชี้วัด (Phase 2 success metrics) */
.metrics-head__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.metrics-section { display: grid; gap: 12px; margin-top: 22px; }
.metrics-section__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.15rem; color: var(--ink); }
.metrics-section__title .icon { color: var(--orange-600); }
.metrics-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.metrics-tile { display: grid; gap: 4px; padding: 16px; align-content: start; min-width: 0; }
.metrics-tile__label { color: var(--muted); font-weight: 600; font-size: .88rem; }
.metrics-tile__value { font-family: var(--font-display); font-size: 1.7rem; color: var(--ink); line-height: 1.15; }
.metrics-tile__sub { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.metrics-chart { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding-top: 6px; border-bottom: 1px solid var(--line); }
.metrics-chart__col { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.metrics-chart__bar { width: 100%; max-width: 22px; border-radius: 4px 4px 0 0; background: var(--orange-500, #f59e0b); }
.metrics-chart__bar--new { position: absolute; bottom: 0; width: 55%; max-width: 12px; background: var(--navy-800); opacity: .85; }
.metrics-chart__axis { display: flex; justify-content: space-between; gap: 8px; }
.metrics-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: middle; background: var(--orange-500, #f59e0b); }
.metrics-key--new { background: var(--navy-800); }
.metrics-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.metrics-bars li { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: .9rem; }
.metrics-bars__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metrics-bars__track { height: 10px; border-radius: 99px; background: var(--navy-50); overflow: hidden; }
.metrics-bars__track span { display: block; height: 100%; border-radius: 99px; background: var(--orange-500, #f59e0b); }
.metrics-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 18px; }
@media (max-width: 560px) {
    .metrics-tile { padding: 12px; }
    .metrics-tile__value { font-size: 1.4rem; }
    .metrics-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .metrics-bars li { grid-template-columns: minmax(0, 6.5rem) minmax(0, 1fr) auto; }
}

/* ---- tab bar v2: five roomy slots, Paws raised in the middle, "เมนู" opens a sheet */
@media (max-width: 900px) {
    :root { --tabbar-h: 64px; }
    .tabbar { padding: 0 6px env(safe-area-inset-bottom); overflow: visible; }
    .tabbar__item { gap: 3px; padding: 6px 0 4px; font-size: .7rem; border: 0; background: none; cursor: pointer; text-decoration: none; }
    .tabbar__icon { width: 48px; height: 30px; }
    .tabbar__item.is-active { color: var(--orange-700); }
    .tabbar__item.is-active .tabbar__icon { background: var(--orange-50); }
    .tabbar__item--center .tabbar__icon {
        width: 54px; height: 54px; margin-top: -26px; border-radius: 50%;
        background: linear-gradient(140deg, var(--orange-500), var(--orange-600)); color: #fff;
        box-shadow: 0 0 0 5px #fff, 0 8px 18px rgba(232, 106, 0, .35);
    }
    .tabbar__item--center.is-active .tabbar__icon { background: linear-gradient(140deg, var(--orange-600), var(--orange-700)); }
    .tabbar__item--center .tabbar__label { margin-top: 1px; }

    .more-sheet .sheet__panel { gap: 18px; padding-top: 18px; }
    .more-sheet__me { display: flex; align-items: center; gap: 12px; padding: 12px; margin-right: 46px; border-radius: 16px; background: var(--navy-50); color: var(--ink); text-decoration: none; }
    .more-sheet__me > span:not(.avatar) { display: grid; min-width: 0; flex: 1; }
    .more-sheet__me strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); }
    .more-sheet__me small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .more-sheet__me > .icon { color: var(--muted); flex-shrink: 0; }
    .more-sheet__guest { display: grid; gap: 10px; padding-right: 44px; }
    .more-sheet__guest strong { font-family: var(--font-display); font-size: 1.1rem; }
    .more-sheet__guest div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .more-sheet__title { margin: 0 0 10px; font-size: .85rem !important; color: var(--muted); font-weight: 600; padding: 0 !important; }
    .more-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
    .more-tile { display: grid; justify-items: center; gap: 6px; min-width: 0; color: var(--ink); text-decoration: none; text-align: center; }
    .more-tile__icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: var(--orange-50); color: var(--orange-700); transition: transform .12s; }
    .more-tile:active .more-tile__icon { transform: scale(.92); }
    .more-tile__label { font-size: .76rem; line-height: 1.25; overflow-wrap: anywhere; }
}
@media (max-width: 360px) {
    .tabbar__icon { width: 42px; }
    .tabbar__item--center .tabbar__icon { width: 50px; height: 50px; }
    .more-tile__icon { width: 44px; height: 44px; }
}

/* ---- case outcome (closing note) + required label */
.field__required { color: var(--danger); font-weight: 500; font-size: .85em; }
.case-outcome { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; padding: 16px; border-radius: var(--radius-lg); border: 1px solid #bbf7d0; background: linear-gradient(135deg, #f0fdf4, #fff); }
.case-outcome--closed { border-color: var(--line); background: var(--navy-50); }
.case-outcome__icon { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; background: #dcfce7; color: #15803d; }
.case-outcome--closed .case-outcome__icon { background: #fff; color: var(--navy-800); }
/* Reporter: volunteers waiting for an answer (the list is at the end of the page on phones). */
.case-pending { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 14px 16px; border-radius: var(--radius-lg); border: 1px solid var(--orange-200); background: var(--orange-50); }
.case-pending__icon { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--orange-600); }
.case-pending > span:nth-child(2) { display: grid; gap: 2px; flex: 1; min-width: 0; }
.case-pending small { color: var(--muted); }
.case-pending .btn { flex-shrink: 0; }
@media (max-width: 480px) { .case-pending { flex-wrap: wrap; } .case-pending .btn { width: 100%; } }
.case-outcome strong { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); }
.case-outcome p { margin: 4px 0; white-space: pre-line; overflow-wrap: anywhere; }
.case-outcome small { color: var(--muted); }

/* ---- "ผลลัพธ์ของเรา" (public results page) */
.impact-page { display: grid; gap: 22px; padding-top: 22px; padding-bottom: 48px; }
.impact-hero { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 16px; }
.impact-hero__big { display: grid; align-content: center; gap: 4px; padding: 24px; border-radius: var(--radius-lg); background: linear-gradient(140deg, var(--orange-500), var(--orange-700)); color: #fff; box-shadow: var(--shadow-sm); }
.impact-hero__big strong { font-family: var(--font-display); font-size: 3.2rem; line-height: 1; }
.impact-hero__big span { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.impact-hero__big small { opacity: .9; }
.impact-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.impact-stat { display: grid; gap: 2px; align-content: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; min-width: 0; }
.impact-stat__icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 4px; border-radius: 10px; background: var(--orange-50); color: var(--orange-700); }
.impact-stat strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); line-height: 1.15; }
.impact-stat span { font-weight: 600; color: var(--ink); font-size: .9rem; }
.impact-stat small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.impact-panel { display: grid; gap: 12px; padding: 20px; }
.impact-panel__head, .impact-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.impact-panel h2, .impact-section h2 { margin: 0; font-size: 1.2rem; }
.impact-key { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 10px; border-radius: 3px; background: var(--navy-200, #c7d2e8); vertical-align: middle; }
.impact-key--done { background: var(--orange-500); }
.impact-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.impact-chart__col { display: grid; gap: 6px; justify-items: center; min-width: 0; }
.impact-chart__bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; height: 150px; border-bottom: 1px solid var(--line); }
.impact-chart__bars span { flex: 1 1 0; max-width: 16px; border-radius: 4px 4px 0 0; background: var(--navy-200, #c7d2e8); }
.impact-chart__bars span.is-done { background: var(--orange-500); }
.impact-chart__col small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.impact-section { display: grid; gap: 12px; }
.impact-stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.impact-story { display: grid; grid-template-rows: auto 1fr; overflow: hidden; padding: 0; color: var(--ink); text-decoration: none; }
.impact-story__photo { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--orange-50); color: var(--orange-600); }
.impact-story__photo img { width: 100%; height: 100%; object-fit: cover; }
.impact-story__photo .status-pill { position: absolute; top: 10px; left: 10px; box-shadow: var(--shadow-sm); }
.impact-story__body { display: grid; gap: 6px; padding: 14px 16px 16px; min-width: 0; }
.impact-story__body strong { font-family: var(--font-display); font-size: 1.02rem; }
.impact-story__body q { color: var(--text); font-style: italic; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.impact-story__body small { color: var(--muted); }
.impact-partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.impact-partner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); text-decoration: none; min-width: 0; }
.impact-partner > span:last-child { display: grid; min-width: 0; }
.impact-partner strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.impact-partner small { color: var(--muted); }
.impact-how { display: grid; gap: 8px; padding: 20px; }
.impact-how h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.impact-how ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--text); }
@media (max-width: 900px) {
    .impact-hero { grid-template-columns: minmax(0, 1fr); }
    .impact-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .impact-stats { gap: 8px; }
    .impact-stat { padding: 12px; }
    .impact-stat strong { font-size: 1.25rem; }
    .impact-hero__big strong { font-size: 2.6rem; }
    .impact-chart { gap: 2px; }
    .impact-chart__bars { height: 120px; gap: 1px; }
    .impact-chart__col small { font-size: .6rem; }
}
.page-head__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; margin-left: 4px; color: rgba(255, 255, 255, .88); font-weight: 600; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; }
.page-head__link:hover { color: #fff; }
@media (max-width: 560px) { .page-head__link { display: flex; margin-left: 0; } }

/* ==========================================================================
   JUMBO Virtual Pet
   ========================================================================== */

.jumbo-coin-amount { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.jumbo-coin {
    display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%; color: #a8580a;
    background: radial-gradient(circle at 32% 28%, #fff6c2 0 12%, #ffd64a 30%, #f5a90f 70%, #d98806 100%);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(150, 80, 0, .35), 0 1px 2px rgba(120, 60, 0, .25);
}
.jumbo-coin svg { filter: drop-shadow(0 1px 0 rgba(255, 240, 180, .7)); }

.vpet-art { position: relative; display: grid; place-items: center; flex-shrink: 0; overflow: hidden; border-radius: 22%;
    background: radial-gradient(circle at 50% 35%, #fff 0 30%, var(--orange-50) 70%, #ffe7c8 100%); }
/* The whole picture, never cropped: pinned to the frame (a percentage height on a grid item would grow with the image instead). */
.vpet-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.vpet-art__emoji { line-height: 1; }
.vpet-art--sm { width: 52px; height: 52px; }
.vpet-art--sm .vpet-art__emoji { font-size: 30px; }
.vpet-art--md { width: 100%; aspect-ratio: 4 / 3; }
.vpet-art--md .vpet-art__emoji { font-size: 64px; }
.vpet-art--lg { width: 180px; height: 180px; }
.vpet-art--lg .vpet-art__emoji { font-size: 96px; }
.vpet-art--xl { width: min(480px, 100%); aspect-ratio: 4 / 3; border-radius: 28px; }
.vpet-art--xl .vpet-art__emoji { font-size: 140px; }
.vpet-art.is-memory { filter: grayscale(.6) brightness(1.05); background: radial-gradient(circle at 50% 35%, #fff 0 30%, #eef0f7 70%, #e1e5f0 100%); }

.vpet-gender { font-size: .9em; font-weight: 700; }
.vpet-gender--male { color: #2563eb; }
.vpet-gender--female { color: #db2777; }
.vpet-stage { display: inline-flex; width: fit-content; padding: 1px 10px; border-radius: 99px; background: var(--orange-50); color: var(--orange-800); font-size: .75rem; font-weight: 600; }
.vpet-stage--memory { background: #eef0f7; color: var(--navy-800); }

.vpet-head .page-head__inner > div { display: grid; justify-items: start; }
.vpet-wallet { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 8px 14px 8px 8px; border-radius: 99px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); }
.vpet-wallet .jumbo-coin-amount strong { font-size: 1.15rem; }
.vpet-wallet > span { color: var(--muted); font-size: .85rem; }
.vpet-page { display: grid; gap: 26px; padding-top: 22px; padding-bottom: 48px; }
.vpet-section { display: grid; gap: 12px; }
.vpet-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vpet-section__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.25rem; }
.vpet-section__title .muted { font-size: .95rem; font-weight: 600; }
.vpet-section__title .pill { background: var(--orange-500); color: #fff; }
.vpet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 14px; }
.vpet-empty { display: grid; justify-items: center; gap: 6px; padding: 18px; text-align: center; color: var(--muted); }

.vpet-card { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; min-width: 0; }
.vpet-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); color: var(--ink); }
.vpet-card__body { display: grid; gap: 3px; padding: 0 4px 4px; min-width: 0; }
.vpet-card__body strong { font-family: var(--font-display); font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vpet-card__body small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vpet-card__owner { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; overflow: hidden; white-space: nowrap; }
.vpet-card.is-memory { background: #fafbfe; }

.vpet-gift { display: inline-grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 16px; background: linear-gradient(140deg, #ffe4ec, #fff1d6); font-size: 28px; overflow: hidden; }
.vpet-gift img { width: 100%; height: 100%; object-fit: contain; }
.vpet-gift--lg { width: 92px; height: 92px; border-radius: 24px; font-size: 56px; }
.vpet-gift--xl { width: 200px; height: 200px; border-radius: 40px; font-size: 130px; }

.vpet-waiting { display: grid; gap: 10px; }
.vpet-waiting__box { display: flex; align-items: center; gap: 12px; padding: 12px; border: 2px solid #ffd2de; border-radius: 20px; background: linear-gradient(120deg, #fff5f8, #fffaf0); color: var(--ink); text-decoration: none; }
.vpet-waiting__box .vpet-gift { animation: bob 2.4s ease-in-out infinite; }
.vpet-waiting__text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.vpet-waiting__text small { color: var(--muted); }
.vpet-waiting__text q { color: var(--text); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vpet-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.vpet-box { display: grid; gap: 12px; padding: 18px; align-content: start; }
.vpet-box__top { display: flex; gap: 14px; align-items: flex-start; }
.vpet-box__info { display: grid; gap: 4px; min-width: 0; }
.vpet-box__info h3 { margin: 0; font-size: 1.15rem; }
.vpet-box__info p { margin: 0; font-size: .88rem; }
.vpet-box__ends { display: inline-flex; align-items: center; gap: 4px; color: var(--orange-700); font-weight: 600; }
.vpet-theme { width: fit-content; padding: 1px 10px; border-radius: 99px; background: linear-gradient(120deg, #ff7aa2, #ffb648); color: #fff; font-size: .72rem; font-weight: 700; }
.vpet-box__preview { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vpet-box__preview .vpet-art--sm { width: 44px; height: 44px; }
.vpet-box__preview .vpet-art--sm .vpet-art__emoji { font-size: 26px; }
.vpet-box__more { color: var(--muted); font-weight: 600; font-size: .85rem; }
.vpet-box__odds { display: inline-flex; align-items: center; gap: 4px; width: fit-content; }
.vpet-box__odds .is-flipped { transform: rotate(180deg); }
.vpet-odds { list-style: none; margin: 0; padding: 10px 12px; border-radius: 14px; background: var(--navy-50); display: grid; gap: 4px; font-size: .88rem; }
.vpet-odds li { display: flex; justify-content: space-between; gap: 8px; }
.vpet-box__buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.vpet-price strong, strong.vpet-price { font-size: 1.2rem; font-family: var(--font-display); }
.vpet-buy__sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.vpet-open { padding-top: 20px; padding-bottom: 60px; }
.vpet-open__stage, .vpet-open__reveal { display: grid; justify-items: center; gap: 10px; text-align: center; }
.vpet-open__stage h1, .vpet-open__reveal h1 { margin: 6px 0 0; }
.vpet-open__note { max-width: 420px; padding: 10px 16px; border-radius: 16px; background: #fff5f8; color: var(--ink); }
.vpet-open__box { margin-top: 16px; padding: 0; border: 0; background: none; cursor: pointer; animation: bob 2.4s ease-in-out infinite; }
.vpet-open__box .vpet-gift { box-shadow: 0 18px 40px rgba(255, 105, 150, .25); }
.vpet-open__box.is-opening { animation: vpet-shake .45s ease-in-out infinite; }
.vpet-open__hint { color: var(--muted); font-weight: 600; }
.vpet-open__reveal { position: relative; isolation: isolate; animation: rise .5s ease-out; }
.vpet-open__reveal .vpet-art { animation: party-card .6s cubic-bezier(.2, 1.4, .4, 1); box-shadow: 0 20px 50px rgba(254, 134, 0, .25); }
.vpet-open__burst { position: absolute; top: 20px; width: 380px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; z-index: -1; pointer-events: none;
    background: repeating-conic-gradient(from 0deg, rgba(255, 200, 80, .35) 0 10deg, transparent 10deg 20deg); animation: spin 18s linear infinite;
    -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); }
.vpet-open__hello { margin: 0; color: var(--orange-700); font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.vpet-open__name { display: grid; gap: 10px; width: min(380px, 100%); padding: 18px; margin-top: 8px; text-align: left; }
@keyframes vpet-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg) scale(1.03); } 75% { transform: rotate(8deg) scale(1.03); } }

.vpet-pet { display: grid; gap: 16px; padding-top: 20px; padding-bottom: 60px; }
/* Wide insides (the daily routine) scroll within their card instead of widening the page. */
.vpet-pet > *, .vpet-home > *, .vpet-routine { min-width: 0; }
.vpet-pet__hero { display: grid; justify-items: center; gap: 8px; padding: 24px 18px; text-align: center; background: linear-gradient(180deg, #fff8ee, #fff 60%); }
.vpet-pet__hero.is-memory { background: linear-gradient(180deg, #f3f0ff, #fff 60%); }
.vpet-pet__hero h1 { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; }
.vpet-pet__rainbow { margin: 0; color: #6d28d9; font-weight: 700; }
.vpet-pet__breed { margin: 0; color: var(--muted); }
.vpet-pet__rename { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.vpet-pet__rename .input { max-width: 220px; }
.vpet-pet__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 460px; margin-top: 6px; }
.vpet-pet__facts > div { display: grid; gap: 2px; padding: 10px 6px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.vpet-pet__facts small { color: var(--muted); font-size: .75rem; }
.vpet-pet__facts strong { font-size: .92rem; overflow-wrap: anywhere; }
.vpet-pet__panel { display: grid; gap: 8px; padding: 18px; }
.vpet-pet__panel h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.1rem; }
.vpet-pet__panel p { margin: 0; }
.vpet-next { display: grid; gap: 6px; }
.vpet-next__bar { height: 10px; border-radius: 99px; background: var(--navy-50); overflow: hidden; }
.vpet-next__bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--orange-500), #ffb648); }
.vpet-pet__memorial { background: linear-gradient(135deg, #f5f3ff, #fff); text-align: center; }
.vpet-pet__owner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.vpet-pet__person { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.vpet-pet__person > span:last-child { display: grid; }
.vpet-pet__person small { color: var(--muted); font-size: .75rem; }
.vpet-pet__owner .btn { margin-left: auto; }

.vpet-browse h1 { margin: 6px 0 0; }
.vpet-coins { display: grid; gap: 14px; padding-top: 20px; padding-bottom: 48px; }
.vpet-coins h1 { margin: 0; }
.vpet-coins__balance { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.vpet-coins__balance > div { display: grid; }
.vpet-coins__balance small { color: var(--muted); }
.vpet-coins__balance strong { font-family: var(--font-display); font-size: 1.8rem; color: var(--ink); line-height: 1.1; }
.coin-log { list-style: none; margin: 0; padding: 4px 16px; display: grid; }
.coin-log li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.coin-log li:last-child { border-bottom: 0; }
.coin-log__text { display: grid; gap: 1px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.coin-log__text small { font-size: .8rem; }
.coin-log__amount { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.coin-log__amount.is-in { color: var(--success); }
.coin-log__amount.is-out { color: var(--danger); }

/* admin */
.image-upload { position: relative; overflow: hidden; cursor: pointer; }
.image-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.coin-filter { display: flex; gap: 4px; }
.coin-filter .input { max-width: 200px; }
.vpet-admin-boxes { display: grid; gap: 12px; }
.vpet-admin-box { display: grid; gap: 10px; padding: 16px; }
.vpet-admin-box__head { display: flex; align-items: center; gap: 12px; }
.vpet-admin-box__head > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.vpet-admin-box__drops { margin: 0; color: var(--text); font-size: .85rem; overflow-wrap: anywhere; }
.vpet-admin-box__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.vpet-state { background: var(--navy-50); color: var(--navy-800); }
.vpet-state--live { background: var(--success-bg, #e7f6ec); color: var(--success); }
.vpet-state--scheduled { background: var(--orange-50); color: var(--orange-800); }
.vpet-box-image { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vpet-weights { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 6px; }
.vpet-weight { display: grid; grid-template-columns: minmax(0, 1fr) 80px 54px; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; font-size: .88rem; }
.vpet-weight.is-on { border-color: #ffc58a; background: var(--orange-50); }
.vpet-weight .input { padding: 6px 8px; min-height: 0; }
.vpet-weight small { color: var(--orange-800); font-weight: 600; text-align: right; }
.vpet-species { padding: 0; overflow: hidden; }
.vpet-species.is-off { opacity: .7; }
.vpet-species__head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.vpet-species__head > span:nth-child(2) { flex: 1; min-width: 0; }
.vpet-species__head .is-flipped { transform: rotate(180deg); }
.vpet-species__emoji { font-size: 28px; }
.vpet-species__body { display: grid; gap: 14px; padding: 0 16px 16px; }
.vpet-species__tools { display: flex; flex-wrap: wrap; gap: 6px; }
.vpet-breed { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; }
.vpet-breed.is-off { opacity: .65; }
.vpet-breed__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vpet-breed__head small { flex: 1; min-width: 160px; }
.vpet-stage-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.vpet-stage-image { display: grid; justify-items: center; gap: 4px; padding: 8px 6px; border-radius: 14px; background: var(--navy-50); text-align: center; font-size: .78rem; }
.vpet-stage-image .vpet-art--sm { width: 72px; height: 72px; }
.vpet-stage-image .vpet-art--sm .vpet-art__emoji { font-size: 40px; }
.vpet-stage-editor { display: grid; gap: 8px; }
.vpet-stage-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 90px auto; grid-template-areas: "name days human remove" "desc desc desc desc"; gap: 6px 8px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.vpet-stage-row > .input:first-child { grid-area: name; }
.vpet-stage-row .input-suffix { grid-area: days; gap: 4px; }
.vpet-stage-row .input-suffix .input { max-width: 100px; }
.vpet-stage-row > small { grid-area: human; }
.vpet-stage-row > .btn { grid-area: remove; }
.vpet-stage-row__desc { grid-area: desc; }
@media (max-width: 560px) {
    .vpet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .vpet-art--md .vpet-art__emoji { font-size: 52px; }
    .vpet-gift--xl { width: 160px; height: 160px; font-size: 100px; }
    .vpet-box__buy .btn { padding-inline: 14px; }
    .vpet-pet__owner .btn { margin-left: 0; }
    .vpet-stage-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name remove" "days human" "desc desc"; }
    .vpet-weight { grid-template-columns: minmax(0, 1fr) 70px 46px; }
}
.vpet-stage-image__zoom { padding: 0; border: 0; background: none; border-radius: 22%; cursor: zoom-in; }
.vpet-stage-image__zoom:hover .vpet-art { box-shadow: 0 0 0 3px var(--orange-300, #ffc58a); }
.photo-viewer--fill .photo-viewer__media img { width: min(900px, 92vw); height: auto; object-fit: contain; }

/* ---- Virtual Pet care */
.vpet-pet__art { position: relative; display: grid; justify-items: center; width: 100%; }
/* what the pet "says" — a speech bubble under the picture (its tail points up at the pet), never on top of it */
.vpet-bubble { --bubble-bg: #fff; --bubble-line: #ffe1c2; position: relative; display: inline-flex; align-items: center; gap: 8px; max-width: min(100%, 420px);
    margin: 14px 0 0; padding: 8px 16px 8px 10px; border: 2px solid var(--bubble-line); border-radius: 999px; background: var(--bubble-bg); color: var(--ink);
    font-size: .92rem; font-weight: 700; line-height: 1.35; box-shadow: 0 6px 16px rgba(0, 23, 74, .1);
    animation: vpet-bubble-in .5s cubic-bezier(.34, 1.56, .64, 1) both, vpet-bubble-float 3.2s ease-in-out .5s infinite; }
.vpet-bubble::before, .vpet-bubble::after { content: ""; position: absolute; left: 50%; border: solid transparent; transform: translateX(-50%); }
.vpet-bubble::before { bottom: 100%; border-width: 0 11px 11px; border-bottom-color: var(--bubble-line); }
.vpet-bubble::after { bottom: calc(100% - 3px); border-width: 0 8px 8px; border-bottom-color: var(--bubble-bg); }
.vpet-bubble__emoji { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: #fff3e6; font-size: 20px;
    animation: vpet-emoji-bounce 1.4s ease-in-out infinite; }
.vpet-bubble--hungry, .vpet-bubble--thirsty, .vpet-bubble--sleepy, .vpet-bubble--lonely { --bubble-bg: #fff7ed; --bubble-line: #fdba74; color: #9a3412; }
.vpet-bubble--joyful, .vpet-bubble--happy { --bubble-bg: #fff1f5; --bubble-line: #fbb6ce; color: #9d174d; }
.vpet-bubble--joyful .vpet-bubble__emoji, .vpet-bubble--happy .vpet-bubble__emoji { background: #ffe4ec; animation-name: vpet-emoji-beat; }
.vpet-bubble--hungry .vpet-bubble__emoji { animation-name: vpet-emoji-wiggle; animation-duration: 1s; }
.vpet-bubble--thirsty .vpet-bubble__emoji { background: #e0f2fe; animation-name: vpet-emoji-drip; }
.vpet-bubble--sleepy .vpet-bubble__emoji { background: #ede9fe; animation-name: vpet-emoji-doze; animation-duration: 2.6s; }
.vpet-bubble--lonely .vpet-bubble__emoji { animation-name: vpet-emoji-sway; animation-duration: 2.2s; }
/* the hello on opening the page / a mood change: the pet hops and emoji for its mood float up around it */
.vpet-pet__stage { position: relative; display: grid; justify-items: center; width: 100%; }
.vpet-pet__stage.is-greeting .vpet-art { animation: vpet-hop .55s ease-out 2; }
.vpet-burst { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.vpet-burst span { position: absolute; bottom: 8%; line-height: 1; opacity: 0; filter: drop-shadow(0 2px 3px rgba(0, 23, 74, .2));
    animation: vpet-float-up 2.6s ease-out both; }
.vpet-burst--sleepy span { animation-duration: 3.4s; animation-timing-function: ease-in-out; }
.vpet-burst--joyful span { animation-name: vpet-pop-up; }
@keyframes vpet-hop { 0%, 100% { transform: translateY(0) scale(1); } 35% { transform: translateY(-14px) scale(1.02, .98); } 70% { transform: translateY(0) scale(1.03, .96); } }
@keyframes vpet-float-up {
    0% { opacity: 0; transform: translate(0, 0) scale(.4) rotate(0); }
    15% { opacity: 1; transform: translate(calc(var(--drift) * .2), -20px) scale(1.1) rotate(calc(var(--spin) * .3)); }
    100% { opacity: 0; transform: translate(var(--drift), -260px) scale(.9) rotate(var(--spin)); }
}
@keyframes vpet-pop-up {
    0% { opacity: 0; transform: translate(0, 0) scale(.2); }
    20% { opacity: 1; transform: translate(calc(var(--drift) * .5), -70px) scale(1.35) rotate(var(--spin)); }
    100% { opacity: 0; transform: translate(calc(var(--drift) * 1.6), -240px) scale(.8) rotate(calc(var(--spin) * -1)); }
}
@keyframes vpet-bubble-in { from { opacity: 0; transform: translateY(-8px) scale(.7); } }
@keyframes vpet-bubble-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes vpet-emoji-bounce { 0%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-5px) scale(1.08); } 55% { transform: translateY(0) scale(.96, 1.04); } }
@keyframes vpet-emoji-beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(.95); } 45% { transform: scale(1.15); } }
@keyframes vpet-emoji-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-16deg); } 40% { transform: rotate(14deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(6deg); } }
@keyframes vpet-emoji-drip { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(4px) scale(.92, 1.1); } }
@keyframes vpet-emoji-doze { 0%, 100% { transform: translate(0, 0) rotate(0); opacity: 1; } 50% { transform: translate(3px, -6px) rotate(8deg); opacity: .55; } }
@keyframes vpet-emoji-sway { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }

/* ---- Virtual Pet: patting (tap the pet), the bond and today's occasion */
.vpet-pet__pat { display: grid; justify-items: center; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.vpet-pet__pat:focus-visible .vpet-art { box-shadow: 0 0 0 3px var(--orange-300, #ffc58a); }
.vpet-pet__zoom-btn { position: absolute; top: 10px; right: calc(50% - min(240px, 50%) + 10px); z-index: 2; display: grid; place-items: center; width: 34px; height: 34px;
    border: 0; border-radius: 50%; background: rgba(255, 255, 255, .88); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 23, 74, .18); cursor: zoom-in; }
.vpet-pet__stage.is-patted.pat-l1 .vpet-art { animation: vpet-pat-shy .6s ease-in-out; }
.vpet-pet__stage.is-patted.pat-l2 .vpet-art { animation: vpet-hop .55s ease-out; }
.vpet-pet__stage.is-patted.pat-l3 .vpet-art { animation: vpet-pat-wiggle .7s ease-in-out; }
.vpet-pet__stage.is-patted.pat-l4 .vpet-art, .vpet-pet__stage.is-patted.pat-l5 .vpet-art { animation: vpet-pat-roll .9s ease-in-out; }
.vpet-pet__stage.is-patted.pat-l5 .vpet-art { box-shadow: 0 0 0 4px #fde68a, 0 0 28px rgba(251, 191, 36, .55); }
.vpet-burst--pat span { bottom: 40%; animation: vpet-pop-up 1.5s ease-out both; animation-delay: 0s !important; }
@keyframes vpet-pat-shy { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg) scale(.98); } 75% { transform: rotate(3deg) scale(.98); } }
@keyframes vpet-pat-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-5deg) translateY(-6px); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-3deg) translateY(-4px); } 80% { transform: rotate(2deg); } }
@keyframes vpet-pat-roll { 0%, 100% { transform: rotate(0) scale(1); } 30% { transform: rotate(-8deg) scale(1.04) translateY(-10px); } 60% { transform: rotate(8deg) scale(1.04); } }
.vpet-pat-hint { margin: 8px 0 0; color: var(--muted); font-size: .82rem; animation: vpet-bubble-float 2.4s ease-in-out infinite; }

.vpet-occasion { margin: 0 0 12px; padding: 8px 14px; border-radius: 999px; background: linear-gradient(90deg, #fff1f5, #fff7ed); color: #9d174d;
    font-weight: 800; text-align: center; animation: vpet-bubble-in .6s cubic-bezier(.34, 1.56, .64, 1) both; }
.vpet-occasion--month { background: linear-gradient(90deg, #eef2ff, #fdf4ff); color: #5b21b6; }

.vpet-bond { display: grid; gap: 8px; width: min(100%, 480px); margin: 6px auto 4px; padding: 12px 14px; border-radius: 18px; background: #fff7fa; border: 1px solid #fbcfe8; text-align: left; }
.vpet-bond__row { display: flex; align-items: center; gap: 10px; }
.vpet-bond__badge { flex: none; padding: 3px 10px; border-radius: 999px; background: #fce7f3; color: #9d174d; font-size: .82rem; font-weight: 800; }
.vpet-bond__bar { flex: 1; height: 10px; border-radius: 999px; background: #fde2ec; overflow: hidden; }
.vpet-bond__bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f9a8d4, #ec4899); transition: width .5s ease; }
.vpet-bond__row small { flex: none; color: #9d174d; font-weight: 700; }
.vpet-bond__max { color: #9d174d; font-weight: 700; font-size: .86rem; }
.vpet-bond__call { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9rem; }
.vpet-bond__call .input { flex: 1 1 160px; min-width: 0; }
.vpet-bond__how summary { cursor: pointer; color: #9d174d; font-size: .84rem; font-weight: 700; }
.vpet-bond__how p { margin: 6px 0; }
.vpet-bond__earn { display: grid; gap: 2px; margin: 0 0 8px; padding: 0; list-style: none; font-size: .84rem; }
.vpet-bond__earn strong { color: #be185d; }
.vpet-bond__levels { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.vpet-bond__levels li { display: grid; gap: 1px; padding: 6px 10px; border-radius: 12px; background: #fff; opacity: .65; font-size: .84rem; }
.vpet-bond__levels li.is-reached { opacity: 1; box-shadow: inset 3px 0 0 #ec4899; }
.vpet-bond--l5 { background: linear-gradient(135deg, #fffbeb, #fff1f5); border-color: #fcd34d; }
.vpet-bond--l5 .vpet-bond__badge { background: linear-gradient(90deg, #fde68a, #fbcfe8); color: #92400e; }
.vpet-reward__bond { color: #be185d !important; }
.vpet-pet__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* a bond level reached, a birthday gift */
.vpet-toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 60; width: min(92vw, 440px); padding: 12px 16px; border-radius: 18px;
    background: #fff; border: 2px solid #f9a8d4; color: #831843; font-weight: 700; text-align: center; box-shadow: 0 12px 32px rgba(0, 23, 74, .2);
    transform: translateX(-50%); animation: vpet-toast-in .5s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes vpet-toast-in { from { opacity: 0; transform: translate(-50%, 24px) scale(.9); } }

/* ---- Virtual Pet: the memory book */
.vpet-book { display: grid; gap: 16px; }
.vpet-book__cover { display: flex; align-items: center; gap: 18px; background: linear-gradient(135deg, #fff7ed, #fff1f5); }
.vpet-book__cover > div { display: grid; gap: 4px; min-width: 0; }
.vpet-book__tag { color: #c2410c; font-size: .85rem; font-weight: 800; }
.vpet-book__cover h1 { margin: 0; }
.vpet-book__cover p { margin: 0; }
.vpet-book__cover .btn { justify-self: start; }
.vpet-book__today { border: 2px dashed #f9a8d4; }
.vpet-book__today h2 { margin: 0 0 6px; font-size: 1.05rem; }
.vpet-book__today p { margin: 4px 0; }
.vpet-book__timeline { position: relative; display: grid; gap: 12px; margin: 0; padding: 0 0 0 4px; list-style: none; }
.vpet-book__timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 23px; width: 3px; border-radius: 3px; background: linear-gradient(#fdba74, #f9a8d4, #c4b5fd); }
.vpet-book__month span { position: relative; display: inline-block; margin-left: 44px; padding: 2px 12px; border-radius: 999px; background: var(--surface-2, #f1f5f9);
    color: var(--muted); font-size: .8rem; font-weight: 700; }
.vpet-book__item { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: start; }
.vpet-book__dot { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff;
    border: 2px solid #fed7aa; font-size: 20px; box-shadow: 0 2px 6px rgba(0, 23, 74, .08); }
.vpet-book__body { display: grid; gap: 4px; padding: 10px 14px; border-radius: 16px; background: var(--surface, #fff); box-shadow: var(--shadow-sm); }
.vpet-book__body small { font-size: .78rem; }
.vpet-book__photo { justify-self: start; width: min(260px, 100%); margin-top: 4px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #f8fafc; cursor: zoom-in; }
.vpet-book__photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.vpet-book__by { display: inline-flex; align-items: center; gap: 6px; justify-self: start; color: var(--muted); font-size: .8rem; }
.vpet-book__item--birthday .vpet-book__dot, .vpet-book__item--bond_level .vpet-book__dot { border-color: #f9a8d4; background: #fff1f5; }
.vpet-book__item--stage .vpet-book__dot, .vpet-book__item--level_up .vpet-book__dot { border-color: #c4b5fd; background: #f5f3ff; }
.vpet-book__item--passed .vpet-book__dot { border-color: #cbd5e1; background: #f8fafc; }
.vpet-book__item--next .vpet-book__body { background: transparent; box-shadow: none; border: 2px dashed #fed7aa; }
@media (max-width: 560px) {
    .vpet-book__cover { flex-direction: column; text-align: center; }
    .vpet-book__cover .btn { justify-self: center; }
    .vpet-book__cover .vpet-art--lg { width: 140px; height: 140px; }
}
.vpet-pet__facts { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 560px; }
.vpet-card__art { position: relative; display: block; }
.vpet-card__need { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff;
    box-shadow: var(--shadow-sm); font-size: 16px; animation: bob 2s ease-in-out infinite; }

.vpet-care { display: grid; gap: 12px; padding: 18px; }
.vpet-care h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.1rem; }
.vpet-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vpet-stat { position: relative; display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 2.2rem; align-items: center; gap: 10px; font-size: .92rem; }
.vpet-stat__label { white-space: nowrap; }
.vpet-stat strong { text-align: right; font-variant-numeric: tabular-nums; }
.vpet-stat__bar { height: 12px; border-radius: 99px; background: var(--navy-50); overflow: hidden; }
.vpet-stat__bar span { display: block; height: 100%; border-radius: 99px; transition: width .6s ease; }
.vpet-stat--good .vpet-stat__bar span { background: linear-gradient(90deg, #34c77b, #1fa463); }
.vpet-stat--ok .vpet-stat__bar span { background: linear-gradient(90deg, #ffb648, #fe8600); }
.vpet-stat--low .vpet-stat__bar span { background: linear-gradient(90deg, #ff7a7a, #e23d3d); }
.vpet-stat__delta { position: absolute; right: -4px; top: -14px; font-weight: 800; font-size: .9rem; animation: vpet-float 1.6s ease-out forwards; pointer-events: none; }
.vpet-stat__delta.is-good { color: var(--success); }
.vpet-stat__delta.is-bad { color: var(--danger); }
@keyframes vpet-float { 0% { opacity: 0; transform: translateY(8px) scale(.8); } 20% { opacity: 1; transform: translateY(0) scale(1.15); } 100% { opacity: 0; transform: translateY(-18px); } }

.vpet-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.vpet-action { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 14px 8px 12px; border: 0; border-radius: 18px;
    color: #fff; font: inherit; text-align: center; cursor: pointer; transition: transform .12s, filter .2s; box-shadow: 0 6px 14px rgba(0, 23, 74, .12); }
.vpet-action:active:not(:disabled) { transform: scale(.95); }
.vpet-action:disabled { cursor: not-allowed; filter: grayscale(.7) opacity(.6); box-shadow: none; }
.vpet-action--feed { background: linear-gradient(150deg, #ff7a8a, #f0436a); }
.vpet-action--water { background: linear-gradient(150deg, #5cb8ff, #2f7fe6); }
.vpet-action--snack { background: linear-gradient(150deg, #ffc35a, #f59e0b); }
.vpet-action--play { background: linear-gradient(150deg, #a98bff, #7c4dff); }
.vpet-action__emoji { font-size: 30px; line-height: 1; }
.vpet-action strong { font-size: .95rem; }
.vpet-action small { font-size: .7rem; opacity: .95; line-height: 1.3; }
.vpet-action__left { position: absolute; top: 6px; right: 8px; font-size: .62rem; font-weight: 700; opacity: .9; }
.vpet-log { list-style: none; margin: 0; padding: 0; display: grid; }
.vpet-log li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.vpet-log li:last-child { border-bottom: 0; }
.vpet-log li > span:nth-child(2) { flex: 1; min-width: 0; }
.vpet-log__emoji { font-size: 20px; }
@media (max-width: 560px) {
    .vpet-pet__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vpet-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .vpet-action { padding: 10px 4px 8px; border-radius: 14px; gap: 2px; }
    .vpet-action__emoji { font-size: 24px; }
    .vpet-action strong { font-size: .74rem; line-height: 1.25; }
    .vpet-action small { font-size: .6rem; }
    .vpet-action__effect { display: none; }
    .vpet-action__left { top: 3px; right: 5px; font-size: .55rem; }
    .vpet-stat { grid-template-columns: 7.2rem minmax(0, 1fr) 2rem; gap: 8px; font-size: .86rem; }
    .vpet-bubble { font-size: .86rem; margin-top: 12px; }
    .vpet-bubble__emoji { width: 30px; height: 30px; font-size: 18px; }
}

/* admin: care values */
.vpet-rules { width: 100%; border-collapse: collapse; font-size: .85rem; }
.vpet-rules th, .vpet-rules td { padding: 6px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.vpet-rules th:first-child, .vpet-rules td:first-child { text-align: left; }
.vpet-rules .input { width: 72px; padding: 6px; min-height: 0; text-align: center; }
.vpet-rules-wrap { overflow-x: auto; }
.vpet-shape-pick { margin-bottom: 4px; }
.vpet-stage-image__fallback { color: var(--muted); font-size: .7rem; }
.admin-page > * { min-width: 0; }

/* ---- Virtual Pet: shop, items, caretakers, strays */
.vpet-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.vpet-link { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink);
    font-weight: 600; font-size: .85rem; text-align: center; text-decoration: none; transition: transform .12s, box-shadow .15s; }
.vpet-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); color: var(--ink); }
.vpet-link span { font-size: 26px; line-height: 1; }
.vpet-stage--stray { background: #ecfdf3; color: #15803d; }

.vpet-cats { margin: 4px 0 14px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.vpet-cats::-webkit-scrollbar { display: none; }
.vpet-cats .filter-chip small { opacity: .7; font-weight: 600; }
.vpet-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.vpet-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 14px; align-items: start; }
.vpet-item__body { display: grid; gap: 3px; min-width: 0; }
.vpet-item__body strong { font-family: var(--font-display); }
.vpet-item__effect { color: var(--orange-800); font-size: .85rem; font-weight: 600; }
.vpet-item__buy { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.vpet-item-art { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; width: 58px; height: 58px; border-radius: 16px;
    background: linear-gradient(145deg, #fff7ed, #ffe9d2); font-size: 32px; overflow: visible; }
.vpet-item-art img { width: 100%; height: 100%; object-fit: contain; border-radius: 16px; }
.vpet-item-art__qty { position: absolute; right: -6px; bottom: -6px; padding: 0 6px; border-radius: 99px; background: var(--navy-800); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; }
.vpet-buy-item { display: flex; gap: 12px; align-items: center; padding-right: 40px; }
.vpet-buy-item h2 { margin: 0; }
.vpet-buy-item p { margin: 2px 0 0; }
.vpet-qty { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vpet-qty strong { min-width: 2ch; text-align: center; font-size: 1.2rem; }

.vpet-use { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.vpet-use__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.vpet-use__head h3 { margin: 0; font-size: 1rem; }
.vpet-use__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.vpet-use__item { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 16px; background: #fff;
    font: inherit; color: var(--ink); cursor: pointer; text-align: center; transition: transform .12s; }
.vpet-use__item:active:not(:disabled) { transform: scale(.95); }
.vpet-use__item:disabled { opacity: .55; cursor: not-allowed; }
.vpet-use__item strong { font-size: .8rem; line-height: 1.2; }
.vpet-use__item small { font-size: .68rem; color: var(--muted); line-height: 1.2; }
.vpet-use__item .vpet-item-art { width: 46px; height: 46px; font-size: 26px; }

.vpet-people { display: grid; gap: 10px; padding: 18px; }
.vpet-people h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.1rem; }
.vpet-people p { margin: 0; }
.vpet-people--stray { background: linear-gradient(135deg, #ecfdf3, #fff); }
.vpet-caretaker { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; }
.vpet-caretaker.is-request { border-color: #ffc58a; background: var(--orange-50); }
.vpet-caretaker__head { display: flex; align-items: center; gap: 10px; }
.vpet-caretaker__head > span { display: grid; flex: 1; min-width: 0; }
.vpet-caretaker__head q { font-size: .85rem; color: var(--text); overflow-wrap: anywhere; }
.vpet-caretaker__actions { display: flex; justify-content: flex-end; gap: 6px; }
.vpet-perms { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.vpet-perms .check { font-size: .88rem; }
.vpet-add-caretaker { display: flex; gap: 6px; }
.vpet-add-caretaker .input { flex: 1; min-width: 0; }
.vpet-people__more { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }

.vpet-stray-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vpet-stray-stats > div { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border-radius: 18px; background: #fff; border: 1px solid var(--line); text-align: center; }
.vpet-stray-stats strong { font-family: var(--font-display); font-size: 1.6rem; color: #15803d; line-height: 1.1; }
.vpet-stray-stats span { color: var(--muted); font-size: .8rem; }

.vpet-admin-cat { margin: 14px 0 6px; font-size: 1rem; }
.vpet-admin-box.is-off { opacity: .6; }
.vpet-effect-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.vpet-effect-inputs label { display: grid; gap: 4px; font-size: .82rem; font-weight: 600; }
.vpet-effect-inputs .input { padding: 6px 8px; min-height: 0; }
@media (max-width: 560px) {
    .vpet-links { gap: 6px; }
    .vpet-link { padding: 10px 4px; font-size: .74rem; }
    .vpet-link span { font-size: 22px; }
    .vpet-stray-stats { gap: 6px; }
    .vpet-stray-stats strong { font-size: 1.3rem; }
}

/* ---- picture cropper (admin art uploads) */
.crop { gap: 12px; }
.crop__frame { position: relative; margin-inline: auto; overflow: hidden; border-radius: 16px; touch-action: none; cursor: grab;
    background: repeating-conic-gradient(#eef1f6 0 25%, #fff 0 50%) 0 0 / 20px 20px; user-select: none; -webkit-user-select: none; }
.crop__frame:active { cursor: grabbing; }
.crop__img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop__grid { position: absolute; inset: 0; z-index: 1; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9), inset 0 0 0 3px rgba(0, 23, 74, .35);
    background: linear-gradient(to right, transparent 33.2%, rgba(255,255,255,.55) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255,255,255,.55) 66.6%, transparent 66.8%),
                linear-gradient(to bottom, transparent 33.2%, rgba(255,255,255,.55) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255,255,255,.55) 66.6%, transparent 66.8%); }
.crop__zoom { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.crop__zoom input { flex: 1; accent-color: var(--orange-500); }
.vpet-pet__zoom { display: grid; justify-items: center; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }

/* Virtual Pet: coins and items that come with every gift box */
.vpet-item-art--xs { width: 26px; height: 26px; border-radius: 8px; font-size: 16px; }
.vpet-item-art--xs img { border-radius: 8px; }
.vpet-box__extras { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vpet-box__extras > small { width: 100%; font-weight: 600; }
.vpet-box__extra { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 99px; background: var(--orange-50); font-size: .85rem; font-weight: 600; }
.vpet-weight > span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vpet-weights-tools { display: flex; gap: 14px; margin-bottom: 6px; font-size: .85rem; }
.vpet-open__loot { width: min(380px, 100%); padding: 16px 18px; margin-top: 8px; text-align: left; }
.vpet-open__loot h2 { margin: 0 0 10px; font-size: 1rem; }
.vpet-open__loot ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.vpet-open__loot li { display: flex; align-items: center; gap: 12px; animation: rise .5s ease-out both; }
.vpet-open__loot li:nth-child(2) { animation-delay: .1s; }
.vpet-open__loot li:nth-child(3) { animation-delay: .2s; }
.vpet-open__loot li:nth-child(n + 4) { animation-delay: .3s; }
.vpet-open__loot li > span:last-child { display: grid; }
.vpet-open__loot .vpet-item-art { width: 44px; height: 44px; font-size: 24px; border-radius: 12px; }
.vpet-open__done { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }

/* Shop: colours / sizes */
.product-card__choices { color: var(--muted); font-size: .78rem; }
.cart-line__variant { color: var(--orange-800); font-size: .8rem; font-weight: 600; }
.product-options { display: grid; gap: 12px; }
.product-options__group { display: grid; gap: 6px; }
.product-options__label { color: var(--muted); font-size: .9rem; }
.product-options__label strong { margin-left: 4px; color: var(--ink); }
.product-options__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.option-chip { min-width: 48px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); font: inherit; font-size: .92rem; font-weight: 500; cursor: pointer; transition: border-color .2s, background-color .2s, color .2s; }
.option-chip:hover { border-color: var(--orange-300, #ffc58a); }
.option-chip.is-selected { border-color: var(--orange-600, #fe8600); background: var(--orange-50); color: var(--orange-800); font-weight: 700; }
.option-chip.is-out { color: var(--muted); border-style: dashed; text-decoration: line-through; }
.option-chip.is-out.is-selected { text-decoration: line-through; }

.variants-editor { display: grid; gap: 14px; }
.variants-editor__axes { display: grid; gap: 4px; }
.variants-editor__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.variants-editor__chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 12px; border-radius: 999px; background: var(--orange-50); color: var(--orange-800); font-weight: 600; }
.variants-editor__chip button { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.variants-editor__chip button:hover { background: #ffe0bd; }
.variants-editor__add { display: inline-flex; gap: 6px; min-width: 0; }
.variants-editor__add .input { width: 140px; min-width: 0; }
.variants-editor__photos { display: grid; gap: 8px; }
.variants-editor__photo-row { display: grid; grid-template-columns: minmax(60px, auto) minmax(0, 1fr); align-items: center; gap: 10px; }
.variants-editor__photo-row > div { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.variants-editor__thumb { flex-shrink: 0; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; overflow: hidden; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-size: .75rem; color: var(--muted); }
.variants-editor__thumb img { width: 100%; height: 100%; object-fit: cover; }
.variants-editor__thumb.is-selected { border-color: var(--orange-600, #fe8600); box-shadow: 0 0 0 2px var(--orange-100, #ffe0bd); }
.variants-editor__bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9rem; }
.variants-editor__bulk .input { width: 96px; }
.variants-editor__table { display: grid; gap: 6px; }
.variants-editor__row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 8px; }
.variants-editor__row--head { color: var(--muted); font-size: .8rem; font-weight: 600; }
.variants-editor__row .input { min-width: 0; padding: 8px 10px; }
.variants-editor__row.is-off .variants-editor__name span { color: var(--muted); text-decoration: line-through; }
.variants-editor__name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.variants-editor__name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.variants-editor__name input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--orange-600, #fe8600); }

/* Chat: a JUMBO page passed on, as a card */
.chat-bubble--share { padding: 6px; }
.chat-share { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; min-width: min(240px, 60vw); max-width: 320px; padding: 8px; border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line); }
.chat-share:hover { box-shadow: 0 0 0 2px var(--orange-300, #ffc58a); }
.chat-share__image { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--orange-50); }
.chat-share__body { display: grid; gap: 2px; min-width: 0; }
.chat-share__body strong { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.chat-share__kind { display: inline-flex; align-items: center; gap: 4px; color: var(--orange-700); font-size: .75rem; font-weight: 700; }
.chat-share__text { overflow: hidden; color: var(--muted); font-size: .82rem; white-space: nowrap; text-overflow: ellipsis; }
.chat-bubble--share .chat-text { display: block; padding: 6px 6px 2px; }
.chat-share:only-child { grid-column: 1 / -1; }
.chat-share:not(:has(.chat-share__image)) { grid-template-columns: minmax(0, 1fr); }

/* Share sheet › send in chat */
.share-feed-option--chat .share-feed-option__icon { background: var(--navy-800, #0f2a5c); color: #fff; }
.share-chat { display: grid; gap: 12px; }
.share-chat__back { justify-self: start; }
.chat-share--preview { max-width: none; }
.share-chat__search { position: relative; display: flex; align-items: center; }
.share-chat__search .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.share-chat__search .input { padding-left: 40px; }
.share-chat__picked { display: flex; flex-wrap: wrap; gap: 6px; }
.share-chat__chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--orange-50); color: var(--orange-800); font-size: .88rem; font-weight: 600; }
.share-chat__chip button { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.share-chat__list { display: grid; gap: 2px; max-height: min(320px, 40vh); overflow-y: auto; }
.share-chat__heading { color: var(--muted); font-weight: 600; padding: 2px 4px; }
.share-chat__person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.share-chat__person:hover { background: var(--surface-2, #f6f7fb); }
.share-chat__person > span:nth-child(2) { display: grid; min-width: 0; }
.share-chat__person strong, .share-chat__person small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.share-chat__tick { display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 50%; color: #fff; }
.share-chat__person.is-selected { background: var(--orange-50); }
.share-chat__person.is-selected .share-chat__tick { border-color: var(--orange-600, #fe8600); background: var(--orange-600, #fe8600); }
.share-chat__done { display: grid; gap: 8px; }
.share-chat__done > p:first-child { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--success, #1f9d55); font-weight: 600; }
.page-head__share { margin-top: 10px; }

/* Virtual Pet: more care, rewards, routine, missions, levels and member tiers */
.vpet-action--walk { background: linear-gradient(150deg, #4fd18b, #16a34a); }
.vpet-action--health { background: linear-gradient(150deg, #ff8fb1, #e0457b); }
.vpet-action--bath { background: linear-gradient(150deg, #5fd6e8, #0ea5c6); }
.vpet-action--rest { background: linear-gradient(150deg, #8b9cff, #5b5fe0); }
.vpet-action__earn { display: inline-block; margin-top: 2px; padding: 1px 7px; border-radius: 99px; background: rgba(255, 255, 255, .22); font-size: .64rem; font-weight: 700; }
@media (max-width: 560px) { .vpet-action__earn { padding: 0 4px; font-size: .56rem; } }

.vpet-reward { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, #fff7e6, #fff1d6); border: 1px solid #ffd79a; animation: rise .4s ease-out; }
.vpet-reward__burst { font-size: 26px; line-height: 1; }
.vpet-reward > span:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.vpet-reward strong { display: inline-flex; align-items: center; gap: 4px; color: var(--orange-800); }
.vpet-reward__xp { color: #6d28d9 !important; }
.vpet-reward__level { width: 100%; color: #b45309 !important; }
.vpet-reward small { width: 100%; color: var(--ink); }

.vpet-routine { margin-top: 14px; }
.vpet-routine h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .95rem; }
.vpet-routine ol { display: flex; gap: 6px; margin: 0; padding: 0 0 4px; list-style: none; overflow-x: auto; }
.vpet-routine li { flex: 1 0 64px; display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: var(--surface-2, #f6f7fb); text-align: center; }
.vpet-routine li.is-done { background: #e9f9ef; }
.vpet-routine__emoji { position: relative; font-size: 22px; line-height: 1; }
.vpet-routine__tick { position: absolute; right: -8px; bottom: -4px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--success, #1f9d55); color: #fff; }
.vpet-routine time { font-weight: 700; font-size: .82rem; }
.vpet-routine small { color: var(--muted); font-size: .68rem; white-space: nowrap; }

.vpet-missions { display: grid; gap: 10px; }
.vpet-missions__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vpet-missions__head h2 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 1.05rem; }
.vpet-missions__list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.vpet-missions__list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2, #f6f7fb); }
.vpet-missions__list li.is-done { background: #e9f9ef; }
.vpet-missions__check { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; font-size: 15px; }
.vpet-missions__list li.is-done .vpet-missions__check { background: var(--success, #1f9d55); color: #fff; }
.vpet-missions__title { min-width: 0; font-weight: 600; font-size: .9rem; }
.vpet-missions__count { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.vpet-missions__coins { font-size: .82rem; }
.vpet-missions__bonus { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(60px, 120px) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, #fff2f7, #ffe8f1); }
.vpet-missions__bonus.is-done { background: linear-gradient(135deg, #eafbf0, #dcf7e6); }
.vpet-missions__bonus > span:nth-child(2) { display: grid; min-width: 0; }
.vpet-missions__bonus small { color: var(--muted); }
.vpet-missions__progress, .vpet-level__bar { position: relative; display: block; height: 8px; border-radius: 99px; background: #eceef5; overflow: hidden; }
.vpet-missions__progress > span, .vpet-level__bar > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #ffb347, #fe8600); transition: width .4s; }
.vpet-missions__foot { margin: 0; }
@media (max-width: 560px) {
    .vpet-missions__bonus { grid-template-columns: auto minmax(0, 1fr) auto; }
    .vpet-missions__bonus .vpet-missions__progress { grid-column: 1 / -1; grid-row: 2; }
}

.vpet-tier { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: .8rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.vpet-tier--bronze { background: #f6e3d3; color: #8a4b1c; }
.vpet-tier--silver { background: #eceff4; color: #475569; }
.vpet-tier--gold { background: #fff2c6; color: #92650a; }
.vpet-tier--platinum { background: #ede7ff; color: #5b3fd1; }
.vpet-tier--lg { padding: 6px 14px; font-size: 1rem; }
.vpet-tiers { display: grid; gap: 12px; margin-bottom: 16px; }
.vpet-tiers__now { display: flex; align-items: center; gap: 12px; }
.vpet-tiers__now > div { display: grid; }
.vpet-tiers__now small { color: var(--muted); }
.vpet-tiers__progress { display: grid; gap: 4px; }
.vpet-tiers__progress small { color: var(--muted); }
.vpet-tiers__all { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.vpet-tiers__all li { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.vpet-tiers__all li.is-current { border-color: var(--orange-600, #fe8600); background: var(--orange-50); }
.vpet-tiers__all small { color: var(--muted); font-size: .76rem; }

.vpet-lv { display: inline-flex; width: fit-content; padding: 1px 8px; border-radius: 99px; background: #ede7ff; color: #5b3fd1; font-size: .72rem; font-weight: 700; }
.vpet-lv--lg { padding: 3px 12px; font-size: .9rem; }
.vpet-level { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: min(380px, 100%); }
.vpet-level small { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.vpet-level .vpet-level__bar > span { background: linear-gradient(90deg, #a98bff, #7c4dff); }

.vpet-item__price { display: inline-flex; align-items: center; gap: 6px; }
.vpet-item__price s { font-size: .8rem; }
.vpet-discount { margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: #e9f9ef; color: var(--success, #1f9d55); font-size: .72rem; font-weight: 700; }
.vpet-rules__time { min-width: 100px; }
.vpet-rules--missions td:first-child .input { min-width: 180px; }
.vpet-rules--tiers td:first-child { display: flex; align-items: center; gap: 6px; }
.variants-editor__name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 6px; }
.variants-editor__name-row .field__label { margin: 0; }
.variants-editor__name-row .input { width: 140px; padding: 6px 10px; }

/* Phase 2: standards page */
.page-head__link { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.standards { display: grid; gap: 16px; padding-top: 20px; padding-bottom: 60px; }
.standards > * { min-width: 0; }
.standards__toc ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 6px 24px; margin: 8px 0 0; padding-left: 20px; }
.standards__section h2 { margin: 0 0 10px; font-size: 1.15rem; }
.standards__section { scroll-margin-top: calc(var(--header-h, 72px) + 12px); }
.standards__list { display: grid; gap: 8px; margin: 0; padding-left: 22px; line-height: 1.65; }
.standards__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Satisfaction ratings */
.rate-prompt { display: grid; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, #f6f7fb); }
.rate-prompt--ask { background: #fff8e8; border: 1px solid #ffe2a6; }
.rate-prompt__label { font-weight: 600; font-size: .9rem; }
.rate-prompt__given { display: grid; gap: 2px; }
.rate-prompt__given q { color: var(--muted); font-size: .88rem; }
.rate-prompt__stars { display: flex; align-items: center; gap: 2px; }
.rate-prompt__star { padding: 0 2px; border: 0; background: none; color: #d6d9e3; font-size: 30px; line-height: 1; cursor: pointer; transition: transform .1s, color .15s; }
.rate-prompt__star.is-on { color: #f5a623; }
.rate-prompt__star:hover { transform: scale(1.12); }
.rate-prompt__stars small { margin-left: 8px; }
.rate-prompt__actions { display: flex; justify-content: flex-end; gap: 8px; }
.rate-prompt__thanks { color: var(--success, #1f9d55); font-weight: 600; }
.stars { color: #f5a623; letter-spacing: 1px; }
.tag--good { background: #e9f9ef; color: #157a42; text-decoration: none; }
.satisfaction { display: grid; gap: 12px; margin-bottom: 16px; }
.satisfaction__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.satisfaction__head .card__title { margin: 0 0 4px; }
.satisfaction__score { display: grid; justify-items: center; gap: 2px; }
.satisfaction__score strong { font-family: var(--font-display); font-size: 1.8rem; line-height: 1; }
.satisfaction__sub { margin: 4px 0 0; font-size: .95rem; }
.satisfaction__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.satisfaction__list li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, #f6f7fb); }
.satisfaction__what { font-weight: 600; font-size: .88rem; }
.satisfaction__list q { font-size: .9rem; }

/* Awareness: post topics, creator spotlight */
.post-topic { display: inline-flex; width: fit-content; margin-bottom: 6px; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; text-decoration: none; }
.post-topic--knowledge { background: #e7f0ff; color: #1d4ed8; }
.post-topic--awareness { background: #ffeef2; color: #be123c; }
.post-card__edit-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.post-card__edit-opts .input { width: fit-content; }
.community__note { margin: 0 0 10px; }
.creator-spotlight { margin-bottom: 14px; }
.creator-spotlight__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.creator-spotlight__head h2 { margin: 0; font-size: 1.05rem; }
.creator-spotlight__row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.creator-card { position: relative; flex: 0 0 150px; display: grid; justify-items: center; gap: 4px; padding: 0 10px 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: inherit; text-align: center; text-decoration: none; scroll-snap-align: start; }
.creator-card.is-featured { border-color: #ffd27a; box-shadow: 0 6px 16px rgba(245, 166, 35, .18); }
.creator-card__cover { display: block; width: calc(100% + 20px); height: 54px; margin-bottom: -26px; background: linear-gradient(135deg, #ffe7c8, #ffd0e0) center / cover; }
.creator-card .avatar, .creator-card img { box-shadow: 0 0 0 3px #fff; }
.creator-card strong { font-size: .88rem; line-height: 1.3; }
.creator-card small { font-size: .74rem; }
.creator-card__pick { font-size: .68rem; font-weight: 700; color: #b45309; }

/* ---- PDPA cookie notice (above the mobile tab bar) and the cookie policy */
.cookie-bar { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 28px); z-index: 70; width: min(760px, calc(100vw - 24px));
    transform: translateX(-50%); animation: cookie-in .35s ease-out both; }
.auth .cookie-bar { bottom: calc(env(safe-area-inset-bottom) + 12px); }
.cookie-bar__inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; align-items: start; padding: 16px 18px; border-radius: 20px;
    background: #fff; border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0, 23, 74, .18); }
.cookie-bar__icon { font-size: 30px; line-height: 1; }
.cookie-bar__text strong { display: block; color: var(--navy-800); }
.cookie-bar__text p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.cookie-bar__text a { color: var(--orange-600, #ea580c); font-weight: 700; }
.cookie-bar__kinds, .cookie-bar__actions { grid-column: 1 / -1; }
.cookie-bar__kinds { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cookie-kind { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--surface-2, #f6f7fb); cursor: pointer; }
.cookie-kind input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--orange-500); }
.cookie-kind span { display: grid; gap: 2px; min-width: 0; }
.cookie-kind small { color: var(--muted); font-size: .8rem; }
.cookie-bar__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
@keyframes cookie-in { from { opacity: 0; transform: translate(-50%, 16px); } }
@media (max-width: 560px) {
    .cookie-bar__inner { padding: 14px; }
    .cookie-bar__actions .btn { flex: 1 1 auto; }
}
.footer__link-btn { padding: 0; border: 0; background: none; color: rgba(255, 255, 255, .72); font: inherit; font-weight: 400; text-align: left; cursor: pointer; }
.footer__link-btn:hover { color: var(--orange-500); }
.cookie-policy { margin-top: 20px; scroll-margin-top: 90px; }
.cookie-policy h2 { margin-top: 0; }
.cookie-policy .table-wrap { overflow-x: auto; }
.cookie-policy__table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .9rem; }
.cookie-policy__table th, .cookie-policy__table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cookie-policy__table th { background: var(--surface-2, #f6f7fb); font-size: .82rem; }
.cookie-policy__table code { font-size: .78rem; color: var(--muted); }

/* ---- Admin › gift boxes: giveaways to everyone over a period */
.vpet-giveaways { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.vpet-giveaway { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2, #f6f7fb); font-size: .84rem; }
.vpet-giveaway .btn { margin-left: auto; }
.vpet-giveaway__state { font-size: .72rem; }
.vpet-giveaway--live { background: #ecfdf5; }
.vpet-giveaway--live .vpet-giveaway__state { background: #d1fae5; color: #065f46; }
.vpet-giveaway--scheduled .vpet-giveaway__state { background: #e0f2fe; color: #075985; }
.vpet-giveaway--ended, .vpet-giveaway--cancelled { opacity: .7; }

/* ---- Admin › settings: where uploads are kept (disk / S3) */
.storage-card .segmented { margin: 4px 0 12px; }
.storage-s3 { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.storage-s3 legend { padding: 0 6px; }
.storage-s3.is-dimmed { opacity: .75; }
.storage-move { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.storage-move h3 { margin: 0; font-size: 1rem; }
.storage-move p { margin: 0; }
.storage-move__status { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, #f6f7fb); }
.storage-move .btn { justify-self: start; }
.storage-now code, .storage-now .muted { margin-left: 4px; word-break: break-all; }
.footer__version { opacity: .6; font-size: .78rem; font-variant-numeric: tabular-nums; }

/* ---- Legal pages (/terms, /privacy), consent prompt, my data */
/* minmax(0, 1fr): the wide tables scroll inside .table-wrap instead of widening the page on phones */
.legal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.legal__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .88rem; }
/* /data-deletion: the same steps in Thai and English, one after the other. */
.data-deletion__lang + .data-deletion__lang { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.data-deletion__lang .btn { text-decoration: none; }
.legal__toc { padding: 16px 20px; border-radius: var(--radius-lg); background: var(--surface-2, #f6f7fb); }
.legal__toc h2 { margin: 0 0 8px; font-size: 1rem; }
.legal__toc ol { margin: 0; padding-left: 22px; columns: 2 220px; column-gap: 24px; font-size: .9rem; }
.legal__toc li { margin-bottom: 4px; break-inside: avoid; }
.legal section { scroll-margin-top: 90px; }
.legal h2 { margin: 8px 0 8px; font-size: 1.2rem; }
.legal h3 { margin: 12px 0 6px; font-size: 1rem; }
.legal p, .legal li { line-height: 1.75; }
.legal ul, .legal ol { padding-left: 22px; }
.legal .table-wrap { overflow-x: auto; }
.legal table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .9rem; }
.legal th, .legal td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal th { background: var(--surface-2, #f6f7fb); font-size: .82rem; }
.legal__note { padding: 12px 16px; border-left: 4px solid var(--orange-500); border-radius: 8px; background: #fff7ed; }
.consent-prompt .check { font-size: .9rem; }
.consent-prompt .sheet__actions { flex-wrap: wrap; }
.my-data__list { margin: 0; padding-left: 20px; color: var(--text); font-size: .9rem; line-height: 1.7; }

/* ---------- Calls (voice / video) ---------- */
.call-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.call-buttons .btn { gap: 6px; }
.call-buttons--block { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-top: 10px; }
.call-buttons__error { margin-top: 6px; }
.chat-head__calls { flex-wrap: nowrap; gap: 2px; margin-left: auto; }
.chat-head__calls + .chat-head__menu { margin-left: 0; }
.volunteer__calls { margin-top: 8px; }
.volunteer__calls .btn--icon { width: 40px; height: 40px; border: 1.5px solid var(--line); border-radius: 50%; }
.case-form__calls-title { margin: 18px 0 8px; }
.case-form__calls-title ~ .toggle + .toggle { margin-top: 8px; }
.privacy__subtitle { display: flex; align-items: center; gap: 8px; margin: 24px 0 4px; font-size: 1rem; color: var(--ink); }

.chat-call { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.chat-call--missed, .chat-call--cancelled, .chat-call--declined { color: var(--danger); }
.chat-msg--mine .chat-call--missed, .chat-msg--mine .chat-call--cancelled, .chat-msg--mine .chat-call--declined { color: inherit; }

.call { position: fixed; inset: 0; z-index: 1200; display: grid; grid-template-rows: 1fr auto; overflow: hidden; color: #fff;
    background: radial-gradient(120% 80% at 50% 0%, var(--navy-600) 0%, var(--navy-900) 55%, var(--navy-950) 100%);
    padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); animation: call-in .2s ease-out; }
@keyframes call-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.call__remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; opacity: 0; transition: opacity .3s; }
.call--video.is-talking .call__remote { opacity: 1; }
.call__audio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.call__local { position: absolute; right: 16px; top: max(16px, env(safe-area-inset-top)); z-index: 2; width: min(28vw, 160px); aspect-ratio: 3 / 4; object-fit: cover;
    border-radius: 16px; background: var(--navy-900); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transform: scaleX(-1); }
.call__local.is-off { opacity: .25; }
.call__info { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.call--video.is-talking .call__info { justify-content: flex-start; align-items: flex-start; text-align: left; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.call__avatar { margin-bottom: 14px; border-radius: 50%; }
.call__avatar.is-ringing { animation: call-pulse 1.6s ease-out infinite; }
@keyframes call-pulse { 0% { box-shadow: 0 0 0 0 rgba(254, 134, 0, .55); } 100% { box-shadow: 0 0 0 26px rgba(254, 134, 0, 0); } }
.call__name { margin: 0; font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: #fff; }
.call__status { margin: 0; font-size: 1rem; color: var(--navy-200); font-variant-numeric: tabular-nums; }
.call__case { display: inline-flex; align-items: center; gap: 6px; max-width: 32ch; margin: 8px 0 0; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: .85rem; color: #fff; }
.call__controls { position: relative; z-index: 1; display: flex; justify-content: center; flex-wrap: wrap; gap: 18px 22px; padding-top: 24px; }
.call__btn { display: grid; justify-items: center; gap: 8px; min-width: 72px; border: 0; background: none; color: #fff; font: inherit; font-size: .8rem; cursor: pointer; }
.call__btn > span { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); transition: background .15s, transform .1s; }
.call__btn:hover > span { background: rgba(255, 255, 255, .26); }
.call__btn:active > span { transform: scale(.94); }
.call__btn:focus-visible { outline: none; }
.call__btn:focus-visible > span { box-shadow: var(--ring); }
.call__btn.is-on > span { background: #fff; color: var(--navy-900); }
.call__btn--accept > span { width: 68px; height: 68px; background: var(--success); }
.call__btn--accept:hover > span { background: #0f7a3a; }
.call__btn--end > span { width: 68px; height: 68px; background: var(--danger); }
.call__btn--end:hover > span { background: #a82222; }
@media (prefers-reduced-motion: reduce) { .call, .call__avatar.is-ringing { animation: none; } }
@media (min-width: 900px) {
    .call__local { width: 220px; }
    .call__controls { gap: 18px 32px; }
}

/* ---------- Admin: possible duplicate cases ---------- */
.dup-list { display: grid; gap: 14px; }
.dup { display: grid; gap: 14px; padding: 16px; }
.dup__head { display: flex; align-items: center; gap: 12px; }
.dup__score { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--navy-100); color: var(--navy-800); font-weight: 700; font-variant-numeric: tabular-nums; }
.dup__score.is-mid { background: var(--orange-100); color: var(--orange-800); }
.dup__score.is-high { background: var(--danger-bg); color: var(--danger); }
.dup__signals { display: flex; flex-wrap: wrap; gap: 6px; }
.dup__signals .pill { display: inline-flex; align-items: center; gap: 4px; }
.dup__cases { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dup__case { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.dup__label { position: absolute; top: -9px; left: 12px; padding: 0 8px; border-radius: 999px; background: var(--navy-800); color: #fff; font-size: .72rem; }
.dup__cover { display: grid; place-items: center; width: 96px; height: 96px; overflow: hidden; border-radius: 12px; background: var(--navy-50); color: var(--navy-600); }
.dup__cover img { width: 100%; height: 100%; object-fit: cover; }
.dup__body { display: grid; align-content: start; gap: 3px; min-width: 0; }
.dup__body strong { overflow-wrap: anywhere; }
.dup__states { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.dup__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dup__actions .input { flex: 1 1 220px; }
.dup__decided { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
@media (max-width: 760px) {
    .dup__cases { grid-template-columns: 1fr; gap: 18px; }
    .dup__case { grid-template-columns: 72px minmax(0, 1fr); }
    .dup__cover { width: 72px; height: 72px; }
}

/* ---------- "สัตว์": near me + map with round photo pins ---------- */
.animals-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.animals-modes .segmented { padding: 3px; }
.animals-modes .segmented__option { padding: 6px 12px; font-size: .88rem; }
.animals-near { display: inline-flex; align-items: center; gap: 6px; }
.animals-near.active { border-color: #2563eb; background: #2563eb; color: #fff; }
.animals-near-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: .9rem; }
.animals-near-bar .input { width: auto; height: 34px; padding-block: 0; border-radius: 99px; }
.animals-map { position: relative; }
.animals-map .browse-map { height: min(72vh, 680px); }
.animals-map__photo { display: grid; place-items: center; flex: none; width: 52px; height: 52px; overflow: hidden; border-radius: 50%; border: 3px solid var(--orange-500); background: var(--orange-50); font-size: 1.6rem; }
.animals-map__photo img { width: 100%; height: 100%; object-fit: cover; }
.animals-map__photo.is-lost { border-color: var(--danger); }
.animals-map__lost { margin-left: 4px; background: var(--danger); color: #fff; font-size: .72rem; }
.animals-map__note { position: absolute; top: 12px; left: 50%; z-index: 500; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px; border-radius: 99px; background: #fff; box-shadow: var(--shadow); font-size: .85rem; transform: translateX(-50%); white-space: nowrap; }
.animals-map__hint { margin: 10px 0 0; }
.animal-card__distance { margin-right: 6px; color: #2563eb; }

.photo-pin { border-radius: 50%; }
.photo-pin img, .photo-pin span { display: grid; place-items: center; box-sizing: border-box; width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--orange-500);
    background: var(--orange-50); box-shadow: 0 3px 10px rgba(0, 23, 74, .35); object-fit: cover; font-size: 1.4rem; transition: transform .12s; }
.photo-pin:hover img, .photo-pin:hover span, .photo-pin:focus img, .photo-pin:focus span { transform: scale(1.12); }
.photo-pin--approx img, .photo-pin--approx span { border-style: dashed; border-color: var(--navy-600); }
.photo-pin--lost img, .photo-pin--lost span { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(196, 43, 43, .3), 0 3px 10px rgba(0, 23, 74, .35); }
@media (max-width: 640px) {
    .animals-map .browse-map { height: calc(100dvh - var(--header-h) - var(--tabbar-h, 64px) - 210px); min-height: 340px; }
    .animals-map__note { white-space: normal; width: calc(100% - 24px); justify-content: center; }
}

/* ==========================================================================
   บทความ — articles
   ========================================================================== */
.articles-page { padding-top: 24px; padding-bottom: 48px; }
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.articles-page .infinite { margin-top: 12px; }
.articles-tag { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .9rem; }
.articles-tag a { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); }

.article-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.article-card__cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--orange-50), var(--navy-50)); }
.article-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.article-card__emoji { font-size: 3.4rem; }
.article-card__draft { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 99px; background: var(--navy-900); color: #fff; font-size: .75rem; font-weight: 600; }
.article-card__body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }
.article-card__cat { align-self: flex-start; }
.article-card__title { margin: 0; font-size: 1.12rem; line-height: 1.35; }
.article-card__title a { color: var(--ink); text-decoration: none; }
.article-card__title a:hover { color: var(--orange-700); }
.article-card__summary { margin: 0; color: var(--text); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-card__by { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.article-card__by > span { display: grid; min-width: 0; font-size: .85rem; }
.article-card__stats { display: flex; flex-wrap: wrap; gap: 10px; font-size: .8rem; }
.article-card__stats span { display: inline-flex; align-items: center; gap: 3px; }
.my-article { display: grid; gap: 8px; align-content: start; }

.article-cat { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; background: var(--orange-50); color: var(--orange-800); font-size: .8rem; font-weight: 600; text-decoration: none; }
.article-cat--knowledge, .article-cat--health { background: var(--info-bg); color: var(--navy-700); }
.article-cat--care_tips, .article-cat--food { background: var(--success-bg); color: var(--success); }

.article-page { max-width: 780px; padding-top: 20px; padding-bottom: 56px; }
.article-head { display: grid; gap: 12px; margin-bottom: 18px; }
.article-head .article-cat { justify-self: start; }
.article-head h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.25; }
.article-head__by { display: flex; align-items: center; gap: 10px; }
.article-head__by > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.article-head__by a { color: var(--ink); text-decoration: none; }
.article-head__tools { display: flex; flex-wrap: wrap; gap: 6px; }
.article-head__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.article-head__tags a { text-decoration: none; }
.article-cover { display: block; width: 100%; margin: 0 0 18px; padding: 0; overflow: hidden; border: 0; border-radius: var(--radius-lg); background: var(--navy-50); cursor: zoom-in; }
.article-cover img { display: block; width: 100%; max-height: 480px; object-fit: cover; }
.article-lead { margin: 0 0 16px; padding-left: 14px; border-left: 4px solid var(--orange-500); color: var(--ink); font-size: 1.12rem; font-weight: 500; }

.article-body { font-size: 1.06rem; line-height: 1.85; color: var(--text); overflow-wrap: anywhere; }
.article-body p { margin: 0 0 1em; }
.article-body h2 { margin: 1.4em 0 .5em; font-size: 1.4rem; color: var(--ink); }
.article-body h3 { margin: 1.2em 0 .4em; font-size: 1.15rem; color: var(--ink); }
.article-body ul, .article-body ol { margin: 0 0 1em; padding-left: 1.4em; }
.article-body li { margin: .2em 0; }
.article-body blockquote { margin: 1em 0; padding: 12px 16px; border-left: 4px solid var(--orange-500); border-radius: 0 var(--radius) var(--radius) 0; background: var(--orange-50); color: var(--ink); }
.article-body a { color: var(--navy-600); }
.article-body__photo { margin: 1.2em 0; }
.article-body__photo button, .article-body__gallery button { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: var(--radius); background: var(--navy-50); cursor: zoom-in; }
.article-body__photo img { display: block; width: 100%; max-height: 560px; object-fit: contain; background: var(--navy-50); }
.article-body__gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 1.2em 0; }
.article-body__gallery.is-single { grid-template-columns: 1fr; }
.article-body__gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.article-body__gallery.is-single img { aspect-ratio: auto; max-height: 520px; object-fit: contain; }

.article-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 24px 0 16px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.article-rating { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.article-rating .card__title { margin-bottom: 4px; }
.article-rating__mine { display: grid; justify-items: end; gap: 4px; }

.article-form { max-width: 860px; padding-top: 20px; padding-bottom: 56px; }
.article-form h1 { margin: 0 0 16px; }
.article-form .form-block { margin-bottom: 18px; }
.input--lg { height: 52px; font-size: 1.15rem; font-weight: 600; }
.article-editor__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.article-editor__head .segmented { padding: 3px; }
.article-editor__head .segmented__option { padding: 6px 12px; font-size: .85rem; }
.article-editor__tools { position: sticky; top: calc(var(--header-h) + 4px); z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border: 1.5px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--surface-soft); }
.article-editor__text { min-height: 420px; border-top-left-radius: 0; border-top-right-radius: 0; font-size: 1rem; line-height: 1.8; resize: vertical; }
.article-editor__photos { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: 6px; color: var(--muted); font-size: .85rem; }
.article-editor__thumb { position: relative; width: 34px; height: 34px; padding: 0; overflow: hidden; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.article-editor__thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-editor__thumb span { position: absolute; right: 1px; bottom: 1px; padding: 0 3px; border-radius: 4px; background: rgba(0, 15, 51, .75); color: #fff; font-size: .65rem; }
.article-editor__preview { min-height: 200px; padding: 16px; border: 1.5px dashed var(--line); border-radius: var(--radius); background: #fff; }
.article-editor__cover { display: block; width: 100%; max-height: 320px; margin-bottom: 14px; border-radius: var(--radius); object-fit: cover; }
.article-form__actions { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .96); }
@media (max-width: 640px) {
    .article-head__by { flex-wrap: wrap; }
    .article-head__tools { width: 100%; }
    .article-rating__mine { justify-items: start; }
    .article-form__actions { bottom: var(--tabbar-h, 64px); }
    .article-form__actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* Partner page "สัตว์" tab: a plain grid (not the swipe cards of the สัตว์ page) */
.partner-animals { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.partner-animals > .infinite { grid-column: 1 / -1; }
.partner-animals__count { margin: 0 0 10px; font-size: .85rem; }
.pet-form__partner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--orange-200, var(--line)); background: var(--orange-50); }
.pet-form__partner > span:nth-child(2) { display: grid; gap: 2px; flex: 1 1 200px; }
.pet-form__partner small { font-size: .78rem; }

/* ระบบหลังบ้าน → ประเภทพาร์ทเนอร์ */
.ptype-menus { display: flex; flex-wrap: wrap; gap: 4px; max-width: 360px; }
.ptype-menus .tag { font-size: .72rem; }
.ptype-menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 8px; }
.ptype-menu { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, background-color .15s; }
.ptype-menu input { margin-top: 3px; accent-color: var(--orange-500); }
.ptype-menu .icon { flex-shrink: 0; margin-top: 1px; color: var(--navy-800); }
.ptype-menu > span { display: grid; gap: 2px; }
.ptype-menu strong { font-size: .88rem; }
.ptype-menu small { color: var(--muted); font-size: .74rem; line-height: 1.35; }
.ptype-menu.is-on { border-color: var(--orange-500); background: var(--orange-50); }

/* Paws "ปิดเสียงคลิป": the option when posting, and the tag on a clip without sound */
.mute-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, background-color .15s; }
.mute-option input { margin-top: 4px; accent-color: var(--orange-500); }
.mute-option .icon { flex-shrink: 0; margin-top: 1px; color: var(--navy-800); }
.mute-option > span { display: grid; gap: 2px; }
.mute-option small { font-size: .78rem; line-height: 1.35; }
.mute-option.is-on { border-color: var(--orange-500); background: var(--orange-50); }
.paws-item__muted { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .45); color: #fff; font-size: .72rem; }

/* Paws: double tap = ❤️ — a big heart where the finger was, small ones flying out, the side ❤️ pops */
.paws-item__video { touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.paws-heart { position: absolute; z-index: 4; font-size: 96px; line-height: 1; pointer-events: none; transform: translate(-50%, -50%) scale(0) rotate(var(--tilt, 0deg)); filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .35)); animation: paws-heart 900ms cubic-bezier(.2, .9, .3, 1.2) forwards; }
.paws-heart--small { font-size: 24px; animation: paws-heart-fly 800ms ease-out forwards; }
@keyframes paws-heart {
    0% { transform: translate(-50%, -50%) scale(0) rotate(var(--tilt, 0deg)); opacity: 0; }
    15% { transform: translate(-50%, -50%) scale(1.25) rotate(var(--tilt, 0deg)); opacity: 1; }
    30% { transform: translate(-50%, -50%) scale(.95) rotate(var(--tilt, 0deg)); }
    45% { transform: translate(-50%, -50%) scale(1.05) rotate(var(--tilt, 0deg)); opacity: 1; }
    100% { transform: translate(-50%, -160%) scale(1.3) rotate(var(--tilt, 0deg)); opacity: 0; }
}
@keyframes paws-heart-fly {
    0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(1); opacity: 0; }
}
.paws-item__react.is-burst .react__emoji { display: inline-block; animation: paws-react-pop 600ms ease-out; }
@keyframes paws-react-pop {
    0% { transform: scale(1); }
    35% { transform: scale(1.6); }
    60% { transform: scale(.9); }
    100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .paws-heart { animation: paws-heart-fade 700ms ease-out forwards; transform: translate(-50%, -50%); }
    .paws-item__react.is-burst .react__emoji { animation: none; }
    @keyframes paws-heart-fade { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
}

/* "ติดตาม" on each animal card (top right of the photo) */
.animal-card__follow {
    position: absolute; right: 10px; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 12px 6px 10px; border: 0; border-radius: 999px; background: var(--orange-600); color: #fff;
    font-family: var(--font-display); font-size: .8rem; font-weight: 600; box-shadow: 0 4px 12px rgba(232, 106, 0, .3); cursor: pointer;
    transition: background-color .15s, color .15s, transform .15s;
}
.animal-card__follow:hover { transform: translateY(-1px); }
.animal-card__follow.is-on { background: rgba(255, 255, 255, .95); color: var(--navy-800); box-shadow: var(--shadow-sm); }
.animal-card__follow:disabled { opacity: .75; cursor: progress; }
@media (max-width: 640px) {
    .animal-card__follow { right: 12px; top: 12px; padding: 8px 14px 8px 12px; font-size: .88rem; }
}
@media (max-width: 640px) {
    /* The list of cards fills exactly what is left of the screen under the search and filters (whatever their height),
       so one card is one screen — never hidden under the tab bar. */
    .animals-page:has(> .animals-list) {
        display: flex; flex-direction: column;
        height: calc(100dvh - var(--header-h) - var(--tabbar-h) - env(safe-area-inset-bottom)); padding-bottom: 10px;
    }
    .animals-page:has(> .animals-list) > * { flex-shrink: 0; }
    .animals-page:has(> .animals-list) > .animals-list { flex: 1 1 0; min-height: 300px; }
}
@media (max-width: 640px) {
    /* One even row that scrolls sideways: "ใกล้ฉัน", the list / map switch and the chips stay side by side at chip height
       (they used to wrap and stretch the row). */
    .animals-modes { flex-wrap: nowrap; flex-shrink: 0; }
    .animals-modes .segmented { flex-wrap: nowrap; flex-shrink: 0; padding: 2px; }
    .animals-modes .segmented__option { padding: 6px 11px; white-space: nowrap; }
    .animals-chipset .filter-chip { padding-block: 6px; }
    .animals-near-bar { font-size: .85rem; }
}

/* ---- Filter chips (every page): PC shows every chip, phones swipe one row */
.filter-chip { min-height: 36px; line-height: 1.2; }
.filter-chip:not(.active):hover { background: var(--surface-2, #f6f7fb); }
@media (min-width: 641px) {
    /* A mouse can't swipe a row whose scrollbar is hidden, and the last chip used to be cut in half: wrap instead. */
    .filter-chips, .filter-chips.shop-page__cats, .filter-chips.service-section__animals, .filter-chips.animals-filters__chips {
        flex-wrap: wrap; overflow: visible; row-gap: 8px; padding-bottom: 0;
    }
}
@media (max-width: 640px) {
    /* One row that swipes: the right edge fades so it's clear there is more. */
    .filter-chips:not(.filter-chips--wrap):not(.nearby-bar__radius) {
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
        mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
        padding-right: 32px;
    }
}

/* ---- Admin › overview: storage used */
.admin-storage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 24px; align-items: start; }
.admin-storage__total { display: flex; align-items: baseline; gap: 10px; grid-column: 1 / -1; }
.admin-storage__total strong { font-size: 1.8rem; color: var(--ink); }
.admin-storage__total span { color: var(--muted); }
.admin-storage__bar { display: flex; height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-soft); grid-column: 1 / -1; }
.admin-storage__bar-image { background: var(--navy-800, #0b2a6b); }
.admin-storage__bar-video { flex: 1; background: var(--orange-500, #f97316); }
.admin-storage__dot--image { background: var(--navy-800, #0b2a6b); }
.admin-storage__dot--video { background: var(--orange-500, #f97316); }
.admin-storage__parts { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: .9rem; }
.admin-storage__parts li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.admin-storage__top h3 { margin: 0 0 6px; font-size: .9rem; }
.admin-storage__top ol { display: grid; gap: 4px; margin: 0; padding-left: 20px; font-size: .88rem; }
.admin-storage__top li span { margin-left: 6px; }
@media (max-width: 640px) { .admin-storage { grid-template-columns: minmax(0, 1fr); } }

/* ---- Share cards: "แชร์ลงสตอรี่" option and the card studio (CardStudio.razor, js/cards.js) ---- */
.share-feed-option--story { border-color: #d62976; background: linear-gradient(90deg, #fff0f6, #fff6eb); }
.share-feed-option--story:hover { background: linear-gradient(90deg, #ffe3ef, #ffeccf); }
.share-feed-option--story .share-feed-option__icon { background: linear-gradient(45deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 85%, #4f5bd5); }
.share-feed-option--story > .icon:last-child { color: #b0215f; }
.card-studio { max-width: 560px; }
.card-studio__tabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 -4px 12px; padding: 2px 4px 6px; scrollbar-width: thin; }
.card-studio__tabs .filter-chip { flex-shrink: 0; }
.card-studio__preview { display: grid; place-items: center; min-height: 260px; padding: 14px; border-radius: 20px; background: repeating-conic-gradient(var(--surface-soft) 0 25%, #fff 0 50%) 0 0 / 22px 22px; }
.card-studio__preview img { display: block; width: auto; max-width: 100%; max-height: min(58vh, 560px); height: auto; border-radius: 14px; box-shadow: 0 10px 30px rgba(14, 26, 51, .22); }
.card-studio__preview.is-wide img { max-height: none; width: 100%; }
.card-studio__preview.is-paper img { border-radius: 4px; }
.card-studio__loading { display: grid; justify-items: center; gap: 10px; color: var(--muted); }
.card-studio__hint { margin: 10px 2px 0; }
.card-studio__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.card-studio__actions .btn--primary { flex: 1 1 100%; justify-content: center; }
.card-studio__actions .btn--outline { flex: 1 1 0; justify-content: center; }
.card-studio__notice { margin-top: 10px; }
.card-studio__preview.is-editing img { max-height: min(46vh, 480px); }

/* "ปรับแต่งการ์ดวันเกิด": 10 designs, colours, headline and wish under the preview */
.bday-editor { display: grid; gap: 14px; margin-top: 14px; padding: 14px; border: 1.5px solid var(--line); border-radius: 18px; background: #fff; }
.bday-editor__group { display: grid; gap: 8px; }
.bday-editor__label { font-weight: 600; color: var(--ink); font-size: .95rem; }
.bday-editor__designs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.bday-editor__design { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); font: inherit; font-size: .78rem; line-height: 1.2; cursor: pointer; transition: border-color .2s, background-color .2s; }
.bday-editor__design:hover { border-color: var(--navy-200); }
.bday-editor__design.is-on { border-color: var(--orange-500); background: var(--orange-50, #fff4e6); font-weight: 600; }
.bday-editor__emoji { font-size: 1.35rem; line-height: 1.2; }
.bday-editor__colors { display: flex; flex-wrap: wrap; gap: 10px; }
.bday-editor__swatch { position: relative; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 3px solid #fff; background: var(--swatch, #fff); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.bday-editor__swatch.is-on { box-shadow: 0 0 0 3px var(--ink); }
.bday-editor__swatch--custom { background: var(--swatch, conic-gradient(#ff5c8a, #fe8600, #f5b800, #22c55e, #3ec1d3, #1a43a8, #8b5cf6, #ff5c8a)); }
.bday-editor__swatch--custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.bday-editor__wishes { display: flex; gap: 8px; overflow-x: auto; margin-top: -6px; padding-bottom: 4px; scrollbar-width: thin; }
.bday-editor__wishes .filter-chip { flex-shrink: 0; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.bday-editor__toggles { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.bday-editor__note { display: flex; align-items: center; gap: 6px; margin: 0; }
@media (max-width: 420px) { .bday-editor__designs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; } .bday-editor__design span:last-child { font-size: .7rem; } }
.lost-banner > .lost-banner__actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; min-width: 0; }

/* "น้องหาบ้าน" on a pet's page */
.adopt-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 16px; padding: 16px 20px; border-radius: var(--radius-lg); background: linear-gradient(120deg, #16a34a, #0f8a5f); color: #fff; box-shadow: var(--shadow); }
.adopt-banner__icon { font-size: 2rem; line-height: 1; }
.adopt-banner__text { display: grid; flex: 1; min-width: 200px; gap: 2px; }
.adopt-banner__text strong { font-family: var(--font-display); font-size: 1.1rem; }
.adopt-banner__text span { opacity: .92; font-size: .92rem; white-space: pre-line; }
.adopt-banner__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.adopt-banner .btn--ghost { color: #fff; }
.adopt-banner .btn--ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* ---- "ชวนเพื่อน" (/invite), invite link landing (/r/{code}), the sign-up banner ---- */
.invite-page { display: grid; gap: 18px; padding-block: 20px 40px; }
.invite-link h2 { margin: 0 0 12px; font-size: 1.15rem; }
.invite-link__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 8px; }
.invite-link__actions .btn { flex: 1 1 200px; justify-content: center; }
.invite-link__code { font-family: var(--font-display); letter-spacing: .06em; color: var(--navy-800); }
.invite-rewards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.invite-reward { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--navy-800), #1a43a8); color: #fff; }
.invite-reward--friend { background: linear-gradient(135deg, var(--orange-600), #ff9f2e); }
.invite-reward__who { font-size: .85rem; opacity: .85; }
.invite-reward strong { font-family: var(--font-display); font-size: 1.25rem; }
.invite-rewards__rule { grid-column: 1 / -1; margin: 0; }
.invite-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.invite-stats > div { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.invite-stats strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--navy-800); }
.invite-stats span { font-size: .8rem; color: var(--muted); text-align: center; }
.invite-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.invite-board__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.invite-board h2, .invite-friends h2 { margin: 0 0 12px; font-size: 1.1rem; }
.invite-board__list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.invite-board__list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface-soft); }
.invite-board__list li.is-top { background: var(--orange-50); }
.invite-board__rank { width: 30px; text-align: center; font-weight: 700; font-size: 1.05rem; }
.invite-board__who { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; color: var(--ink); font-weight: 600; }
.invite-board__who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite-board__list strong { font-family: var(--font-display); color: var(--orange-700); }
.invite-friends__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.invite-friends__list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.invite-friends__who { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); }
.invite-friends__who span { display: grid; min-width: 0; }
.invite-friends__who small { font-size: .78rem; }
@media (max-width: 720px) {
    .invite-columns { grid-template-columns: 1fr; }
    .invite-stats { grid-template-columns: repeat(2, 1fr); }
}
.invite-landing { padding-block: 24px 48px; display: grid; gap: 18px; }
.invite-landing__card { display: grid; justify-items: center; gap: 12px; padding: 28px 22px; text-align: center; }
.invite-landing__card h1 { margin: 0; font-size: 1.7rem; }
.invite-landing__card .btn--block { width: 100%; }
.invite-landing__who { display: flex; align-items: center; gap: 12px; text-align: left; }
.invite-landing__who span { display: grid; }
.invite-landing__who strong { font-size: 1.15rem; }
.invite-landing__gift { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--orange-50); border: 1.5px dashed var(--orange-500); text-align: left; }
.invite-landing__gift span { font-size: 2rem; }
.invite-landing__gift p { margin: 0; }
.invite-landing__more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.invite-landing__link { display: grid; justify-items: center; gap: 4px; padding: 16px 10px; border-radius: 18px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-align: center; }
.invite-landing__link span { font-size: 1.6rem; }
.invite-landing__link small { color: var(--muted); font-size: .78rem; }
@media (max-width: 560px) { .invite-landing__more { grid-template-columns: 1fr; } .invite-landing__link { grid-template-columns: auto 1fr; justify-items: start; text-align: left; } .invite-landing__link span { grid-row: span 2; } }
.invite-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 14px; border-radius: 16px; background: var(--orange-50); border: 1.5px solid var(--orange-200, #ffd3a3); }
.invite-banner p { margin: 0; font-size: .92rem; }

/* ---- "น้องหาบ้าน" (/adopt) ---- */
.adopt-head { background: linear-gradient(135deg, #0f8a5f 0%, #16a34a 55%, #4cc96f 100%); }
.adopt-head h1 { line-height: 1.2; }
.adopt-head__count { margin-top: 10px; font-size: 1.05rem; }
.adopt-head__count strong { font-family: var(--font-display); font-size: 1.6rem; color: #fff7c2; }
.adopt-page { display: grid; gap: 18px; padding-block: 20px 40px; }
.adopt-filters { display: grid; gap: 12px; }
.adopt-filters__province { display: flex; align-items: center; gap: 8px; max-width: 420px; padding-left: 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--green-700, #15803d); }
.adopt-filters__province .input { border: 0; box-shadow: none; padding-left: 4px; background: transparent; }
.adopt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.adopt-card { display: grid; grid-template-rows: auto 1fr; padding: 0; overflow: hidden; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.adopt-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg, 0 12px 30px rgba(14, 26, 51, .14)); color: var(--ink); }
.adopt-card__photo { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: linear-gradient(135deg, var(--orange-50), #e8f6ee); }
.adopt-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.adopt-card__emoji { font-size: 4rem; }
.adopt-card__where { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(15, 138, 95, .92); color: #fff; font-size: .8rem; font-weight: 600; }
.adopt-card__body { display: grid; align-content: start; gap: 4px; padding: 12px 14px 14px; }
.adopt-card__title { display: flex; align-items: center; gap: 6px; }
.adopt-card__title strong { font-family: var(--font-display); font-size: 1.15rem; }
.adopt-card__tag { justify-self: start; }
.adopt-card__note { font-size: .86rem; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adopt-card__carer { margin-top: 4px; font-size: .8rem; color: var(--muted); }
.adopt-owner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.adopt-owner > div { flex: 1; min-width: 220px; }
.adopt-owner h2 { margin: 0 0 4px; font-size: 1.15rem; }
.adopt-owner p { margin: 0; }
.kindness-me__card, .help-impact-card { margin-top: 12px; }
@media (max-width: 560px) {
    .adopt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .adopt-card__body { padding: 10px 10px 12px; }
    .adopt-card__title strong { font-size: 1.02rem; }
    .adopt-card__where { left: 6px; bottom: 6px; font-size: .72rem; padding: 3px 8px; }
}
@media (max-width: 560px) {
    .invite-reward { padding: 12px 14px; }
    .invite-reward strong { font-size: 1.05rem; }
    .invite-reward span { font-size: .82rem; }
}

/* ---- numbered pages (the "สัตว์" page on computers) ---- */
.animals-pagesize { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.animals-pagesize .input { min-height: 36px; padding: 4px 28px 4px 10px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 24px 0 8px; }
.pager__pages { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pager__btn, .pager__num { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 12px;
    border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
    transition: border-color .15s, background-color .15s, color .15s; }
.pager__btn:hover:not(:disabled), .pager__num:hover:not(:disabled) { border-color: var(--navy-200, #b9c6e4); background: var(--surface-soft); }
.pager__num.is-current { border-color: var(--navy-800); background: var(--navy-800); color: #fff; cursor: default; }
.pager__btn:disabled { opacity: .45; cursor: default; }
.pager__gap { min-width: 20px; text-align: center; color: var(--muted); }

/* ---- "แชร์คลิปไป TikTok / Reels" (ShareVideoPanel.razor) ---- */
.share-feed-option--tiktok { border-color: #111; background: linear-gradient(90deg, #f1fbfc, #fff0f4); }
.share-feed-option--tiktok:hover { background: linear-gradient(90deg, #e3f7f9, #ffe3ea); }
.share-feed-option--tiktok .share-feed-option__icon { background: #111; color: #fff; box-shadow: -2px -2px 0 #25f4ee, 2px 2px 0 #fe2c55; }
.share-feed-option--tiktok > .icon:last-child { color: #111; }
.share-video { display: grid; gap: 12px; }
.share-video__busy { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; background: var(--surface-soft); }
.share-video__busy p { margin: 0; }
.share-video__ready { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--success, #16a34a); font-weight: 600; }
.share-video .btn--block { justify-content: center; }
.share-video__back { justify-self: start; }

/* ---------------------------------------------------------------- ค่าใช้จ่ายของน้อง (pet tab, record sheet, /pets/expenses) */
.month-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0 16px; }
.month-nav strong { min-width: 150px; text-align: center; font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); }
.month-nav .icon-button:disabled { opacity: .35; cursor: default; }
.expenses { display: grid; gap: 16px; min-width: 0; }
.expenses > .month-nav { margin: 0; }
.expense-hero { display: grid; gap: 10px; background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); color: #fff; border: 0; }
.expense-hero small { display: block; color: rgba(255,255,255,.75); font-size: .85rem; }
.expense-hero strong { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.2; }
.expense-hero__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.expense-hero__right { text-align: right; }
.expense-hero__right strong { font-size: 1.2rem; }
.expense-hero__left { margin: 0; font-size: .95rem; }
.expense-hero__left strong { font-size: 1.05rem; }
.expense-hero .progress { background: rgba(255,255,255,.2); }
.expense-hero__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.18); }
.expense-hero__foot .muted { color: rgba(255,255,255,.75); font-size: .88rem; }
.expense-hero .link-button { color: #ffd29a; }
.expense-savings strong { font-size: 1.05rem; }
.expense-hero .is-over, .expense-hero .expense-savings.is-over strong { color: #ffb4a8; }
.expense-progress.is-over span { background: linear-gradient(90deg, #f05a4f, var(--danger)); }
.expense-add { justify-self: stretch; }
.expense-hint { text-align: center; margin: 0; }
.expense-community__total { margin: 0 0 12px; color: var(--muted); }
.expense-community__total strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--orange-700); }
.expense-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.expense-people li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.expense-people li > span { display: grid; flex: 1; min-width: 0; }
.expense-people li > span a { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-cats-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.expense-cats-list li { display: grid; grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: .92rem; }
.expense-bar { height: 10px; border-radius: 99px; background: var(--navy-50); overflow: hidden; }
.expense-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange-500), var(--orange-700)); }
.expense-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.expense-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.expense-item__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--orange-50); font-size: 1.25rem; }
.expense-item__icon--medical, .expense-item__icon--vaccine { background: var(--info-bg); }
.expense-item__icon--grooming, .expense-item__icon--toy { background: var(--success-bg); }
.expense-item__text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.expense-item__text strong { color: var(--ink); overflow-wrap: anywhere; }
.expense-item__text small a { color: inherit; text-decoration: underline; }
.expense-item__note { font-size: .88rem; color: var(--text); overflow-wrap: anywhere; }
.expense-item__amount { display: grid; text-align: right; flex: none; }
.expense-item__amount strong { font-family: var(--font-display); color: var(--ink); }
.expense-item .icon-button { flex: none; margin: -4px -6px 0 0; }
.expense-sheet { display: grid; gap: 14px; }
.expense-sheet h2 { margin: 0; }
.expense-cats { margin: 0; }
.expense-sheet__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.expense-pets { display: flex; flex-wrap: wrap; gap: 8px; }
.expense-pet { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; max-width: 100%; }
.expense-pet span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-pet.is-on { border-color: var(--orange-500); background: var(--orange-50); color: var(--orange-800); font-weight: 600; }
.expense-split { margin: 4px 0 0; font-size: .88rem; }
.activity-expense-link { margin-top: 6px; }
.expenses-page { display: grid; gap: 18px; padding-top: 24px; padding-bottom: 48px; min-width: 0; }
.expenses-page .section-title { margin: 10px 0 0; font-size: 1.25rem; }
.expense-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.expense-stat { display: grid; gap: 6px; align-content: start; }
.expense-stat > small:first-child { color: var(--muted); font-weight: 600; }
.expense-stat strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); line-height: 1.2; }
.expense-stat strong.is-over { color: var(--danger); }
.expense-trend { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: end; height: 170px; }
.expense-trend__col { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 4px; height: 100%; min-width: 0; font-size: .78rem; color: var(--muted); }
.expense-trend__col small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.expense-trend__col > span:last-child { white-space: nowrap; }
.expense-trend__bar { align-self: end; width: min(42px, 70%); border-radius: 8px 8px 3px 3px; background: var(--navy-200); }
.expense-trend__col.is-current .expense-trend__bar { background: linear-gradient(180deg, var(--orange-500), var(--orange-700)); }
.expense-trend__col.is-current { color: var(--ink); font-weight: 600; }
.expense-pet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.expense-pet-card { display: grid; gap: 10px; color: inherit; transition: transform .2s, box-shadow .2s; }
.expense-pet-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.expense-pet-card__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.expense-pet-card__head > span { display: grid; flex: 1; min-width: 0; }
.expense-pet-card__head > span strong { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-pet-card__amount { font-family: var(--font-display); font-size: 1.2rem; color: var(--orange-700); }
@media (max-width: 640px) {
    .expense-stats { grid-template-columns: minmax(0, 1fr); }
    .expense-stat { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .expense-stat strong { font-size: 1.3rem; grid-column: 2; grid-row: 1; }
    .expense-stat > small:not(:first-child), .expense-stat .progress { grid-column: 1 / -1; }
    .expense-cats-list li { grid-template-columns: minmax(0, 7em) minmax(0, 1fr) auto; }
    .expense-trend { height: 150px; gap: 4px; }
}
.expense-visibility { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.expense-visibility > span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); font-size: .92rem; }
.media-tile__from-post { position: absolute; top: 6px; left: 6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 23, 74, .6); color: #fff; pointer-events: none; }

/* ---------------------------------------------------------------- สวนความทรงจำ (a pet that has passed away) */
.pet-hero--memorial { background: linear-gradient(180deg, #f6f1ff, #fff 60%); border-color: #e4d9fb; }
.pet-hero--memorial .avatar--ring { box-shadow: 0 0 0 4px #fff, 0 0 0 7px #c9b6f2, 0 10px 30px rgba(126, 87, 194, .25); }
.memorial { position: relative; overflow: hidden; display: grid; gap: 0; border-radius: var(--radius-lg); background: linear-gradient(160deg, #2a1f5c 0%, #1b2a6b 55%, #0d1b4a 100%); color: #fff; box-shadow: var(--shadow); min-width: 0; }
.memorial__sky { position: absolute; inset: 0; pointer-events: none; opacity: .7;
    background-image: radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 42%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 46% 12%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 63% 30%, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 78% 16%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 90% 44%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 8% 62%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 55% 58%, #fff 50%, transparent 51%),
        linear-gradient(180deg, rgba(255, 138, 128, .18), rgba(255, 241, 118, .12) 30%, rgba(129, 212, 250, .12) 60%, transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 0, #000 55%, transparent 100%); }
.memorial__head { position: relative; display: grid; justify-items: center; gap: 10px; padding: 28px 20px 24px; text-align: center; }
.memorial__eyebrow { padding: 4px 14px; border-radius: 999px; background: rgba(255,255,255,.14); font-family: var(--font-display); font-weight: 600; font-size: .9rem; letter-spacing: .02em; }
.memorial__head h2 { margin: 0; font-size: clamp(1.35rem, 4.5vw, 1.8rem); color: #fff; }
.memorial__dates { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 0; color: #d1c4e9; font-size: .92rem; }
.memorial__words { margin: 6px 0 0; max-width: 560px; font-family: var(--font-body); font-size: 1.08rem; line-height: 1.6; color: #fff; overflow-wrap: anywhere; }
.memorial__edit { display: grid; gap: 8px; width: min(560px, 100%); }
.memorial__edit .input { color: var(--ink); }
.memorial .link-button { color: #ffd29a; }
.memorial__tributes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.memorial__tribute { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.35); background: rgba(255,255,255,.1); color: #fff; font: inherit; font-weight: 600; cursor: pointer; transition: background-color .2s, transform .2s; }
.memorial__tribute:hover:not(:disabled) { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.memorial__tribute:disabled { cursor: default; }
.memorial__tribute strong { min-width: 1.6em; padding: 0 8px; border-radius: 999px; background: rgba(255,255,255,.18); font-size: .85rem; }
.memorial__tribute.is-given { background: rgba(255,255,255,.92); color: #4a2f8f; border-color: transparent; }
.memorial__tribute.is-given strong { background: #ede7f6; }
.memorial__tribute-emoji { font-size: 1.25rem; line-height: 1; }
.memorial__share { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
/* Opened from a memorial card in the feed: the flower / candle buttons call softly a few times. */
.memorial__tributes.is-calling .memorial__tribute:not(.is-given):not(:disabled) { animation: memorial-call 1.3s ease-in-out 3; }
@keyframes memorial-call { 50% { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(255,255,255,.18); } }
@media (prefers-reduced-motion: reduce) { .memorial__tributes.is-calling .memorial__tribute { animation: none; } }
.memorial__tribute.is-given .memorial__tribute-emoji { animation: memorial-glow 1.6s ease-in-out infinite alternate; }
@keyframes memorial-glow { from { filter: drop-shadow(0 0 0 rgba(255, 200, 120, 0)); } to { filter: drop-shadow(0 0 6px rgba(255, 200, 120, .9)); } }
.memorial__visitors { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; font-size: .92rem; color: #ede7f6; }
.memorial__visitors .avatar-stack { margin: 0; gap: 0; }
.memorial__visitors .avatar-stack a + a { margin-left: -8px; }
.memorial__visitors .avatar { box-shadow: 0 0 0 2px #2a1f5c; }
.memorial__anniversary { margin: 0; font-size: .85rem; color: #b8aee0; max-width: 520px; }
.memorial__hint { margin: 0; font-size: .88rem; color: #d1c4e9; }
.memorial__hint a { color: #ffd29a; text-decoration: underline; }
.memorial__timeline { position: relative; padding: 18px 20px 24px; background: rgba(255,255,255,.06); border-top: 1px solid rgba(255,255,255,.1); }
.memorial__timeline h3 { margin: 0 0 14px; font-size: 1.1rem; color: #fff; }
.memorial__timeline ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.memorial__timeline li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; position: relative; }
.memorial__timeline li::before { content: ""; position: absolute; left: 27px; top: 30px; bottom: -16px; width: 2px; background: rgba(255,255,255,.18); }
.memorial__timeline li:last-child::before { display: none; }
.memorial__year { position: relative; z-index: 1; display: grid; place-items: center; height: 30px; border-radius: 999px; background: #7e57c2; font-family: var(--font-display); font-weight: 700; font-size: .85rem; }
.memorial__year-body { display: grid; gap: 8px; min-width: 0; padding-top: 4px; }
.memorial__event { margin: 0; color: #ede7f6; font-size: .95rem; overflow-wrap: anywhere; }
.memorial__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.memorial__photo, .memorial__more { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.1); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.memorial__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.memorial__photo .media-tile__play { width: 28px; height: 28px; }

/* ---------------------------------------------------------------- เจอน้องหาย สแกนเลย (p/{code}) and อาจเป็นน้องของคุณ */
.finder { display: grid; gap: 16px; max-width: 560px; padding-top: 20px; padding-bottom: 48px; }
.finder__lost { display: grid; gap: 4px; padding: 14px 18px; border-radius: var(--radius); background: var(--danger); color: #fff; text-align: center; }
.finder__lost strong { font-family: var(--font-display); font-size: 1.1rem; }
.finder__lost span { font-size: .9rem; opacity: .9; }
.finder__card { display: grid; justify-items: center; gap: 10px; text-align: center; }
.finder__card h1 { margin: 4px 0 0; font-size: 2rem; }
.finder__meta { margin: 0; color: var(--muted); }
.finder__carer { margin: 0; }
.finder__note { width: 100%; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--warning-bg); border: 1px solid #f5d27a; text-align: left; }
.finder__note p { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.finder__cta { margin-top: 6px; font-size: 1.1rem; }
.finder__privacy { margin: 0; font-size: .85rem; }
.finder__form { display: grid; gap: 12px; width: 100%; text-align: left; }
.finder__sent { display: grid; justify-items: center; gap: 8px; width: 100%; padding: 16px; border-radius: var(--radius); background: var(--success-bg); }
.finder__sent h2 { margin: 0; font-size: 1.2rem; color: var(--success); }
.finder__sent p { margin: 0; }
.finder__sent-icon { font-size: 2rem; }
.finder__pitch { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--orange-50); }
.finder__pitch p { margin: 2px 0 4px; font-size: .9rem; color: var(--text); }
.found-reports ul, .lost-matches ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.found-reports { border-left: 4px solid var(--orange-500); }
.found-report { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.found-report:last-child { border-bottom: 0; padding-bottom: 0; }
.found-report__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.found-report__message { margin: 0; overflow-wrap: anywhere; }
.found-report__place { margin: 0; display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .9rem; }
.found-report__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lost-matches { border-left: 4px solid var(--danger); }
.lost-match { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.lost-match:last-child { border-bottom: 0; padding-bottom: 0; }
.lost-match.is-unlikely { opacity: .6; }
.lost-match--confirmed { background: var(--success-bg); border-radius: var(--radius-sm); padding: 8px; }
.lost-match__photo { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 14px; overflow: hidden; background: var(--navy-50); font-size: 2rem; }
.lost-match__photo img { width: 100%; height: 100%; object-fit: cover; }
.lost-match__body { display: grid; gap: 4px; min-width: 0; }
.lost-match__title { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.lost-match__reasons { margin: 0; font-size: .88rem; color: var(--text); }
.lost-match__ai { margin: 0; padding: 6px 10px; border-radius: 10px; background: var(--info-bg); font-size: .88rem; display: grid; gap: 2px; }
.lost-match__ai--likely { background: var(--success-bg); }
.lost-match__ai--unlikely { background: var(--surface-soft); }
.lost-match__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }
.finder > *, .finder__card > * { min-width: 0; max-width: 100%; }
.finder__form .btn, .finder__cta { white-space: normal; text-align: center; line-height: 1.35; }
.crop__shapes { margin-inline: auto; }
.crop__actions { flex-wrap: wrap; }
@media (max-width: 640px) { .crop__actions .btn { flex: 1 1 auto; } }

/* ---------------------------------------------------------------- น้องจรประจำซอย (feeding tab) */
.feeding { display: grid; gap: 16px; min-width: 0; }
.feeding-today { display: grid; gap: 10px; border-left: 4px solid var(--success); }
.feeding-today.is-hungry { border-left-color: var(--orange-500); background: var(--orange-50); }
.feeding-today h2 { margin: 0; font-size: 1.2rem; }
.feeding-today p { margin: 0; }
.feeding-today__who { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; }
.feeding-today__who span { display: inline-flex; align-items: center; gap: 6px; }
.feeding-streak { font-weight: 600; color: var(--orange-700); }
.feeding-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.feeding-day { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; align-items: start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.feeding-day:last-child { border-bottom: 0; padding-bottom: 0; }
.feeding-day__label { font-weight: 700; color: var(--ink); font-size: .92rem; }
.feeding-day.is-empty .muted { font-size: .9rem; }
.feeding-day__list { display: grid; gap: 8px; min-width: 0; }
.feeding-check { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.feeding-check__photo { flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--navy-50); }
.feeding-check__photo img { width: 100%; height: 100%; object-fit: cover; }
.feeding-check__text { display: grid; gap: 2px; flex: 1; min-width: 0; font-size: .92rem; overflow-wrap: anywhere; }
.feeding-check__text a { color: var(--ink); }
.feeding-rota { display: grid; gap: 6px; }
.feeding-rota__row { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) minmax(0, 1fr); gap: 6px; align-items: stretch; }
.feeding-rota__head span { font-size: .85rem; font-weight: 700; color: var(--muted); text-align: center; }
.feeding-rota__day { display: flex; align-items: center; font-weight: 600; font-size: .9rem; color: var(--ink); }
.feeding-rota__row.is-today .feeding-rota__day { color: var(--orange-700); }
.feeding-rota__cell { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 6px; border-radius: 12px; background: var(--surface-soft); border: 1px solid var(--line); }
.feeding-rota__row.is-today .feeding-rota__cell { border-color: var(--orange-100); background: var(--orange-50); }
.feeding-rota__cell.is-mine { border-color: var(--success); background: var(--success-bg); }
.feeding-rota__toggle { border: 0; background: none; color: var(--orange-700); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.feeding-rota__toggle:hover { background: rgba(0,0,0,.05); }
.feeding-rota__cell.is-mine .feeding-rota__toggle { color: var(--success); }
.feeding-top { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; }
.feeding-top li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feeding-top a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; min-width: 0; }
.feeding-sheet { display: grid; gap: 12px; }
.feeding-sheet h2 { margin: 0; }
.feeding-top__total { margin: -6px 0 10px; }
@media (max-width: 640px) {
    .feeding-day { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .feeding-rota__row { grid-template-columns: 5.6em minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------- Digital vaccine book (สมุดวัคซีนดิจิทัล) ---------- */
.card__head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.vacc-verified { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--success-bg); color: var(--success); font-size: .8rem; font-weight: 600; }
.vacc-verified img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.vacc-verified--inline { padding: 1px 8px; font-size: .75rem; vertical-align: middle; }
.vacc-pending, .vacc-rejected { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .8rem; color: #8a5a00; }
.vacc-rejected { color: var(--danger); }
.vacc-ask { align-self: flex-start; color: var(--navy-700); }
.record__body .vacc-verified, .record__body .vacc-pending, .record__body .vacc-rejected, .record__body .vacc-ask { margin-top: 4px; }
.vaccine-verify h2, .vaccine-share h2 { display: flex; align-items: center; gap: 8px; }
.clinic-pick { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; margin-top: 8px; }
.clinic-pick__item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.clinic-pick__item img, .clinic-pick__logo { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; object-fit: cover; }
.clinic-pick__logo { display: grid; place-items: center; background: var(--navy-50); color: var(--navy-700); }
.clinic-pick__item span { display: grid; gap: 2px; min-width: 0; }
.clinic-pick__item strong { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.clinic-pick__item strong svg { color: var(--navy-600); }
.clinic-pick__item.is-picked { border-color: var(--orange-500); background: var(--orange-50); box-shadow: var(--ring); }
.vaccine-share__new { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--surface-soft); margin: 12px 0; }
.vaccine-share__head { font-size: 1rem; margin: 18px 0 8px; }
.vaccine-share__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vaccine-share__item { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.vaccine-share__item > div:first-child { display: grid; gap: 2px; }
.vaccine-share__item.is-expired { opacity: .65; }
.vaccine-share__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.link-button--danger { color: var(--danger); }

.vbook { max-width: 860px; padding-top: 24px; padding-bottom: 40px; display: grid; gap: 18px; }
.vbook__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.vbook__head h1 { margin: 4px 0 0; font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--navy-900); }
.vbook__kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--orange-700); font-family: var(--font-display); font-weight: 600; font-size: .9rem; }
.vbook__overall { padding: 6px 14px; border-radius: 999px; font-family: var(--font-display); font-weight: 600; background: var(--navy-100); color: var(--navy-800); }
.vbook__overall--up_to_date { background: var(--success-bg); color: var(--success); }
.vbook__overall--due_soon { background: #fff4d6; color: #8a5a00; }
.vbook__overall--overdue { background: var(--danger-bg); color: var(--danger); }
.vbook__pet { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 20px; align-items: center; }
.vbook__photo { width: 140px; height: 140px; border-radius: 24px; object-fit: cover; background: var(--navy-50); }
.vbook__facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; margin: 0; }
.vbook__facts dt { font-size: .78rem; color: var(--muted); }
.vbook__facts dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); }
.vbook__doses { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vbook__dose { display: flex; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-soft); border-left: 4px solid var(--line); }
.vbook__dose.is-verified { border-left-color: var(--success); }
.vbook__dose-main, .vbook__dose-side { display: grid; gap: 4px; align-content: start; }
.vbook__dose-side { justify-items: end; text-align: right; }
.vbook__foot { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; }
.vbook__foot p { margin: 0 0 6px; }
.vbook__qr { width: 120px; height: 120px; image-rendering: pixelated; }
@media (max-width: 640px) {
    .vbook__pet { grid-template-columns: minmax(0, 1fr); justify-items: center; }
    .vbook__dose { flex-direction: column; }
    .vbook__dose-side { justify-items: start; text-align: left; }
    .vbook__foot { grid-template-columns: 96px minmax(0, 1fr); }
    .vbook__qr { width: 96px; height: 96px; }
    .vbook__print { grid-column: 1 / -1; }
}
@media print {
    body:has(.vbook) .header, body:has(.vbook) .footer, body:has(.vbook) .tabbar, body:has(.vbook) .cookie-bar, .vbook__print { display: none !important; }
    .vbook { padding: 0; max-width: none; }
    .vbook .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
    .vbook__dose { break-inside: avoid; }
}

.clinic-vax { display: grid; gap: 12px; }
.clinic-vax__pet { display: flex; align-items: center; gap: 12px; }
.clinic-vax__pet img, .clinic-vax__nophoto { width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px; object-fit: cover; }
.clinic-vax__nophoto { display: grid; place-items: center; background: var(--navy-50); color: var(--navy-600); }
.clinic-vax__pet > div { display: grid; gap: 2px; }
.clinic-vax__pet code { font-size: .8rem; color: var(--navy-700); }
.clinic-vax__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.clinic-vax__item { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.clinic-vax__dose { display: grid; gap: 4px; }
.clinic-vax__note { margin: 4px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-soft); font-style: italic; }
.clinic-vax__evidence img { max-width: 220px; max-height: 160px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
.clinic-vax__answer { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--orange-50); }

/* ---------- Wishlist (ส่งของตาม Wishlist) ---------- */
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--navy-100); color: var(--navy-800); }
.badge--urgent { background: var(--danger-bg); color: var(--danger); }
.badge--success { background: var(--success-bg); color: var(--success); }
.wishlist { display: grid; gap: 14px; scroll-margin-top: calc(var(--header-h) + 12px); }
.wishlist h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 8px; }
.wishlist__intro { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--orange-50); color: var(--orange-800); font-size: .92rem; }
.wishlist__intro svg { flex-shrink: 0; margin-top: 3px; }
.wishlist__address { display: grid; gap: 6px; }
.wishlist__address-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.wishlist__items { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wishlist__item { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-soft); }
.wishlist__item.is-closed:not(.is-done) { opacity: .7; }
.wishlist__item-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.wishlist__item-head strong { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); }
.wishlist__note { margin: 0; font-size: .9rem; color: var(--muted); }
.wishlist__item-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.wishlist__item-actions .link-button { margin-right: auto; }
.wishlist__thanks ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wishlist__thanks li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--orange-50); font-size: .85rem; }
.wishlist__thanks img, .wishlist__avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.wishlist__avatar { display: grid; place-items: center; background: #fff; color: var(--orange-600); }
.wish-bar { position: relative; display: flex; height: 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.wish-bar__got { background: linear-gradient(90deg, var(--orange-500), var(--orange-600)); transition: width .4s; }
.wish-bar__coming { background: repeating-linear-gradient(45deg, var(--orange-100), var(--orange-100) 6px, #ffd9a8 6px, #ffd9a8 12px); transition: width .4s; }
.wish-bar__text { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; font-size: .85rem; }
.qty-stepper { display: flex; align-items: center; gap: 8px; }
.qty-stepper .input { width: 90px; text-align: center; }
.pledge-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pledge { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pledge--received { border-color: #c9ecd7; background: #f6fcf8; }
.pledge--cancelled { opacity: .6; }
.pledge__main { display: grid; gap: 4px; min-width: 0; }
.pledge__owner { font-size: .8rem; font-weight: 600; color: var(--navy-700); }
.pledge__what { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pledge__what img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.pledge__status { padding: 1px 8px; border-radius: 999px; background: var(--navy-50); color: var(--navy-700); font-size: .75rem; font-weight: 600; }
.pledge--received .pledge__status { background: var(--success-bg); color: var(--success); }
.pledge__msg, .pledge__thanks { margin: 0; font-size: .88rem; color: var(--muted); }
.pledge__thanks { color: var(--orange-800); }
.pledge__shipto { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--orange-50); }
.pledge__shipto p { margin: 2px 0 4px; white-space: pre-line; color: var(--ink); }
.pledge__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.wishlist-page { padding-top: 24px; padding-bottom: 40px; display: grid; gap: 18px; }
.wishlist-page .page-head h1 { display: flex; align-items: center; gap: 10px; }
.wish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.wish-card { display: grid; gap: 10px; align-content: start; padding: 16px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.wish-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.wish-card__owner { display: flex; align-items: center; gap: 10px; }
.wish-card__owner img, .wish-card__noimg { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; object-fit: cover; }
.wish-card__noimg { display: grid; place-items: center; background: var(--orange-50); color: var(--orange-600); }
.wish-card__owner > span { display: grid; min-width: 0; }
.wish-card__owner strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wish-card__item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wish-card__item strong { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); }
.wish-card__cta { justify-self: start; }
@media (max-width: 640px) {
    .pledge { flex-direction: column; }
    .pledge__actions { flex-direction: row; align-items: center; }
}
.record--vacc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; }
.record--vacc .record__icon { grid-row: span 2; }
.record--vacc .record__side { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; justify-items: start; text-align: left; }
.record--vacc > .icon-button { grid-column: 3; grid-row: 1; }
.record--vacc .vacc-verified { border-radius: 10px; line-height: 1.4; }
.memorial__date { display: grid; gap: 4px; margin-bottom: 8px; font-size: .9rem; font-weight: 600; }
.memorial__date .input { max-width: 220px; }

/* ---------- พาสปอร์ตน้องจร ---------- */
.pstamp { display: block; max-width: 100%; height: auto; overflow: visible; }
.pstamp text { fill: var(--ink); }
.pstamp--ghost { opacity: .55; }
.ptier { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--navy-50); color: var(--navy-800); white-space: nowrap; }
.ptier--fed { background: var(--orange-50); color: var(--orange-800); }
.ptier--care { background: #fff7d1; color: #7a5c00; }
.ptier--discoverer { background: linear-gradient(90deg, #fff4c2, #ffe08a); color: #6b4e00; }

.passport-card { display: grid; gap: 14px; min-width: 0; /* the visitors row scrolls inside the card, never widens the page */ scroll-margin-top: calc(var(--header-h) + 12px); }
.passport-card__body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.passport-card__stamp { display: grid; justify-items: center; gap: 6px; padding: 10px; border-radius: 18px; background: #fbf8f1; box-shadow: inset 0 0 0 1px #efe7d6; }
.passport-card__stamp.is-thump .pstamp { animation: stamp-thump .55s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes stamp-thump { 0% { transform: scale(1.6) rotate(-12deg); opacity: 0; } 60% { transform: scale(.94); opacity: 1; } 100% { transform: scale(1); } }
.passport-card__info { display: grid; gap: 8px; justify-items: start; }
.passport-card__info p { margin: 0; }
.passport-card__flow { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--orange-50); }
.passport-card__flow p { margin: 0; display: flex; align-items: center; gap: 6px; }
.passport-card__ok { color: var(--success); font-weight: 600; }
.passport-card__visitors { min-width: 0; }
.passport-card__visitors h3 { font-size: .95rem; margin: 0 0 8px; }
.passport-card__visitors ul { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 10px; overflow-x: auto; }
.passport-card__visitors li { display: grid; gap: 4px; width: 92px; flex-shrink: 0; }
.passport-card__visitors img, .passport-card__nophoto { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; }
.passport-card__nophoto { display: grid; place-items: center; background: var(--navy-50); color: var(--navy-600); }
.passport-card__visitors small { font-size: .72rem; line-height: 1.35; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.passport-card__close { justify-self: start; color: var(--muted); }
.passport-card__got { margin: 0; font-weight: 600; color: var(--orange-700); }
.passport-card__share { color: var(--orange-700); }

.passport-page { padding-top: 24px; padding-bottom: 40px; display: grid; gap: 20px; }
.passport-cover { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 26px; border-radius: 26px;
    background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .08), transparent 40%), linear-gradient(135deg, #0b2a5b, #00174a); color: #fff; overflow: hidden; }
.passport-cover::after { content: ""; position: absolute; inset: 10px; border: 1.5px solid rgba(255, 214, 140, .45); border-radius: 18px; pointer-events: none; }
.passport-cover__kicker { font-size: .75rem; letter-spacing: 3px; color: #ffd68c; font-weight: 600; }
.passport-cover h1 { margin: 6px 0 6px; color: #ffd68c; font-size: clamp(1.7rem, 5vw, 2.4rem); }
.passport-cover p { margin: 0; color: rgba(255, 255, 255, .85); }
.passport-cover__stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 0; }
.passport-cover__stats div { display: grid; }
.passport-cover__stats dt { font-size: .75rem; color: rgba(255, 255, 255, .7); }
.passport-cover__stats dd { margin: 0; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: #fff; }
.passport-cover__seal { --ink: #ffd68c !important; opacity: .9; }
.passport-cover__share { position: relative; margin-top: 16px; }
.passport-cover__seal text { fill: #ffd68c; }
.passport-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.passport-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.passport-sheet { padding: 20px; border-radius: 22px; background: #fbf8f1; box-shadow: inset 0 0 0 1px #efe7d6, var(--shadow-sm);
    background-image: repeating-linear-gradient(0deg, transparent 0 31px, rgba(0, 23, 74, .035) 31px 32px); }
.passport-sheet__title { margin: 0 0 14px; font-size: 1.05rem; color: var(--navy-800); }
.stamp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 12px; }
.stamp-cell { display: grid; justify-items: center; gap: 6px; text-align: center; color: inherit; text-decoration: none; }
.stamp-cell:hover .pstamp { transform: scale(1.04) rotate(-2deg); }
.stamp-cell .pstamp { transition: transform .25s; }
.stamp-cell strong { font-size: .9rem; }
.stamp-cell small { font-size: .75rem; }
@media (max-width: 640px) {
    .passport-card__body { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
    .passport-card__info { justify-items: center; }
    .passport-cover { grid-template-columns: minmax(0, 1fr); }
    .passport-cover__seal { position: absolute; right: -24px; top: -18px; width: 120px; opacity: .35; }
    .stamp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* พาสปอร์ตน้องจร on the map */
.passport-near__locate { justify-self: start; }
.passport-map { height: 440px; border-radius: 18px; overflow: hidden; }
.passport-map__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; font-size: .85rem; color: var(--text); }
.passport-map__legend > span { display: inline-flex; align-items: center; gap: 6px; }
.passport-map__legend small { flex-basis: 100%; }
.passport-map__key { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: .72rem; font-weight: 700; }
.passport-map__key--got { background: var(--success); }
.passport-map__key--missing { background: var(--orange-600); }
.photo-pin--stamp-got img, .photo-pin--stamp-got span { border-color: var(--success); }
.photo-pin--stamp-missing img, .photo-pin--stamp-missing span { border-color: #9aa3b5; border-style: dashed; filter: grayscale(.85); opacity: .85; }
.photo-pin--stamp-got::after, .photo-pin--stamp-missing::after { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 20px; height: 20px;
    border-radius: 50%; border: 2px solid #fff; color: #fff; font: 700 11px/1 var(--font-display); box-shadow: 0 1px 4px rgba(0, 23, 74, .35); }
.photo-pin--stamp-got::after { content: "✓"; background: var(--success); }
.photo-pin--stamp-missing::after { content: "?"; background: var(--orange-600); }
@media (max-width: 640px) { .passport-map { height: 380px; } }

/* ---------------------------------------------------------------- TH | EN */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--navy-50); border: 1px solid var(--navy-100); flex: none; }
.lang-switch__btn { border: 0; background: transparent; color: var(--navy-700); font: inherit; font-size: .78rem; font-weight: 600; letter-spacing: .04em; min-width: 36px; height: 28px; padding: 0 8px; border-radius: 999px; cursor: pointer; }
.lang-switch__btn:hover:not(.is-active) { color: var(--orange-700); }
.lang-switch__btn.is-active { background: var(--navy-800); color: #fff; cursor: default; }
.lang-switch__btn:focus-visible { outline: 2px solid var(--orange-500); outline-offset: 1px; }
.lang-switch--dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); }
.lang-switch--dark .lang-switch__btn { color: rgba(255,255,255,.8); }
.lang-switch--dark .lang-switch__btn.is-active { background: #fff; color: var(--navy-900); }
@media (max-width: 900px) {
    .lang-switch.header__desktop-only { display: none; } /* phones: the switch is in the menu */
    .nav__mobile-only.nav__lang { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; color: var(--navy-700); font-weight: 600; }
}
.auth__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
/* The photo cropper on phones: the frame's height is set by its width in a plain block, at most --crop-h tall. */
.crop { --crop-h: 46vh; --crop-h: 46dvh; }
.crop__stage { display: block; min-width: 0; }
.crop__shapes { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.crop__shapes::-webkit-scrollbar { display: none; }
@media (max-width: 640px) {
    .crop { --crop-h: 42vh; --crop-h: 42dvh; }
    .crop__shapes .segmented__option { padding: 7px 12px; white-space: nowrap; }
    .crop > .muted { font-size: .82rem; }
}

/* iOS Safari: date / time fields ignore width:100% (they keep a minimum width of their own and spill out of the form)
   and an empty one grows taller than the other fields. Same height as .input, never wider than its box. */
.input[type="date"], .input[type="time"], .input[type="datetime-local"], .input[type="month"] {
    -webkit-appearance: none; appearance: none;
    display: block; min-width: 0; max-width: 100%;
    height: 52px; line-height: 1.4;
}
.input[type="date"]::-webkit-date-and-time-value,
.input[type="time"]::-webkit-date-and-time-value,
.input[type="datetime-local"]::-webkit-date-and-time-value,
.input[type="month"]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.4em; }
/* The +/− of a quantity: neutral (not the red "delete" hover), and plainly off at the ends. */
.qty-stepper .icon-button { border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.qty-stepper .icon-button:hover:not(:disabled) { background: var(--navy-50); color: var(--navy-800); }
/* The hero's "what you can do here" chips. */
.hero__points a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); color: #fff; font-weight: 600; text-decoration: none; transition: background-color .2s; }
.hero__points a:hover { background: rgba(255,255,255,.22); }
.hero__points { gap: 8px; }
.confirm-sheet .sheet__panel { width: min(420px, 100%); }
.confirm-sheet__text { margin: 0; padding-right: 8px; font-size: 1.05rem; font-weight: 600; color: var(--ink); white-space: pre-line; }
.auth__hint { font-size: .9rem; }
.invite-landing__later { text-align: center; margin: 0; }

/* Phones / small tablets: the bottom bar's "เมนู" is the menu — no hamburger in the header (it stays where the bottom bar
   is hidden, e.g. inside a chat). */
@media (max-width: 900px) {
    .header__toggle { display: none; }
    body:has(.chat-page.is-thread) .header__toggle { display: inline-flex; }
    .more-sheet__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
    .more-sheet__lang { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; color: var(--muted); font-size: .9rem; font-weight: 600; }
    .more-sheet__logout { color: var(--danger); }
}
/* The account menu grew taller than a laptop screen: it scrolls on its own (the header it hangs from doesn't). */
.user-menu__panel { max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }

/* ---- Sign in with Google / LINE / Facebook (colours from each brand's button guide) ---- */
.sso { display: grid; gap: 10px; margin: 4px 0 8px; }
.sso__lead { margin: 0 0 2px; color: var(--muted); font-size: .9rem; text-align: center; }
.sso__btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 18px;
    border-radius: 999px; border: 1px solid transparent; font-family: var(--font-display); font-weight: 600; font-size: .95rem;
    text-decoration: none; transition: background-color .2s, box-shadow .2s, filter .2s;
}
.sso__btn:hover { text-decoration: none; }
.sso__btn--google { background: #fff; border-color: #747775; color: #1f1f1f; }
.sso__btn--google:hover { background: #f8fafd; box-shadow: 0 1px 3px rgba(60, 64, 67, .3); }
.sso__btn--line { background: #06c755; color: #fff; }
.sso__btn--line:hover { filter: brightness(.9); color: #fff; }
.sso__btn--facebook { background: #1877f2; color: #fff; }
.sso__btn--facebook:hover { background: #166fe5; color: #fff; }
.sso__note { display: flex; gap: 6px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--muted); font-size: .85rem; }
.sso__or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: .85rem; }
.sso__or::before, .sso__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sso-logo { flex: none; }
.sso-complete__provider { display: flex; align-items: center; gap: 8px; }

/* Account page: linked sign-ins */
.linked-logins { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.linked-logins__row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.linked-logins__logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none; border: 1px solid var(--line); background: #fff; }
.linked-logins__logo--line { background: #06c755; border-color: #06c755; color: #fff; }
.linked-logins__logo--facebook { background: #1877f2; border-color: #1877f2; color: #fff; }
.linked-logins__text { display: grid; min-width: 0; flex: 1; }
.linked-logins__text .muted { font-size: .85rem; overflow-wrap: anywhere; }

/* Admin: SSO keys */
.sso-admin .form-block__title { display: flex; align-items: center; gap: 8px; }
.sso-admin__state { margin-left: auto; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.sso-admin__state--on { background: #e3f6ea; color: #157347; }
.sso-admin__state--off { background: var(--surface-soft); color: var(--muted); }
.sso-admin__callback { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sso-admin__callback code { flex: 1; min-width: 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-soft); overflow-wrap: anywhere; font-size: .85rem; }

/* ---- ครอบครัวของน้อง (Co-parent): the family card on a pet's page, invite / manage sheets, the invite and hand-over pages */
.choice__text small { color: var(--muted); font-size: .85rem; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--navy-800); flex: none; }
.pet-family { border-left: 4px solid var(--navy-700); }
.pet-family__members { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pet-family__member { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pet-family__who { display: grid; min-width: 0; }
.pet-family__who a { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pet-family__role { justify-self: start; display: inline-block; margin-top: 2px; padding: 1px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--navy-100); color: var(--navy-800); }
.pet-family__role--owner { background: var(--orange-100); color: var(--orange-800); }
.pet-family__role--caretaker { background: var(--success-bg); color: var(--success); }
.pet-family__transfer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--info-bg); font-size: .92rem; }
.pet-family__mine { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 12px; font-size: .92rem; }
.pet-family__leave { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--danger-bg); display: grid; gap: 10px; }
.pet-family__leave p { margin: 0; }
.pet-family__leave-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pet-card__shared { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; color: var(--navy-700); font-size: .85rem; font-weight: 600; }

.family-invite__step, .family-manage__heading { margin: 18px 0 8px; font-size: 1rem; color: var(--ink); }
.family-invite__pets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.family-invite__pet { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; min-width: 0; }
.family-invite__pet.is-selected { border-color: var(--navy-700); background: var(--navy-50); }
.family-invite__pet input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--navy-800); }
.family-invite__pet span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.family-invite__pet select { flex-basis: 100%; }
.family-invite__qr { display: block; margin: 12px auto; width: 200px; height: 200px; image-rendering: pixelated; border-radius: 12px; border: 1px solid var(--line); }
.family-invite__link { display: flex; gap: 8px; margin: 8px 0; }
.family-invite__link .input { flex: 1; min-width: 0; font-size: .85rem; }

.family-manage__members, .family-manage__invites { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.family-manage__member { display: grid; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.family-manage__who { display: flex; align-items: center; gap: 10px; }
.family-manage__edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.family-manage__edit .input { width: auto; flex: 1 1 140px; }
.family-manage__invites li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.family-manage__invites span { display: grid; min-width: 0; }
.family-manage__transfer { display: grid; gap: 8px; }

.family-join { max-width: 640px; margin: 24px auto; }
.family-join__card { display: grid; gap: 16px; justify-items: center; text-align: center; }
.family-join__title { margin: 0; font-size: 1.4rem; }
.family-join__from { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; color: var(--ink); }
.family-join__pets { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.family-join__pet { display: grid; justify-items: center; gap: 6px; max-width: 160px; }
.family-join__can { list-style: none; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-soft); text-align: left; display: grid; gap: 6px; font-size: .92rem; width: 100%; }
.family-join__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@media (max-width: 480px) {
    .family-join { margin: 12px auto; }
    .pet-family__members { grid-template-columns: minmax(0, 1fr); }
}

/* ครอบครัวของน้อง — the care tab (rules, one-tap logging), the /family page and family reminders */
.care-rules { border-left: 4px solid var(--orange-500); }
.care-rules__text { margin: 6px 0 0; white-space: pre-line; }
.care-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.care-quick__btn { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-align: center; min-width: 0; }
.care-quick__btn:hover { border-color: var(--navy-700); }
.care-quick__btn small { font-weight: 400; color: var(--success); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.care-quick__btn.is-done { background: var(--success-bg); border-color: transparent; }
.care-quick__icon { font-size: 1.5rem; line-height: 1; }
.reminder__family { color: var(--navy-700); font-size: .85rem; font-weight: 600; }

.family-home { display: grid; gap: 16px; margin-block: 16px 32px; }
.family-home__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.family-home__group .card__title { display: flex; align-items: center; gap: 8px; }
.family-home__pets { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.family-home__pet { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.family-home__pet:last-child { border-bottom: 0; padding-bottom: 0; }
.family-home__who { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.family-home__who span { display: grid; }
.family-home__rules { margin: 0; font-size: .88rem; color: var(--muted); white-space: pre-line; }
.family-home__slots { display: flex; flex-wrap: wrap; gap: 6px; }
.family-slot { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; border: 1.5px dashed var(--navy-200); background: var(--surface); color: var(--navy-800); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.family-slot.is-done { border-style: solid; border-color: transparent; background: var(--success-bg); color: var(--success); cursor: default; }
.family-slot--more { border-style: solid; color: var(--muted); }
.family-home__reminders { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.family-home__reminders li { display: grid; gap: 2px; }
@media (max-width: 480px) {
    .care-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ครอบครัวของน้อง round 2 — น้องอยู่กับใคร, แบ่งค่าใช้จ่าย, ใครค้างใคร */
.custody { display: grid; gap: 16px; }
.custody-now { display: grid; gap: 10px; }
.custody-now__who { display: flex; align-items: center; gap: 12px; }
.custody-now__who > div { display: grid; min-width: 0; }
.custody-now__who strong { font-size: 1.25rem; color: var(--navy-900, var(--ink)); }
.custody-now__due { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--warning-bg); color: #7a4a00; font-weight: 600; }
.custody-now__next { margin: 0; color: var(--navy-700); font-weight: 600; }
.custody-handover { display: grid; gap: 10px; }
.custody-handover__who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.custody-handover__heading { margin: 4px 0 0; font-size: .95rem; }
.custody-check { display: grid; gap: 6px; }
.custody-check__pet { font-size: .9rem; color: var(--navy-700); }
.custody-check__items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.custody-check__items li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--navy-50); }
.custody-check__items li.is-done span { color: var(--success); text-decoration: line-through; }
.custody-check__items label { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.custody-check__items input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--success); flex: none; }
.custody-check__add { display: flex; gap: 6px; }
.custody-check__add .input { flex: 1; min-width: 0; }
.custody-swaps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.custody-swap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.custody-swap > div:first-child { display: grid; gap: 2px; min-width: 0; }
.custody-swap__actions { display: flex; align-items: center; gap: 6px; }
.custody-periods { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.custody-period { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; }
.custody-period > span { display: grid; min-width: 0; }
.custody-period.is-mine { background: var(--navy-50); }
.custody-plan p { margin: 0 0 4px; }
.custody-now > .btn, .custody-handover > .btn:not(.btn--block) { justify-self: start; }
.custody-editor { display: grid; gap: 12px; }
.custody-editor__row { display: flex; flex-wrap: wrap; gap: 12px; }
.custody-editor__row .field { flex: 1 1 160px; }
.custody-members { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.custody-members li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 12px; }
.custody-members li.is-selected { border-color: var(--navy-700); background: var(--navy-50); }
.custody-members label { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.custody-members input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--navy-800); }
.custody-members__order { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--navy-800); color: #fff; font-size: .78rem; font-weight: 700; }
.custody-ranges { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.custody-ranges li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.custody-chip { display: inline-block; margin: 0 0 8px; padding: 4px 12px; border-radius: 999px; background: var(--navy-50); color: var(--navy-800); font-weight: 600; font-size: .9rem; }
.family-home__custody { font-size: .88rem; color: var(--navy-700); font-weight: 600; text-decoration: none; }
.family-home__custody.is-due { color: #8a5a00; }
.split-card { display: grid; gap: 8px; }
.split-card p { margin: 0; }
.split-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.split-people li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; }
.split-people label { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.split-people input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--navy-800); }
.split-people__percent { display: flex; align-items: center; gap: 4px; }
.split-people__percent .input { width: 76px; }
.balances { display: grid; gap: 10px; scroll-margin-top: 80px; }
.balances__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.balance { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.balance:last-child { border-bottom: 0; padding-bottom: 0; }
.balance__head { display: flex; align-items: center; gap: 10px; }
.balance__head > div { display: grid; min-width: 0; }
.balance__amount { font-size: 1.3rem; font-weight: 700; color: var(--muted); }
.balance__amount.is-owed { color: var(--success); }
.balance__amount.is-owing { color: var(--danger); }
.balance__pending { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--warning-bg); font-size: .9rem; }
.balance__actions { display: flex; gap: 6px; }
.balance__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px; }
.balance__months summary { cursor: pointer; color: var(--navy-700); font-size: .88rem; font-weight: 600; }
.balance__table { width: 100%; margin-top: 6px; border-collapse: collapse; font-size: .82rem; }
.balance__table th, .balance__table td { padding: 4px 6px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.balance__table th:first-child, .balance__table td:first-child { text-align: left; }
.balance__months { max-width: 100%; overflow-x: auto; }
.balances__hint { margin: 0; font-size: .82rem; }
@media (max-width: 480px) {
    .custody-ranges li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .custody-ranges li select { grid-column: 1 / -1; }
}

/* ---- "แท็ก" in posts: picked tags, the picker, @names while typing and in the text, "กับ …" under the author ---- */
.tag-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.tag-chips__label { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .85rem; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 4px 3px 4px; border-radius: 999px; background: var(--orange-50); border: 1px solid var(--orange-100); color: var(--ink); font-size: .88rem; }
.tag-chip--user { background: var(--navy-50); border-color: var(--navy-100); }
.tag-chip--partner { background: #eef7f1; border-color: #d5ecdc; }
.tag-chip__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.tag-chip__x { display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.tag-chip__x:hover { background: rgba(0, 23, 74, .08); color: var(--ink); }
.post-composer__tags { margin: 6px 0 0; }
.avatar--square { border-radius: 10px; }

.tag-picker { display: grid; gap: 10px; }
.tag-picker__search { position: relative; display: block; }
.tag-picker__search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.tag-picker__search .input { padding-left: 42px; }
.tag-picker__label { margin: 4px 0 0; }
.tag-picker__empty { margin: 8px 0; text-align: center; }
.tag-picker__list { display: grid; gap: 2px; max-height: min(52vh, 420px); margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.tag-picker__row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 14px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.tag-picker__row:hover { background: var(--surface-soft); }
.tag-picker__row.is-on { background: var(--orange-50); }
.tag-picker__who { display: grid; flex: 1; min-width: 0; }
.tag-picker__who strong, .tag-picker__who small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tag-picker__who small { color: var(--muted); font-size: .82rem; }
.tag-picker__check { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); color: #fff; }
.tag-picker__row.is-on .tag-picker__check { border-color: var(--orange-600); background: var(--orange-600); }

.mention-box { position: relative; }
.mention-box textarea { width: 100%; }
.mention-box__list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); display: grid; gap: 2px; max-height: 260px; margin: 0; padding: 6px; overflow-y: auto; list-style: none;
    border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.mention-box__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.mention-box__item:hover, .mention-box__item:focus-visible { background: var(--surface-soft); }
.mention-box__item > span { display: grid; min-width: 0; }
.mention-box__item strong, .mention-box__item small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mention-box__item small { color: var(--muted); font-size: .8rem; }

.post-mention { color: var(--orange-700); font-weight: 600; text-decoration: none; }
.post-mention:hover { text-decoration: underline; }
.post-card__with { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 5px; margin: -2px 0 0; color: var(--muted); font-size: .88rem; }
.post-card__with a { color: var(--ink); font-weight: 600; text-decoration: none; }
.post-card__with a:hover { text-decoration: underline; }
.post-card__untag { margin-left: auto; }

/* ---- passport: strays close together on a zoomed-out map, finding an area, and the table of every stray ---- */
.map-cluster { background: none; border: 0; }
.map-cluster span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--orange-600); color: #fff;
    font-family: var(--font-display); font-weight: 700; font-size: 1rem; border: 3px solid #fff;
    box-shadow: 0 0 0 6px rgba(232, 106, 0, .25), 0 4px 12px rgba(0, 23, 74, .35); transition: transform .15s; }
.map-cluster:hover span, .map-cluster:focus span { transform: scale(1.1); }
.map-pin--place span { background: var(--navy-800); }
.passport-map__key--cluster { width: 22px; height: 22px; background: var(--orange-600); box-shadow: 0 0 0 3px rgba(232, 106, 0, .25); }
.passport-map__search { position: relative; display: flex; gap: 8px; align-items: center; }
.passport-map__search .input { flex: 1; min-height: 42px; padding-left: 40px; border-radius: 999px; }
.passport-map__search .search__icon { left: 14px; }
.passport-map__places { margin-top: -4px; }
.passport-strays__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

/* A partner page's "เคส" tab: cases reported in its name, and the team's button to report one. */
.partner-cases { display: grid; gap: 16px; }
.partner-cases > .btn { justify-self: start; }

/* รับเงินช่วยเหลือ (case donations) */
.donation { display: grid; gap: 14px; scroll-margin-top: calc(var(--header-h) + 12px); }
.donation h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 8px; }
.donation__totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.donation__totals > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface-soft); min-width: 0; }
.donation__totals small { color: var(--muted); font-size: .8rem; }
.donation__totals strong { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); overflow-wrap: anywhere; }
.donation__totals .is-got { background: var(--orange-50); }
.donation__totals .is-got strong { color: var(--orange-700, var(--orange-600)); }
.donation__account { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--radius); border: 1px dashed var(--line); }
.donation__account > div { display: grid; gap: 2px; min-width: 0; }
.donation__number { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: .04em; color: var(--ink); }
.donation__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.donation__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-soft); }
.donation__who { display: grid; gap: 2px; flex: 1 1 160px; min-width: 0; }
.donation__amount { font-family: var(--font-display); color: var(--orange-600); white-space: nowrap; }
.donation__avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: #fff; color: var(--orange-600); flex-shrink: 0; }
.donation__slip img { width: 56px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.donation__note { flex-basis: 100%; display: flex; align-items: flex-start; gap: 6px; color: var(--orange-800); }
.donation__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (max-width: 480px) { .donation__totals strong { font-size: .95rem; } }

/* ===================================================================== ดวงดาวของเพื่อนตัวโต (Rainbow Star) */
.star-world--meadow { --sw-bg: linear-gradient(180deg, #8fd3f4 0%, #c9ecd8 62%, #a8dc8f 100%); --sw-ink: #16304d; --sw-soft: rgba(255,255,255,.62); --sw-link: #a63d03; }
.star-world--garden { --sw-bg: linear-gradient(170deg, #2b2160 0%, #5b3a8c 55%, #b0628f 100%); --sw-ink: #fff; --sw-soft: rgba(255,255,255,.14); --sw-link: #ffd29a; }
.star-world--moon { --sw-bg: linear-gradient(170deg, #0b1640 0%, #1d2f6e 60%, #34509a 100%); --sw-ink: #fff; --sw-soft: rgba(255,255,255,.13); --sw-link: #ffe39a; }
.star-world--cloud { --sw-bg: linear-gradient(180deg, #ffd9ec 0%, #e3ddff 52%, #cde8ff 100%); --sw-ink: #2b2350; --sw-soft: rgba(255,255,255,.66); --sw-link: #a63d03; }
.star-world--forever { --sw-bg: radial-gradient(ellipse at 28% 18%, #3c2a7a 0%, transparent 55%), radial-gradient(ellipse at 82% 72%, #1e3a7a 0%, transparent 52%), #0a0820; --sw-ink: #fff; --sw-soft: rgba(255,255,255,.12); --sw-link: #ffd29a; }

.star-world, .star-card, .star-chat { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--sw-bg); color: var(--sw-ink); box-shadow: var(--shadow); min-width: 0; }
.star-world > :not(.star-world__sky), .star-card > :not(.star-world__sky), .star-chat > :not(.star-world__sky) { position: relative; }
.star-world__sky { position: absolute; inset: 0; pointer-events: none; }
.star-world--garden .star-world__sky, .star-world--moon .star-world__sky, .star-world--forever .star-world__sky {
    opacity: .85;
    background-image:
        radial-gradient(1.6px 1.6px at 8% 14%, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 22% 32%, #fff 50%, transparent 52%),
        radial-gradient(2px 2px at 37% 9%, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 52% 24%, #fff 50%, transparent 52%),
        radial-gradient(1.6px 1.6px at 66% 12%, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 81% 30%, #fff 50%, transparent 52%),
        radial-gradient(2px 2px at 92% 8%, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 14% 58%, #fff 50%, transparent 52%),
        radial-gradient(1.6px 1.6px at 44% 48%, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 74% 54%, #fff 50%, transparent 52%),
        radial-gradient(1.6px 1.6px at 90% 66%, #fff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 30% 80%, #fff 50%, transparent 52%),
        radial-gradient(1.2px 1.2px at 60% 86%, #fff 50%, transparent 52%);
}
.star-world--forever .star-world__sky { background-size: 340px 340px; }
.star-world--moon .star-world__sky::after { content: ""; position: absolute; top: 18px; right: 22px; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 36% 36%, #fffbe6, #f0dc92); box-shadow: 0 0 44px rgba(255,240,180,.55); }
.star-world--meadow .star-world__sky {
    background:
        radial-gradient(circle at 50% 118%, transparent 52%, rgba(255,80,80,.28) 53%, rgba(255,170,60,.28) 56%, rgba(255,235,90,.28) 59%, rgba(90,200,110,.26) 62%, rgba(70,150,255,.24) 65%, rgba(150,90,230,.22) 68%, transparent 70%) top / 100% 300px no-repeat;
}
.star-world--cloud .star-world__sky {
    background:
        radial-gradient(ellipse 70px 26px at 16% 16%, rgba(255,255,255,.9) 60%, transparent 62%),
        radial-gradient(ellipse 50px 22px at 24% 12%, rgba(255,255,255,.9) 60%, transparent 62%),
        radial-gradient(ellipse 80px 28px at 82% 22%, rgba(255,255,255,.85) 60%, transparent 62%),
        radial-gradient(ellipse 56px 22px at 74% 18%, rgba(255,255,255,.85) 60%, transparent 62%),
        radial-gradient(ellipse 90px 30px at 50% 96%, rgba(255,255,255,.75) 60%, transparent 62%);
}
.star-world .link-button, .star-chat .link-button { color: var(--sw-link); }

.star-world { display: grid; gap: 14px; padding-bottom: 18px; }
.star-world__head { display: grid; justify-items: center; gap: 6px; padding: 24px 20px 0; text-align: center; }
.star-world__eyebrow { padding: 4px 14px; border-radius: 999px; background: var(--sw-soft); font-family: var(--font-display); font-weight: 600; font-size: .9rem; }
.star-world__emoji { font-size: 2.6rem; line-height: 1.1; animation: star-float 4s ease-in-out infinite; }
.star-world__head h2 { margin: 0; font-size: clamp(1.25rem, 4.2vw, 1.6rem); color: inherit; }
.star-world__head p { margin: 0; max-width: 520px; opacity: .9; }
.star-world__traits { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0 16px; }
.star-trait { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--sw-soft); font-size: .88rem; font-weight: 600; }
.star-trait__dots { display: inline-flex; gap: 3px; }
.star-trait__dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .25; }
.star-trait__dots i.on { opacity: 1; }
.star-world__facts { display: grid; gap: 6px; margin: 0; padding: 0 20px; max-width: 620px; justify-self: center; width: 100%; box-sizing: border-box; }
.star-world__facts div { display: grid; grid-template-columns: minmax(96px, auto) minmax(0, 1fr); gap: 10px; font-size: .92rem; }
.star-world__facts dt { opacity: .75; }
.star-world__facts dd { margin: 0; overflow-wrap: anywhere; }
.star-world__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0 16px; }
.star-action { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 0; border-radius: 999px; background: rgba(255,255,255,.94); color: #3a2a78; font: inherit; font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .2s; }
.star-action:hover { transform: translateY(-1px); text-decoration: none; }
.star-action--quiet { background: var(--sw-soft); color: inherit; box-shadow: none; }
.star-world__loading { display: grid; place-items: center; padding: 12px; }
.star-world__empty { margin: 0; padding: 0 20px; text-align: center; font-size: .92rem; opacity: .85; }
.star-memories { display: grid; gap: 10px; padding: 0 14px; }
.star-memories h3 { margin: 4px 4px 0; font-size: 1.05rem; color: inherit; }
.star-memory { display: grid; gap: 8px; padding: 14px; border-radius: var(--radius); background: rgba(255,255,255,.95); color: var(--ink); min-width: 0; }
.star-memory--letter { background: #fffaf0; box-shadow: inset 4px 0 0 #f4b860; }
.star-memory header { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.star-memory__kind { font-size: 1.3rem; line-height: 1.2; }
.star-memory__title { display: grid; gap: 2px; flex: 1; min-width: 0; }
.star-memory__title strong { overflow-wrap: anywhere; }
.star-memory__title small { color: var(--muted); font-size: .8rem; }
.star-memory__tools { display: flex; gap: 4px; }
.star-memory__text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.star-memory__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.star-memory__photo { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-soft); }
.star-memory__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.star-world-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.star-world-pick { display: grid; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.star-world-pick > span { font-size: 1.3rem; }
.star-world-pick strong { font-size: .92rem; color: var(--ink); }
.star-world-pick small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.star-world-pick.active { border-color: var(--orange-500); background: var(--orange-50); }
.star-scales { display: grid; gap: 14px; }
.star-scale { display: grid; gap: 4px; }
.star-scale__name { font-weight: 600; color: var(--ink); }
.star-scale input[type=range] { width: 100%; accent-color: var(--orange-500); }
.star-scale__ends { display: flex; justify-content: space-between; color: var(--muted); }

.page-head--stars { background: linear-gradient(160deg, #2a1f5c 0%, #1b2a6b 55%, #0d1b4a 100%); }
.my-stars { padding-block: 20px 32px; }
.my-stars__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.star-card { display: grid; justify-items: center; gap: 12px; padding: 20px 14px 16px; text-align: center; }
.star-card__link { display: grid; justify-items: center; gap: 4px; color: inherit; text-decoration: none; min-width: 0; }
.star-card__link:hover { text-decoration: none; }
.star-card__link strong { font-family: var(--font-display); font-size: 1.15rem; overflow-wrap: anywhere; }
.star-card__link small { opacity: .88; }
.star-card__photo .avatar { box-shadow: 0 0 0 3px rgba(255,255,255,.7), 0 0 24px rgba(255,240,180,.45); }

.star-chat-page { max-width: 760px; padding-block: 14px 28px; }
.star-chat { display: grid; gap: 12px; padding: 14px; min-height: 70vh; align-content: start; }
.star-chat__head { display: flex; align-items: center; gap: 10px; }
.star-chat__head .icon-button { color: inherit; }
.star-chat__who { display: grid; flex: 1; min-width: 0; }
.star-chat__who strong { font-family: var(--font-display); font-size: 1.1rem; overflow-wrap: anywhere; }
.star-chat__who small { opacity: .85; }
.star-chat__disclaimer { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--sw-soft); font-size: .84rem; line-height: 1.5; }
.star-chat__off { display: grid; justify-items: center; gap: 12px; padding: 28px 12px; text-align: center; }
.star-chat__messages { display: grid; gap: 8px; align-content: start; }
.star-chat__hint { margin: 12px 0; text-align: center; opacity: .88; }
.star-msg { max-width: 85%; padding: 10px 14px; border-radius: 18px; overflow-wrap: anywhere; line-height: 1.55; }
.star-msg p { margin: 0; white-space: pre-wrap; }
.star-msg--me { justify-self: end; background: var(--orange-500); color: #fff; border-bottom-right-radius: 6px; }
.star-msg--pet { justify-self: start; background: rgba(255,255,255,.95); color: var(--ink); border-bottom-left-radius: 6px; }
.star-msg--care { max-width: 100%; background: #fff8e1; color: var(--ink); box-shadow: inset 0 0 0 1.5px #f4b860; }
.star-msg__keep { margin-top: 6px; padding: 0; border: 0; background: none; color: #6a4fb3; font: inherit; font-size: .8rem; text-decoration: underline; cursor: pointer; }
.star-msg--typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.star-msg--typing span { width: 7px; height: 7px; border-radius: 50%; background: #8a7fb8; animation: star-typing 1.2s ease-in-out infinite; }
.star-msg--typing span:nth-child(2) { animation-delay: .15s; }
.star-msg--typing span:nth-child(3) { animation-delay: .3s; }
.star-chat__error { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); font-size: .88rem; }
.star-chat__compose { display: flex; gap: 8px; align-items: flex-end; }
.star-chat__compose textarea { flex: 1; min-width: 0; resize: none; color: var(--ink); }
.star-chat__left { margin: 0; font-size: .82rem; opacity: .85; text-align: center; }
.star-chat__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: .8rem; opacity: .9; }
.star-context { display: grid; gap: 6px; margin: 12px 0; padding-left: 18px; max-height: 50vh; overflow: auto; font-size: .92rem; overflow-wrap: anywhere; }

@keyframes star-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes star-typing { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .star-world__emoji, .star-msg--typing span { animation: none; } }
@media (max-width: 420px) { .star-world-picks { grid-template-columns: minmax(0, 1fr); } .star-msg { max-width: 92%; } }

/* ---------------------------------------------------------------- Back office (สำนักงาน JUMBO, /office) */
.office-shell .admin-side { background: linear-gradient(180deg, var(--navy-950), var(--navy-800)); }
.office-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.office-card { display: grid; align-content: start; gap: 8px; padding: 20px; }
.office-card h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.1rem; }
.office-card p { margin: 0; }
.office-card--soon { background: var(--surface-soft); box-shadow: none; }
.office-card__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.office-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.office-checks { display: grid; gap: 10px; margin: 0 0 12px; padding: 0; border: 0; }
.office-2fa { max-width: 560px; margin: 24px auto; display: grid; gap: 14px; }
.office-2fa h1 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: clamp(1.25rem, 3vw, 1.5rem); }
.office-2fa p { margin: 0; }
.office-2fa__steps { display: grid; gap: 18px; margin: 0; padding-left: 1.3em; }
.office-2fa__qr { display: grid; place-items: center; min-height: 236px; margin-top: 10px; }
.office-2fa__qr img { border-radius: var(--radius); border: 1px solid var(--line); }
.office-2fa__secret { display: inline-block; margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: var(--navy-50); font-size: 1rem; letter-spacing: .06em; word-break: break-all; }
.office-2fa__form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.office-2fa__input { flex: 1 1 160px; max-width: 220px; font-size: 1.3rem; letter-spacing: .2em; text-align: center; }
.office-2fa__codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin: 0; padding-left: 1.6em; font-size: 1.05rem; }
.office-2fa__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.office-2fa--verify { text-align: left; }
@media (max-width: 420px) { .office-2fa__codes { grid-template-columns: minmax(0, 1fr); } }

/* Back office › บุคคล (HR) */
.tag--muted { background: var(--surface-soft); color: var(--muted); }
.office-card--link { color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.office-card--link:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.office-section { display: grid; gap: 12px; margin-top: 16px; padding: 20px; }
.office-section h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.office-section--private { border: 1px dashed var(--line); }
.office-section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.office-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 24px; margin: 0; }
.office-facts dt { color: var(--muted); font-size: .85rem; }
.office-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.office-facts__wide { grid-column: 1 / -1; }
.office-note { margin: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-soft); white-space: pre-line; }
.office-balances { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.office-balance { display: grid; gap: 4px; padding: 16px; }
.office-balance h3 { margin: 0; font-size: .95rem; color: var(--muted); font-weight: 600; }
.office-balance p { margin: 0; }
.office-balance__left strong { font-family: var(--font-display); font-size: 1.8rem; color: var(--ink); }
.office-balance__left span { color: var(--muted); }
.office-person { display: flex; align-items: center; gap: 14px; min-width: 0; }
.office-person h1 { overflow-wrap: anywhere; }
.admin-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-table--clickable tbody tr { cursor: pointer; }
.admin-table--clickable tbody tr:hover { background: var(--surface-soft); }
.office-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.office-form-grid__wide { grid-column: 1 / -1; }
.office-form-heading { display: flex; align-items: center; gap: 6px; margin: 16px 0 8px; font-size: .95rem; color: var(--muted); }
.office-leave-days { min-height: 1.4em; margin: 4px 0 8px; }
.office-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.office-upload .input { flex: 1 1 160px; min-width: 0; }
.office-upload__pick { position: relative; overflow: hidden; cursor: pointer; }
.office-upload__pick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.office-docs { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.office-docs li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.office-docs li > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.office-docs__actions { display: flex; gap: 4px; }
.office-holiday-form { grid-template-columns: minmax(150px, 200px) minmax(0, 1fr) auto; align-items: end; }
.office-holiday-form .field { margin: 0; }
.office-holidays { display: grid; gap: 0; margin: 16px 0 0; padding: 0; list-style: none; }
.office-holidays li { display: grid; grid-template-columns: minmax(130px, 180px) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); }
.office-holidays__past { opacity: .55; }
.office-holidays__date small { display: block; }
@media (max-width: 560px) {
    .office-holiday-form { grid-template-columns: minmax(0, 1fr); }
    .office-holidays li { grid-template-columns: minmax(0, 1fr) auto; }
    .office-holidays li > span:nth-child(2) { grid-column: 1; }
}

/* Back office › บัญชี */
.office-shell .num { text-align: right; font-variant-numeric: tabular-nums; }
.office-positive { color: var(--success); }
.office-negative { color: var(--danger); }
.office-row--off { opacity: .55; }
.office-balance--pick { font: inherit; text-align: left; color: inherit; border: 2px solid transparent; cursor: pointer; }
.office-balance--pick:hover { box-shadow: var(--shadow); }
.office-balance--on { border-color: var(--navy-800); }
.office-book-filters { flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.office-book-filters .tabs { margin: 0; }
.office-book-search { flex: 1 1 220px; min-width: 0; }
.office-book-search .input { width: 100%; }
.office-book-totals { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 4px 0 12px; }
.office-book td .tag { margin-right: 4px; }
.office-fieldset { display: grid; gap: 4px; margin: 0; padding: 0; border: 0; min-width: 0; }
.office-fieldset .tabs { margin-bottom: 8px; }
.office-amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 16px; margin: 4px 0 12px; padding: 12px; border-radius: var(--radius); background: var(--surface-soft); }
.office-amounts dt { color: var(--muted); font-size: .85rem; }
.office-amounts dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.office-amounts__total dd { font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.office-amounts--stack { grid-template-columns: minmax(0, 1fr); }
.office-amounts--stack > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.office-amounts--stack dd { margin: 0; }
.office-report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.office-report-grid > .office-section { margin-top: 16px; }
.office-claim-row { position: relative; display: grid; gap: 4px; margin: 12px 0 0; padding: 12px 14px 4px; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.office-claim-row legend { padding: 0 6px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.office-claim-row__remove { position: absolute; top: 4px; right: 6px; }
.office-claim-row__receipt { display: grid; align-content: start; gap: 6px; }
.office-claim-row__receipt .office-upload__pick { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.office-claim-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 4px; }
.office-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin: 8px 0 12px; padding: 0; list-style: none; }
.office-steps li { padding: 10px 12px; border-radius: var(--radius); background: var(--surface-soft); color: var(--muted); }
.office-steps__done { background: var(--success-bg) !important; color: var(--success) !important; }
.office-steps__now { background: var(--warning-bg) !important; color: #8a5a00 !important; font-weight: 600; }
.office-steps__off { opacity: .5; }
.office-sheet-delete { margin-right: auto; color: var(--danger); }

/* Back office › โปรเจกต์ */
.office-empty { display: grid; justify-items: center; gap: 6px; margin-top: 16px; padding: 32px 20px; text-align: center; color: var(--muted); }
.office-empty p { margin: 0; }
.office-pre { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.office-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; margin-top: 16px; }
.office-project-card { display: grid; align-content: start; gap: 10px; padding: 20px; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.office-project-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.office-project-card h2 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.office-project-card__head { display: flex; justify-content: space-between; gap: 8px; }
.office-project-card__desc { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .9rem; }
.office-project-card__counts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; }
.office-project-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.office-progress { height: 8px; border-radius: 999px; background: var(--surface-soft); overflow: hidden; }
.office-progress span { display: block; height: 100%; border-radius: inherit; background: var(--success); }
.office-avatars { display: flex; align-items: center; }
.office-avatars > * { margin-left: -6px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.office-avatars > :first-child { margin-left: 0; }
.office-avatars__more { display: inline-grid; place-items: center; width: 28px; height: 28px; background: var(--surface-soft); color: var(--muted); font-size: .75rem; }
.office-board-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.office-board-filters .input { flex: 1 1 160px; min-width: 0; }
.office-board-hint { margin: 12px 0 0; }
.office-board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); align-items: start; gap: 12px; margin-top: 12px; padding-bottom: 8px; overflow-x: auto; }
.office-column { display: grid; align-content: start; gap: 8px; min-width: 0; min-height: 160px; padding: 10px; border: 2px dashed transparent; border-radius: var(--radius); background: var(--surface-soft); transition: border-color .15s, background .15s; }
.office-column--over { border-color: var(--orange-700); background: var(--navy-50); }
.office-column__head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.office-column__head h2 { flex: 1; margin: 0; font-size: .95rem; }
.office-column__cards { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.office-column__empty { margin: 0; padding: 16px 4px; text-align: center; }
.office-task { position: relative; display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-sm); cursor: grab; }
.office-task[draggable=false] { cursor: default; }
.office-task--dragging { opacity: .45; }
.office-task--urgent { border-left: 4px solid var(--danger); }
.office-task__open { display: grid; gap: 2px; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.office-task__open:focus-visible { outline: 2px solid var(--orange-700); outline-offset: 2px; border-radius: 4px; }
.office-task__key { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .02em; }
.office-task__title { line-height: 1.4; overflow-wrap: anywhere; }
.office-task__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .8rem; }
.office-task__due { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); }
.office-task__due--late { color: var(--danger); font-weight: 600; }
.office-task__who { margin-left: auto; }
.office-task__move { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; border-radius: 8px; background: #fff; opacity: 0; transition: opacity .15s; }
.office-task:hover .office-task__move, .office-task:focus-within .office-task__move { opacity: 1; }
@media (hover: none) { .office-task__move { position: static; justify-content: flex-end; opacity: 1; } }
.office-comments { display: grid; gap: 12px; margin: 0 0 12px; padding: 0; list-style: none; }
.office-comments li { display: flex; align-items: flex-start; gap: 10px; }
.office-comments li > div { flex: 1; min-width: 0; }
.office-comments p { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.office-comments__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.office-comments__meta .btn { margin-left: auto; }
.office-comment-form { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 8px; }
.office-comment-form textarea { flex: 1; min-width: 0; }
.office-people-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; max-height: 260px; padding: 4px; overflow: auto; }
.office-people-pick .check { align-items: center; }
.office-meetings { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.office-meeting-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 16px 20px; color: inherit; text-decoration: none; }
.office-meeting-row:hover { box-shadow: var(--shadow); }
.office-meeting-row > div:first-child { display: grid; gap: 2px; min-width: 0; }
.office-meeting-row__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.office-attendees { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.office-attendees li { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.office-task-link { min-width: 0; color: var(--ink); text-align: left; text-decoration: none; overflow-wrap: anywhere; }
.office-task-link:hover { text-decoration: underline; }
@media (max-width: 560px) {
    .office-board { grid-template-columns: repeat(4, minmax(78vw, 1fr)); scroll-snap-type: x mandatory; }
    .office-column { scroll-snap-align: start; }
    .office-comment-form { flex-direction: column; align-items: stretch; }
}

/* Back office › วันนี้ของคุณ, การแจ้งเตือน */
.office-today { display: grid; gap: 10px; margin-top: 20px; padding: 20px; }
.office-today__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.office-today__head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.1rem; }
.office-today > .muted { margin: 0; }
.office-today__clear { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--success); }
.office-today__groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px 24px; }
.office-today__groups:empty { display: none; }
.office-today__group { display: grid; align-content: start; gap: 6px; min-width: 0; }
.office-today__group h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .95rem; }
.office-today__group ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.office-today__group li { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.office-today__group a { color: var(--ink); text-decoration: none; }
.office-today__group a:hover { text-decoration: underline; }
.office-today__group .tag { font-size: .72rem; }
.office-notify { display: grid; gap: 16px; max-width: 720px; margin-top: 16px; padding: 20px; }
.office-notify > p { display: flex; align-items: center; gap: 6px; margin: 0; }
.office-notify__group { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; }
.office-notify__group legend { margin-bottom: 4px; padding: 0; font-weight: 600; }
.office-notify__group .check span { display: grid; gap: 2px; }
.office-notify__group p { margin: 0; }
.office-notify__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Back office › เงินเดือน */
.office-pay-filter { margin: 4px 0 12px; }
.office-pay-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 12px; margin: 16px 0; }
.office-pay-totals .card { display: grid; align-content: start; gap: 4px; padding: 14px 16px; }
.office-pay-totals strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.office-pay-form { display: grid; gap: 12px; margin: 0 0 16px; padding: 20px; }
.office-pay-form h2 { margin: 0; font-size: 1.05rem; }
.office-pay-form p { margin: 0; }
.office-slip-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.office-slip-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.office-slip-list li:last-child { border-bottom: 0; }
.office-slip-list a { display: grid; gap: 2px; color: var(--ink); text-decoration: none; }
.office-slip-list a:hover strong { text-decoration: underline; }
.office-slip-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.office-slip { display: grid; gap: 20px; max-width: 820px; padding: 28px; }
.office-slip__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.office-slip__head h1 { margin: 2px 0; font-size: 1.4rem; }
.office-slip__head p { margin: 0; }
.office-slip__brand { color: var(--orange-700); letter-spacing: .08em; }
.office-slip__who { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px 20px; margin: 0; }
.office-slip__who div { display: grid; gap: 2px; }
.office-slip__who dt { color: var(--muted); font-size: .8rem; }
.office-slip__who dd { margin: 0; overflow-wrap: anywhere; }
.office-slip__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px 28px; }
.office-slip__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.office-slip__table caption { padding-bottom: 6px; font-weight: 700; text-align: left; }
.office-slip__table th, .office-slip__table td { padding: 6px 0; border-bottom: 1px solid var(--line); font-weight: 400; text-align: left; }
.office-slip__table td { text-align: right; white-space: nowrap; }
.office-slip__table tfoot th, .office-slip__table tfoot td { border-bottom: 0; font-weight: 700; }
.office-slip__net { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0; padding: 14px 18px; border-radius: var(--radius); background: var(--surface-soft); font-size: 1.05rem; }
.office-slip__net strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
@media print {
    body:has(.office-slip) * { visibility: hidden; }
    .office-slip, .office-slip * { visibility: visible; }
    .office-slip { position: absolute; left: 0; top: 0; width: 100%; max-width: none; border: 0; box-shadow: none; }
}

/* Back office › ขาย: quotes, invoices and receipts */
.office-sales-form { display: grid; gap: 12px; padding: 20px; }
.office-sales-form__title { margin: 8px 0 0; font-size: 1rem; }
.office-sales-form__title:first-child { margin-top: 0; }
.office-sales-lines td { vertical-align: top; }
.office-sales-lines textarea { min-width: min(320px, 60vw); resize: vertical; }
.office-sales-lines__num { width: 110px; text-align: right; }
.office-sales-lines__unit { width: 80px; }
.office-sales-form__bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px 32px; align-items: start; margin-top: 8px; }
.office-sales-totals { display: grid; gap: 6px; margin: 0; font-variant-numeric: tabular-nums; }
.office-sales-totals div { display: flex; justify-content: space-between; gap: 16px; }
.office-sales-totals dt { color: var(--muted); }
.office-sales-totals dd { margin: 0; white-space: nowrap; }
.office-sales-totals__grand { padding-top: 6px; border-top: 1px solid var(--line); font-weight: 700; }
.office-sales-totals__grand dt { color: var(--ink); }
.office-sales-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.office-sales-actions__gap { flex: 1; }
.office-sales-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 4px; }
.office-sales-receive-total { margin: 0 0 8px; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.office-doc { position: relative; display: grid; gap: 18px; max-width: 880px; padding: 32px; overflow: hidden; }
.office-doc__stamp { position: absolute; top: 38%; left: 50%; padding: 6px 28px; border: 4px solid currentColor; border-radius: 8px; color: rgba(196, 43, 43, .22); font-size: 3.4rem; font-weight: 800; letter-spacing: .1em; pointer-events: none; transform: translate(-50%, -50%) rotate(-18deg); }
.office-doc--draft .office-doc__stamp { color: rgba(120, 120, 120, .2); }
.office-doc__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 32px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.office-doc__seller, .office-doc__customer { display: grid; gap: 2px; font-size: .92rem; }
.office-doc__company { font-size: 1.25rem; }
.office-doc__meta { display: grid; gap: 8px; min-width: 220px; text-align: right; }
.office-doc__meta h1 { margin: 0; font-size: 1.45rem; }
.office-doc__meta dl { display: grid; gap: 2px; margin: 0; }
.office-doc__meta dl div { display: flex; justify-content: flex-end; gap: 12px; }
.office-doc__meta dt { color: var(--muted); }
.office-doc__meta dd { margin: 0; font-variant-numeric: tabular-nums; }
.office-doc__customer { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.office-doc__customer h2, .office-doc__note h2 { margin: 0 0 2px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.office-doc__pre { white-space: pre-line; overflow-wrap: anywhere; }
.office-doc__subject { margin: 0; }
.office-doc__lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.office-doc__lines th { padding: 8px; border-bottom: 2px solid var(--ink); font-size: .85rem; text-align: left; }
.office-doc__lines td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.office-doc__lines .num { text-align: right; }
.office-doc__sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px 32px; align-items: start; }
.office-doc__words { display: grid; gap: 4px; padding: 12px 16px; border-radius: var(--radius); background: var(--surface-soft); }
.office-doc__paid { margin: 0; padding: 10px 16px; border-left: 4px solid var(--success); background: var(--surface-soft); font-weight: 600; }
.office-doc__note p { margin: 0; }
.office-doc__void-reason { margin: 0; color: var(--danger); font-weight: 600; }
.office-doc__signs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px 48px; margin-top: 28px; }
.office-doc__sign { display: grid; gap: 4px; justify-items: center; text-align: center; }
.office-doc__sign-line { width: 100%; max-width: 240px; height: 40px; border-bottom: 1px dotted var(--ink); }
.office-doc__footer { margin: 0; color: var(--muted); font-size: .85rem; text-align: center; }
@media (max-width: 600px) {
    .office-doc { padding: 18px; }
    .office-doc__meta { text-align: left; }
    .office-doc__meta dl div { justify-content: flex-start; }
    .office-doc__stamp { font-size: 2.2rem; }
}
@media print {
    @page { size: A4; margin: 12mm; }
    body:has(.office-doc) * { visibility: hidden; }
    .office-doc, .office-doc * { visibility: visible; }
    .office-doc { position: absolute; left: 0; top: 0; width: 100%; max-width: none; padding: 0; border: 0; box-shadow: none; overflow: visible; }
    .office-doc__lines tr { break-inside: avoid; }
    .office-doc__signs { break-inside: avoid; }
}

/* Back office › ลงเวลา */
.office-clock { display: grid; gap: 10px; margin-top: 20px; margin-bottom: 20px; padding: 20px; }
.office-clock__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.office-clock__head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.1rem; }
.office-clock__body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.office-clock__now { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.office-clock > .muted, .office-clock > .field__error { margin: 0; }
.office-warn { color: #8a5a00; }
.office-time-table__off td { color: var(--muted); background: var(--surface-soft); }

/* Back office › แดชบอร์ดผู้บริหาร */
.office-dash-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; margin-bottom: 16px; }
.office-dash-tile { display: grid; align-content: start; gap: 4px; padding: 16px 18px; color: var(--ink); text-decoration: none; }
.office-dash-tile strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.office-dash-tile--link:hover { border-color: #fdba74; }
.office-dash-section { display: grid; gap: 10px; margin-bottom: 16px; padding: 20px; }
.office-dash-section h2 { margin: 0; font-size: 1.1rem; }
.office-dash-section h3 { margin: 8px 0 0; font-size: .95rem; }
.office-dash-section p { margin: 0; }
.office-dash-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 16px; }
.office-dash-facts { display: grid; gap: 6px; margin: 0; }
.office-dash-facts div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.office-dash-facts dt { color: var(--muted); }
.office-dash-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.office-dash-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.office-dash-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.office-dash-projects { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.office-dash-projects__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.office-dash-projects__head a { color: var(--ink); }
.office-dash-projects__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; }
.office-dash-progress { height: 8px; overflow: hidden; border-radius: 4px; background: var(--surface-soft); }
.office-dash-progress span { display: block; height: 100%; border-radius: 4px; background: #2a78d6; }

.office-chart { --series-income: #2a78d6; --series-expense: #eb6834; display: grid; gap: 8px; margin: 0; }
.office-chart__legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; color: var(--muted); font-size: .85rem; list-style: none; }
.office-chart__legend li { display: inline-flex; align-items: center; gap: 6px; }
.office-chart__key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.office-chart__key--income { background: var(--series-income); }
.office-chart__key--expense { background: var(--series-expense); }
.office-chart__plot { position: relative; }
.office-chart__plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.office-chart__grid { stroke: #ecebe7; stroke-width: 1; }
.office-chart__axis { stroke: #d6d4cf; stroke-width: 1; }
.office-chart__tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.office-chart__bar--income { fill: var(--series-income); }
.office-chart__bar--expense { fill: var(--series-expense); }
.office-chart__hit { fill: transparent; cursor: default; outline: none; }
.office-chart__hit.is-on { fill: rgba(0, 0, 0, .04); }
.office-chart__hit:focus-visible { stroke: var(--ink); stroke-width: 1; }
.office-chart__tip { position: absolute; top: 0; z-index: 2; display: grid; gap: 2px; min-width: 170px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .1); font-size: .85rem; font-variant-numeric: tabular-nums; pointer-events: none; transform: translateX(12px); }
.office-chart__tip--left { transform: translateX(calc(-100% - 12px)); }
.office-chart__tip span { display: inline-flex; align-items: center; gap: 6px; }
.office-chart__table summary { color: var(--muted); font-size: .85rem; cursor: pointer; }

/* Sales › recurring invoice card on an invoice */
.office-recurring { margin: 12px 0 16px; padding: 14px 16px; }
.office-recurring__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.office-recurring__head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.office-recurring p { margin: 4px 0; }
.office-recurring__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* Executive dashboard › AI summary */
.office-dash-ai { margin-bottom: 16px; padding: 16px 18px; }
.office-dash-ai__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.office-dash-ai__head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.office-dash-ai__points { margin: 0 0 8px; padding-left: 1.2em; display: grid; gap: 6px; line-height: 1.6; }
.office-dash-ai p { margin: 4px 0; }

/* ---------------------------------------------------------------- back office › ปฏิทินคอนเทนต์ */
.office-form-grid .field--wide { grid-column: 1 / -1; }
.content-cal { display: grid; gap: 12px; }
.content-cal__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.content-cal__nav { display: flex; align-items: center; gap: 6px; }
.content-cal__title { margin: 0 0 0 6px; font-size: 1.15rem; }
.content-cal__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.content-cal__body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.content-cal__main { min-width: 0; }
.content-cal__empty { padding: 24px 0; text-align: center; }
.content-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.content-cal__weekday { padding: 6px 8px; font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.content-cal__day { display: flex; flex-direction: column; gap: 4px; min-height: 110px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.content-cal__grid--week .content-cal__day { min-height: 320px; }
.content-cal__day:nth-child(7n) { border-right: 0; }
.content-cal__day.is-other { background: var(--surface-soft); }
.content-cal__day.is-other .content-cal__date span { color: var(--muted); }
.content-cal__day.is-today .content-cal__date span { background: var(--orange-600); color: #fff; }
.content-cal__day.is-drop { outline: 2px dashed var(--orange-500); outline-offset: -3px; background: var(--orange-50); }
.content-cal__date { display: flex; align-items: center; justify-content: space-between; font-size: .82rem; }
.content-cal__date span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 999px; font-weight: 600; }
.content-cal__add { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); cursor: pointer; opacity: 0; }
.content-cal__day:hover .content-cal__add, .content-cal__add:focus-visible { opacity: 1; }
.content-cal__add:hover { background: var(--navy-50); color: var(--navy-700); }
.content-cal__list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.content-cal__list li { display: grid; gap: 6px; }
.content-cal__list-day { margin: 0; font-size: .95rem; }
.content-cal__list-day.is-today { color: var(--orange-700); }
.content-cal__side { display: grid; gap: 8px; padding: 14px; position: sticky; top: calc(var(--header-h, 64px) + 12px); max-height: calc(100vh - 120px); overflow: auto; }
.content-cal__side h3 { margin: 0; font-size: 1rem; }
.content-cal__side p { margin: 0; }

.content-card { display: grid; gap: 2px; width: 100%; padding: 5px 7px 5px 9px; border: 1px solid var(--line); border-left: 4px solid var(--channel, var(--muted)); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .8rem; text-align: left; cursor: pointer; box-shadow: var(--shadow-sm); }
.content-card[draggable="true"] { cursor: grab; }
.content-card:hover { border-color: var(--navy-200); }
.content-card:focus-visible { outline: 2px solid var(--ring, var(--orange-500)); outline-offset: 1px; }
.content-card.is-overdue { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.content-card--posted { opacity: .8; }
.content-card--cancelled { opacity: .55; text-decoration: line-through; }
.content-card__top { display: flex; justify-content: space-between; gap: 4px; color: var(--muted); font-size: .72rem; }
.content-card__channel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-card__time { font-variant-numeric: tabular-nums; }
.content-card__title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 600; line-height: 1.35; }
.content-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--muted); font-size: .72rem; }
.content-card__late { color: var(--danger); font-weight: 600; }
.content-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--muted); }
.content-dot--soon { background: var(--orange-500); }
.content-dot--navy { background: var(--navy-600); }
.content-dot--success { background: var(--success); }

.content-channels { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 12px 0 0; padding: 0; border: 0; }
.content-channels legend { margin-bottom: 6px; }
.content-channels__item { align-items: center; padding: 6px 10px 6px 8px; border: 1px solid var(--line); border-left: 4px solid var(--channel); border-radius: var(--radius-sm); }

@media (max-width: 1023px) {
    .content-cal__body { grid-template-columns: minmax(0, 1fr); }
    .content-cal__side { position: static; max-height: none; }
}
@media (max-width: 767px) {
    .content-cal__grid { overflow-x: auto; }
    .content-cal__day { min-height: 72px; }
    .content-card__title { -webkit-line-clamp: 1; }
}
.content-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.content-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: var(--navy-50); color: var(--navy-800); font-size: .82rem; }
.content-tag button { display: inline-grid; place-items: center; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.content-tags .input { width: 160px; }
.content-post-tabs .tabs__tab { display: inline-flex; align-items: center; gap: 6px; border-bottom-color: var(--channel); }
.content-add-channel { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.content-post { display: grid; gap: 10px; margin-top: 10px; padding: 14px; }
.content-post__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.content-post__row .input { flex: 1 1 200px; }
.content-post__heading { margin: 4px 0 0; font-size: .95rem; }
.content-status { display: flex; flex-wrap: wrap; gap: 6px; }
.content-status__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; }
.content-status__btn.is-on { border-color: var(--navy-700); background: var(--navy-50); font-weight: 600; }
.content-status__btn:disabled { cursor: default; }
.content-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.content-link { padding: 0; border: 0; background: none; color: var(--navy-700); font: inherit; text-align: left; cursor: pointer; }
.content-link:hover { text-decoration: underline; }
.content-report { display: grid; gap: 14px; }
.content-report__range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.content-report__range .field { margin: 0; }
.content-report__tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.content-report__table, .content-report__top { padding: 14px; }
.content-report h3 { margin: 0 0 8px; font-size: 1rem; }
.content-report .content-dot, .content-settings .content-dot { vertical-align: middle; }
.content-settings { display: grid; gap: 14px; }
.content-settings__list { padding: 14px; }
.content-settings__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.content-settings__head h3 { margin: 0; font-size: 1rem; }
.content-color { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.content-order { width: 80px; }
.content-cal__side.is-drop { outline: 2px dashed var(--orange-500); outline-offset: -3px; background: var(--orange-50); }

/* pet match: "เหมาะกับน้องมะลิ", who a product suits, the "for your pets" / collections rows */
.match-badge { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 3px 10px; border-radius: 99px; background: var(--success-bg); color: var(--success); font-size: .82rem; font-weight: 600; }
.match-badge--card { padding: 2px 8px; font-size: .74rem; }
.product-info__suits { margin: 0; }
.suits-picker__stages { margin-top: 8px; }
.shop-page__for { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: var(--radius); background: var(--navy-50); color: var(--navy-800); font-weight: 600; }
.shop-strip { display: grid; gap: 10px; min-width: 0; }
.shop-strip__title { margin: 0; font-size: 1.15rem; }
.shop-strip__row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 200px); gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.shop-strip__row > * { scroll-snap-align: start; }
.shop-strip__row--collections { grid-auto-columns: minmax(220px, 260px); }

/* collections */
.collection-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.collection-card:hover { transform: translateY(-2px); color: var(--ink); }
.collection-card__cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--orange-50); font-size: 2.4rem; }
.collection-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.collection-card__body { display: grid; gap: 2px; padding: 10px 12px 12px; }
.collection-card__body strong { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.collection-page { padding-block: 24px 80px; display: grid; gap: 16px; }
.collection-hero { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; align-items: center; }
.collection-hero__cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); }
.collection-hero__text { display: grid; gap: 8px; }
.collection-hero__text h1 { margin: 0; }
.collection-hero__by a, .collection-hero__by > span { display: inline-flex; align-items: center; gap: 6px; color: var(--navy-800); font-weight: 600; }
.collection-hero__blurb { margin: 0; color: var(--text); }
.collection-hero__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.collection-form__cover { display: flex; align-items: center; gap: 12px; }
.collection-form__cover img { width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.collection-form__chosen { display: grid; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; counter-reset: pick; }
.collection-form__chosen li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.collection-form__chosen li::before { counter-increment: pick; content: counter(pick); min-width: 1.4em; color: var(--muted); font-weight: 600; text-align: center; }
.collection-form__chosen img, .collection-form__chosen li > span[aria-hidden] { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; object-fit: cover; border-radius: 8px; background: var(--surface-soft); }
.collection-form__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collection-list { display: grid; gap: 12px; }
.collection-list__row { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; align-items: center; }
.collection-list__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* shop things in an article / post, and the editor's picker */
.attached-shop { display: grid; gap: 8px; margin-block: 12px; min-width: 0; }
.attached-shop__title { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .95rem; color: var(--navy-800); }
.attached-shop__row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 190px); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.attached-shop__collection { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--orange-50); color: var(--ink); }
.attached-shop__collection img { flex: 0 0 96px; width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.attached-shop__collection > span { display: grid; gap: 2px; flex: 1; min-width: 0; }
.shop-attach { margin-block: 8px; }
.shop-attach__panel { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--navy-200); border-radius: var(--radius); background: var(--surface-soft); }
.shop-attach__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.shop-attach__head strong { display: inline-flex; align-items: center; gap: 6px; }
.shop-attach__chosen { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.shop-attach__chosen li { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 4px 3px 10px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-size: .88rem; }
.shop-attach__chosen li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-attach__x { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.shop-attach__x:hover:not(:disabled) { background: var(--navy-50); color: var(--ink); }
.shop-attach__x:disabled { opacity: .35; cursor: default; }
.shop-attach__search { display: flex; gap: 8px; }
.shop-attach__search .input { flex: 1; min-width: 0; }
.shop-attach__results { display: grid; gap: 2px; max-height: 240px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.shop-attach__results button { width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.shop-attach__results button:hover:not(:disabled) { background: #fff; }
.shop-attach__results button:disabled { opacity: .5; cursor: default; }
.pet-starter { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; background: var(--orange-50); border-color: var(--orange-100); }
.pet-starter__emoji { font-size: 1.8rem; }
.pet-starter__text { display: grid; gap: 2px; }
@media (max-width: 640px) {
    .collection-hero, .collection-list__row { grid-template-columns: minmax(0, 1fr); }
    .pet-starter { grid-template-columns: auto minmax(0, 1fr); }
    .pet-starter .btn { grid-column: 1 / -1; justify-self: start; }
}

/* ---------------------------------------------------------------- back office › marketing */
.office-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 4px; border: 1px solid var(--line); }
.office-break { overflow-wrap: anywhere; word-break: break-word; }
.office-utm { margin: 8px 0 12px; }
.office-utm > summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 4px 0; }
.office-link-share { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.office-link-share img { border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.office-link-share p { margin: 0 0 6px; }
.office-brand-filters { flex-wrap: wrap; gap: 8px; }
.office-brand-filters .input { width: auto; min-width: 0; flex: 1 1 160px; }
.office-brand-grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.office-brand-card { display: grid; align-content: start; gap: 8px; padding: 12px; }
.office-brand-card.is-archived { opacity: .6; }
.office-brand-card__open { display: grid; gap: 4px; justify-items: start; text-align: left; background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; font: inherit; }
.office-brand-card__open:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--radius-sm); }
.office-brand-card__swatch, .office-brand-card__icon { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px solid var(--line); }
.office-brand-card__icon { background: var(--surface-soft); color: var(--muted); }
.office-brand-color .office-brand-card__swatch { width: 56px; aspect-ratio: 1; }
.office-brand-card__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.office-brand-card__actions { display: flex; gap: 4px; }
.office-brand-color { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.office-brand-color input[type="color"] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.office-brand-color .input { width: 120px; }
.office-brand-preview { display: block; max-width: 100%; max-height: 260px; margin: 8px auto; border-radius: var(--radius); background: repeating-conic-gradient(var(--surface-soft) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.office-ai { display: grid; gap: 0; }
.office-ai .tabs { flex-wrap: wrap; margin-bottom: 12px; }
.office-ai__result { width: 100%; font: inherit; line-height: 1.6; }
.office-creator-channel { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)) auto; align-items: end; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.office-news-preview { display: grid; gap: 8px; padding: 14px 16px; margin: 12px 0; }
.office-news-count { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 4px 0 12px; font-weight: 600; }
@media (max-width: 520px) {
    .office-link-share { grid-template-columns: minmax(0, 1fr); justify-items: center; }
    .office-creator-channel { grid-template-columns: minmax(0, 1fr); }
}

/* ================================================================ back office as an app
   Top bar: brand on phones, the title on wide screens, the search pill (Ctrl K), announcements, account.
   Phones: a bottom tab bar (วันนี้ รออนุมัติ ปฏิทิน งาน เมนู); the เมนู sheet holds every module as a tile. */
.office-top { gap: 10px; }
.office-top__brand { display: none; align-items: center; gap: 8px; color: var(--navy-800); font-family: var(--font-display); font-weight: 700; text-decoration: none; }
.office-top__brand img { border-radius: 9px; }
.office-top__icon { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--navy-800); }
.office-top__icon:hover { background: var(--navy-50); }
.office-top__dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--orange-500); box-shadow: 0 0 0 2px #fff; }
.office-search-button {
    display: inline-flex; align-items: center; gap: 10px; flex: 0 1 380px; min-width: 0; height: 40px; margin-left: 12px; padding: 0 8px 0 14px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer;
    transition: border-color .2s, background-color .2s;
}
.office-search-button:hover { border-color: var(--navy-200); background: #fff; }
.office-search-button:focus-visible { outline: none; box-shadow: var(--ring); }
.office-search-button__text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; }
.office-search-button__key, .office-search kbd {
    display: inline-block; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px;
    background: #fff; color: var(--muted); font: 600 .72rem/1.5 var(--font-body); white-space: nowrap;
}
.office-tabbar { display: none; }
.office-tabbar__badge {
    position: absolute; top: -4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
    background: var(--danger); color: #fff; font: 700 .66rem/18px var(--font-body); text-align: center; box-shadow: 0 0 0 2px #fff;
}
.office-tabbar__badge--dot { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 0; left: calc(50% + 8px); background: var(--orange-500); }
.tabbar__icon, .more-tile__icon { position: relative; }
.office-menu__search {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 16px; margin-right: 46px;
    border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); color: var(--muted); font: inherit; text-align: left; cursor: pointer;
}
.office-menu .sheet__panel { padding-top: 18px; }
.office-menu__search { width: calc(100% - 50px); }
.office-menu .more-tile__icon { background: var(--navy-50); color: var(--navy-800); }

@media (max-width: 900px) {
    .office-shell .admin-top {
        height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0; gap: 6px;
        background: rgba(255, 255, 255, .94); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
    }
    .office-top__brand { display: inline-flex; }
    .office-top__title, .office-top__wide { display: none !important; }
    .office-search-button { flex: 0 0 40px; width: 40px; margin-left: auto; padding: 0; justify-content: center; border-radius: 12px; background: none; border-color: transparent; color: var(--navy-800); }
    .office-search-button__text, .office-search-button__key { display: none; }
    .office-shell .admin-top__actions { margin-left: 0; gap: 2px; }
    .office-shell .user-menu__button { padding: 2px; border: 0; }
    .office-shell .user-menu__button > :not(.avatar) { display: none; }
    .office-tabbar { display: grid; }
    .office-shell .admin-content { gap: 14px; padding: 16px 14px calc(28px + var(--tabbar-h)); }
    .office-shell .admin-head { gap: 10px; }
    .office-shell .admin-head h1 { font-size: 1.35rem; }
    .office-shell .admin-head > div:first-child { min-width: 0; flex: 1 1 100%; }
    .office-shell .admin-head__actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
    .office-shell .admin-head > .btn, .office-shell .admin-head__actions > .btn { flex: 1 1 auto; justify-content: center; }
    .office-shell .card { padding: 18px; border-radius: 20px; }
    .office-shell .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .office-shell .tabs::-webkit-scrollbar { display: none; }
    .office-shell .tabs__tab { flex: 0 0 auto; white-space: nowrap; }
    .office-shell .admin-toolbar { flex-wrap: wrap; }
    .office-shell table { font-size: .88rem; }
    .office-shell .admin-table-wrap, .office-shell .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .office-shell .office-board { scroll-snap-type: x mandatory; }
    .office-shell .office-board > * { scroll-snap-align: start; }
    .office-shell .btn { min-height: 44px; }
    .office-shell .btn--sm { min-height: 38px; }
    .office-shell .input { font-size: 16px; } /* no zoom-in on iOS */
}

/* ---- Ctrl+K palette: top-aligned on wide screens, full screen on phones */
.office-search { place-items: start center; padding-top: min(12vh, 96px); }
.office-search__panel { width: min(640px, 100%); gap: 0; padding: 0; overflow: hidden; }
.office-search__box { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.office-search__input { flex: 1; min-width: 0; height: 40px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 1.05rem; outline: none; }
.office-search__input::-webkit-search-cancel-button { display: none; }
.office-search__close { border: 0; background: none; padding: 4px; cursor: pointer; }
.office-search__results { max-height: min(60vh, 520px); overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.office-search__hint { margin: 0; padding: 22px 12px; color: var(--muted); text-align: center; font-size: .92rem; }
.office-search__group { margin: 8px 10px 4px; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.office-search__hit { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.office-search__hit.is-selected { background: var(--orange-50); }
.office-search__icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; background: var(--navy-50); color: var(--navy-800); }
.office-search__hit.is-selected .office-search__icon { background: #fff; color: var(--orange-700); }
.office-search__text { display: grid; flex: 1; min-width: 0; }
.office-search__text strong, .office-search__text small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.office-search__text strong { font-weight: 600; }
.office-search__text small { color: var(--muted); }
.office-search__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface-soft); }
@media (max-width: 700px) {
    .office-search { place-items: stretch; padding: 0; }
    .office-search .office-search__panel { display: flex; flex-direction: column; width: 100%; height: 100%; max-height: none; border-radius: 0; padding: env(safe-area-inset-top) 0 0; animation: fade-in .15s; }
    .office-search__results { flex: 1; max-height: none; }
    .office-search__foot { display: none; }
}

/* ---- chips (filters, kinds) */
.office-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.office-chips::-webkit-scrollbar { display: none; }
.office-chip {
    display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 36px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 999px;
    background: #fff; color: var(--text); font: inherit; font-size: .88rem; font-weight: 500; white-space: nowrap; cursor: pointer; transition: border-color .2s, background-color .2s, color .2s;
}
.office-chip:hover { border-color: var(--navy-200); }
.office-chip.is-active { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }
.office-chip__count { min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--navy-50); color: var(--navy-800); font-size: .75rem; font-weight: 700; text-align: center; }
.office-chip.is-active .office-chip__count { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---- รออนุมัติ */
.office-inbox { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.office-inbox__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon body amount" "icon actions actions"; gap: 6px 14px; padding: 18px 20px; }
.office-inbox__icon { grid-area: icon; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--navy-50); color: var(--navy-800); }
.office-inbox__icon--leave { background: #eaf1ff; color: #1a43a8; }
.office-inbox__icon--claim { background: var(--orange-50); color: var(--orange-700); }
.office-inbox__icon--payroll { background: var(--success-bg); color: var(--success); }
.office-inbox__icon--sales { background: #f3ecff; color: #6b3fc4; }
.office-inbox__body { grid-area: body; display: grid; gap: 3px; min-width: 0; }
.office-inbox__body p { margin: 0; }
.office-inbox__kind { color: var(--muted); font-size: .8rem; font-weight: 600; }
.office-inbox__title { color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.office-inbox__title:hover { text-decoration: underline; }
.office-inbox__line { color: var(--text); font-size: .92rem; }
.office-inbox__quote { color: var(--muted); font-size: .9rem; font-style: italic; overflow-wrap: anywhere; }
.office-inbox__warn { display: flex; align-items: center; gap: 6px; color: var(--orange-800); font-size: .85rem; }
.office-inbox__amount { grid-area: amount; font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); white-space: nowrap; }
.office-inbox__actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
@media (max-width: 560px) {
    .office-inbox__item { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon body" "amount amount" "actions actions"; padding: 16px; }
    .office-inbox__amount { padding-left: 58px; }
    .office-inbox__actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
    .office-inbox__actions .btn { justify-content: center; }
}

/* ---- วันนี้ของฉัน */
.myday-hero {
    position: relative; display: grid; gap: 18px; padding: 26px 28px; overflow: hidden; border-radius: var(--radius-lg); color: #fff;
    background: radial-gradient(120% 140% at 100% 0%, rgba(254, 134, 0, .35), transparent 55%), linear-gradient(135deg, var(--navy-900, #00174a), var(--navy-700));
}
.myday-hero::after { content: ""; position: absolute; inset: 0; background: var(--paw-pattern); opacity: .06; pointer-events: none; }
.myday-hero h1 { margin: 2px 0 0; color: #fff; font-size: clamp(1.4rem, 4vw, 1.9rem); }
.myday-hero__date { margin: 0; color: rgba(255, 255, 255, .75); font-size: .9rem; font-weight: 600; }
.myday-hero__sub { margin: 6px 0 0; color: rgba(255, 255, 255, .88); }
.myday-actions { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, max-content)); gap: 10px; }
.myday-action { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; font-size: .9rem; text-decoration: none; transition: background-color .2s; }
.myday-action:hover { background: rgba(255, 255, 255, .22); }
.myday-action > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--navy-800); }
.myday-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.myday-stat { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon value" "icon label"; align-items: center; gap: 0 12px; padding: 16px 18px !important; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .2s; }
a.myday-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.myday-stat__icon { grid-area: icon; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--navy-50); color: var(--navy-800); }
.myday-stat strong { grid-area: value; font-family: var(--font-display); font-size: 1.45rem; line-height: 1.2; overflow-wrap: anywhere; }
.myday-stat > span:last-child { grid-area: label; color: var(--muted); font-size: .85rem; }
.myday-stat--alert .myday-stat__icon { background: var(--danger-bg); color: var(--danger); }
.myday-stat--accent .myday-stat__icon { background: var(--orange-100); color: var(--orange-700); }
.myday-announce { display: grid; gap: 8px; padding: 18px 20px !important; border-left: 4px solid var(--orange-500); }
.myday-announce.is-pinned { background: linear-gradient(135deg, var(--orange-50), #fff); }
.myday-announce__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--orange-700); }
.myday-announce__head a { color: var(--ink); text-decoration: none; }
.myday-announce__body { margin: 0; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.myday-announce__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.myday-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: start; }
.myday-panel { display: grid; gap: 10px; padding: 20px !important; }
.myday-panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.myday-panel__head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.myday-panel > .muted { margin: 0; }
.myday-leave { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.myday-leave li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: .9rem; }
.myday-leave li > strong.muted { grid-column: 2 / -1; justify-self: end; font-weight: 500; }
.myday-leave__bar { height: 8px; overflow: hidden; border-radius: 99px; background: var(--navy-50); }
.myday-leave__bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--orange-500), var(--orange-600)); }
.myday-roles { margin: 0; text-align: center; }
@media (max-width: 700px) {
    .myday-hero { gap: 16px; padding: 22px 18px 18px; margin: -4px -2px 0; border-radius: 24px; }
    .myday-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .myday-action { flex-direction: column; justify-content: center; gap: 6px; padding: 10px 2px; border-radius: 16px; font-size: .75rem; text-align: center; }
    .myday-action > span { width: 40px; height: 40px; }
    .myday-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .myday-stat { grid-template-columns: minmax(0, 1fr); grid-template-areas: "icon" "value" "label"; gap: 4px; padding: 14px !important; }
    .myday-stat__icon { width: 36px; height: 36px; border-radius: 12px; margin-bottom: 4px; }
    .myday-stat strong { font-size: 1.25rem; }
}

/* ---- agenda rows (my day, calendar) */
.agenda { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.agenda__day { margin: 8px 0 2px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.agenda__item > a { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--surface-soft); color: var(--ink); text-decoration: none; border-left: 4px solid var(--cal, var(--navy-200)); }
.agenda__item > a:hover { background: var(--navy-50); }
.agenda__time { color: var(--muted); font-size: .8rem; font-weight: 700; }
.agenda__time.is-late { color: var(--danger); }
.agenda__text { display: grid; min-width: 0; }
.agenda__text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.agenda__text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.agenda__icon { color: var(--cal, var(--muted)); }

/* calendar kinds: one colour each, also used by the legend, pills and dots */
.cal-kind--leave, .agenda__item--leave { --cal: #2f6fe0; --cal-bg: #eaf1ff; }
.cal-kind--holiday, .agenda__item--holiday { --cal: #c42b2b; --cal-bg: #fdecec; }
.cal-kind--meeting, .agenda__item--meeting { --cal: #7a4bd6; --cal-bg: #f2ecfd; }
.cal-kind--task, .agenda__item--task { --cal: #e86a00; --cal-bg: #fff2e2; }
.cal-kind--post, .agenda__item--post { --cal: #0f8b8d; --cal-bg: #e3f6f5; }
.cal-kind--follow_up, .agenda__item--follow_up { --cal: #138a43; --cal-bg: #e8f7ee; }
.cal-kind--deal, .agenda__item--deal { --cal: #8a6a00; --cal-bg: #fbf3d6; }

/* ---- ปฏิทินทีม */
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav__title { min-width: 10.5rem; margin: 0; font-size: 1.2rem; text-align: center; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cal-legend__item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; border: 0; background: none; color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; }
.cal-legend__item.is-off { color: var(--muted); text-decoration: line-through; opacity: .6; }
.cal-legend__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--cal); }
.cal { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; transition: opacity .2s; }
.cal.is-loading { opacity: .6; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--line); gap: 1px; }
.cal-grid__weekday { padding: 8px 4px; background: var(--surface-soft); color: var(--muted); font-size: .78rem; font-weight: 700; text-align: center; }
.cal-day { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 108px; padding: 6px; border: 0; background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cal-day:hover { background: var(--navy-50); }
.cal-day:focus-visible { outline: 2px solid var(--orange-500); outline-offset: -2px; }
.cal-day.is-off { background: #fbfcfe; }
.cal-day.is-other { color: var(--muted); background: var(--surface-soft); }
.cal-day.is-other .cal-day__events { opacity: .55; }
.cal-day.is-selected { box-shadow: inset 0 0 0 2px var(--navy-800); }
.cal-day__num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .85rem; font-weight: 600; }
.cal-day.is-today .cal-day__num { background: var(--orange-500); color: #fff; }
.cal-day__events { display: grid; gap: 3px; min-width: 0; }
.cal-pill { overflow: hidden; padding: 1px 6px; border-radius: 6px; background: var(--cal-bg); color: var(--ink); border-left: 3px solid var(--cal); font-size: .72rem; line-height: 1.5; white-space: nowrap; text-overflow: ellipsis; }
.cal-pill.is-pending { background: repeating-linear-gradient(135deg, var(--cal-bg), var(--cal-bg) 4px, #fff 4px, #fff 8px); }
.cal-more { color: var(--muted); font-size: .72rem; font-weight: 600; }
.cal-day__dots { display: none; gap: 3px; justify-content: center; }
.cal-day__dots > span { width: 6px; height: 6px; border-radius: 50%; background: var(--cal); }
.cal-agenda { position: sticky; top: 80px; display: grid; gap: 10px; padding: 20px !important; }
.cal-agenda h2 { margin: 0; font-size: 1.05rem; }
.cal-agenda .agenda__item > a { grid-template-columns: 3.8rem minmax(0, 1fr) auto; }
.cal-agenda .agenda__text strong { white-space: normal; }
@media (max-width: 1100px) {
    .cal { grid-template-columns: minmax(0, 1fr); }
    .cal-agenda { position: static; }
}
@media (max-width: 700px) {
    .cal-toolbar { flex-direction: column; align-items: stretch; }
    .cal-nav { justify-content: space-between; }
    .cal-nav__title { flex: 1; min-width: 0; }
    .cal-legend { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .cal-legend__item { flex: 0 0 auto; }
    .cal-grid { border-radius: 18px; }
    .cal-day { align-items: center; min-height: 54px; padding: 4px 2px; }
    .cal-day__events { display: none; }
    .cal-day__dots { display: flex; }
    .cal-grid__weekday { padding: 6px 0; font-size: .72rem; }
}

/* ---- ประกาศ */
.announce-list { display: grid; gap: 10px; }
.announce { padding: 0 !important; overflow: hidden; }
.announce.is-pinned { border-color: var(--orange-100); background: linear-gradient(135deg, var(--orange-50), #fff 50%); }
.announce__head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 18px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.announce__icon { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--orange-50); color: var(--orange-700); }
.announce__title { display: grid; flex: 1; min-width: 0; }
.announce__title strong { font-family: var(--font-display); font-size: 1.02rem; overflow-wrap: anywhere; }
.announce.is-unread .announce__title strong { color: var(--navy-800); }
.announce__dot { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--orange-500); }
.announce__body { padding: 0 18px 14px 70px; color: var(--text); line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.announce__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.announce__spacer { flex: 1; }
.announce-readers { display: grid; gap: 8px; padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.announce-readers h3 { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.announce-readers__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.announce-readers__list li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: var(--surface-soft); font-size: .85rem; }
@media (max-width: 560px) {
    .announce__body { padding: 0 16px 14px; }
    .announce__foot .btn--primary { flex: 1 1 100%; justify-content: center; }
}

/* ---- CRM */
.crm-toolbar { align-items: center; gap: 10px; }
.crm-search { position: relative; display: flex; align-items: center; flex: 1 1 280px; min-width: 0; }
.crm-search > .icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.crm-search .input { padding-left: 42px; }
.crm-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.crm-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px !important; color: var(--ink); text-decoration: none; transition: box-shadow .2s, border-color .2s; }
.crm-row:hover { border-color: var(--navy-200); box-shadow: var(--shadow); }
.crm-row__icon { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 14px; background: var(--navy-50); color: var(--navy-800); }
.crm-kind--customer { background: var(--orange-50); color: var(--orange-700); }
.crm-kind--partner { background: #eaf1ff; color: #1a43a8; }
.crm-kind--supplier { background: #e3f6f5; color: #0f6f71; }
.crm-kind--creator { background: #f2ecfd; color: #6b3fc4; }
.crm-row__main { display: grid; gap: 2px; min-width: 0; }
.crm-row__main strong { font-family: var(--font-display); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.crm-row__main small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.crm-row__tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 0; }
.crm-row__side { display: grid; justify-items: end; gap: 2px; text-align: right; }
.crm-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon main actions" "reach reach reach"; align-items: center; gap: 14px 16px; }
.crm-head > .crm-row__icon { grid-area: icon; width: 56px; height: 56px; border-radius: 18px; }
.crm-head__main { grid-area: main; min-width: 0; }
.crm-head__main h1 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.7rem); overflow-wrap: anywhere; }
.crm-head__main p { margin: 2px 0 0; }
.crm-head__actions { grid-area: actions; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.crm-reach { grid-area: reach; display: flex; flex-wrap: wrap; gap: 8px; }
.crm-reach:empty { display: none; }
.crm-reach__btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--navy-50); color: var(--navy-800); font-weight: 600; font-size: .9rem; text-decoration: none; }
.crm-reach__btn:hover { background: var(--navy-100); }
.crm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.crm-layout__main, .crm-layout__side { display: grid; gap: 16px; min-width: 0; }
.crm-layout section > h2, .crm-layout .myday-panel__head h2 { margin: 0 0 10px; font-size: 1.05rem; }
.crm-compose { display: grid; gap: 10px; }
.crm-compose__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crm-compose__row .input { width: auto; min-height: 40px; }
.crm-compose__row .btn { margin-left: auto; }
.crm-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.crm-timeline__item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.crm-timeline__item:first-child { border-top: 0; }
.crm-timeline__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-soft); color: var(--navy-800); }
.crm-timeline__body p { margin: 0; }
.crm-timeline__text { margin-top: 2px !important; white-space: pre-line; overflow-wrap: anywhere; }
.crm-follow { display: inline-flex; margin-top: 6px; padding: 4px 10px; border-radius: 99px; background: var(--success-bg); color: var(--success); }
.crm-follow.is-due { background: var(--warning-bg); color: var(--orange-800); }
.crm-deals, .crm-docs { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.crm-deal { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.crm-deal:disabled { cursor: default; }
.crm-deal .tag { justify-self: start; margin-top: 4px; }
.crm-docs a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.crm-docs li:first-child a { border-top: 0; }
.crm-docs a .muted { grid-column: 1; }
.crm-docs a > span:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 600; }
.crm-info dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: .9rem; }
.crm-info dt { color: var(--muted); }
.crm-info dd { margin: 0; overflow-wrap: anywhere; }
.crm-info__note { white-space: pre-line; }
.crm-board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.crm-board__col { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 12px; border-radius: var(--radius-lg); background: var(--navy-50); }
.crm-board__col h2 { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px; margin: 0 4px; font-size: .98rem; }
.crm-board__empty { margin: 6px 4px; }
.crm-card { display: grid; gap: 8px; padding: 12px !important; border-radius: 16px !important; }
.crm-card__open { display: grid; gap: 3px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.crm-card__open:disabled { cursor: default; }
.crm-card__open .tag { justify-self: start; margin-top: 4px; }
.crm-card__value { font-family: var(--font-display); font-weight: 600; color: var(--navy-800); }
.crm-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crm-stage-tabs { display: none; }
@media (max-width: 1000px) {
    .crm-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
    .crm-row { grid-template-columns: auto minmax(0, 1fr); padding: 12px 14px !important; }
    .crm-row__side { grid-column: 2; justify-items: start; text-align: left; }
    .crm-head { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon main" "reach reach" "actions actions"; }
    .crm-head__actions { justify-content: stretch; }
    .crm-head__actions .btn { flex: 1 1 auto; justify-content: center; }
    .crm-reach { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
    .crm-reach__btn { flex-direction: column; gap: 4px; padding: 10px 4px; border-radius: 14px; font-size: .78rem; }
    .crm-compose__row .btn { flex: 1 1 100%; justify-content: center; margin-left: 0; }
    .crm-stage-tabs { display: flex; }
    .crm-board { grid-template-columns: minmax(0, 1fr); overflow: visible; }
    .crm-board__col { display: none; padding: 0; background: none; }
    .crm-board__col.is-current { display: grid; }
    .crm-board__col h2 { display: none; }
}

/* ---- recurring tasks, templates, many cards */
.recur-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.recur { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.recur.is-paused { opacity: .65; }
.recur__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--orange-50); color: var(--orange-700); }
.recur__main { display: grid; gap: 2px; min-width: 0; }
.recur__actions { display: flex; gap: 4px; }
.template-card { display: grid; align-content: start; gap: 8px; }
.template-card h2 { display: flex; align-items: center; gap: 8px; }
.template-card p { margin: 0; }
.template-card__tasks { display: grid; gap: 4px; margin: 0; padding-left: 1.3em; font-size: .9rem; }
.template-card__actions { display: flex; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.template-form__heading { margin: 4px 0 0; font-size: 1rem; }
.template-form__tasks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: task; }
.template-form__task { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: end; gap: 8px; }
.template-form__offset { display: grid; gap: 2px; }
.template-form__offset .input { width: 5.5rem; }
.office-section__actions { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 560px) {
    .template-form__task { grid-template-columns: minmax(0, 1fr) auto; padding: 10px; border-radius: 14px; background: var(--surface-soft); }
    .template-form__task > .input:first-child { grid-column: 1 / -1; }
    .template-form__offset { grid-column: 1; grid-row: 3; }
    .template-form__task > .icon-button { grid-column: 2; grid-row: 3; }
}
