:root {
    --ink: #302822;
    --muted: #716760;
    --paper: #fffdf9;
    --cream: #fff7ef;
    --peach: #ef8c72;
    --peach-dark: #c45e49;
    --sage: #7a9d8e;
    --line: #eadfd6;
    --shadow: 0 20px 55px rgba(77, 51, 36, .12);
    --radius: 24px;
}

* { box-sizing: border-box; }
.visually-hidden { width: 1px !important; height: 1px !important; position: absolute !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
html { color-scheme: light; background: var(--cream); }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 90% 0, #ffe4d9 0, transparent 28rem), var(--cream); font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif; line-height: 1.65; }
a { color: inherit; text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header { min-height: 72px; max-width: 1180px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; text-decoration: none; letter-spacing: .02em; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 45% 55% 50% 50%; color: white; background: var(--peach); font-size: .65rem; transform: rotate(-8deg); }
.header-actions, .header-user { display: flex; align-items: center; gap: 18px; font-size: .9rem; }
.header-user form { margin: 0; }
.text-button { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 8px; }
.main-shell { width: min(1180px, calc(100% - 32px)); min-height: calc(100vh - 150px); margin: 0 auto; padding: 40px 0 72px; }
.site-footer { max-width: 1180px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: .85rem; }
.site-footer nav { display: flex; gap: 18px; }

.button { min-height: 48px; padding: 12px 22px; border: 1px solid var(--peach); border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--peach); color: #fff; font-weight: 750; text-decoration: none; cursor: pointer; box-shadow: 0 8px 24px rgba(196, 94, 73, .18); }
.button:hover { background: var(--peach-dark); border-color: var(--peach-dark); }
.button:focus-visible, input:focus-visible { outline: 3px solid rgba(122, 157, 142, .45); outline-offset: 2px; }
.button-small { min-height: 40px; padding: 8px 17px; }
.button-ghost { color: var(--ink); background: rgba(255,255,255,.62); border-color: var(--line); box-shadow: none; }
.button-ghost:hover { color: var(--peach-dark); background: #fff; border-color: var(--peach); }
.button-wide { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.button-row.centered { justify-content: center; }

.welcome-grid { min-height: 510px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 6vw; }
.welcome-copy h1 { margin: 10px 0 18px; font-family: ui-serif, "Yu Mincho", serif; font-size: clamp(2.6rem, 6vw, 5.3rem); line-height: 1.1; letter-spacing: -.04em; }
.eyebrow { color: var(--peach-dark); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lead { max-width: 36rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.microcopy { color: var(--muted); font-size: .82rem; }
.memory-preview { min-height: 450px; position: relative; display: grid; place-items: center; }
.preview-card { width: min(350px, 84vw); min-height: 390px; position: relative; z-index: 2; padding: 24px; border: 9px solid #fff; border-radius: 42px; background: linear-gradient(145deg, #dce9df, #f7d7c8); box-shadow: var(--shadow); transform: rotate(2deg); display: flex; flex-direction: column; justify-content: flex-end; }
.paw-placeholder { min-height: 230px; display: grid; place-items: center; color: rgba(255,255,255,.9); font-size: 5rem; }
.preview-card strong { font-size: 1.5rem; }
.preview-card p, .preview-date { margin: 4px 0; color: #5d5149; }
.preview-orbit { width: 76px; height: 76px; position: absolute; z-index: 3; display: grid; place-items: center; border: 5px solid #fff; border-radius: 50%; background: var(--sage); color: #fff; font-size: .8rem; font-weight: 800; box-shadow: var(--shadow); }
.orbit-one { left: 4%; top: 17%; transform: rotate(-8deg); }
.orbit-two { right: 0; bottom: 12%; background: var(--peach); transform: rotate(8deg); }
.feature-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); box-shadow: var(--shadow); }
.feature-strip article { padding: 28px; background: rgba(255,253,249,.92); }
.feature-strip span { color: var(--peach); font-size: .74rem; font-weight: 800; }
.feature-strip h2 { margin: 8px 0; font-size: 1.1rem; }
.feature-strip p { margin: 0; color: var(--muted); font-size: .88rem; }

.auth-card { width: min(850px, 100%); margin: 20px auto; padding: clamp(24px, 5vw, 54px); display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; border: 1px solid var(--line); border-radius: 32px; background: rgba(255,253,249,.95); box-shadow: var(--shadow); }
.auth-card.compact { width: min(660px, 100%); grid-template-columns: 1fr; gap: 20px; }
.auth-card h1 { margin: 8px 0; font-family: ui-serif, "Yu Mincho", serif; font-size: 2.2rem; }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.form-stack label:not(.check-row) { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid #d8cbc1; border-radius: 12px; background: #fff; color: var(--ink); }
.form-help { margin: -12px 0 0; color: var(--muted); font-size: .78rem; }
.consent-box { padding: 15px; display: flex; flex-direction: column; gap: 10px; border-radius: 14px; background: var(--cream); }
.check-row { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; font-size: .82rem; }
.check-row input { width: 20px; min-height: 20px; margin: 2px 0 0; }
.auth-foot { text-align: center; }
.notice { margin: 0 auto 20px; padding: 14px 18px; border-radius: 14px; }
.notice.success { background: #e6f2ec; color: #315a47; border: 1px solid #b9d9c8; }
.notice.error { background: #fff0ed; color: #8a362a; border: 1px solid #f1c1b8; }

.dashboard-head { padding: 28px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.dashboard-identity { display: flex; align-items: center; gap: 18px; }
.dashboard-identity > div { min-width: 0; }
.dashboard-identity .eyebrow { margin-top: 0; }
.dashboard-head h1 { margin: 5px 0; font-family: ui-serif, "Yu Mincho", serif; font-size: clamp(2rem, 4vw, 3.2rem); }
.owner-avatar-form { width: 82px; height: 82px; flex: 0 0 auto; position: relative; overflow: visible; border: 5px solid #fff; border-radius: 50%; background: #f6dcd0; box-shadow: 0 10px 28px rgba(77,51,36,.13); cursor: pointer; }
.owner-avatar-form img, .owner-avatar-placeholder { width: 100%; height: 100%; overflow: hidden; display: grid; place-items: center; border-radius: 50%; object-fit: cover; color: var(--peach-dark); font-size: 1.8rem; font-weight: 800; }
.owner-avatar-form input[type="file"] { width: 100%; height: 100%; min-height: 0; position: absolute; inset: 0; z-index: 4; padding: 0; border: 0; border-radius: 50%; opacity: 0; cursor: pointer; }
.owner-avatar-form:focus-within { outline: 3px solid rgba(122,157,142,.55); outline-offset: 3px; }
.owner-avatar-edit { width: 29px; height: 29px; position: absolute; right: -5px; bottom: -4px; z-index: 3; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; background: var(--peach); font-size: .72rem; }
.owner-avatar-form.is-uploading::after { content: "保存中"; position: absolute; inset: -5px; z-index: 5; display: grid; place-items: center; border-radius: 50%; background: rgba(48,40,34,.68); color: #fff; font-size: .67rem; font-weight: 800; }
.empty-state { min-height: 360px; padding: 52px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px dashed #d4bbaa; border-radius: 30px; background: rgba(255,253,249,.82); }
.empty-state p { max-width: 540px; color: var(--muted); }
.empty-icon { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; background: #fbe2d6; color: var(--peach-dark); font-size: 2rem; }
.error-page { min-height: 50vh; }
.pet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pet-card { min-height: 110px; padding: 20px; display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); text-decoration: none; box-shadow: 0 10px 30px rgba(77, 51, 36, .08); }
.pet-card h2, .pet-card p { margin: 0; }
.pet-card p { color: var(--muted); font-size: .9rem; }
.pet-avatar { width: 64px; height: 64px; overflow: hidden; display: grid; place-items: center; border-radius: 45% 55% 50% 50%; background: #f8d9cc; color: var(--peach-dark); font-size: 1.6rem; font-weight: 800; object-fit: cover; }
.page-head { max-width: 780px; margin: 0 auto 28px; }
.page-head h1 { margin: 6px 0; font-family: ui-serif, "Yu Mincho", serif; font-size: clamp(2rem, 5vw, 3.6rem); }
.back-link { color: var(--muted); font-size: .9rem; text-decoration: none; }
.profile-form { max-width: 900px; margin: 0 auto; }
.form-section { margin-bottom: 20px; padding: clamp(22px, 4vw, 38px); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,253,249,.94); }
.form-section h2 { margin-top: 0; font-size: 1.25rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 700; }
.form-grid.textareas textarea { min-height: 90px; resize: vertical; }
.required { margin-left: 7px; padding: 2px 6px; border-radius: 5px; background: #fbe1d9; color: #a34434; font-size: .65rem; }
.choice-fieldset { margin-top: 22px; padding: 16px; display: flex; flex-wrap: wrap; gap: 20px; border: 1px solid var(--line); border-radius: 14px; }
.choice-fieldset label { display: flex; align-items: center; gap: 7px; }
.choice-fieldset input { width: 18px; min-height: 18px; }
.sticky-submit { padding: 18px; position: sticky; bottom: 12px; display: flex; justify-content: flex-end; border: 1px solid rgba(234,223,214,.9); border-radius: 20px; background: rgba(255,253,249,.9); backdrop-filter: blur(12px); }
.pet-hero { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 7vw, 88px); align-items: center; }
.pet-hero-photo { aspect-ratio: 4/5; padding: 24px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; border: 9px solid #fff; border-radius: 40px; background: linear-gradient(145deg, #f4d8cc, #dfeadf); box-shadow: var(--shadow); }
.pet-hero-photo .pet-initial { font-family: ui-serif, "Yu Mincho", serif; font-size: 7rem; color: rgba(255,255,255,.9); }
.pet-hero-photo small { color: var(--muted); }
.pet-main-photo-form { margin: 0; cursor: pointer; isolation: isolate; }
.pet-main-photo-form:focus-within { outline: 4px solid rgba(122,157,142,.55); outline-offset: 4px; }
.pet-main-photo-form input[type="file"] { width: 100%; height: 100%; min-height: 0; position: absolute; inset: 0; z-index: 5; padding: 0; border: 0; border-radius: 0; opacity: 0; cursor: pointer; }
.main-photo-action, .main-photo-status { position: absolute; z-index: 3; left: 50%; max-width: calc(100% - 32px); transform: translateX(-50%); border-radius: 999px; background: rgba(255,253,249,.92); color: var(--ink); text-align: center; white-space: nowrap; box-shadow: 0 5px 18px rgba(48,40,34,.12); }
.main-photo-action { bottom: 50px; padding: 9px 15px; font-size: .84rem; font-weight: 800; }
.pet-hero-photo .main-photo-status { bottom: 17px; padding: 3px 10px; overflow: hidden; color: var(--muted); font-size: .66rem; text-overflow: ellipsis; }
.pet-main-photo-form.is-uploading::after { content: "保存中…"; position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(48,40,34,.55); color: #fff; font-size: 1rem; font-weight: 800; }
.pet-hero-copy h1 { margin: 6px 0 0; font-family: ui-serif, "Yu Mincho", serif; font-size: clamp(3.2rem, 8vw, 6.8rem); line-height: 1; }
.nickname { color: var(--muted); font-size: 1.15rem; }
.pet-stats { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 24px; }
.pet-stats span { color: var(--muted); font-size: .75rem; }
.pet-stats strong { display: block; color: var(--ink); font-size: 1.25rem; }
.profile-notes { margin-top: 54px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.profile-notes article, .story-card { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.profile-notes span { color: var(--peach-dark); font-size: .75rem; font-weight: 800; }
.profile-notes p { margin-bottom: 0; }
.story-card { margin-top: 20px; }
.danger-link { margin-top: 45px; text-align: right; color: #9a4135; font-size: .85rem; }
.danger-card { border-color: #edc5be; }
.danger-button { border-color: #a53a2e; background: #a53a2e; }
.pet-hero-photo:has(img) { padding:12px; }
.pet-main-photo-form:has(img) { padding-bottom:105px; }
.pet-hero-photo img { width:100%;height:100%;min-height:0;object-fit:contain; }
.memory-form { display: flex; flex-direction: column; gap: 24px; }
.photo-picker { min-height: 280px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 2px dashed #d9b6a5; border-radius: 24px; background: #fff8f3; cursor: pointer; text-align: center; }
.photo-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-picker-icon { width: 56px; height: 56px; position: relative; z-index: 2; display: grid; place-items: center; border-radius: 50%; background: var(--peach); color: #fff; font-size: 2rem; }
.photo-picker strong, .photo-picker small { position: relative; z-index: 2; }
.photo-picker small { color: var(--muted); }
.photo-picker.has-photo { padding:12px; }
.photo-picker.has-photo .photo-picker-icon { display:none; }
.photo-picker strong { max-width:100%;overflow-wrap:anywhere; }
.photo-preview { display:block;width:100%;height:auto;max-height:500px;object-fit:contain; }
.long-label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 700; }
.long-label textarea { resize: vertical; }
.inline-checks { display: flex; flex-wrap: wrap; gap: 18px; }
.timeline-head { max-width: none; display: flex; flex-direction: column; align-items: flex-start; }
.timeline-filter { margin-bottom: 28px; padding: 14px; display: flex; align-items: end; gap: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.timeline-filter label { min-width: 110px; font-size: .8rem; font-weight: 700; }
.timeline-grid { display: grid; grid-template-columns: 90px 1fr; gap: 20px 28px; }
.timeline-year { grid-column: 1; margin: 0; padding-top: 10px; color: var(--peach-dark); font-family: ui-serif, "Yu Mincho", serif; font-size: 1.6rem; }
.memory-card { grid-column: 2; overflow: hidden; display: grid; grid-template-columns: minmax(220px, .9fr) 1.1fr; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: 0 12px 32px rgba(77,51,36,.08); }
.memory-photo-link { min-width:0;padding:12px;display:flex;flex-direction:column;justify-content:center;background:#f1ede7;text-decoration:none; }
.memory-photo-link img,.memory-card > video { display:block;width:100%;height:auto;max-height:600px;object-fit:contain;background:#f1ede7; }
.memory-photo-link span { padding:8px 12px;color:var(--muted);text-align:center;font-size:.75rem; }
.memory-card-copy { padding: 24px; }
.memory-card-copy time { margin-right: 8px; font-size: .82rem; font-weight: 800; }
.category-pill, .best-pill { margin-right: 5px; padding: 4px 8px; border-radius: 999px; background: #edf3ef; color: #466858; font-size: .68rem; font-weight: 800; }
.best-pill { background: #fbe2d6; color: var(--peach-dark); }
.danger-text { padding-left: 0; color: #9a4135; }
.recent-memories { margin-top: 54px; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.section-title h2 { margin: 0; }
.recent-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.recent-grid a { aspect-ratio: 1; position: relative; overflow: hidden; border-radius: 18px; background: var(--line); }
.recent-grid img { width: 100%; height: 100%; object-fit: contain; }
.recent-grid video { width:100%;height:100%;object-fit:contain; }
.video-marker { position:absolute; inset:50% auto auto 50%; transform:translate(-50%,-50%); width:44px;height:44px;display:grid;place-items:center;border-radius:50%;background:rgba(0,0,0,.65);color:#fff; }
.recent-grid span { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(48,40,34,.72); color: #fff; font-size: .68rem; text-decoration: none; }
.health-head { max-width: none; }
.health-primary { border-color: #457263; background: #457263; }
.health-primary:hover { border-color: #31594d; background: #31594d; }
.health-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.health-summary-grid article { min-height: 130px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #cadbd4; border-radius: 18px; background: #f5faf7; }
.health-summary-grid span { color: #527266; font-size: .78rem; font-weight: 800; }
.health-summary-grid strong { font-size: 1.25rem; }
.health-profile-editor { margin-top: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.health-profile-editor summary { font-weight: 800; cursor: pointer; }
.health-profile-editor form { margin-top: 18px; }
.health-section { margin-top: 24px; padding: clamp(20px,4vw,32px); border: 1px solid var(--line); border-radius: 22px; background: var(--paper); }
.weight-chart { color: #4f806f; }
.weight-chart svg { width: 100%; height: 230px; padding: 20px; overflow: visible; border-radius: 16px; background: linear-gradient(#f7fbf8 49%, #dce8e2 50%, #f7fbf8 51%); }
.weight-chart > div { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; }
.health-records { display: flex; flex-direction: column; gap: 12px; }
.health-records > article { padding:18px;display:grid;grid-template-columns:110px minmax(0,1fr);gap:18px;border:1px solid #dbe6e1;border-radius:16px; }
.health-record-date span { display: block; margin-top: 8px; color: #467162; font-size: .75rem; font-weight: 800; }
.health-records h3, .health-records p { margin-top: 0; }
.health-record-content { min-width:0;overflow-wrap:anywhere; }
.health-photo-entry { margin-bottom:22px;padding:22px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:18px;border:1px solid #c2d8cc;border-radius:20px;background:#edf6f0; }
.health-photo-entry > div { flex:1 1 340px; }
.health-photo-entry h2 { margin:0;font-size:1.15rem; }
.health-photo-entry p { margin:8px 0 0;color:#527266;font-size:.87rem; }
.health-photo-gallery,.health-photo-previews { margin:16px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:14px; }
.health-photo-gallery > a,.health-photo-item > a { min-width:0;display:flex;flex-direction:column;background:#f1f5f2;border:1px solid #dbe6e1;border-radius:12px;overflow:hidden;text-decoration:none; }
.health-photo-gallery img { display:block;width:100%;height:250px;padding:8px;object-fit:contain; }
.health-photo-gallery a span { padding:9px;text-align:center;color:#396556;font-size:.78rem; }
.health-photo-manage { display:inline-block;margin-top:10px;color:#396556;font-weight:700;font-size:.86rem; }
.health-photo-picker { margin:24px 0;padding:18px;border:1px solid #cadbd4;border-radius:16px;background:#f5faf7; }
.health-photo-picker .attachment-picker { margin-top:0; }
.health-photo-picker p { font-size:.8rem; }
.health-photo-picker input { max-width:100%; }
.health-photo-previews figure { min-width:0;margin:0;padding:8px;border:1px solid #dbe6e1;border-radius:10px;background:#fff; }
.health-photo-previews img { display:block;width:100%;height:230px;object-fit:contain; }
.health-photo-previews img[hidden] { display:none; }
.health-photo-previews figcaption { margin-top:8px;overflow-wrap:anywhere;font-size:.75rem; }
.health-card-photos { margin-top:28px; }
.health-card-photo-record { margin-top:20px;padding-top:12px;border-top:1px solid #cbd9d4; }
.health-card-photo-record h3 { font-size:1rem; }
.next-date { color: #396556; font-weight: 800; }
.muted { color: var(--muted); }
.attachment-picker { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; font-weight: 700; }
.health-card-screen { min-height: 70vh; padding: clamp(22px,5vw,54px); border: 2px solid #31594d; border-radius: 18px; background: #fff; color: #182a24; }
.health-card-top { display: flex; justify-content: space-between; gap: 20px; color: #31594d; font-weight: 800; }
.health-card-screen > h1 { margin: 20px 0; font-size: clamp(3rem,8vw,6rem); }
.health-card-facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #b9cbc4; border-left: 1px solid #b9cbc4; }
.health-card-facts div { padding: 15px; border-right: 1px solid #b9cbc4; border-bottom: 1px solid #b9cbc4; }
.health-card-facts span { display: block; color: #516a61; font-size: .72rem; }
.critical-health { margin: 20px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.critical-health article { padding: 18px; border: 2px solid #31594d; border-radius: 10px; }
.critical-health h2 { margin-top: 0; color: #31594d; font-size: 1rem; }
.health-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.health-table th, .health-table td { padding: 10px; border-bottom: 1px solid #cbd9d4; text-align: left; vertical-align: top; }
.social-book-head { max-width: none; }
.book-section { margin-top: 24px; padding: clamp(20px,4vw,32px); border: 1px solid var(--line); border-radius: 24px; background: var(--paper); }
.trip-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 14px; }
.trip-grid article { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.trip-grid img, .trip-placeholder { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.trip-placeholder { display: grid; place-items: center; background: #e7efe9; color: #668072; font-size: .75rem; letter-spacing: .2em; }
.trip-grid article > div:last-child { padding: 18px; }
.trip-grid h3, .trip-grid p { margin: 5px 0; }
.trip-grid time { color: var(--muted); font-size: .72rem; }
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 14px; }
.friend-grid article { padding: 15px; border: 1px solid var(--line); border-radius: 18px; text-align: center; }
.friend-grid img, .friend-avatar { width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.friend-avatar { display: grid; place-items: center; background: #f6dcd0; color: var(--peach-dark); font-size: 3rem; font-weight: 800; }
.friend-grid h3, .friend-grid p { margin: 6px 0; }
.friend-grid small { color: var(--muted); }
.bulk-import-form { display: flex; flex-direction: column; gap: 20px; }
.bulk-picker { min-height: 260px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed #d5b5a5; border-radius: 24px; background: #fff8f3; text-align: center; cursor: pointer; }
.bulk-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.bulk-picker > span { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; background: var(--peach); color: #fff; font-size: 2.2rem; }
.bulk-picker small, .form-grid small { color: var(--muted); font-weight: 400; }
.bulk-file-count { margin: -8px 0 0; color: #497161; font-weight: 800; text-align: center; }
.family-head { max-width: 780px; }
.invite-result, .invite-form, .family-list { max-width: 780px; margin: 18px auto; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.copy-row { margin: 10px 0; display: flex; gap: 8px; }
.copy-row input { font-size: .78rem; }
.invite-result small { color: var(--muted); }
.invite-form { display: flex; align-items: end; gap: 12px; }
.invite-form label { flex: 1; font-size: .85rem; font-weight: 800; }
.family-list article { padding: 12px 0; display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); }
.family-list article:last-child { border-bottom: 0; }
.family-list article > div:not(.member-avatar) { display: flex; flex-direction: column; }
.family-list span { color: var(--muted); font-size: .78rem; }
.member-avatar { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #e4eee8; color: #496e60; font-weight: 800; object-fit: cover; }
.auth-card details { padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.auth-card details summary { font-weight: 800; cursor: pointer; }
.auth-card details .form-stack { margin-top: 15px; }
.onboarding-guide { margin-top: 28px; padding: clamp(20px,4vw,34px); border: 1px solid var(--line); border-radius: 26px; background: var(--paper); }
.guide-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.guide-intro h2 { margin: 4px 0; }
.guide-intro p { margin: 0; color: var(--muted); }
.guide-progress { width: 86px; height: 86px; flex: 0 0 auto; display: grid; grid-template-columns: auto auto; place-content: center; align-items: baseline; border-radius: 50%; background: #e6f0eb; color: #426b5c; }
.guide-progress strong { font-size: 1.7rem; }
.guide-progress span { font-size: .75rem; }
.onboarding-guide ol { margin: 24px 0 0; padding: 0; list-style: none; }
.guide-step { min-height: 68px; padding: 10px 0; display: grid; grid-template-columns: 42px 1fr auto auto; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); }
.guide-step:last-child { border-bottom: 0; }
.guide-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #f6e2d9; color: var(--peach-dark); font-size: .78rem; font-weight: 800; }
.guide-step > div { display: flex; flex-direction: column; }
.guide-step small { color: var(--muted); }
.guide-step.completed, .guide-step.skipped { color: var(--muted); }
.guide-step.completed .guide-number { background: #dfece5; color: #3e6b59; }
.guide-step.skipped .guide-number { background: #eee9e4; color: #756c65; }
.visibility-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.visibility-options label { padding: 16px; display: grid; grid-template-columns: 22px 1fr; gap: 4px 8px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.visibility-options input { width: 18px; min-height: 18px; grid-row: 1/3; }
.visibility-options small { color: var(--muted); }
.public-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.public-pet-page { width: min(1000px,100%); margin: 0 auto; overflow: hidden; border-radius: 34px; background: #fff; box-shadow: var(--shadow); }
.public-pet-hero { min-height: 610px; position: relative; background: #dce8df; }
.public-pet-hero > img,.public-pet-placeholder { width: 100%; height: 610px; object-fit: cover; }
.public-pet-placeholder { display: grid; place-items: center; color: #fff; font-family: ui-serif,serif; font-size: 10rem; }
.public-pet-hero::after { content:""; position:absolute; inset:35% 0 0; background:linear-gradient(transparent,rgba(24,20,17,.76)); }
.public-pet-overlay { position:absolute; z-index:2; left:clamp(24px,6vw,70px); right:24px; bottom:48px; color:#fff; }
.public-pet-overlay p { margin:0; letter-spacing:.12em; }
.public-pet-overlay h1 { margin:4px 0; font-family:ui-serif,"Yu Mincho",serif; font-size:clamp(4rem,12vw,9rem); line-height:.92; }
.public-intro { padding:clamp(34px,8vw,90px); text-align:center; }
.public-intro h2 { font-family:ui-serif,"Yu Mincho",serif; font-size:clamp(2rem,5vw,3.8rem); }
.public-intro > p { max-width:650px; margin:18px auto; }
.public-intro blockquote { max-width:700px; margin:34px auto 0; padding:24px; border:0; border-radius:18px; background:#fff4ee; color:#8a4638; font-size:1.25rem; font-weight:800; }
.public-days,.public-stats { display:grid; grid-template-columns:repeat(2,1fr); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.public-days div,.public-stats div { padding:34px; text-align:center; border-right:1px solid var(--line); }
.public-days div:last-child,.public-stats div:last-child { border-right:0; }
.public-days strong,.public-stats strong { display:block; font-size:2rem; }
.public-days span,.public-stats span { color:var(--muted); font-size:.78rem; }
.public-facts { padding:clamp(30px,6vw,70px); display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; }
.public-facts article { padding:22px; border-radius:18px; background:#f7f1eb; }
.public-facts span { color:var(--peach-dark); font-size:.75rem; font-weight:800; }
.badge-cloud { padding:24px; display:flex; flex-wrap:wrap; justify-content:center; gap:8px; background:#e8f1ec; }
.badge-cloud span { padding:8px 13px; border-radius:999px; background:#fff; color:#416556; font-size:.8rem; font-weight:800; }
.public-stats { grid-template-columns:repeat(4,1fr); }
.public-gallery { padding:clamp(30px,6vw,70px); }
.public-gallery-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.public-gallery figure { margin:0; }
.public-gallery img { width:100%; aspect-ratio:1; border-radius:18px; object-fit:contain;background:#f1ede7; }
.public-gallery figcaption { padding:6px; color:var(--muted); font-size:.72rem; }
.public-pet-footer { padding:28px; display:flex; justify-content:space-between; align-items:center; gap:20px; background:#332a25; color:#fff; }
.share-card-studio { display:grid; grid-template-columns:minmax(300px,1fr) minmax(330px,.8fr); gap:28px; align-items:start; }
.share-card-preview { aspect-ratio:1; position:sticky; top:20px; overflow:hidden; border:10px solid #fff; border-radius:34px; background:#e4eee8; box-shadow:var(--shadow); }
.share-card-preview::after { content:""; position:absolute; inset:35% 0 0; background:linear-gradient(transparent,rgba(30,24,20,.8)); }
.share-card-preview img { width:100%; height:100%; object-fit:cover; }
.share-card-preview > div { position:absolute; z-index:2; left:8%; right:8%; bottom:8%; color:#fff; }
.share-card-preview span { font-size:.78rem; font-weight:800; letter-spacing:.15em; }
.share-card-preview h2 { margin:4px 0; font-family:ui-serif,"Yu Mincho",serif; font-size:clamp(3rem,7vw,6rem); line-height:1; }
.share-card-preview p { margin:0; }
.share-card-controls { padding:24px; border:1px solid var(--line); border-radius:24px; background:var(--paper); }
.card-type-list { max-height:520px; overflow:auto; display:flex; flex-direction:column; gap:6px; }
.card-type-list label { padding:12px; display:grid; grid-template-columns:22px 1fr; gap:10px; border:1px solid var(--line); border-radius:12px; cursor:pointer; }
.card-type-list input { width:18px; min-height:18px; }
.card-type-list span { display:flex; flex-direction:column; }
.card-type-list small { color:var(--muted); }
.card-actions { margin-top:18px; display:flex; gap:8px; }
.theme-link { margin-top:24px; text-align:right; }
.pet-theme.theme-background-peach .pet-hero-photo,.theme-preview.theme-background-peach { background:linear-gradient(145deg,#f7d6c8,#fff1e8); }
.pet-theme.theme-background-sage .pet-hero-photo,.theme-preview.theme-background-sage { background:linear-gradient(145deg,#cfe1d7,#edf5f0); }
.pet-theme.theme-background-sky .pet-hero-photo,.theme-preview.theme-background-sky { background:linear-gradient(145deg,#cfe3ed,#f3f8fa); }
.pet-theme.theme-background-night .pet-hero-photo,.theme-preview.theme-background-night { background:linear-gradient(145deg,#29364b,#596781); color:#fff; }
.pet-theme.theme-card-classic .profile-notes article { border-radius:6px; border-color:#b9a99c; }
.pet-theme.theme-card-pop .profile-notes article { border:3px solid #ef8c72; transform:rotate(-1deg); }
.pet-theme.theme-cover-polaroid .pet-hero-photo { border-radius:4px; border-bottom-width:42px; }
.pet-theme.theme-cover-minimal .pet-hero-photo { border-width:0; border-radius:12px; }
.public-pet-page.theme-public-layout-gallery .public-gallery-grid { grid-template-columns:repeat(3,1fr); }
.public-pet-page.theme-public-layout-profile .public-pet-hero { min-height:460px; }
.public-pet-page.theme-public-layout-profile .public-pet-hero > img { height:460px; }
.theme-editor { display:grid; grid-template-columns:minmax(300px,.8fr) minmax(360px,1.2fr); gap:24px; align-items:start; }
.theme-preview { aspect-ratio:4/5; position:sticky; top:20px; overflow:hidden; padding:28px; display:flex; flex-direction:column; justify-content:flex-end; border:10px solid #fff; border-radius:34px; box-shadow:var(--shadow); }
.theme-preview > img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.theme-preview::after { content:""; position:absolute; inset:45% 0 0; background:linear-gradient(transparent,rgba(30,24,20,.7)); }
.theme-preview > div:last-child { position:relative; z-index:2; color:#fff; }
.theme-preview h2 { margin:3px 0; font-family:ui-serif,serif; font-size:3rem; }
.theme-pet-icon { width:190px; height:190px; position:absolute!important; z-index:2; top:22%; left:50%; transform:translateX(-50%); display:grid; place-items:center; border-radius:50%; background:#f0dcc5; color:#7b5c42; font-size:4rem; }
.theme-ear { width:65px; height:100px; position:absolute; top:-20px; border-radius:70% 70% 40% 40%; background:inherit; }
.theme-ear.left { left:-22px; transform:rotate(-24deg); }.theme-ear.right { right:-22px; transform:rotate(24deg); }
.theme-ears-pointy .theme-ear { border-radius:80% 0 50% 50%; transform-origin:bottom; }.theme-ears-round .theme-ear { width:68px; height:68px; border-radius:50%; }
.theme-fur-brown .theme-pet-icon { background:#9a7356;color:#fff; }.theme-fur-black .theme-pet-icon { background:#343231;color:#fff; }.theme-fur-white .theme-pet-icon { background:#fff;color:#776d66; }.theme-fur-gray .theme-pet-icon { background:#9da1a4;color:#fff; }.theme-fur-orange .theme-pet-icon { background:#dc8c4b;color:#fff; }
.theme-controls { padding:24px; display:flex; flex-direction:column; gap:18px; border:1px solid var(--line); border-radius:24px; background:var(--paper); }
.theme-controls fieldset { padding:0; border:0; }.theme-controls legend { margin-bottom:8px; font-weight:800; }
.theme-option-row { display:flex; flex-wrap:wrap; gap:7px; }
.theme-option-row input { position:absolute; opacity:0; pointer-events:none; }
.theme-option-row span { padding:8px 12px; display:block; border:1px solid var(--line); border-radius:999px; cursor:pointer; font-size:.82rem; }
.theme-option-row input:checked + span { border-color:var(--peach-dark); background:#fbe4db; color:#9a4636; font-weight:800; }
.video-picker { min-height:240px; position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; border:2px dashed #b9cfc5; border-radius:24px; background:#f3f8f5; cursor:pointer; text-align:center; }
.video-picker input { position:absolute;width:1px;height:1px;opacity:0; }
.video-picker > span { width:64px;height:64px;display:grid;place-items:center;border-radius:50%;background:#457263;color:#fff;font-size:1.6rem; }
.video-picker small { color:var(--muted); }
.video-preview { width:100%;max-height:480px;border-radius:18px;background:#111; }
.video-validation { color:#396556;font-weight:800;text-align:center; }
.community-hero { min-height:360px; padding:clamp(30px,7vw,80px); display:flex; flex-direction:column; justify-content:center; border-radius:32px; background:linear-gradient(135deg,#f7dcd0,#e4eee8); }
.community-hero h1 { margin:8px 0; font-family:ui-serif,"Yu Mincho",serif; font-size:clamp(2.8rem,7vw,5.8rem); line-height:1.08; }
.community-hero > p:last-child { max-width:650px;color:var(--muted); }
.community-section { margin-top:38px; }
.community-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:14px; }
.community-grid > a { overflow:hidden; border:1px solid var(--line); border-radius:20px; background:var(--paper); text-decoration:none; }
.community-grid img,.community-placeholder { width:100%;aspect-ratio:1;object-fit:cover; }
.community-placeholder { display:grid;place-items:center;background:#e5eee8;color:#557366;font-size:4rem;font-weight:800; }
.community-grid > a > div:last-child { padding:14px;display:flex;flex-direction:column; }
.community-grid span { color:var(--muted);font-size:.78rem; }
.public-reactions { padding:clamp(24px,5vw,50px);text-align:center;background:#fff8f3; }
.public-reactions > div { display:flex;justify-content:center;flex-wrap:wrap;gap:8px; }
.public-reactions form { margin:0; }
.public-reactions button { min-width:130px;padding:12px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);cursor:pointer; }
.public-reactions button span { margin-right:6px;color:var(--peach-dark);font-size:1.1rem; }
.public-reactions button b { margin-left:8px;color:var(--muted); }
.public-reactions > a { margin-top:20px;display:inline-block;color:var(--muted);font-size:.74rem; }
.public-pet-footer a { color:#fff; }

.admin-body { min-height:100vh; background:#eef2ef; color:#17231f; font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",sans-serif; }
.admin-header { min-height:68px; padding:12px clamp(16px,4vw,48px); display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:24px; background:#182722; color:#fff; }
.admin-brand { display:flex;align-items:center;gap:10px;text-decoration:none;font-weight:800; }
.admin-brand > span { width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#f3a075;color:#182722;font-size:.72rem; }
.admin-header nav { display:flex;gap:22px; }
.admin-header nav a { color:#dbe7e1;text-decoration:none;font-size:.88rem; }
.admin-account { justify-self:end;display:flex;align-items:center;gap:14px;font-size:.8rem; }
.admin-account form { margin:0; }
.admin-account button { padding:7px 12px;border:1px solid #476258;border-radius:8px;background:transparent;color:#fff;cursor:pointer; }
.admin-main { width:min(1440px,calc(100% - 32px));margin:0 auto;padding:34px 0 70px; }
.admin-page-head { margin-bottom:24px;display:flex;justify-content:space-between;align-items:end;gap:24px; }
.admin-page-head p { margin:0;color:#5d7d6f;font-size:.72rem;font-weight:900;letter-spacing:.16em; }
.admin-page-head h1 { margin:5px 0;font-size:clamp(2rem,4vw,3.2rem);line-height:1.05; }
.admin-page-head span,.admin-page-head code { color:#60716a;font-size:.8rem; }
.admin-link-button,.admin-panel button { min-height:40px;padding:9px 15px;border:0;border-radius:9px;background:#315e4e;color:#fff;text-decoration:none;font-weight:750;cursor:pointer; }
.admin-kpi-grid { margin-bottom:18px;display:grid;grid-template-columns:repeat(4,1fr);gap:12px; }
.admin-kpi-grid article { min-height:110px;padding:20px;display:flex;flex-direction:column;justify-content:space-between;border:1px solid #d3ddd8;border-radius:15px;background:#fff; }
.admin-kpi-grid span { color:#64756e;font-size:.75rem;font-weight:800; }
.admin-kpi-grid strong { font-size:1.8rem; }
.admin-panel { margin-bottom:16px;padding:22px;border:1px solid #d3ddd8;border-radius:15px;background:#fff;box-shadow:0 8px 24px rgba(29,51,43,.05); }
.admin-panel h2 { margin-top:0;font-size:1.05rem; }
.admin-panel > p { color:#65766f;font-size:.82rem; }
.admin-table-wrap { overflow-x:auto; }
.admin-table { width:100%;border-collapse:collapse;font-size:.82rem; }
.admin-table th { padding:11px 12px;border-bottom:2px solid #d8e1dd;color:#52665d;text-align:left;white-space:nowrap; }
.admin-table td { min-width:110px;padding:14px 12px;border-bottom:1px solid #e3e9e6;vertical-align:top; }
.admin-table td:first-child { min-width:230px; }
.admin-table code,.admin-table small { margin-top:4px;display:block;color:#718078;font-size:.68rem; }
.admin-badge,.admin-status { padding:5px 9px;border-radius:999px;background:#e5efe9;color:#315e4e;font-size:.7rem;font-weight:900; }
.admin-status.suspended { background:#f7ddd5;color:#943f31; }
.admin-grid-two { display:grid;grid-template-columns:1fr 1fr;gap:16px; }
.admin-inline-form { margin:10px 0;display:flex;align-items:end;gap:8px; }
.admin-inline-form label { flex:1;display:flex;flex-direction:column;gap:3px;font-size:.72rem;font-weight:800; }
.admin-inline-form select,.admin-moderation-form select,.admin-moderation-form input { min-height:40px;padding:7px 10px;border:1px solid #c7d2cd;border-radius:8px;background:#fff; }
.admin-usage-list { max-height:250px;margin:0;padding:0;overflow:auto;list-style:none; }
.admin-usage-list li { padding:8px 0;display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid #e6ebe9;font-size:.75rem; }
.admin-moderation-form { display:grid;grid-template-columns:minmax(110px,.45fr) minmax(190px,1fr) auto;gap:7px; }
.admin-panel button.danger { background:#9b493d; }
.admin-account-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:16px; }
.admin-user-card { min-width:0;margin:0;display:flex;flex-direction:column; }
.admin-user-heading { display:flex;align-items:start;justify-content:space-between;gap:14px; }
.admin-user-heading h2 { margin-bottom:0;overflow-wrap:anywhere; }
.admin-user-heading .admin-status { flex-shrink:0; }
.admin-user-email { overflow-wrap:anywhere; }
.admin-account-details { margin:0 0 18px;font-size:.82rem; }
.admin-account-details > div { padding:12px 0;border-top:1px solid #e3e9e6; }
.admin-account-details dt { margin-bottom:4px;color:#60716a;font-size:.75rem; }
.admin-account-details dd { margin:0;overflow-wrap:anywhere; }
.admin-account-details dd span { display:block;margin-bottom:4px; }
.admin-delete-link { display:inline-block;color:#943f31;font-size:.82rem;font-weight:750; }
.admin-user-card > .admin-delete-link,.admin-user-card > .admin-protected { margin:auto 0 0; }
.admin-protected { color:#60716a;font-size:.8rem; }
.admin-delete-panel { max-width:860px;overflow-wrap:anywhere; }
.admin-delete-effects { padding-left:22px;margin-bottom:28px;font-size:.88rem; }
.admin-delete-effects li { margin:10px 0; }
.admin-family-impact { padding:18px;margin:12px 0;border:1px solid #d8e1dd;border-radius:10px;background:#f5f8f6; }
.admin-family-impact h3 { margin:0;font-size:1rem; }
.admin-family-impact p { margin:8px 0 0;font-size:.85rem; }
.admin-family-impact strong { display:block;margin-top:12px;color:#943f31;font-size:.9rem; }
.admin-delete-form { margin-top:24px;padding-top:20px;border-top:1px solid #d8e1dd; }
.admin-delete-form .button-row { margin-top:22px;justify-content:flex-end;gap:20px; }
.admin-event-list { max-height:420px;overflow:auto; }
.admin-event-list article { padding:10px 0;display:grid;grid-template-columns:150px 200px 1fr;gap:10px;border-bottom:1px solid #e4e9e7;font-size:.72rem; }
.admin-event-list time,.admin-event-list code { color:#6c7c75;overflow-wrap:anywhere; }
.admin-filter { margin-bottom:16px;display:flex;flex-wrap:wrap;gap:8px; }
.admin-filter a { padding:8px 13px;border:1px solid #cdd8d3;border-radius:999px;background:#fff;text-decoration:none;font-size:.75rem;font-weight:800; }
.admin-report-head { display:flex;justify-content:space-between;align-items:start;gap:20px; }
.admin-report-head h2 { margin:10px 0; }
.admin-report-head small,.admin-report-head time { color:#708079;font-size:.72rem; }
.admin-report-list dl { display:grid;grid-template-columns:repeat(3,1fr);gap:10px; }
.admin-report-list dl > div { padding:12px;border-radius:10px;background:#f3f6f4; }
.admin-report-list dt { color:#687970;font-size:.68rem;font-weight:800; }
.admin-report-list dd { margin:4px 0 0; }
.admin-test-banner { margin-bottom:16px;padding:16px 20px;display:flex;justify-content:space-between;gap:20px;border-radius:13px;background:#183f32;color:#fff; }
.admin-test-banner span { color:#c9ddd5;font-size:.78rem; }
.admin-feature-list { display:flex;flex-direction:column; }
.admin-feature-list article { padding:13px 0;display:grid;grid-template-columns:1fr auto;align-items:center;gap:20px;border-bottom:1px solid #e2e9e5; }
.admin-feature-list article > div { display:flex;flex-direction:column; }
.admin-feature-list code,.admin-feature-list small { color:#6a7b73;font-size:.68rem; }
.admin-feature-list form { display:flex;gap:7px; }
.admin-feature-list select,.admin-tenant-picker select { min-height:40px;padding:7px 10px;border:1px solid #c8d4ce;border-radius:8px;background:#fff; }
.admin-tenant-picker { display:flex;align-items:end;gap:8px; }
.admin-tenant-picker label { flex:1;display:flex;flex-direction:column;gap:5px;font-size:.75rem;font-weight:800; }
.admin-feature-context { margin-top:20px;padding:13px;display:flex;justify-content:space-between;border-radius:9px;background:#eef4f1; }
.admin-feature-context span { color:#52675e;font-size:.75rem; }
.settings-head { max-width:780px; }
.owner-icon-settings { max-width:780px;margin:0 auto 20px;padding:24px;display:flex;align-items:center;gap:24px;border:1px solid var(--line);border-radius:22px;background:var(--paper); }
.owner-avatar-settings-form { width:112px;height:112px; }
.owner-avatar-settings-form .owner-avatar-placeholder { font-size:2.4rem; }
.owner-icon-settings h2,.owner-icon-settings p { margin:4px 0; }
.owner-icon-settings > div > p:last-child { color:var(--muted);font-size:.86rem; }
.settings-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:14px; }
.settings-card { min-height:310px;padding:25px;display:flex;flex-direction:column;align-items:flex-start;border:1px solid var(--line);border-radius:22px;background:var(--paper); }
.settings-card > span,.settings-danger > span { color:var(--peach-dark);font-size:.72rem;font-weight:900;letter-spacing:.12em;text-transform:uppercase; }
.settings-card h2 { margin:8px 0;font-size:1.25rem; }
.settings-card p { color:var(--muted);font-size:.86rem; }
.settings-card dl { width:100%;margin:10px 0; }
.settings-card dl > div { padding:7px 0;display:grid;grid-template-columns:70px 1fr;border-bottom:1px solid var(--line);font-size:.76rem; }
.settings-card dt { color:var(--muted); }.settings-card dd { margin:0; }
.settings-card .button,.settings-card form { margin-top:auto; }
.settings-danger { margin-top:24px;padding:clamp(22px,4vw,38px);border:1px solid #e3b7ae;border-radius:22px;background:#fff8f6; }
.settings-danger details { margin-top:18px;padding:16px;border:1px solid #e2c5be;border-radius:14px;background:#fff; }
.settings-danger summary { color:#913f33;font-weight:800;cursor:pointer; }
.settings-danger form { margin-top:17px; }
.memorial-banner { margin:26px 0;padding:clamp(26px,6vw,60px);border-radius:28px;background:linear-gradient(135deg,#314052,#686c80);color:#fff;text-align:center;box-shadow:var(--shadow); }
.memorial-banner span { color:#d9d3ea;font-size:.72rem;font-weight:900;letter-spacing:.2em; }
.memorial-banner h2 { margin:8px 0;font-family:ui-serif,"Yu Mincho",serif;font-size:clamp(2rem,5vw,4rem); }
.memorial-banner p { max-width:630px;margin:12px auto;color:#e9e6ef; }
.memorial-banner blockquote { max-width:650px;margin:22px auto;padding:18px 20px;border:1px solid rgba(255,255,255,.22);border-radius:16px;background:rgba(255,255,255,.08);color:#fff;line-height:1.9;text-align:left; }
.memorial-banner-date { color:#fff!important;font-weight:800;letter-spacing:.04em; }
.memorial-banner-button { margin-top:10px;border-color:#fff;background:#fff;color:#394253; }
.memorial-home-link { margin:0 0 22px;padding:18px 20px;display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:15px;border:1px solid #d8d4df;border-radius:20px;background:linear-gradient(135deg,#f8f6fb,#efedf5);color:#343744;text-decoration:none;box-shadow:0 8px 24px rgba(61,57,76,.08); }
.memorial-home-link strong,.memorial-home-link small { display:block; }
.memorial-home-link small { margin-top:3px;color:#706e7b;font-size:.78rem; }
.memorial-home-symbol { width:48px;height:48px;display:grid;place-items:center;border-radius:50%;background:#5c6174;color:#fff;font-size:1.2rem; }
.memorial-archive-head,.memorial-form-head { text-align:center; }
.memorial-archive-head .back-link,.memorial-form-head .back-link { display:block;text-align:left; }
.memorial-archive-head > .button { margin-top:16px; }
.memorial-archive-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:22px; }
.memorial-archive-card { overflow:hidden;display:flex;flex-direction:column;border:1px solid #d8d4df;border-radius:28px;background:#fff;box-shadow:0 14px 38px rgba(61,57,76,.10); }
.memorial-archive-photo { overflow:hidden;color:#fff;font-family:ui-serif,"Yu Mincho",serif;font-size:5rem; }
.memorial-archive-photo img { display:block;width:100%;height:auto;object-fit:contain; }
.memorial-archive-photo span { aspect-ratio:4/3;display:grid;place-items:center;background:linear-gradient(145deg,#e1dde8,#697083); }
.memorial-archive-copy { padding:25px;display:flex;flex:1;flex-direction:column; }
.memorial-kind { margin:0;color:#777586;font-size:.7rem;font-weight:900;letter-spacing:.13em;text-transform:uppercase; }
.memorial-archive-copy h2 { margin:5px 0;font-family:ui-serif,"Yu Mincho",serif;font-size:2rem; }
.memorial-date { margin:0;color:#5b5d69;font-size:.84rem;font-weight:800; }
.memorial-story { margin:20px 0;overflow-wrap:anywhere;color:#4f4c55;line-height:1.9; }
.memorial-story-empty { color:var(--muted); }
.memorial-card-actions { margin-top:auto;padding-top:16px;display:flex;flex-wrap:wrap;gap:9px 16px;border-top:1px solid #ece8ef; }
.memorial-card-actions a { color:#555b70;font-size:.8rem;font-weight:800; }
.memorial-privacy-note { margin:22px auto 0;color:var(--muted);font-size:.78rem;text-align:center; }
.memorial-empty { background:linear-gradient(145deg,#fffdfa,#f3f0f6);border-color:#d5d0dc; }
.memorial-form-section { border-color:#d9d5df;background:rgba(255,255,255,.95); }
.memorial-form-section label small { color:var(--muted);font-size:.72rem;font-weight:500; }
.memorial-current-photo { width:min(100%,300px);aspect-ratio:4/3;margin-top:20px;border:7px solid #fff;border-radius:20px;object-fit:contain;box-shadow:0 8px 24px rgba(61,57,76,.13); }
.life-mode-control { margin-top:24px;padding:24px;border:1px solid #cfd4dc;border-radius:20px;background:#f7f7fa; }
.life-mode-control h2 { margin:0; }.life-mode-control p { color:var(--muted); }
.life-mode-control summary { cursor:pointer;font-weight:700; }
.history-confirmation h1 { overflow-wrap:anywhere; }
.history-confirmation h2 { font-size:clamp(1.2rem,4vw,1.65rem); }

.app-navigation { width:min(620px,calc(100% - 32px));margin:0 auto;padding:5px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;position:sticky;top:10px;z-index:20;border:1px solid var(--line);border-radius:18px;background:rgba(255,253,249,.97);box-shadow:0 5px 20px rgba(77,51,36,.06); }
.app-navigation a { min-height:44px;padding:8px;display:flex;align-items:center;justify-content:center;gap:8px;border-radius:12px;color:var(--muted);font-size:.85rem;font-weight:750;text-decoration:none; }
.app-navigation svg { width:21px;height:21px;flex:0 0 auto; }
.app-navigation a[aria-current] { background:#fff0e8;color:#a54d37; }
.app-navigation a:hover { background:#fff0e8; }
.app-navigation a:focus-visible,.pet-list-tabs a:focus-visible,.home-add-link:focus-visible,.home-pet-profile:focus-visible,.home-guide summary:focus-visible { outline:3px solid var(--sage);outline-offset:2px; }
.has-app-navigation .main-shell { padding-top:24px; }
.home-page { max-width:960px;margin:0 auto; }
.home-welcome,.home-archive-heading { padding:0;margin:0 0 22px; }
.home-welcome .dashboard-identity { gap:12px;align-items:center; }
.home-welcome .owner-avatar-form { width:54px;height:54px;border-width:3px;box-shadow:0 4px 14px rgba(77,51,36,.09); }
.home-welcome .owner-avatar-placeholder { font-size:1.2rem; }
.home-welcome .owner-avatar-edit { width:23px;height:23px;right:-4px;bottom:-3px;border-width:2px;font-size:.65rem; }
.home-greeting { margin:0 0 2px;color:var(--muted);font-size:.78rem; }
.home-welcome h1,.home-archive-heading h1 { margin:0;font-size:clamp(1.1rem,3vw,1.4rem);line-height:1.5;overflow-wrap:anywhere; }
.pet-list-tabs { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:4px;border:1px solid var(--line);border-radius:16px;background:#f2e9e2; }
.pet-list-tabs a { min-height:48px;padding:8px 6px;display:flex;align-items:center;justify-content:center;gap:6px;border-radius:12px;color:var(--muted);font-size:.85rem;font-weight:750;text-decoration:none;white-space:nowrap; }
.pet-list-tabs a[aria-current] { background:var(--paper);color:var(--ink);box-shadow:0 2px 7px rgba(77,51,36,.1); }
.pet-list-tabs a:hover { color:var(--ink); }
.pet-list-tabs a span { min-width:22px;height:22px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:rgba(48,40,34,.06);font-size:.72rem; }
.home-section-heading { margin:18px 0 12px;display:flex;justify-content:space-between;align-items:center;gap:12px; }
.home-section-heading h2 { margin:0;font-size:1.05rem; }
.home-add-link { min-height:44px;display:inline-flex;align-items:center;gap:3px;color:var(--peach-dark);font-size:.86rem;font-weight:750;text-decoration:none;white-space:nowrap; }
.home-add-link span { font-size:1.1rem; }
.home-section-description { margin:-2px 0 18px;color:var(--muted);font-size:.85rem; }
.home-pet-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px; }
.home-pet-card { padding:16px;border:1px solid var(--line);border-radius:22px;background:var(--paper);box-shadow:0 7px 24px rgba(77,51,36,.05); }
.home-pet-profile { min-height:82px;display:grid;grid-template-columns:76px minmax(0,1fr) 12px;align-items:center;gap:14px;border-radius:12px;text-decoration:none; }
.home-pet-photo { width:76px;height:76px;display:grid;place-items:center;object-fit:contain;border-radius:18px;background:#f8e7dc;color:var(--peach-dark);font-size:1.8rem;font-weight:750; }
.home-pet-profile h3 { margin:0;font-size:1.12rem;line-height:1.5;overflow-wrap:anywhere; }
.home-pet-profile p { margin:2px 0;color:var(--muted);font-size:.82rem; }
.home-pet-profile small { color:var(--muted);font-size:.72rem; }
.home-pet-chevron { color:#9b8c81;font-size:1.5rem; }
.home-pet-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid #f0e7df; }
.home-pet-actions .button { min-height:44px;padding:9px 8px;border-radius:13px;font-size:.86rem;box-shadow:none; }
.home-guide { margin-top:20px;border:1px solid var(--line);border-radius:18px;background:rgba(255,253,249,.7); }
.home-guide summary { min-height:72px;padding:14px 18px;display:flex;align-items:center;gap:14px;border-radius:18px;list-style:none;font-size:.9rem;font-weight:750;cursor:pointer; }
.home-guide summary::-webkit-details-marker { display:none; }
.home-guide summary::after { content:'⌄';font-size:1.1rem;color:var(--muted); }
.home-guide[open] summary::after { transform:rotate(180deg); }
.home-guide summary small { display:block;color:var(--muted);font-size:.74rem;font-weight:400; }
.home-guide-progress { margin-left:auto;color:var(--muted);font-size:.78rem;white-space:nowrap; }
.home-guide .onboarding-guide { margin:0;padding:8px 18px 18px;border:0;border-radius:0 0 18px 18px;background:transparent; }
.home-guide .guide-intro h2 { font-size:1rem; }
.home-guide .guide-intro p { font-size:.8rem; }
.home-empty { min-height:260px;padding:28px 20px; }
.home-empty h2 { font-size:1.1rem; }
.home-empty .button { margin-top:8px; }
.home-page .memorial-archive-card { display:grid;grid-template-columns:80px minmax(0,1fr);align-items:start;gap:14px;padding:18px; }
.home-page .memorial-archive-photo { width:80px;height:auto;min-height:0;border-radius:16px; }
.home-page .memorial-archive-photo span { min-height:96px;aspect-ratio:auto;font-size:2.2rem; }
.home-page .memorial-archive-copy { padding:0; }
.home-page .memorial-archive-copy h2 { margin:0;font-family:inherit;font-size:1.1rem;line-height:1.5;overflow-wrap:anywhere; }
.home-page .memorial-story { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;font-size:.84rem; }
.home-page .memorial-card-actions { display:flex;flex-direction:column;align-items:stretch;gap:2px;margin-top:12px;padding-top:10px; }
.home-page .memorial-card-actions a { min-height:44px;display:flex;align-items:center;font-size:.8rem; }

@media (max-width: 760px) {
    .has-app-navigation { padding-bottom:calc(78px + env(safe-area-inset-bottom)); }
    .has-app-navigation .site-header { min-height:58px; }
    .has-app-navigation .main-shell { padding-top:14px; }
    .app-navigation { width:100%;position:fixed;top:auto;left:0;right:0;bottom:0;margin:0;padding:6px max(12px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));border:0;border-top:1px solid var(--line);border-radius:18px 18px 0 0;box-shadow:0 -4px 18px rgba(77,51,36,.07);backdrop-filter:blur(12px); }
    .app-navigation a { min-height:54px;padding:4px;flex-direction:column;gap:2px;font-size:.72rem; }
    .app-navigation svg { width:22px;height:22px; }
    .home-pet-grid { grid-template-columns:minmax(0,1fr); }
    .home-welcome,.home-archive-heading { margin-bottom:18px; }
    .has-app-navigation input,.has-app-navigation select,.has-app-navigation textarea,.has-app-navigation .button { scroll-margin-bottom:calc(90px + env(safe-area-inset-bottom)); }
    .site-header { padding: 10px 16px; }
    .main-shell { width: min(100% - 24px, 680px); padding-top: 20px; }
    .welcome-grid { grid-template-columns: 1fr; gap: 12px; }
    .welcome-copy { padding-top: 24px; }
    .memory-preview { min-height: 420px; }
    .feature-strip { grid-template-columns: 1fr 1fr; }
    .auth-card { grid-template-columns: 1fr; gap: 24px; border-radius: 24px; }
    .dashboard-head { align-items: flex-start; flex-direction: column; }
    .dashboard-identity { align-items:flex-start; }
    .form-grid { grid-template-columns: 1fr; }
    .sticky-submit { position: static; bottom: auto; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; background: transparent; backdrop-filter: none; }
    .sticky-submit .button { width: 100%; }
    .pet-hero { grid-template-columns: 1fr; }
    .pet-hero-photo { max-height: 420px; }
    .timeline-filter { align-items: stretch; flex-direction: column; }
    .timeline-grid { grid-template-columns: 1fr; }
    .timeline-year, .memory-card { grid-column: 1; }
    .memory-card { grid-template-columns: 1fr; }
    .recent-grid { grid-template-columns: 1fr 1fr; }
    .health-summary-grid, .critical-health { grid-template-columns: 1fr; }
    .health-records > article { grid-template-columns:1fr; }
    .health-photo-gallery,.health-photo-previews { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
    .health-photo-gallery img,.health-photo-previews img { height:190px; }
    .health-card-facts { grid-template-columns: 1fr; }
    .health-table { display: block; overflow-x: auto; }
    .invite-form, .copy-row { align-items: stretch; flex-direction: column; }
    .guide-intro { align-items: flex-start; }
    .guide-step { grid-template-columns: 38px 1fr auto; }
    .guide-step form { grid-column: 2 / 4; }
    .visibility-options,.public-toggles { grid-template-columns:1fr; }
    .public-pet-page { border-radius:22px; }
    .public-pet-hero,.public-pet-hero > img,.public-pet-placeholder { height:500px; min-height:500px; }
    .public-stats { grid-template-columns:1fr 1fr; }
    .public-gallery-grid { grid-template-columns:1fr; }
    .share-card-studio { grid-template-columns:1fr; }
    .share-card-preview { position:relative; top:auto; }
    .card-actions { flex-direction:column; }
    .theme-editor { grid-template-columns:1fr; }
    .theme-preview { position:relative;top:auto; }
    .public-pet-page.theme-public-layout-gallery .public-gallery-grid { grid-template-columns:1fr 1fr; }
    .site-footer { flex-direction: column; }
    .header-user > span { display: none; }
    .admin-header { grid-template-columns:1fr auto;gap:10px; }
    .admin-header nav { grid-column:1 / -1;grid-row:2;display:flex;gap:8px;overflow-x:auto;padding-top:2px;scrollbar-width:none; }
    .admin-header nav::-webkit-scrollbar { display:none; }
    .admin-header nav a { min-height:40px;padding:8px 13px;display:inline-flex;align-items:center;border:1px solid #476258;border-radius:999px;white-space:nowrap; }
    .admin-header .admin-account { grid-column:2;grid-row:1; }
    .admin-account > span { display:none; }
    .admin-main { width:min(100% - 20px,680px);padding-top:22px; }
    .admin-page-head { align-items:flex-start;flex-direction:column; }
    .admin-kpi-grid { grid-template-columns:1fr 1fr; }
    .admin-grid-two { grid-template-columns:1fr; }
    .admin-moderation-form { grid-template-columns:1fr; }
    .admin-event-list article { grid-template-columns:1fr;gap:3px; }
    .admin-report-list dl { grid-template-columns:1fr; }
    .admin-test-banner,.admin-feature-context { flex-direction:column;gap:4px; }
    .admin-feature-list article { grid-template-columns:1fr; }
    .admin-feature-list form { align-items:stretch;flex-direction:column; }
    .settings-grid { grid-template-columns:1fr; }
    .owner-icon-settings { align-items:flex-start;gap:18px;padding:20px; }
    .owner-avatar-settings-form { width:92px;height:92px; }
    .settings-card { min-height:0; }
    .memorial-archive-grid { grid-template-columns:1fr; }
    .memorial-archive-card { border-radius:22px; }
    .memorial-archive-copy { padding:22px; }
    .memorial-banner blockquote { padding:15px; }
}

@media (max-width: 430px) {
    .welcome-copy h1 { font-size: 2.5rem; }
    .feature-strip { grid-template-columns: 1fr; }
    .feature-strip article { padding: 22px; }
    .button-row .button { width: 100%; }
    .header-actions > a:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
    .app-navigation { display:none; }
    .has-app-navigation { padding-bottom:0; }
}
