/* ANIM — Design System v1 (mobile-first) */

:root {
    --color-bg: #FFF8F3;
    --color-bg-alt: #FFF1E8;
    --color-surface: #FFFFFF;
    --color-surface-elevated: #FFFFFF;
    --color-text: #2D3436;
    --color-text-muted: #636E72;
    --color-text-soft: #8B9599;
    --color-primary: #E07A5F;
    --color-primary-hover: #CB684E;
    --color-primary-soft: #FCEEE8;
    --color-accent: #3D9970;
    --color-accent-soft: #E8F5EE;
    --color-border: rgba(45, 52, 54, 0.1);
    --color-border-strong: rgba(45, 52, 54, 0.16);
    --color-error: #C0392B;
    --color-error-bg: #FDEDEC;
    --color-success: #1E8449;
    --color-success-bg: #E9F7EF;
    --shadow-sm: 0 2px 8px rgba(45, 52, 54, 0.06);
    --shadow-md: 0 8px 24px rgba(45, 52, 54, 0.08);
    --shadow-lg: 0 16px 48px rgba(224, 122, 95, 0.12);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;
    --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic UI", sans-serif;
    --header-h: 60px;
    --page-gutter: 1.25rem;
    --max-width: 440px;
    --max-width-wide: 520px;
    --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

/* 背景オーブ */
.app-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 196, 163, 0.45), transparent 60%),
        radial-gradient(ellipse 60% 40% at 100% 20%, rgba(61, 153, 112, 0.12), transparent 50%),
        radial-gradient(ellipse 50% 30% at 0% 80%, rgba(224, 122, 95, 0.1), transparent 50%),
        var(--color-bg);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 0 var(--page-gutter);
    background: rgba(255, 248, 243, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: 0.02em;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.logo-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.logo-text {
    line-height: 1;
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    flex-shrink: 0;
}

.site-header-icon-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.05rem;
    margin-right: 0.05rem;
}

.site-header-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.site-header-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.site-header-icon-link:hover,
.site-header-icon-link:focus-visible {
    color: var(--color-primary);
    background: var(--color-primary-soft);
}

.site-header-icon-link.is-active {
    color: var(--color-primary);
    background: rgba(224, 122, 95, 0.14);
    box-shadow: inset 0 0 0 1px rgba(224, 122, 95, 0.22);
}

.site-header-icon-badge {
    position: absolute;
    top: 5px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: var(--radius-full);
    background: #e53935;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px rgba(255, 248, 243, 0.95);
    pointer-events: none;
}

.site-header--logged-in .logo-text {
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    z-index: 120;
    width: min(280px, calc(100vw - 2rem));
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 1rem 1rem 1.25rem;
    background: rgba(255, 251, 247, 0.98);
    border-left: 1px solid var(--color-border);
    box-shadow: -8px 0 32px rgba(42, 36, 32, 0.08);
    transform: translateX(105%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav.is-open {
    transform: translateX(0);
}

.site-menu-backdrop {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 110;
    background: rgba(42, 36, 32, 0.28);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.site-menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    color: var(--color-text);
    transition: background var(--transition);
    position: relative;
}

.site-menu-toggle-dot {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #e53935;
    box-shadow: 0 0 0 2px var(--color-surface, #fff8f3);
    pointer-events: none;
}

.site-menu-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
}

.site-menu-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

body.site-menu-open .site-menu-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.site-menu-open .site-menu-toggle-bar:nth-child(2) {
    opacity: 0;
}

body.site-menu-open .site-menu-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-menu-section {
    margin-bottom: 0.85rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--color-border);
}

.site-menu-label {
    margin: 0 0 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-text-soft);
    text-transform: uppercase;
}

.site-menu-email {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    word-break: break-all;
    color: var(--color-text);
}

.site-menu-nickname {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-text);
}

.site-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.site-menu-form {
    margin: 0;
}

.site-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    width: 100%;
    padding: 0.72rem 0.85rem;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-text);
    text-decoration: none;
    text-align: left;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.site-menu-link-text {
    flex: 1 1 auto;
}

.site-menu-badge {
    flex: 0 0 auto;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35rem;
    text-align: center;
}

.site-menu-link.is-active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 700;
}

.site-menu-link:hover,
.site-menu-link:focus-visible {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.site-menu-link-accent {
    color: var(--color-accent);
    font-weight: 700;
}

.site-menu-button {
    appearance: none;
}

.nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-link:hover { color: var(--color-primary); }

.inline-form { display: inline; margin: 0; }

.link-button {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

/* Main */
.main {
    width: 100%;
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: var(--page-gutter) var(--page-gutter) 3rem;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--color-text-soft);
    font-size: 0.75rem;
}

.site-footer-tag {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
}

.site-footer p { margin: 0; }

/* Typography */
h1 {
    margin: 0 0 0.75rem;
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

h2 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.lead {
    margin: 0 0 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.text-muted { color: var(--color-text-muted); font-size: 0.9rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary), #E8956F);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(224, 122, 95, 0.35);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(224, 122, 95, 0.4);
}

.btn:active { transform: translateY(0); }

.btn-block { width: 100%; }

.btn-small {
    min-height: 36px;
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(224, 122, 95, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--color-primary);
    box-shadow: none;
    border: 1.5px solid var(--color-border-strong);
}

.btn-ghost:hover {
    background: var(--color-primary-soft);
    box-shadow: none;
}

/* Cards */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.card-soft {
    background: var(--color-primary-soft);
    border-color: transparent;
    box-shadow: none;
}

/* Hero (Landing) */
.hero {
    text-align: center;
    padding: 1rem 0 2rem;
}

.hero-visual {
    width: min(180px, 45vw);
    margin: 0 auto 1.5rem;
    animation: float 4s ease-in-out infinite;
}

.hero-egg-svg {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-badge {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.35rem 0.9rem;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    letter-spacing: 0.04em;
}

.anim-kicker {
    margin-bottom: 1rem;
    text-align: center;
}

.anim-kicker-name {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: var(--color-primary-hover);
}

.anim-kicker-tag {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.anim-word {
    -webkit-text-fill-color: var(--color-primary-hover);
    background: none;
    color: var(--color-primary-hover);
}

.anim-inline-brand {
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-primary-hover);
}

.hero-title {
    font-size: clamp(1.75rem, 6vw, 2.125rem);
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--color-text) 30%, var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-lead {
    margin: 0 auto 2rem;
    max-width: 320px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 280px;
    margin: 0 auto;
}

.feature-list {
    list-style: none;
    margin: 2.5rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
    text-align: left;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--color-text-muted);
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-soft);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
}

/* Auth pages */
.page-auth .main {
    max-width: var(--max-width);
    padding-top: 2rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #FFE8D6, #FFC4A3);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* Legacy compat */
.container { max-width: var(--max-width); margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text);
}

.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.form-group select {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.form-group input[type="hidden"] {
    display: none;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.15);
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23636E72' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-actions {
    margin-top: 1.75rem;
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.form-footer a {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
}

.form-footer a:hover { text-decoration: underline; }

.auth-remember-row {
    margin: 0.15rem 0 1rem;
}

.auth-remember-check {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.field-error {
    display: block;
    margin-top: 0.35rem;
    color: var(--color-error);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert-error {
    background: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid rgba(192, 57, 43, 0.15);
}

.alert-success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid rgba(30, 132, 73, 0.15);
}

/* Guardian box */
.guardian-box {
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    background: #FFFBF7;
    border: 1.5px dashed rgba(224, 122, 95, 0.35);
    border-radius: var(--radius-md);
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 0.15rem;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.hint {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: var(--color-text-soft);
    line-height: 1.5;
}

/* Dashboard */
.page-dashboard .main { max-width: var(--max-width); }

.anim-room-debug-panel {
    margin-top: 0.5rem;
}

.anim-room-debug-stage.is-active {
    color: #fff;
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.page-anim-room .main {
    max-width: 520px;
    background: var(--room-page-bg, #ffffff);
}

.page-anim-room {
    --room-page-bg: #ffffff;
}

@media (max-width: 767px) {
    .page-anim-room,
    .page-anim-diary,
    .page-anim-encounters,
    .page-dashboard,
    .page-account {
        --page-gutter: 0.65rem;
    }

    .site-header--logged-in .logo-text {
        display: none;
    }

    .site-header-icon-link {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .site-header-icon {
        width: 21px;
        height: 21px;
    }
}

.anim-room-page {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.anim-room-personality {
    margin-top: 0.15rem;
}

.anim-room-personality-heading {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
}

.anim-room-personality-body {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.anim-profile-blurb {
    margin-bottom: 0.85rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.anim-profile-blurb-stage {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted, #8a7a72);
    letter-spacing: 0.04em;
}

.anim-profile-blurb-body {
    margin: 0;
    line-height: 1.65;
    font-size: 0.95rem;
}

.anim-profile-blurb-hint {
    margin: 0.55rem 0 0;
    font-size: 0.88rem;
    color: var(--text-muted, #6f625c);
}

.anim-profile-blurb-hint-label {
    display: inline-block;
    margin-right: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent, #c97b63);
}

.app-notifications-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.app-notifications-banner-lead {
    margin: 0;
    font-size: 0.92rem;
}

.app-notifications-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.app-notification-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.app-notification-item.is-unread {
    background: rgba(201, 123, 99, 0.06);
    margin: 0 -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border-radius: 0.5rem;
    border-bottom-color: transparent;
}

.app-notification-title {
    margin: 0 0 0.25rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.app-notification-body {
    margin: 0 0 0.35rem;
    font-size: 0.88rem;
    color: var(--text-muted, #6f625c);
    white-space: pre-line;
}

.app-notification-time {
    font-size: 0.75rem;
    color: var(--text-muted, #9a8d87);
}

.app-notification-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.app-notification-read-form {
    margin: 0;
}

.app-notifications-mark-all {
    margin-top: 0.75rem;
}

.notification-settings-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification-setting-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    font-size: 0.92rem;
}

.notification-setting-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.anim-room-viewport {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: min(82vh, 680px);
    padding: 0;
    overflow: hidden;
    background: var(--room-bg, #ffffff);
    border-color: rgba(0, 0, 0, 0.06);
}

.anim-room-stage-area {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: block;
    overflow: hidden;
}

/* シーン＝部屋全体（ヘッダー・フッターの下までアニムが動ける） */
.anim-room-scene {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: visible;
    transition: none;
}

.anim-room-viewport.is-chat-open .anim-room-scene {
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(4rem, 13vw, 5.25rem);
}

/* 部屋：会話返答吹き出し（プレイ領域全体に配置） */
.anim-room-reply-layer {
    position: absolute;
    inset: 0;
    z-index: 15;
    pointer-events: none;
    overflow: visible;
}

.anim-room-reply-layer .anim-murmur {
    position: absolute;
    top: auto;
    bottom: auto;
    z-index: 12;
    max-width: min(320px, 92vw);
    padding: 0.65rem 0.95rem;
    box-sizing: border-box;
}

.anim-room-reply-layer .anim-murmur.anim-murmur--room-layer {
    transform: translate(-50%, 0);
}

.anim-room-reply-layer .anim-murmur.is-chat-reply::after {
    top: -5px;
    bottom: auto;
    border-right: none;
    border-bottom: none;
    border-top: 1px solid rgba(244, 162, 97, 0.45);
    border-left: 1px solid rgba(244, 162, 97, 0.45);
}

.anim-room-reply-layer .anim-murmur.anim-murmur--room-above::after {
    top: auto;
    bottom: -5px;
    border-top: none;
    border-left: none;
    border-right: 1px solid rgba(244, 162, 97, 0.45);
    border-bottom: 1px solid rgba(244, 162, 97, 0.45);
}

.anim-room-reply-layer .anim-murmur.is-chat-reply {
    max-width: min(300px, 90vw);
}

.anim-room-reply-layer .anim-murmur.is-chat-reply.is-visible {
    pointer-events: auto;
}

.anim-room-reply-layer .anim-murmur.is-chat-reply .anim-murmur-text {
    font-size: 0.88rem;
    line-height: 1.5;
}

.anim-room-reply-layer .anim-murmur.is-chat-reply.is-visible {
    animation: anim-murmur-chat-in-below 0.32s ease forwards;
}

.anim-room-reply-layer .anim-murmur.anim-murmur--room-layer.is-visible {
    animation: anim-murmur-chat-in-below 0.32s ease forwards !important;
}

.anim-room-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem 1.35rem;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(255, 255, 255, 0.72) 55%,
        rgba(255, 255, 255, 0) 100%
    );
}

.anim-room-topbar-main,
.anim-room-growth-popover,
.anim-room-growth-popover summary {
    pointer-events: auto;
}

.anim-room-topbar-main {
    min-width: 0;
}

.anim-room-kicker {
    margin: 0;
    font-size: 0.75rem;
    color: var(--color-text-soft);
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.85);
}

.anim-room-title {
    margin: 0.12rem 0 0;
    font-size: 1.25rem;
    line-height: 1.25;
    text-shadow: 0 1px 10px rgba(255, 255, 255, 0.9);
}

.anim-room-growth-popover {
    position: relative;
    flex: 0 0 auto;
}

.anim-room-stage-summary {
    list-style: none;
    cursor: pointer;
}

.anim-room-stage-summary::-webkit-details-marker {
    display: none;
}

.anim-room-growth-popover[open] .anim-room-stage-label {
    color: #fff;
    background: var(--color-accent);
}

.anim-room-growth-panel {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    z-index: 60;
    width: min(300px, calc(100vw - 2.5rem));
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 32px rgba(42, 36, 32, 0.12);
}

.anim-room-stage-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-accent);
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(231, 111, 81, 0.1);
    transition: background 0.2s ease, color 0.2s ease;
}

.anim-room-baby-wrap {
    position: relative;
    z-index: 2;
    width: min(260px, 68vw);
    flex-shrink: 0;
    transition: transform 0.28s ease, width 0.28s ease, filter 0.45s ease, margin 0.45s ease;
}

.anim-room-sleep-stack .anim-room-baby-wrap {
    width: min(260px, 68vw);
}

.anim-room-viewport.is-chat-open .anim-room-baby-wrap {
    width: min(220px, 58vw);
    transform: translateY(0);
}

.anim-room-baby-wrap .baby-anim-visual {
    margin: 0 auto;
}

/* --- 睡眠モード（SVGベッド＋斜め上視点） --- */

.anim-room-sleep-stack {
    position: relative;
    width: min(260px, 68vw);
    margin: 0 auto;
    flex-shrink: 0;
}

.anim-room-scene.anim-is-sleeping .anim-room-sleep-stack {
    width: min(320px, 84vw);
    min-height: min(340px, 66vw);
    perspective: 960px;
    perspective-origin: 50% 22%;
}

.anim-sleep-plane {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.55s ease;
}

/* 通常時：睡眠用ラッパーはレイアウトに影響させない */
.anim-room-scene:not(.anim-is-sleeping) .anim-sleep-plane {
    display: contents;
}

.anim-room-scene:not(.anim-is-sleeping) .anim-sleep-bed-base,
.anim-room-scene:not(.anim-is-sleeping) .anim-sleep-duvet {
    display: none;
}

.anim-room-scene.anim-is-sleeping .anim-sleep-plane {
    display: grid;
    grid-template-areas: "bed";
    place-items: end center;
    height: min(300px, 58vw);
    min-height: min(280px, 54vw);
    padding-bottom: 2%;
    transform: rotateX(42deg);
}

.anim-sleep-overlay {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
}

.anim-sleep-overlay.is-hidden {
    display: none;
}

.anim-sleep-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 72%, rgba(30, 40, 90, 0.18) 0%, rgba(10, 15, 40, 0.34) 100%);
    transition: opacity 0.5s ease;
}

.anim-room-scene.anim-is-deep-sleep .anim-sleep-shade {
    background: radial-gradient(ellipse at 50% 72%, rgba(20, 25, 70, 0.32) 0%, rgba(5, 8, 30, 0.5) 100%);
}

/* SVG ベッド（睡眠時のみ表示・配置） */
.anim-sleep-bed-base {
    display: none;
    width: 100%;
    max-width: min(300px, 82vw);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.anim-room-scene.anim-is-sleeping .anim-sleep-bed-base {
    display: block;
    grid-area: bed;
    transform: translateZ(0);
    opacity: 1;
    visibility: visible;
}

.anim-sleep-bed-art {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: bottom;
}

/* キャラ：通常は通常サイズ、睡眠時のみベッド上に縮小配置 */
.anim-room-scene.anim-is-sleeping .anim-room-sleep-stack .anim-room-baby-wrap {
    width: auto;
}

.anim-room-scene.anim-is-sleeping .anim-room-sleep-stack .anim-sleep-anim-slot {
    grid-area: bed;
    align-self: end;
    justify-self: center;
    width: min(148px, 42vw);
    max-width: 52%;
    margin-bottom: 22%;
    z-index: 2;
    transform: translateZ(8px);
}

.anim-room-scene.anim-is-sleeping .anim-room-sleep-stack .anim-sleep-anim-slot {
    filter: saturate(0.9) brightness(0.96);
}

.anim-room-scene.anim-is-deep-sleep .anim-room-sleep-stack .anim-sleep-anim-slot {
    filter: saturate(0.82) brightness(0.92);
}

.anim-room-scene.anim-is-napping .anim-room-sleep-stack .anim-sleep-anim-slot {
    filter: saturate(0.92) brightness(0.97);
}

.anim-room-scene.anim-is-groggy .anim-room-sleep-stack .anim-sleep-anim-slot {
    filter: saturate(0.94);
}

/* 掛け布団（睡眠時のみ） */
.anim-sleep-duvet {
    display: none;
    pointer-events: none;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.anim-room-scene.anim-is-sleeping .anim-sleep-duvet {
    display: block;
    grid-area: bed;
    align-self: end;
    justify-self: center;
    width: min(188px, 54vw);
    max-width: 62%;
    height: min(80px, 22vw);
    margin-bottom: 16%;
    z-index: 3;
    transform: translateZ(16px);
    opacity: 1;
    visibility: visible;
    animation: anim-duvet-breathe 3.4s ease-in-out infinite;
}

@keyframes anim-duvet-breathe {
    0%, 100% { transform: translateZ(16px) scale(1); }
    50% { transform: translateZ(16px) scale(1.02); }
}

.anim-sleep-duvet-body {
    width: 100%;
    height: 100%;
    border-radius: 20px 20px 28px 28px;
    background: linear-gradient(165deg, #b8cae8 0%, #8fa8d0 45%, #7592c4 100%);
    box-shadow:
        0 10px 24px rgba(40, 55, 100, 0.2),
        inset 0 3px 0 rgba(255, 255, 255, 0.45),
        inset 0 -6px 14px rgba(60, 80, 120, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.anim-room-scene.anim-is-deep-sleep .anim-sleep-duvet-body {
    background: linear-gradient(165deg, #a3b6d8 0%, #7f96bc 48%, #6884b0 100%);
}

.anim-sleep-zzz {
    position: absolute;
    top: 10%;
    right: 14%;
    width: 64px;
    height: 64px;
    z-index: 4;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    color: rgba(120, 140, 200, 0.88);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.anim-sleep-z {
    position: absolute;
    opacity: 0;
    animation: anim-sleep-zzz-float 2.8s ease-in-out infinite;
}

.anim-sleep-z1 { font-size: 1.35rem; left: 0; bottom: 0; animation-delay: 0s; }
.anim-sleep-z2 { font-size: 1rem; left: 18px; bottom: 14px; animation-delay: 0.55s; }
.anim-sleep-z3 { font-size: 0.75rem; left: 32px; bottom: 26px; animation-delay: 1.1s; }

@keyframes anim-sleep-zzz-float {
    0% { opacity: 0; transform: translateY(8px) scale(0.8); }
    20% { opacity: 0.95; }
    70% { opacity: 0.5; }
    100% { opacity: 0; transform: translateY(-28px) scale(1.05); }
}

.anim-sleep-badge {
    display: inline-block;
    position: static;
    width: fit-content;
    max-width: 100%;
    margin: 0.4rem 0 0;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    line-height: 1.35;
    color: #4a5580;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 10px rgba(30, 40, 80, 0.1);
    white-space: nowrap;
}

.anim-sleep-badge.is-hidden {
    display: none;
}

.anim-room-topbar-main .anim-sleep-badge {
    pointer-events: none;
}

/* 睡眠中の触り・寝言吹き出し：キャラ直上（トップバーと被らない） */
.anim-room-scene.anim-is-sleeping .anim-murmur {
    top: auto;
    bottom: calc(100% + 8px);
    left: 50%;
    right: auto;
    max-width: min(180px, 72vw);
    transform: translate(-50%, 0) scale(0.9);
}

.anim-room-scene.anim-is-sleeping .anim-murmur.is-visible {
    transform: translate(-50%, 0) scale(1);
    animation: anim-murmur-sleep-pop 2.6s ease forwards;
}

.anim-room-scene.anim-is-sleeping .anim-murmur.is-chat-reply {
    top: auto;
    bottom: calc(100% + 8px);
    left: 50%;
    right: auto;
    max-width: min(220px, 80vw);
    transform: translate(-50%, 0);
}

.anim-room-scene.anim-is-sleeping .anim-murmur.is-chat-reply.is-visible {
    animation: anim-murmur-sleep-chat-in 0.32s ease forwards;
}

.anim-room-scene.anim-is-sleeping .anim-murmur::after {
    left: 50%;
    right: auto;
    bottom: -5px;
    top: auto;
    transform: translateX(-50%) rotate(45deg);
}

@keyframes anim-murmur-sleep-pop {
    0% { opacity: 0; transform: translate(-50%, 6px) scale(0.88); }
    12% { opacity: 1; transform: translate(-50%, 0) scale(1); }
    78% { opacity: 1; transform: translate(-50%, 0) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -4px) scale(0.96); }
}

@keyframes anim-murmur-sleep-chat-in {
    0% { opacity: 0; transform: translate(-50%, 8px) scale(0.92); }
    100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.anim-room-scene [data-anim-25d] {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.anim-room-scene.anim-is-sleeping [data-anim-25d] {
    cursor: pointer;
}

.anim-room-scene.anim-is-sleeping [data-anim-25d].anim-25d-is-asleep .anim-25d-shadow {
    opacity: 0.28;
    transform: scale(0.7) translateY(6px);
}

.anim-room-scene.anim-is-sleeping [data-anim-25d].anim-25d-is-asleep .anim-25d-glow {
    opacity: 0.18;
}

/* 寝姿：マットレス上に仰向け */
.anim-room-scene.anim-is-sleeping [data-anim-25d].anim-25d-is-asleep:not(.is-ai-ready) .anim-25d-rig {
    animation: anim-25d-lie-sleep 3.6s ease-in-out infinite;
    transform-origin: 50% 78%;
}

.anim-room-scene.anim-is-sleeping [data-anim-25d].anim-25d-is-asleep.is-ai-ready .anim-25d-body-wrap {
    animation: anim-sleep-lie-breathe 3.4s ease-in-out infinite;
    transform-origin: 50% 80%;
}

@keyframes anim-25d-lie-sleep {
    0%, 100% { transform: translateY(4px) scale(0.88) scaleY(0.82); }
    50% { transform: translateY(6px) scale(0.86) scaleY(0.8); }
}

@keyframes anim-sleep-lie-breathe {
    0%, 100% { transform: translateY(2px) scale(0.9) scaleY(0.84); }
    50% { transform: translateY(4px) scale(0.88) scaleY(0.82); }
}

.anim-room-scene.anim-is-sleeping [data-anim-25d].anim-25d-is-asleep .baby-anim-face-layer {
    animation: none;
}

/* AI 待ち：孵化〜生成完了まで丸い仮 SVG を出さない */
.baby-anim-visual.anim-awaiting-ai:not(.is-ai-ready) .baby-anim-svg {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.baby-anim-visual.anim-awaiting-ai:not(.is-ai-ready) .anim-25d-body-wrap {
    min-height: min(200px, 52vw);
}

.baby-anim-visual.anim-awaiting-ai:not(.is-ai-ready) .anim-25d-glow {
    opacity: 0.45;
    animation: anim-awaiting-ai-glow 2.4s ease-in-out infinite;
}

.baby-anim-visual.anim-awaiting-ai:not(.is-ai-ready) .anim-25d-shadow {
    opacity: 0.25;
    transform: scale(0.85);
}

@keyframes anim-awaiting-ai-glow {
    0%, 100% { opacity: 0.35; transform: scale(0.96); }
    50% { opacity: 0.55; transform: scale(1.02); }
}

.egg-baby-reveal.anim-awaiting-ai-hatch:not(.is-ai-ready) .baby-anim-svg,
.egg-baby-reveal .baby-anim-visual.anim-awaiting-ai:not(.is-ai-ready) .baby-anim-svg {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .anim-room-scene.anim-is-sleeping .anim-sleep-plane {
        transform: rotateX(38deg);
    }
    .anim-room-scene.anim-is-sleeping [data-anim-25d].anim-25d-is-asleep:not(.is-ai-ready) .anim-25d-rig,
    .anim-room-scene.anim-is-sleeping [data-anim-25d].anim-25d-is-asleep.is-ai-ready .anim-25d-body-wrap,
    .anim-room-scene.anim-is-sleeping .anim-sleep-duvet {
        animation: none;
    }
}

.anim-room-scene.anim-is-deep-sleep .anim-sleep-zzz {
    opacity: 1;
}

.anim-room-scene.anim-is-sleeping:not(.anim-is-deep-sleep) .anim-sleep-z3 {
    animation-duration: 3.4s;
}

.anim-room-debug-sleep {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.12);
}

.anim-room-debug-sleep-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.anim-room-foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.65rem;
    padding: 1.35rem 1rem 0.85rem;
    pointer-events: none;
    background: linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(255, 255, 255, 0.72) 55%,
        rgba(255, 255, 255, 0) 100%
    );
}

.anim-room-foot-main,
.anim-room-chat-fab,
.anim-room-schedule-edit {
    pointer-events: auto;
}

.anim-room-mood {
    margin: 0;
    padding: 0 0 0.15rem;
    text-align: left;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--color-text-soft);
}

.anim-room-foot-main {
    min-width: 0;
}

.anim-room-stage-desc {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    color: var(--color-text-soft);
    line-height: 1.4;
}

.anim-room-growth {
    margin: 0;
}

.anim-room-stage-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.35rem;
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
}

.anim-room-stage-step {
    font-size: 0.62rem;
    line-height: 1.2;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    color: var(--color-text-soft);
    background: rgba(0, 0, 0, 0.04);
}

.anim-room-stage-step.is-past {
    color: var(--color-accent);
    background: rgba(231, 111, 81, 0.1);
}

.anim-room-stage-step.is-current {
    color: #fff;
    font-weight: 700;
    background: var(--color-accent);
}

.anim-room-growth-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.anim-room-growth-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ffb4a2, #e76f51);
    transition: width 0.45s ease;
}

.anim-room-growth-hint {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    color: var(--color-text-soft);
}

.anim-room-growth-regenerate {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.anim-room-regenerate-growth {
    width: 100%;
    font-size: 0.78rem;
    padding: 0.45rem 0.65rem;
}

.anim-room-regenerate-status {
    margin: 0.35rem 0 0;
    font-size: 0.7rem;
    color: var(--color-text-soft);
}

.anim-room-regenerate-note {
    margin: 0.25rem 0 0;
    font-size: 0.65rem;
    color: var(--color-text-soft);
    opacity: 0.85;
}

.anim-room-regenerate-status.is-error {
    color: #c0392b;
}

.anim-room-viewport.is-chat-open .anim-room-foot {
    opacity: 0.45;
    pointer-events: none;
}

.anim-room-viewport.is-chat-open .anim-room-foot .anim-room-chat-fab {
    pointer-events: none;
}

.anim-room-chat-fab {
    position: static;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #f4a261, #e76f51);
    box-shadow: 0 6px 18px rgba(231, 111, 81, 0.32);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.anim-room-chat-fab:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(231, 111, 81, 0.42);
}

.anim-room-chat-fab:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.anim-room-viewport.is-chat-open .anim-room-chat-fab {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.85);
}

.anim-room-growth-eta {
    color: var(--color-text-soft);
    font-size: 0.68rem;
}

.anim-room-chat-sheet {
    flex: 0 0 auto;
    z-index: 40;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid transparent;
    transition:
        max-height 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.24s ease,
        padding 0.32s ease,
        border-color 0.24s ease;
    pointer-events: none;
}

.anim-room-chat-sheet.is-open {
    max-height: min(240px, 42vh);
    opacity: 1;
    padding: 0.65rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    border-top-color: rgba(231, 111, 81, 0.12);
    box-shadow: 0 -4px 20px rgba(42, 36, 32, 0.06);
    pointer-events: auto;
    overflow-y: auto;
}

.anim-room-chat-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.anim-room-chat-sheet-title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-soft);
}

.anim-room-chat-close {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text-soft);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.anim-room-chat-form {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 0.5rem;
}

.anim-room-chat-form textarea {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    resize: none;
    min-height: 2.4rem;
    max-height: 4.5rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    font: inherit;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.anim-room-chat-form .anim-room-chat-send {
    flex: 0 0 auto;
    min-width: 4.5rem;
    margin: 0;
    padding-inline: 1rem;
    border-radius: 999px;
}

.anim-room-chat-status {
    min-height: 1rem;
    margin: 0.35rem 0 0;
    font-size: 0.76rem;
    color: var(--color-text-soft);
}

.anim-room-chat-status.is-error {
    color: #c0392b;
}

.anim-room-schedule-dialog {
    border: none;
    border-radius: 16px;
    padding: 0;
    max-width: min(400px, 92vw);
    margin: auto;
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.anim-room-schedule-dialog::backdrop {
    background: rgba(42, 36, 32, 0.42);
}

.anim-room-schedule-dialog:not([open]) {
    display: none;
}

.anim-room-schedule-form {
    padding: 1.25rem 1.35rem 1.1rem;
}

.anim-room-schedule-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.anim-room-schedule-desc {
    margin: 0 0 1rem;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--color-text-soft);
}

.anim-room-schedule-fields {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.anim-room-schedule-field {
    display: grid;
    gap: 0.3rem;
    font-size: 0.84rem;
}

.anim-room-schedule-field input[type="time"] {
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font: inherit;
}

.anim-room-schedule-status {
    min-height: 1.2em;
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    color: var(--color-text-soft);
}

.anim-room-schedule-status.is-error {
    color: #c0392b;
}

.anim-room-schedule-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.anim-room-schedule-edit {
    margin-top: 0.35rem;
    padding: 0.2rem 0.55rem;
    border: none;
    background: transparent;
    color: var(--color-text-soft);
    font-size: 0.72rem;
    text-decoration: underline;
    cursor: pointer;
}

.anim-room-debug-illustration {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.anim-room-debug-illustration-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}

.anim-room-debug-illustration-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.03);
    font-size: 0.78rem;
}

.anim-room-debug-illustration-item.is-active {
    background: rgba(42, 157, 143, 0.12);
    font-weight: 600;
}

.anim-room-debug-illustration-item.is-muted {
    opacity: 0.55;
}

.anim-room-debug-illustration-empty {
    font-size: 0.78rem;
    color: var(--color-text-soft);
}

.anim-room-debug-illustration-revert {
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
}

.anim-room-scene .anim-murmur {
    top: -6%;
    max-width: min(220px, 88vw);
    padding: 0.55rem 0.85rem;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(42, 157, 143, 0.16);
}

.anim-room-scene .anim-murmur.is-chat-reply {
    top: calc(100% + 10px);
    bottom: auto;
    max-width: min(320px, 92vw);
    padding: 0.65rem 0.95rem;
    box-sizing: border-box;
}

.anim-room-scene .anim-murmur.is-chat-reply::after {
    top: -5px;
    bottom: auto;
    border-right: none;
    border-bottom: none;
    border-top: 1px solid rgba(244, 162, 97, 0.45);
    border-left: 1px solid rgba(244, 162, 97, 0.45);
}

/* 会話返答は JS のタイマーで消す（CSS の自動フェードアウトは使わない） */
.anim-room-scene .anim-murmur.is-chat-reply.is-visible,
.anim-murmur.is-chat-reply.is-visible {
    animation: anim-murmur-chat-in-below 0.32s ease forwards;
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) scale(1);
    pointer-events: auto;
}

.anim-room-scene .anim-murmur.is-chat-reply .anim-murmur-text,
.anim-murmur.is-chat-reply .anim-murmur-text {
    font-size: 0.92rem;
    line-height: 1.55;
    text-align: left;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    max-height: min(42vh, 220px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
}

@keyframes anim-murmur-chat-in {
    0% { opacity: 0; transform: translate(-50%, 8px) scale(0.92); }
    100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes anim-murmur-chat-in-below {
    0% { opacity: 0; transform: translate(-50%, -8px) scale(0.92); }
    100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.anim-25d-is-speaking .anim-25d-body-wrap,
.anim-25d-is-speaking .anim-25d-rig {
    animation: anim-room-speak-bob 0.55s ease-in-out infinite alternate;
}

@keyframes anim-murmur-chat {
    0% { opacity: 0; transform: translate(-50%, 8px) scale(0.88); }
    100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes anim-room-speak-bob {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
}

@media (max-width: 767px) {
    .page-anim-room .main {
        max-width: none;
    }

    .anim-room-page {
        gap: 0.65rem;
    }

    .anim-room-viewport {
        min-height: min(78vh, 620px);
    }

    .anim-room-foot {
        padding-bottom: 0.75rem;
    }

    .anim-room-mood {
        font-size: 0.76rem;
    }

    .anim-room-viewport.is-chat-open .anim-room-baby-wrap {
        width: min(190px, 52vw);
    }

    .anim-room-chat-sheet.is-open {
        max-height: min(260px, 46vh);
    }

    .anim-room-title {
        font-size: 1.12rem;
    }

    .anim-room-growth-hint {
        font-size: 0.68rem;
        line-height: 1.45;
    }

    .anim-room-growth-eta {
        display: block;
        margin-top: 0.2rem;
    }

    .anim-room-chat-form {
        flex-direction: column;
        align-items: stretch;
    }

    .anim-room-chat-form .anim-room-chat-send {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .anim-room-chat-sheet,
    .anim-room-scene,
    .anim-room-baby-wrap {
        transition: none;
    }

    .anim-room-scene .anim-murmur.is-chat-reply.is-visible,
    .anim-murmur.is-chat-reply.is-visible {
        animation: none;
    }

    .anim-25d-is-speaking .anim-25d-body-wrap,
    .anim-25d-is-speaking .anim-25d-rig {
        animation: none;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.dashboard-greeting {
    margin-bottom: 1.5rem;
}

.dashboard-greeting h1 { font-size: 1.375rem; }

.profile-card { margin-bottom: 1.5rem; }

.page-account .account-page-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.page-account .account-page-stack > .card {
    margin: 0;
}

.page-account .account-page-stack > .card > h2 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
}

.page-account .account-page-stack > .card > .profile-lead:last-child {
    margin-bottom: 0;
}

.page-account .dashboard-egg-card .btn-block {
    margin-top: 0.25rem;
}

.profile-lead {
    margin: 0 0 1rem;
    font-size: 0.9rem;
}

.avatar-picker-section {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.avatar-picker-section-register {
    margin-top: 0.25rem;
    border-bottom: none;
    padding-bottom: 0.5rem;
}

.avatar-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    text-align: center;
}

.avatar-picker-trigger {
    appearance: none;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
}

.avatar-picker-ring {
    position: relative;
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, #f3ebe4 0%, #e8ddd4 100%);
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 4px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(61, 43, 31, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.avatar-picker-compact .avatar-picker-ring {
    width: 96px;
    height: 96px;
}

.avatar-picker-trigger:hover .avatar-picker-ring,
.avatar-picker-trigger:focus-visible .avatar-picker-ring {
    transform: scale(1.02);
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 4px var(--color-primary),
        0 10px 28px rgba(61, 43, 31, 0.16);
}

.avatar-picker-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-picker-preview.is-hidden,
.avatar-picker-fallback.is-hidden {
    display: none;
}

.avatar-picker-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.avatar-picker-compact .avatar-picker-fallback {
    font-size: 2rem;
}

.avatar-picker-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.38);
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.avatar-picker-trigger:hover .avatar-picker-overlay,
.avatar-picker-trigger:focus-visible .avatar-picker-overlay {
    opacity: 1;
}

.avatar-picker-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.avatar-picker-change {
    appearance: none;
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.avatar-picker-change:hover {
    color: #2d6b52;
}

.avatar-picker-hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.avatar-picker-error {
    margin: 0;
}

body.avatar-crop-open {
    overflow: hidden;
}

.avatar-crop-modal[hidden] {
    display: none !important;
}

.avatar-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 640px) {
    .avatar-crop-modal {
        align-items: center;
    }
}

.avatar-crop-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 12, 10, 0.72);
    backdrop-filter: blur(4px);
}

.avatar-crop-sheet {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
    padding: 0 0 calc(1rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 640px) {
    .avatar-crop-sheet {
        border-radius: 20px;
        margin: 1rem;
    }
}

.avatar-crop-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.avatar-crop-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}

.avatar-crop-btn {
    appearance: none;
    border: none;
    background: none;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 999px;
}

.avatar-crop-btn-ghost {
    color: var(--color-text-muted);
    justify-self: start;
}

.avatar-crop-btn-primary {
    color: var(--color-primary);
    font-weight: 700;
    justify-self: end;
}

.avatar-crop-stage-wrap {
    padding: 1.25rem 1rem 0.75rem;
    display: flex;
    justify-content: center;
}

.avatar-crop-stage {
    position: relative;
    width: 280px;
    height: 280px;
    overflow: hidden;
    border-radius: 50%;
    background: #111;
    cursor: grab;
    touch-action: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.avatar-crop-stage.is-dragging {
    cursor: grabbing;
}

.avatar-crop-image {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    user-select: none;
    pointer-events: none;
    max-width: none;
}

.avatar-crop-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem 0;
}

.avatar-crop-zoom-label {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.avatar-crop-zoom {
    flex: 1;
    accent-color: var(--color-primary);
}

.avatar-crop-footnote {
    margin: 0.65rem 0 0;
    padding: 0 1.25rem;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    text-align: center;
}

.owner-profile-form .form-group textarea {
    width: 100%;
    min-height: 4.5rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    font: inherit;
    resize: vertical;
}

.account-age-note {
    margin: 0.75rem 0 1rem;
}

.account-email-form {
    margin-top: 1rem;
}

.account-email-cancel {
    margin-top: 0.5rem;
}

.info-grid {
    display: grid;
    gap: 0;
    margin: 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
    gap: 1rem;
}

.info-row:last-child { border-bottom: none; }

.info-row dt {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.info-row dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    text-align: right;
    word-break: break-all;
}

.status-pill {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.coming-soon {
    padding: 1.25rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    text-align: center;
}

.coming-soon p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Status page (email sent etc) */
.status-page {
    text-align: center;
    padding: 2rem 0;
}

.status-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
}

.status-icon--mail {
    background: var(--color-accent-soft);
}

.status-icon--error {
    background: var(--color-error-bg);
}

.status-email {
    display: inline-block;
    margin: 0.5rem 0 1rem;
    padding: 0.4rem 0.85rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    word-break: break-all;
}

/* Forms */

/* Onboarding @req FR-ONB */
.page-onboarding .main { max-width: var(--max-width-wide); }

.onboarding-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.onboarding-header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
}

.onboarding-progress {
    margin-bottom: 1.25rem;
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.progress-step {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--color-text-soft);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
}

.progress-step.is-active {
    color: var(--color-primary);
    border-color: var(--color-primary-soft);
    background: var(--color-primary-soft);
    font-weight: 500;
}

.progress-step.is-done {
    color: var(--color-accent);
    border-color: var(--color-accent-soft);
    background: var(--color-accent-soft);
}

.progress-bar-wrap {
    height: 6px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
    transition: width var(--transition);
}

.progress-label {
    margin: 0;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.interest-category { margin-bottom: 1.25rem; }

.interest-category-title {
    margin: 0 0 0.65rem;
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

.interest-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.interest-chips--flat {
    margin-bottom: 0.25rem;
}

.interest-chip {
    cursor: pointer;
}

.interest-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.interest-chip span {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-surface);
    transition: border-color var(--transition), background var(--transition);
}

.interest-chip input:checked + span {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
    font-weight: 500;
}

.interest-chip input:disabled + span {
    opacity: 0.45;
}

.interest-counter {
    text-align: center;
    margin: 1rem 0 0;
}

.form-actions-split {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.form-actions-split .btn,
.form-actions-split .inline-form {
    flex: 1;
}

.form-actions-split .inline-form .btn {
    width: 100%;
}

.card-question .question-text {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.option-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.option-card {
    display: block;
    cursor: pointer;
}

.option-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-card-label {
    display: block;
    padding: 0.85rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.option-card input:checked + .option-card-label {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.option-card input:focus-visible + .option-card-label {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.hero-compact { padding-top: 1.5rem; }

/* Egg @req FR-EGG */
.page-egg .main {
    max-width: var(--max-width-wide);
    padding-top: max(1.75rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(3.5rem, env(safe-area-inset-bottom, 0px));
}

.egg-page,
.egg-gate-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-block: 0.75rem;
}

.egg-page > .card,
.egg-gate-page > .card {
    margin: 0;
}

.egg-page.egg-phase-ready .anim-kicker,
.egg-page.egg-phase-ready .egg-header,
.egg-page.egg-phase-ready .egg-gate-benefits,
.egg-page.egg-phase-ready .egg-gate-actions,
.egg-page.egg-phase-ready .egg-gate-note,
.egg-page.egg-phase-ready .egg-saved-note,
.egg-page.egg-phase-ready .egg-lineage-badge,
.egg-page.egg-phase-ready .egg-gate-mood {
    display: none;
}

.egg-ready-message {
    display: none;
    text-align: center;
    padding: 0 0.75rem;
}

.egg-page.egg-phase-ready .egg-ready-message {
    display: block;
}

.egg-page.egg-phase-hatching .egg-ready-message,
.egg-page.egg-phase-naming .egg-ready-message {
    display: none;
}

.egg-ready-message-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.875rem;
    color: var(--color-primary-hover);
    letter-spacing: 0.02em;
}

.egg-ready-message-title {
    margin: 0 0 0.5rem;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.35;
}

.egg-ready-message-lead {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}

.egg-ready-decor {
    position: absolute;
    inset: -22% -16%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.egg-page.egg-phase-ready .egg-ready-decor {
    opacity: 1;
}

.egg-page.egg-phase-hatching .egg-ready-decor,
.egg-page.egg-phase-naming .egg-ready-decor {
    opacity: 0;
}

.egg-ready-decor-glow {
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 220, 175, 0.55) 0%, rgba(255, 196, 140, 0.2) 45%, transparent 72%);
    animation: egg-ready-glow-breathe 2.8s ease-in-out infinite;
}

.egg-ready-decor-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    border: 1px solid rgba(255, 200, 150, 0.45);
    transform: translate(-50%, -50%);
}

.egg-ready-decor-ring-outer {
    width: 118%;
    height: 118%;
    animation: egg-ready-ring-pulse 3.2s ease-in-out infinite;
}

.egg-ready-decor-ring-inner {
    width: 92%;
    height: 92%;
    border-color: rgba(255, 230, 200, 0.55);
    animation: egg-ready-ring-pulse 3.2s ease-in-out 0.6s infinite;
}

.egg-ready-decor-sparks span {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 230, 190, 0.95);
    box-shadow: 0 0 8px rgba(255, 196, 140, 0.8);
    opacity: 0;
    animation: egg-ready-spark 2.4s ease-in-out infinite;
}

.egg-ready-decor-sparks span:nth-child(1) { left: 14%; top: 22%; animation-delay: 0s; }
.egg-ready-decor-sparks span:nth-child(2) { left: 78%; top: 18%; animation-delay: 0.4s; }
.egg-ready-decor-sparks span:nth-child(3) { left: 86%; top: 52%; animation-delay: 0.8s; }
.egg-ready-decor-sparks span:nth-child(4) { left: 12%; top: 58%; animation-delay: 1.2s; }
.egg-ready-decor-sparks span:nth-child(5) { left: 50%; top: 8%; animation-delay: 0.2s; }
.egg-ready-decor-sparks span:nth-child(6) { left: 46%; top: 86%; animation-delay: 1s; }

.egg-page.egg-phase-ready .egg-interactive {
    filter: drop-shadow(0 0 14px rgba(255, 196, 140, 0.55));
    animation: egg-ready-egg-glow 2.8s ease-in-out infinite;
}

.egg-hatch-cluster {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    scroll-margin-top: 5rem;
    scroll-margin-bottom: 2rem;
}

.egg-hatch-cluster .egg-stage-wrap,
.egg-hatch-cluster .egg-gate-visual-wrap {
    margin-bottom: 0;
}

.egg-page.egg-phase-ready .egg-hatch-cluster {
    gap: 0.25rem;
    min-height: min(58dvh, 26rem);
    justify-content: center;
}

.egg-page.egg-phase-ready .egg-touch-hint {
    margin: 0.35rem 0 0;
}

.egg-page.egg-phase-hatching .egg-hatch-cluster {
    min-height: min(72dvh, 34rem);
    justify-content: center;
    gap: 0.35rem;
}

.egg-page.egg-phase-hatching .egg-debug-panel,
.egg-page.egg-phase-hatching .anim-kicker,
.egg-page.egg-phase-hatching .egg-header,
.egg-page.egg-phase-hatching .egg-ready-message,
.egg-page.egg-phase-hatching .egg-gate-benefits,
.egg-page.egg-phase-hatching .egg-gate-actions,
.egg-page.egg-phase-hatching .egg-gate-note,
.egg-page.egg-phase-hatching .egg-saved-note,
.egg-page.egg-phase-hatching .egg-lineage-badge,
.egg-page.egg-phase-hatching .egg-gate-mood,
.egg-page.egg-phase-hatching #egg-incubating-stats {
    display: none !important;
}

.egg-page.egg-phase-hatching .egg-touch-hint {
    margin: 0.5rem 0 0;
    min-height: 2.6em;
}

@media (max-height: 740px) {
    .egg-page.egg-phase-hatching .egg-shell-slot {
        max-width: 190px;
    }

    .egg-page.egg-phase-hatching .egg-hatch-cluster {
        min-height: min(68dvh, 30rem);
    }
}

.egg-page.egg-phase-naming .egg-gate-benefits,
.egg-page.egg-phase-naming .egg-gate-actions,
.egg-page.egg-phase-naming .egg-gate-note,
.egg-page.egg-phase-naming .egg-saved-note,
.egg-page.egg-phase-naming .egg-header,
.egg-page.egg-phase-naming .anim-kicker {
    display: none;
}

html.egg-hatch-scroll-lock {
    overflow: hidden;
    overscroll-behavior: none;
}

html.egg-hatch-scroll-lock body {
    overflow: hidden;
    touch-action: none;
}

.egg-page.egg-phase-ready {
    gap: 0.75rem;
}

.egg-page.egg-phase-ready > .egg-hatch-cluster {
    margin-top: 0.25rem;
}

.egg-page.egg-phase-naming .egg-naming-panel,
.egg-page.egg-phase-naming .egg-named-celebrate {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.egg-page { text-align: center; overflow: visible; }

.egg-header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
}

.egg-lineage-badge {
    display: inline-block;
    margin: 0.5rem 0 0;
    padding: 0.3rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--color-primary-hover);
    background: var(--color-primary-soft);
    border-radius: var(--radius-full);
}

.egg-stage-wrap {
    margin: 1.25rem auto 1rem;
    position: relative;
    overflow: visible;
}

.egg-murmur {
    position: absolute;
    left: 50%;
    bottom: calc(100% - 4px);
    top: auto;
    z-index: 5;
    max-width: min(168px, 88vw);
    padding: 0.45rem 0.7rem;
    background: #fff;
    border: 1px solid rgba(244, 162, 97, 0.4);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(42, 157, 143, 0.12);
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%);
}

.egg-murmur.is-hidden {
    visibility: hidden;
    opacity: 0;
}

.egg-murmur::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-right: 1px solid rgba(244, 162, 97, 0.4);
    border-bottom: 1px solid rgba(244, 162, 97, 0.4);
    transform: translateX(-50%) rotate(45deg);
}

.egg-murmur-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    letter-spacing: 0.04em;
    color: var(--color-text);
    text-align: center;
    word-break: keep-all;
}

.egg-murmur.is-visible {
    animation: egg-murmur-pop 2.8s ease forwards;
}

@keyframes egg-murmur-pop {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(8px) scale(0.9);
    }
    12% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    78% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-6px) scale(0.96);
    }
}

.egg-stage {
    position: relative;
    overflow: visible;
    transform-origin: center bottom;
    transition: transform 0.4s ease;
    margin: 0 auto;
    max-width: 240px;
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    cursor: pointer;
}

.egg-shell-slot {
    position: relative;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
    aspect-ratio: 200 / 240;
}

.egg-shell-slot .hero-egg-svg {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    margin: 0;
}

.egg-stage:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

.egg-stage .hero-egg-svg {
    display: block;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
}

.egg-shell-slot .egg-touch-ripple {
    z-index: 3;
}

.egg-touch-ripple {
    position: absolute;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 180, 162, 0.55) 0%, rgba(255, 180, 162, 0) 70%);
    pointer-events: none;
    opacity: 0;
    transform: scale(0.4);
}

.egg-touch-ripple.is-active {
    animation: egg-ripple 0.55s ease-out forwards;
}

.egg-touch-hint {
    margin: 0.75rem 0 0;
    text-align: center;
}

.egg-guest-note {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.egg-interactive {
    cursor: pointer;
    transition: transform 0.35s ease, filter 0.35s ease;
    transform-origin: center bottom;
}

.egg-stats {
    margin-bottom: 1rem;
    text-align: left;
}

.egg-stat + .egg-stat { margin-top: 1rem; }

.egg-stat-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 0.35rem;
}

.egg-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.warmth-bar-wrap {
    height: 8px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.warmth-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #FFB4A2);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

.egg-actions { margin-bottom: 1rem; }

.egg-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.egg-ready-banner { margin-bottom: 1rem; text-align: left; }

.transfer-code {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-align: center;
    margin: 0 0 0.75rem;
    word-break: break-all;
}

.transfer-code-card { margin-bottom: 1.5rem; }

@keyframes egg-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-2deg); }
    75% { transform: rotate(2deg); }
}

.egg-wiggle { animation: egg-wiggle 2.5s ease-in-out infinite; }

/* 待機中の自発的な動き（中で息をしている感じ） */
@keyframes egg-idle-sway {
    0%, 100% { transform: rotate(0deg); }
    30% { transform: rotate(-1.2deg); }
    70% { transform: rotate(1deg); }
}

@keyframes egg-idle-settle {
    0%, 100% { transform: translateY(0) scale(1); }
    45% { transform: translateY(-3px) scale(1.015); }
}

@keyframes egg-idle-rock {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    20% { transform: rotate(-0.8deg) translateY(-2px); }
    50% { transform: rotate(0.6deg) translateY(-4px); }
    80% { transform: rotate(-0.4deg) translateY(-1px); }
}

@keyframes egg-idle-kick {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    35% { transform: translateY(-5px) rotate(-1.5deg); }
    55% { transform: translateY(-2px) rotate(0.8deg); }
}

@keyframes egg-idle-bump {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.03) translateY(-2px); }
    65% { transform: scale(0.99) translateY(1px); }
}

@keyframes egg-idle-stir {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(-2deg); }
    30% { transform: rotate(1.5deg); }
    45% { transform: rotate(-1deg); }
    60% { transform: rotate(0.8deg); }
}

@keyframes egg-idle-glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.08) drop-shadow(0 0 8px rgba(244, 162, 97, 0.35)); }
}

.egg-idle-sway { animation: egg-idle-sway 3.2s ease-in-out; }
.egg-idle-settle { animation: egg-idle-settle 2.8s ease-in-out; }
.egg-idle-rock { animation: egg-idle-rock 2.2s ease-in-out; }
.egg-idle-kick { animation: egg-idle-kick 1.5s ease-in-out; }
.egg-idle-bump { animation: egg-idle-bump 1.4s ease-in-out; }
.egg-idle-stir { animation: egg-idle-stir 1.8s ease-in-out; }
.egg-idle-glow { animation: egg-idle-glow 2.4s ease-in-out; }

@keyframes egg-ripple {
    0% { opacity: 0.75; transform: scale(0.35); }
    100% { opacity: 0; transform: scale(2.2); }
}

@keyframes egg-act-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-10px) scale(1.03); }
}

@keyframes egg-act-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px) rotate(-2deg); }
    40% { transform: translateX(5px) rotate(2deg); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

@keyframes egg-act-pulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.06); filter: brightness(1.08); }
}

@keyframes egg-act-tilt {
    0%, 100% { transform: rotate(0deg); }
    35% { transform: rotate(-6deg); }
    70% { transform: rotate(5deg); }
}

@keyframes egg-act-hop {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-14px) scale(0.98, 1.02); }
    55% { transform: translateY(2px) scale(1.02, 0.98); }
}

@keyframes egg-act-glow {
    0%, 100% { filter: drop-shadow(0 0 0 transparent); }
    50% { filter: drop-shadow(0 0 14px rgba(255, 180, 162, 0.75)); }
}

@keyframes egg-act-squeeze {
    0%, 100% { transform: scale(1, 1); }
    45% { transform: scale(1.05, 0.94); }
}

@keyframes egg-act-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes egg-act-wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

@keyframes egg-act-flinch {
    0%, 100% { transform: scale(1); }
    35% { transform: scale(0.94); }
    55% { transform: scale(1.02); }
}

@keyframes egg-act-nudge {
    0%, 100% { transform: translateX(0); }
    40% { transform: translateX(6px); }
    65% { transform: translateX(-3px); }
}

@keyframes egg-act-pop {
    0%, 100% { transform: scale(1); }
    45% { transform: scale(1.08); }
}

@keyframes egg-act-dip {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px) scale(0.98); }
}

@keyframes egg-act-jiggle {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(-3deg); }
    30% { transform: rotate(3deg); }
    45% { transform: rotate(-2deg); }
    60% { transform: rotate(2deg); }
}

@keyframes egg-act-shimmer {
    0%, 100% { filter: brightness(1); }
    25% { filter: brightness(1.12); }
    50% { filter: brightness(1.04); }
    75% { filter: brightness(1.1); }
}

@keyframes egg-act-recoil {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-12px); }
    55% { transform: translateY(3px); }
}

.egg-act-bounce { animation: egg-act-bounce 0.55s ease; }
.egg-act-shake { animation: egg-act-shake 0.55s ease; }
.egg-act-pulse { animation: egg-act-pulse 0.55s ease; }
.egg-act-tilt { animation: egg-act-tilt 0.55s ease; }
.egg-act-hop { animation: egg-act-hop 0.55s ease; }
.egg-act-glow { animation: egg-act-glow 0.55s ease; }
.egg-act-squeeze { animation: egg-act-squeeze 0.55s ease; }
.egg-act-spin { animation: egg-act-spin 0.65s ease; }
.egg-act-wobble { animation: egg-act-wobble 0.55s ease; }
.egg-act-flinch { animation: egg-act-flinch 0.5s ease; }
.egg-act-nudge { animation: egg-act-nudge 0.5s ease; }
.egg-act-pop { animation: egg-act-pop 0.45s ease; }
.egg-act-dip { animation: egg-act-dip 0.5s ease; }
.egg-act-jiggle { animation: egg-act-jiggle 0.55s ease; }
.egg-act-shimmer { animation: egg-act-shimmer 0.55s ease; }
.egg-act-recoil { animation: egg-act-recoil 0.55s ease; }

.egg-saved-note {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.egg-gate-page .egg-gate-preview {
    text-align: center;
    margin-bottom: 1rem;
}

.egg-gate-visual {
    max-width: 200px;
    margin: 0 auto 0.75rem;
}

.egg-gate-visual-wrap {
    text-align: center;
    margin-bottom: 1rem;
}

.egg-gate-visual-wrap .egg-stage {
    max-width: 220px;
    margin: 0 auto;
}

.egg-gate-mood {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.egg-gate-benefits-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.egg-gate-list {
    margin: 0;
    padding-left: 1.1rem;
    text-align: left;
    line-height: 1.7;
}

.egg-gate-list li + li {
    margin-top: 0.35rem;
}

.egg-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.egg-gate-note {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.8125rem;
}

.egg-gate-timer {
    text-align: center;
    margin-bottom: 1rem;
}

.egg-gate-timer .egg-stat-label {
    text-align: center;
}

.egg-stat-value-timer {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    color: var(--color-accent, #2A9D8F);
}

.egg-gate-timer-note {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.egg-debug-panel {
    position: relative;
    z-index: 10002;
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    border: 2px dashed #e76f51;
    border-radius: var(--radius-md);
    background: rgba(231, 111, 81, 0.06);
    font-size: 0.8125rem;
    text-align: left;
}

.egg-debug-panel summary {
    cursor: pointer;
    font-weight: 700;
    color: #c45c3e;
}

.egg-debug-hint {
    margin: 0.5rem 0 0.75rem;
    color: var(--color-text-muted);
}

.egg-debug-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.egg-debug-preset {
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(231, 111, 81, 0.45);
    border-radius: var(--radius-sm, 6px);
    background: #fff;
    font-size: 0.75rem;
    cursor: pointer;
}

.egg-debug-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
}

.egg-debug-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 120px;
}

.egg-debug-field input {
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm, 6px);
}

.egg-debug-submit {
    flex-shrink: 0;
}

.egg-debug-current {
    margin: 0 0 0.65rem;
    font-size: 0.875rem;
    color: var(--color-text, #3d3d3d);
}

.egg-debug-current-meta {
    color: var(--color-text-muted);
    font-size: 0.8125rem;
}

.egg-debug-randomize {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.egg-debug-randomize input {
    width: auto;
    margin: 0;
}

.egg-debug-preset-random {
    border-color: rgba(42, 157, 143, 0.55);
    color: #1f7a6e;
}

.egg-debug-reset-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed rgba(231, 111, 81, 0.35);
}

.egg-debug-reset-wrap .btn {
    margin: 0;
    flex: 1 1 auto;
}

.egg-debug-reset {
    font-size: 0.8125rem;
}

.egg-debug-status {
    margin: 0.65rem 0 0;
    min-height: 1.2em;
    color: var(--color-text-muted);
}

.egg-debug-status.is-error {
    color: #c0392b;
}

.dashboard-egg-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.125rem;
}

.alert-info {
    background: var(--color-accent-soft);
    color: var(--color-text);
    border: 1px solid rgba(61, 153, 112, 0.25);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    text-align: left;
    margin: 1rem 0;
}

@media (min-width: 480px) {
    :root {
        --page-gutter: 1.5rem;
    }

    .hero { padding-top: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-visual { animation: none; }
    .btn { transition: none; }
    .egg-wiggle { animation: none; }
    .egg-idle-sway,
    .egg-idle-settle,
    .egg-idle-rock,
    .egg-idle-kick,
    .egg-idle-bump,
    .egg-idle-stir,
    .egg-idle-glow { animation: none; }
    .egg-murmur.is-visible { animation: none; }
    .egg-murmur.is-visible:not(.is-hidden) {
        opacity: 1;
        transform: translateX(-50%);
        visibility: visible;
    }
    .egg-hatch-rays,
    .egg-hatch-particles span,
    .baby-anim-idle,
    .anim-25d-is-alive .anim-25d-rig,
    .anim-25d-is-alive .anim-25d-shadow,
    .anim-25d-is-alive .anim-25d-glow,
    .anim-25d-is-alive .baby-anim-face-layer,
    .anim-25d-is-alive .baby-anim-eye,
    .anim-25d-is-alive.is-ai-ready .anim-25d-shine,
    .anim-murmur.is-visible,
    .egg-hatch-phase-stir .egg-interactive,
    .egg-hatch-phase-shake .egg-interactive,
    .egg-hatch-phase-glow .egg-shell-unified,
    .egg-hatch-phase-stir .egg-shell-unified,
    .egg-hatch-phase-crack .egg-shell-unified,
    .egg-page.egg-phase-ready .egg-interactive { animation: none; }
    .egg-shell-crack path { animation: none; stroke-dashoffset: 0; }
    .egg-hatch-phase-crack .egg-shell-cracks { opacity: 1; }
    .egg-baby-reveal.egg-baby-is-appearing { animation: none; opacity: 1; filter: none; transform: translate(-50%, -48%) scale(1); }
    .egg-hatched-baby-wrap { animation: none; opacity: 1; transform: none; filter: none; }
}

/* Hatch ceremony @req FR-HAT-001 */
#egg-stage-wrap {
    position: relative;
    overflow: visible;
}

.egg-hatch-fx {
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.egg-hatch-is-active .egg-hatch-fx {
    opacity: 1;
}

.egg-hatch-backdrop {
    position: absolute;
    inset: 2% 4%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 230, 200, 0.55) 0%, transparent 68%);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.8s ease, transform 1s ease;
}

.egg-hatch-rays {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 130%;
    height: 130%;
    margin: -65% 0 0 -65%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 214, 160, 0.45) 18deg,
        transparent 36deg,
        rgba(255, 196, 140, 0.35) 72deg,
        transparent 90deg,
        rgba(255, 220, 180, 0.4) 130deg,
        transparent 160deg
    );
    opacity: 0;
    filter: blur(1px);
}

.egg-hatch-phase-glow .egg-hatch-backdrop {
    opacity: 1;
    transform: scale(1);
    animation: egg-hatch-glow-pulse 2.4s ease-in-out infinite;
}

.egg-hatch-phase-glow .egg-hatch-rays,
.egg-hatch-phase-stir .egg-hatch-rays,
.egg-hatch-phase-crack .egg-hatch-rays {
    opacity: 0.55;
    animation: egg-hatch-rays-spin 8s linear infinite;
}

.egg-hatch-phase-stir .egg-hatch-rays,
.egg-hatch-phase-crack .egg-hatch-rays {
    opacity: 0.75;
}

.egg-hatch-phase-glow .egg-interactive,
.egg-hatch-phase-stir .egg-interactive,
.egg-hatch-phase-crack .egg-interactive {
    filter: drop-shadow(0 0 18px rgba(255, 196, 140, 0.65));
}

.egg-hatch-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 220, 170, 0.9);
    opacity: 0;
}

.egg-hatch-particles span:nth-child(1) { left: 22%; top: 28%; }
.egg-hatch-particles span:nth-child(2) { left: 72%; top: 22%; }
.egg-hatch-particles span:nth-child(3) { left: 82%; top: 52%; }
.egg-hatch-particles span:nth-child(4) { left: 18%; top: 58%; }
.egg-hatch-particles span:nth-child(5) { left: 50%; top: 12%; }
.egg-hatch-particles span:nth-child(6) { left: 44%; top: 78%; }

.egg-hatch-phase-glow .egg-hatch-particles span,
.egg-hatch-phase-stir .egg-hatch-particles span,
.egg-hatch-phase-crack .egg-hatch-particles span {
    animation: egg-hatch-particle 2.4s ease-out infinite;
}

.egg-shell-cracks {
    opacity: 0;
    pointer-events: none;
}

.egg-shell-unified {
    transform-origin: 100px 194px;
    transform-box: fill-box;
}

.egg-shell-crack path {
    fill: none;
    stroke-dasharray: 320;
    stroke-dashoffset: 320;
}

.egg-hatch-phase-crack .egg-shell-cracks,
.egg-hatch-phase-break .egg-shell-cracks,
.egg-hatch-phase-light .egg-shell-cracks {
    opacity: 1;
}

.egg-hatch-phase-light .egg-shell-cracks {
    opacity: 0.4;
    transition: opacity 2.5s ease;
}

.egg-hatch-phase-crack .egg-shell-crack-1 path {
    animation: egg-shell-crack-draw 1.6s ease forwards;
}

.egg-hatch-phase-crack .egg-shell-crack-2 path {
    animation: egg-shell-crack-draw 0.8s ease 1.05s forwards;
}

.egg-hatch-phase-crack .egg-shell-crack-3 path {
    animation: egg-shell-crack-draw 0.8s ease 1.25s forwards;
}

.egg-hatch-phase-crack .egg-shell-crack-4 path {
    animation: egg-shell-crack-draw 0.85s ease 1.45s forwards;
}

.egg-hatch-phase-crack .egg-shell-crack-5 path {
    animation: egg-shell-crack-draw 0.85s ease 1.65s forwards;
}

.egg-shell-crack-shadow {
    mix-blend-mode: multiply;
}

.egg-shell-crack-highlight {
    mix-blend-mode: soft-light;
}

.egg-hatch-burst {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, rgba(255, 220, 180, 0.8) 35%, transparent 70%);
    opacity: 0;
    transform: scale(0.2);
    z-index: 11;
}

.egg-hatch-phase-break .egg-hatch-burst {
    animation: egg-hatch-burst 2s ease-out forwards;
}

.egg-hatch-phase-light .egg-hatch-burst {
    opacity: 0.35;
    transform: scale(2.8);
}

.egg-hatch-phase-light .egg-hatch-backdrop {
    opacity: 1;
    animation: egg-hatch-glow-pulse 2.8s ease-in-out infinite;
}

.egg-hatch-phase-light .egg-hatch-rays {
    opacity: 0.85;
    animation: egg-hatch-rays-spin 10s linear infinite;
}

.egg-hatch-phase-light .egg-hatch-particles span {
    animation: egg-hatch-particle 2.6s ease-out infinite;
}

.egg-hatch-phase-glow .egg-shell-unified,
.egg-hatch-phase-stir .egg-shell-unified,
.egg-hatch-phase-crack .egg-shell-unified {
    animation: egg-hatch-shake 0.65s ease-in-out infinite;
}

.egg-hatch-phase-break .egg-shell-unified {
    animation: egg-hatch-shell-vanish 1.6s ease forwards;
}

.egg-hatch-phase-break .egg-interactive {
    animation: none;
}

.egg-hatch-phase-light .egg-shell-unified,
.egg-hatch-phase-peek .egg-shell-unified,
.egg-hatch-is-done .egg-shell-unified {
    opacity: 0;
    visibility: hidden;
}

.egg-hatch-phase-light .egg-interactive,
.egg-hatch-phase-peek .egg-interactive,
.egg-hatch-phase-reveal .egg-interactive,
.egg-hatch-is-done .egg-interactive {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
}

.egg-baby-reveal {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86%;
    transform: translate(-50%, -48%) scale(0.96);
    opacity: 0;
    z-index: 12;
    pointer-events: none;
}

.egg-baby-reveal.egg-baby-is-restored,
.egg-hatch-is-done .egg-baby-reveal.egg-baby-is-restored {
    opacity: 1;
    transform: translate(-50%, -48%) scale(1);
    filter: none;
    animation: none;
    pointer-events: auto;
}

.egg-baby-reveal .baby-anim-visual,
.egg-hatched-baby-wrap .baby-anim-visual {
    width: 100%;
}

/* 2.5D アニム @req FR-HAT-004 */
.anim-25d {
    --anim-25d-depth: 520px;
    width: 100%;
    max-width: 220px;
    margin-inline: auto;
}

.anim-25d-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    perspective: var(--anim-25d-depth);
    perspective-origin: 50% 42%;
    transform-style: preserve-3d;
    overflow: visible;
}

.anim-25d-glow {
    position: absolute;
    left: 50%;
    top: 58%;
    width: 72%;
    height: 38%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        color-mix(in srgb, var(--anim-glow, #ffc4a3) 42%, transparent) 0%,
        transparent 72%
    );
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}

.anim-25d-shadow {
    position: absolute;
    left: 50%;
    bottom: 8%;
    width: 58%;
    height: 11%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: color-mix(in srgb, var(--anim-shadow, #f4a261) 28%, transparent);
    filter: blur(1px);
    pointer-events: none;
    z-index: 1;
}

.anim-25d-rig {
    position: absolute;
    inset: 6% 8% 14%;
    transform-style: preserve-3d;
    transform: translateZ(0);
    z-index: 2;
}

.anim-25d-body-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.anim-25d-shine {
    position: absolute;
    inset: 0;
    border-radius: 42% 42% 48% 48%;
    background: linear-gradient(
        125deg,
        color-mix(in srgb, var(--anim-light, #fff) 35%, transparent) 0%,
        transparent 42%,
        transparent 100%
    );
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    mix-blend-mode: soft-light;
}

.baby-anim-visual.is-ai-ready .anim-25d-shine {
    opacity: 0.45;
}

.baby-anim-visual {
    position: relative;
    width: 100%;
}

.baby-anim-visual .baby-anim-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.baby-anim-ai-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    border-radius: 0;
    transform: translateZ(12px);
}

.baby-anim-visual.is-ai-ready .baby-anim-ai-img {
    display: block;
}

.baby-anim-visual.is-ai-ready .baby-anim-svg {
    display: none;
}

.anim-25d-is-alive:not([class*="anim-25d-act-"]) .anim-25d-rig {
    animation: anim-25d-breathe 3.6s ease-in-out infinite;
}

.anim-25d-is-alive:not([class*="anim-25d-act-"]) .anim-25d-shadow {
    animation: anim-25d-shadow-breathe 3.6s ease-in-out infinite;
}

.anim-25d-is-alive .anim-25d-glow {
    animation: anim-25d-glow-pulse 4.8s ease-in-out infinite;
}

.anim-25d-is-alive:not([class*="anim-25d-act-"]) .baby-anim-face-layer {
    animation: anim-25d-face-float 3.6s ease-in-out infinite;
    animation-delay: 0.1s;
    transform-origin: 50% 58%;
}

.anim-25d-is-alive .baby-anim-eye {
    animation: baby-anim-blink 4.8s ease-in-out infinite;
}

.anim-25d-is-alive.is-ai-ready:not([class*="anim-25d-act-"]) .anim-25d-shine {
    animation: anim-25d-shine-drift 5.2s ease-in-out infinite;
}

.anim-25d.anim-25d-act-sway .anim-25d-rig { animation: anim-25d-sway 2.4s ease-in-out both; }
.anim-25d.anim-25d-act-hop .anim-25d-rig { animation: anim-25d-hop 1.05s cubic-bezier(0.34, 1.35, 0.48, 1) both; }
.anim-25d.anim-25d-act-peek .anim-25d-rig { animation: anim-25d-peek 1.8s ease-in-out both; }
.anim-25d.anim-25d-act-settle .anim-25d-rig { animation: anim-25d-settle 2.2s ease-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-turn .anim-25d-rig { animation: anim-25d-turn 1.6s ease-in-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-wiggle .anim-25d-rig { animation: anim-25d-wiggle 1.7s ease-in-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-nod .anim-25d-rig { animation: anim-25d-nod 1.4s ease-in-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-lean .anim-25d-rig { animation: anim-25d-lean 2s ease-in-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-twirl .anim-25d-rig { animation: anim-25d-twirl 1.5s ease-in-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-stretch .anim-25d-rig { animation: anim-25d-stretch 2.2s ease-in-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-curl .anim-25d-rig { animation: anim-25d-curl 2.4s ease-in-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-joy .anim-25d-rig { animation: anim-25d-joy 1.3s cubic-bezier(0.34, 1.35, 0.48, 1) both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-shy .anim-25d-rig { animation: anim-25d-shy 2s ease-in-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-reach .anim-25d-rig { animation: anim-25d-reach 1.8s ease-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-sleepy .anim-25d-rig { animation: anim-25d-sleepy 2.8s ease-in-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-sparkle .anim-25d-rig { animation: anim-25d-sparkle 2s ease-in-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-wave .anim-25d-rig { animation: anim-25d-wave 2.2s ease-in-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-snuggle .anim-25d-rig { animation: anim-25d-snuggle 2.3s ease-in-out both; }
.anim-25d:not(.is-ai-ready).anim-25d-act-bounce .anim-25d-rig { animation: anim-25d-bounce 1.2s cubic-bezier(0.34, 1.35, 0.48, 1) both; }

.anim-25d[class*="anim-25d-act-"] .anim-25d-shadow {
    animation: anim-25d-shadow-react 2.4s ease-in-out both;
}

.anim-25d[class*="anim-25d-act-"] .baby-anim-face-layer,
.anim-25d[class*="anim-25d-act-"] .anim-25d-shine {
    animation: none;
}

.anim-25d.anim-25d-act-joy .anim-25d-glow,
.anim-25d.anim-25d-act-sparkle .anim-25d-glow,
.anim-25d.anim-25d-act-snuggle .anim-25d-glow,
.anim-25d.anim-25d-act-reach .anim-25d-glow {
    animation: anim-25d-glow-burst 2s ease-in-out both;
}

/* AI イラスト：rig ではなく body-wrap を動かす */
.anim-25d-is-alive.is-ai-ready:not([class*="anim-25d-act-"]):not(.anim-25d-is-wandering) .anim-25d-rig {
    animation: none;
    transform: none;
}

.anim-25d-is-alive.is-ai-ready:not([class*="anim-25d-act-"]) .anim-25d-body-wrap {
    animation: anim-25d-ai-breathe 3.4s ease-in-out infinite;
}

.anim-25d.is-ai-ready[class*="anim-25d-act-"] .anim-25d-rig {
    animation: none;
}

.anim-25d.is-ai-ready.anim-25d-act-sway .anim-25d-body-wrap { animation: anim-25d-ai-sway 2.4s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-hop .anim-25d-body-wrap { animation: anim-25d-ai-hop 1.05s cubic-bezier(0.34, 1.35, 0.48, 1) both; }
.anim-25d.is-ai-ready.anim-25d-act-peek .anim-25d-body-wrap { animation: anim-25d-ai-peek 1.8s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-turn .anim-25d-body-wrap { animation: anim-25d-ai-turn 1.6s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-settle .anim-25d-body-wrap { animation: anim-25d-ai-settle 2.2s ease-out both; }
.anim-25d.is-ai-ready.anim-25d-act-wiggle .anim-25d-body-wrap { animation: anim-25d-ai-wiggle 1.7s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-nod .anim-25d-body-wrap { animation: anim-25d-ai-nod 1.4s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-lean .anim-25d-body-wrap { animation: anim-25d-ai-lean 2s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-twirl .anim-25d-body-wrap { animation: anim-25d-ai-twirl 1.5s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-stretch .anim-25d-body-wrap { animation: anim-25d-ai-stretch 2.2s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-curl .anim-25d-body-wrap { animation: anim-25d-ai-curl 2.4s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-joy .anim-25d-body-wrap { animation: anim-25d-ai-joy 1.3s cubic-bezier(0.34, 1.35, 0.48, 1) both; }
.anim-25d.is-ai-ready.anim-25d-act-shy .anim-25d-body-wrap { animation: anim-25d-ai-shy 2s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-reach .anim-25d-body-wrap { animation: anim-25d-ai-reach 1.8s ease-out both; }
.anim-25d.is-ai-ready.anim-25d-act-sleepy .anim-25d-body-wrap { animation: anim-25d-ai-sleepy 2.8s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-sparkle .anim-25d-body-wrap { animation: anim-25d-ai-sparkle 2s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-wave .anim-25d-body-wrap { animation: anim-25d-ai-wave 2.2s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-snuggle .anim-25d-body-wrap { animation: anim-25d-ai-snuggle 2.3s ease-in-out both; }
.anim-25d.is-ai-ready.anim-25d-act-bounce .anim-25d-body-wrap { animation: anim-25d-ai-bounce 1.2s cubic-bezier(0.34, 1.35, 0.48, 1) both; }

/* ランダムちょこ歩き（CSS 変数 + rig 移動） */
.anim-25d.anim-25d-is-wandering:not(.is-ai-ready) .anim-25d-rig {
    animation: none !important;
    transform: translate3d(
        var(--anim-walk-x, 0px),
        calc(var(--anim-walk-y, 0px) + var(--anim-walk-hop, 0px)),
        0
    ) scaleX(var(--anim-walk-face, 1));
    transition: transform 0.4s cubic-bezier(0.34, 1.15, 0.48, 1);
}

.anim-25d.anim-25d-is-wandering.is-ai-ready .anim-25d-rig {
    animation: none !important;
    transform: translate3d(
        var(--anim-walk-x, 0px),
        calc(var(--anim-walk-y, 0px) + var(--anim-walk-hop, 0px)),
        0
    );
    transition: transform 0.4s cubic-bezier(0.34, 1.15, 0.48, 1);
}

.anim-25d.anim-25d-is-wandering.is-ai-ready .anim-25d-body-wrap {
    animation: none !important;
    transform: none !important;
}

.anim-25d.anim-25d-is-wandering .anim-25d-shadow {
    animation: none !important;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.egg-baby-reveal .baby-anim-svg {
    width: 100%;
    display: block;
}

.egg-baby-reveal.egg-baby-is-appearing,
.egg-hatch-phase-peek .egg-baby-reveal.egg-baby-is-appearing,
.egg-hatch-phase-reveal .egg-baby-reveal.egg-baby-is-appearing,
.egg-hatch-is-done .egg-baby-reveal.egg-baby-is-appearing {
    animation: egg-baby-fade-in 3.4s ease forwards;
}

.egg-hatched-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-block: 0.75rem;
}

.egg-hatched-visual {
    margin: 0.5rem auto 0.25rem;
    max-width: 220px;
    width: 100%;
}

.egg-hatched-baby-wrap {
    animation: egg-hatched-baby-fade-in 2.2s ease forwards;
    max-width: 220px;
    margin-inline: auto;
    overflow: visible;
}

.egg-hatched-baby-wrap .baby-anim-visual,
.egg-hatched-visual .baby-anim-visual {
    overflow: visible;
}

.egg-hatched-baby-wrap .baby-anim-svg {
    width: 100%;
    display: block;
}

.egg-hatched-actions {
    margin-top: 0.25rem;
}

.egg-hatched-guest-save,
.egg-hatched-logged-in {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.egg-hatched-guest-save h2,
.egg-hatched-logged-in h2 {
    margin: 0;
    font-size: 1.0625rem;
}

.egg-hatched-guest-save p,
.egg-hatched-logged-in p {
    margin: 0;
    line-height: 1.65;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.egg-hatched-guest-save .btn,
.egg-hatched-logged-in .btn {
    margin: 0;
}

.egg-hatch-is-active .egg-shell-slot {
    z-index: 4;
}

.egg-ready-cta {
    margin: 0;
    padding: 0.85rem 1.25rem 1rem;
    border: 1px solid rgba(244, 162, 97, 0.35);
    background: linear-gradient(180deg, rgba(255, 248, 243, 0.95), #fff);
}

.egg-ready-cta .egg-hatch-start {
    margin: 0;
}

.egg-naming-panel,
.egg-named-celebrate {
    margin-top: 1rem;
    text-align: center;
}

.egg-naming-title {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
}

.egg-naming-lead,
.egg-named-lead {
    margin: 0 0 1rem;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.egg-naming-examples {
    margin: -0.35rem 0 0.85rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    opacity: 0.88;
}

.egg-naming-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: left;
    margin-bottom: 0.75rem;
}

.egg-naming-field input {
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm, 6px);
    font-size: 1rem;
}

.egg-naming-error {
    margin: 0 0 0.75rem;
    color: #c0392b;
    font-size: 0.875rem;
}

.egg-named-kicker {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
}

.baby-anim-idle {
    animation: baby-anim-breathe 3.2s ease-in-out infinite;
}

.baby-anim-idle .baby-anim-eye {
    animation: baby-anim-blink 4.5s ease-in-out infinite;
}

@keyframes anim-25d-breathe {
    0%, 100% { transform: translateY(0) rotateX(0deg) scale(1); }
    50% { transform: translateY(-5px) rotateX(2deg) scale(1.018); }
}

@keyframes anim-25d-shadow-breathe {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.85; }
    50% { transform: translateX(-50%) scale(0.88); opacity: 0.55; }
}

@keyframes anim-25d-glow-pulse {
    0%, 100% { opacity: 0.45; transform: translate(-50%, -50%) scale(0.96); }
    50% { opacity: 0.72; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes anim-25d-face-float {
    0%, 100% { transform: translateY(0) translateZ(4px); }
    50% { transform: translateY(-2px) translateZ(8px); }
}

@keyframes anim-25d-shine-drift {
    0%, 100% { transform: translateX(0); opacity: 0.35; }
    50% { transform: translateX(3%); opacity: 0.55; }
}

@keyframes anim-25d-sway {
    0%, 100% { transform: translateY(-2px) rotateY(0deg); }
    25% { transform: translateY(-4px) rotateY(-14deg); }
    75% { transform: translateY(-3px) rotateY(14deg); }
}

@keyframes anim-25d-hop {
    0%, 100% { transform: translateY(0) scale(1, 1); }
    28% { transform: translateY(-22px) scale(0.94, 1.06); }
    52% { transform: translateY(0) scale(1.05, 0.94); }
    68% { transform: translateY(-8px) scale(0.98, 1.02); }
}

@keyframes anim-25d-peek {
    0%, 100% { transform: translate(0, 0) rotateZ(0deg); }
    35% { transform: translate(-10px, -6px) rotateZ(-6deg); }
    65% { transform: translate(10px, -4px) rotateZ(5deg); }
}

@keyframes anim-25d-settle {
    0% { transform: translateY(-6px) scale(1.02); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes anim-25d-turn {
    0%, 100% { transform: translateY(-2px) rotateY(0deg); }
    35%, 65% { transform: translateY(-5px) rotateY(180deg); }
}

@keyframes anim-25d-shadow-react {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.85; }
    40% { transform: translateX(-50%) scale(0.65); opacity: 0.45; }
}

@keyframes anim-25d-ai-breathe {
    0%, 100% { transform: translateY(0) scale(1, 1); }
    50% { transform: translateY(-6px) scale(1.03, 0.98); }
}

@keyframes anim-25d-ai-sway {
    0%, 100% { transform: translateY(-2px) translateX(0); }
    25% { transform: translateY(-7px) translateX(-5px); }
    50% { transform: translateY(-5px) translateX(5px); }
    75% { transform: translateY(-6px) translateX(-3px); }
}

@keyframes anim-25d-ai-hop {
    0%, 100% { transform: translateY(0) scale(1, 1); }
    28% { transform: translateY(-24px) scale(0.94, 1.06); }
    52% { transform: translateY(0) scale(1.06, 0.94); }
    68% { transform: translateY(-10px) scale(0.98, 1.02); }
}

@keyframes anim-25d-ai-peek {
    0%, 100% { transform: translate(0, 0) scaleX(1); }
    30% { transform: translate(-12px, -8px) scaleX(1); }
    55% { transform: translate(12px, -6px) scaleX(-1); }
    80% { transform: translate(0, -2px) scaleX(-1); }
}

@keyframes anim-25d-ai-turn {
    0%, 100% { transform: translateY(-2px) scaleX(1); }
    40% { transform: translateY(-4px) scaleX(-1); }
    60% { transform: translateY(-3px) scaleX(-1); }
}

@keyframes anim-25d-ai-settle {
    0% { transform: translateY(-8px) scale(1.04); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes anim-25d-wiggle {
    0%, 100% { transform: translateY(-2px) rotateZ(0deg); }
    20% { transform: translateY(-3px) rotateZ(-7deg); }
    40% { transform: translateY(-4px) rotateZ(7deg); }
    60% { transform: translateY(-3px) rotateZ(-5deg); }
    80% { transform: translateY(-2px) rotateZ(5deg); }
}

@keyframes anim-25d-nod {
    0%, 100% { transform: translateY(-2px); }
    30% { transform: translateY(2px); }
    55% { transform: translateY(-6px); }
    75% { transform: translateY(0); }
}

@keyframes anim-25d-lean {
    0%, 100% { transform: translateY(-2px) scale(1); }
    40%, 70% { transform: translateY(-8px) scale(1.08); }
}

@keyframes anim-25d-twirl {
    0%, 100% { transform: translateY(-2px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(12deg); }
}

@keyframes anim-25d-stretch {
    0%, 100% { transform: translateY(-2px) scale(1, 1); }
    35% { transform: translateY(-10px) scale(0.94, 1.12); }
    65% { transform: translateY(-4px) scale(1.02, 0.96); }
}

@keyframes anim-25d-curl {
    0%, 100% { transform: translateY(-2px) scale(1); }
    45%, 75% { transform: translateY(6px) scale(0.9); }
}

@keyframes anim-25d-joy {
    0%, 100% { transform: translateY(0) scale(1); }
    20% { transform: translateY(-16px) scale(1.05); }
    45% { transform: translateY(0) scale(0.96); }
    65% { transform: translateY(-10px) scale(1.04); }
}

@keyframes anim-25d-shy {
    0%, 100% { transform: translate(0, -2px) scale(1); }
    40%, 70% { transform: translate(-8px, 2px) scale(0.92); }
}

@keyframes anim-25d-reach {
    0%, 100% { transform: translateY(-2px) scale(1); }
    35%, 60% { transform: translateY(-14px) scale(1.06); }
}

@keyframes anim-25d-sleepy {
    0%, 100% { transform: translateY(-2px) rotateZ(0deg); }
    50% { transform: translateY(5px) rotateZ(4deg) scale(0.96); }
}

@keyframes anim-25d-sparkle {
    0%, 100% { transform: translateY(-2px) scale(1); }
    25% { transform: translateY(-8px) scale(1.08); }
    50% { transform: translateY(-4px) scale(1); }
    75% { transform: translateY(-7px) scale(1.06); }
}

@keyframes anim-25d-wave {
    0%, 100% { transform: translateY(-2px) rotateZ(0deg); }
    25% { transform: translateY(-6px) rotateZ(-10deg); }
    50% { transform: translateY(-4px) rotateZ(10deg); }
    75% { transform: translateY(-5px) rotateZ(-6deg); }
}

@keyframes anim-25d-snuggle {
    0%, 100% { transform: translate(0, -2px) scale(1); }
    30% { transform: translate(6px, -4px) scale(1.04); }
    55% { transform: translate(-4px, -3px) scale(1.02); }
    80% { transform: translate(3px, -5px) scale(1.05); }
}

@keyframes anim-25d-bounce {
    0%, 100% { transform: translateY(0); }
    18% { transform: translateY(-18px); }
    36% { transform: translateY(0); }
    54% { transform: translateY(-12px); }
    72% { transform: translateY(0); }
}

@keyframes anim-25d-glow-burst {
    0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
    40% { opacity: 0.95; transform: translate(-50%, -50%) scale(1.18); }
    70% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.06); }
}

@keyframes anim-25d-ai-wiggle {
    0%, 100% { transform: translateY(-2px) rotate(0deg) scaleX(1); }
    20% { transform: translateY(-3px) rotate(-6deg) scaleX(1); }
    40% { transform: translateY(-4px) rotate(6deg) scaleX(-1); }
    60% { transform: translateY(-3px) rotate(-4deg) scaleX(-1); }
    80% { transform: translateY(-2px) rotate(4deg) scaleX(1); }
}

@keyframes anim-25d-ai-nod {
    0%, 100% { transform: translateY(-2px) scaleX(1); }
    30% { transform: translateY(3px) scaleX(1); }
    55% { transform: translateY(-8px) scaleX(1); }
    75% { transform: translateY(0) scaleX(1); }
}

@keyframes anim-25d-ai-lean {
    0%, 100% { transform: translateY(-2px) scale(1); }
    40%, 70% { transform: translateY(-10px) scale(1.1); }
}

@keyframes anim-25d-ai-twirl {
    0%, 100% { transform: translateY(-2px) rotate(0deg) scaleX(1); }
    50% { transform: translateY(-8px) rotate(8deg) scaleX(-1); }
}

@keyframes anim-25d-ai-stretch {
    0%, 100% { transform: translateY(-2px) scale(1, 1); }
    35% { transform: translateY(-12px) scale(0.92, 1.14); }
    65% { transform: translateY(-4px) scale(1.03, 0.95); }
}

@keyframes anim-25d-ai-curl {
    0%, 100% { transform: translateY(-2px) scale(1); }
    45%, 75% { transform: translateY(8px) scale(0.88); }
}

@keyframes anim-25d-ai-joy {
    0%, 100% { transform: translateY(0) scale(1); }
    20% { transform: translateY(-20px) scale(1.06); }
    45% { transform: translateY(0) scale(0.95); }
    65% { transform: translateY(-12px) scale(1.05); }
}

@keyframes anim-25d-ai-shy {
    0%, 100% { transform: translate(0, -2px) scale(1); }
    40%, 70% { transform: translate(-10px, 4px) scale(0.9); }
}

@keyframes anim-25d-ai-reach {
    0%, 100% { transform: translateY(-2px) scale(1); }
    35%, 60% { transform: translateY(-16px) scale(1.08); }
}

@keyframes anim-25d-ai-sleepy {
    0%, 100% { transform: translateY(-2px) rotate(0deg); }
    50% { transform: translateY(6px) rotate(3deg) scale(0.94); }
}

@keyframes anim-25d-ai-sparkle {
    0%, 100% { transform: translateY(-2px) scale(1); }
    25% { transform: translateY(-10px) scale(1.1); }
    50% { transform: translateY(-4px) scale(1); }
    75% { transform: translateY(-8px) scale(1.07); }
}

@keyframes anim-25d-ai-wave {
    0%, 100% { transform: translateY(-2px) rotate(0deg) scaleX(1); }
    25% { transform: translateY(-7px) rotate(-8deg) scaleX(1); }
    50% { transform: translateY(-5px) rotate(8deg) scaleX(-1); }
    75% { transform: translateY(-6px) rotate(-5deg) scaleX(-1); }
}

@keyframes anim-25d-ai-snuggle {
    0%, 100% { transform: translate(0, -2px) scale(1); }
    30% { transform: translate(8px, -5px) scale(1.05); }
    55% { transform: translate(-6px, -4px) scale(1.03); }
    80% { transform: translate(4px, -6px) scale(1.06); }
}

@keyframes anim-25d-ai-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    18% { transform: translateY(-20px) scale(0.96, 1.05); }
    36% { transform: translateY(0) scale(1.04, 0.96); }
    54% { transform: translateY(-14px) scale(0.98, 1.03); }
    72% { transform: translateY(0) scale(1); }
}

/* 孵化後アニムの吹き出し @req FR-HAT-005 */
.anim-murmur {
    position: absolute;
    left: 50%;
    top: 2%;
    z-index: 20;
    max-width: min(172px, 92%);
    padding: 0.45rem 0.7rem;
    background: #fff;
    border: 1px solid rgba(244, 162, 97, 0.45);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(42, 157, 143, 0.14);
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 0) scale(0.9);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
    visibility: hidden;
}

.anim-murmur.is-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    animation: none !important;
}

.anim-murmur::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-right: 1px solid rgba(244, 162, 97, 0.45);
    border-bottom: 1px solid rgba(244, 162, 97, 0.45);
    transform: translateX(-50%) rotate(45deg);
}

.anim-murmur-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    letter-spacing: 0.05em;
    color: var(--color-text, #3d3d3d);
    text-align: center;
    word-break: keep-all;
}

.anim-murmur.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) scale(1);
    animation: anim-murmur-pop 2.6s ease forwards;
}

@keyframes anim-murmur-pop {
    0% { opacity: 0; transform: translate(-50%, 6px) scale(0.88); }
    12% { opacity: 1; transform: translate(-50%, 0) scale(1); }
    78% { opacity: 1; transform: translate(-50%, 0) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -4px) scale(0.96); }
}

.egg-baby-reveal .anim-murmur,
.egg-hatched-visual .anim-murmur {
    top: -4%;
}

@keyframes egg-ready-glow-breathe {
    0%, 100% { opacity: 0.75; transform: scale(0.96); }
    50% { opacity: 1; transform: scale(1.04); }
}

@keyframes egg-ready-ring-pulse {
    0%, 100% { opacity: 0.35; transform: translate(-50%, -50%) scale(0.98); }
    50% { opacity: 0.75; transform: translate(-50%, -50%) scale(1.03); }
}

@keyframes egg-ready-spark {
    0%, 100% { opacity: 0; transform: scale(0.6); }
    45% { opacity: 1; transform: scale(1); }
    70% { opacity: 0.4; transform: scale(0.8) translateY(-6px); }
}

@keyframes egg-ready-egg-glow {
    0%, 100% { filter: drop-shadow(0 0 12px rgba(255, 196, 140, 0.45)); }
    50% { filter: drop-shadow(0 0 22px rgba(255, 210, 160, 0.75)); }
}

@keyframes egg-hatch-glow-pulse {
    0%, 100% { opacity: 0.75; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.06); }
}

@keyframes egg-hatched-baby-fade-in {
    0% {
        opacity: 0;
        transform: scale(0.94);
        filter: blur(3px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes egg-baby-fade-in {
    0% {
        opacity: 0;
        transform: translate(-50%, -46%) scale(0.94);
        filter: blur(4px);
    }
    35% {
        opacity: 0.25;
        filter: blur(2px);
    }
    65% {
        opacity: 0.65;
        filter: blur(0.5px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -48%) scale(1);
        filter: blur(0);
    }
}

@keyframes egg-hatch-rays-spin {
    to { transform: rotate(360deg); }
}

@keyframes egg-hatch-shake {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    20% { transform: rotate(-2deg) translateY(-2px); }
    40% { transform: rotate(2deg) translateY(1px); }
    60% { transform: rotate(-1.5deg) translateY(-1px); }
    80% { transform: rotate(1deg) translateY(0); }
}

@keyframes egg-shell-crack-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes egg-hatch-shell-fade {
    to { opacity: 0; transform: scale(0.92) translateY(8px); filter: blur(2px); }
}

@keyframes egg-hatch-shell-vanish {
    0% { opacity: 1; transform: scale(1); filter: brightness(1); }
    35% { opacity: 0.9; transform: scale(1.04); filter: brightness(1.35); }
    100% { opacity: 0; transform: scale(1.1); filter: brightness(1.8) blur(3px); visibility: hidden; }
}

@keyframes egg-hatch-burst {
    0% { opacity: 0; transform: scale(0.2); }
    35% { opacity: 1; transform: scale(2.2); }
    100% { opacity: 0; transform: scale(3.4); }
}

@keyframes egg-hatch-particle {
    0% { opacity: 0; transform: translateY(8px) scale(0.6); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-28px) scale(1); }
}

@keyframes baby-anim-breathe {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes baby-anim-blink {
    0%, 92%, 100% { transform: scaleY(1); }
    96% { transform: scaleY(0.12); }
}

/* --- Anim Diary --- */
.page-anim-diary .main {
    max-width: var(--max-width);
}

.anim-diary-page {
    display: grid;
    gap: 1rem;
}

.anim-diary-header {
    margin-bottom: 0.25rem;
}

.anim-diary-title {
    font-size: 1.5rem;
    margin: 0.35rem 0 0.5rem;
}

.anim-diary-lead {
    margin: 0;
    color: var(--text-muted, #6b5f58);
    font-size: 0.92rem;
    line-height: 1.65;
}

.anim-diary-date-nav {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
}

.anim-diary-date-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: rgba(255, 180, 150, 0.18);
    color: var(--text, #3d2f28);
    text-decoration: none;
    font-weight: 700;
}

.anim-diary-date-btn.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.anim-diary-date-current {
    text-align: center;
}

.anim-diary-date-label {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
}

.anim-diary-date-raw {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted, #6b5f58);
    margin-top: 0.15rem;
}

.anim-diary-timeline {
    padding: 1rem 1rem 1.25rem;
}

.anim-diary-empty {
    margin: 0;
    text-align: center;
    color: var(--text-muted, #6b5f58);
    padding: 2rem 0.5rem;
}

.anim-diary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
}

.anim-diary-item {
    display: grid;
    grid-template-columns: 3.2rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(61, 47, 40, 0.08);
    position: relative;
}

.anim-diary-item:last-child {
    border-bottom: none;
}

.anim-diary-item::before {
    content: '';
    position: absolute;
    left: 3.55rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 180, 150, 0.35);
    pointer-events: none;
}

.anim-diary-item-time {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted, #6b5f58);
    padding-top: 0.15rem;
}

.anim-diary-item-body {
    position: relative;
    padding-left: 0.35rem;
}

.anim-diary-item-body::before {
    content: '';
    position: absolute;
    left: -0.72rem;
    top: 0.45rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #ffb496;
    box-shadow: 0 0 0 3px rgba(255, 180, 150, 0.25);
}

.anim-diary-item.is-sleep .anim-diary-item-body::before { background: #9bb4d9; box-shadow: 0 0 0 3px rgba(155, 180, 217, 0.25); }
.anim-diary-item.is-wake .anim-diary-item-body::before { background: #ffd27a; box-shadow: 0 0 0 3px rgba(255, 210, 122, 0.25); }
.anim-diary-item.is-chat .anim-diary-item-body::before { background: #f4a4c0; box-shadow: 0 0 0 3px rgba(244, 164, 192, 0.25); }
.anim-diary-item.is-touch .anim-diary-item-body::before { background: #c9a6e8; box-shadow: 0 0 0 3px rgba(201, 166, 232, 0.25); }

.anim-diary-item-type {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-muted, #6b5f58);
    margin-bottom: 0.2rem;
}

.anim-diary-item-summary {
    margin: 0;
    line-height: 1.55;
    font-size: 0.95rem;
}

.anim-diary-item-tag {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 180, 150, 0.16);
    color: var(--text-muted, #6b5f58);
}

.anim-diary-back {
    margin: 0.5rem 0 0;
    text-align: center;
}

.anim-diary-item.is-encounter .anim-diary-item-body::before { background: #7ec8a8; box-shadow: 0 0 0 3px rgba(126, 200, 168, 0.25); }

.anim-diary-item-link {
    display: block;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed rgba(126, 200, 168, 0.55);
}

.anim-diary-item-link:hover {
    color: #2d6b52;
}

/* --- Anim Encounters (history) --- */
.page-anim-encounters .main {
    max-width: var(--max-width);
}

.anim-encounters-page {
    display: grid;
    gap: 1rem;
}

.anim-encounters-header {
    margin-bottom: 0.25rem;
}

.anim-encounters-title {
    font-size: 1.5rem;
    margin: 0.35rem 0 0.5rem;
}

.anim-encounters-lead {
    margin: 0;
    color: var(--text-muted, #6b5f58);
    font-size: 0.92rem;
    line-height: 1.65;
}

.anim-encounters-empty {
    padding: 1.25rem;
    color: var(--text-muted, #6b5f58);
    line-height: 1.65;
}

.anim-encounters-list,
.anim-encounters-history,
.anim-encounters-partner-summary {
    padding: 1rem;
}

.anim-encounters-partners-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
}

.anim-encounters-partners-hint,
.anim-encounters-detail-hint,
.anim-encounters-detail-count {
    margin: 0.35rem 0 0;
    font-size: 0.76rem;
    color: var(--text-muted, #6b5f58);
}

.anim-encounters-partners-hint {
    margin-bottom: 0.75rem;
}

.anim-encounters-detail-header {
    margin-bottom: 0.85rem;
}

.anim-encounters-detail-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.anim-encounters-partner-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.anim-encounters-partner-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.7rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.anim-encounters-partner-link:hover {
    background: rgba(126, 200, 168, 0.12);
}

.anim-encounters-partner-action {
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted, #6b5f58);
}

.anim-encounters-partner-anim {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.anim-encounters-partner-thumb {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 248, 243, 0.9);
}

.anim-encounters-partner-thumb--empty {
    display: block;
    background: linear-gradient(145deg, rgba(126, 200, 168, 0.25), rgba(155, 180, 217, 0.2));
}

.anim-encounters-partner-meta {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.anim-encounters-partner-name {
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.3;
}

.anim-encounters-partner-last {
    font-size: 0.78rem;
    color: var(--text-muted, #6b5f58);
}

.anim-encounters-partner-owner {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.anim-encounters-owner-avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 248, 243, 0.9);
}

.anim-encounters-owner-avatar--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted, #6b5f58);
    background: rgba(155, 180, 217, 0.25);
}

.anim-encounters-owner-name {
    font-size: 0.74rem;
    color: var(--text-muted, #6b5f58);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anim-encounters-partner-sub {
    font-size: 0.72rem;
    color: var(--text-muted, #6b5f58);
}

.anim-encounters-detail-empty {
    margin: 0;
    color: var(--text-muted, #6b5f58);
    font-size: 0.88rem;
    line-height: 1.6;
}

.anim-encounters-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.anim-encounters-history-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 248, 243, 0.7);
    transition: background 0.15s ease;
}

.anim-encounters-history-link:hover {
    background: rgba(126, 200, 168, 0.14);
}

.anim-encounters-history-main {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.anim-encounters-history-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
}

.anim-encounters-history-title {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--color-text, #2c2420);
}

.anim-encounters-history-scene {
    font-size: 0.8125rem;
    color: var(--color-text-muted, #64748b);
}

.anim-encounters-history-time {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted, #6b5f58);
}

.anim-encounters-history-summary {
    font-size: 0.88rem;
    line-height: 1.45;
    font-weight: 600;
}

.anim-encounters-history-action {
    flex-shrink: 0;
    font-size: 0.76rem;
    font-weight: 700;
    color: #2d6b52;
}

.anim-encounters-partner-page .anim-encounters-partner-summary-main {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.anim-encounters-partner-summary-body {
    align-items: center;
}

.anim-encounters-partner-summary .anim-encounters-partner-meta {
    gap: 0.35rem;
}

.anim-encounters-partner-summary-meta {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.anim-encounter-pref-unavailable {
    margin: 1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.85rem;
    color: var(--text-muted, #6b5f58);
    line-height: 1.55;
}

.anim-encounters-back {
    margin: 0.5rem 0 0;
    text-align: center;
}

.anim-encounter-page,
.anim-connections-page,
.anim-connection-chat-page {
    max-width: 36rem;
    margin: 0 auto;
    padding: 0 var(--page-gutter, 1rem) 2rem;
}

.anim-encounter-visual {
    overflow: hidden;
    padding: 0;
}

.anim-encounter-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: inherit;
}

.anim-encounter-dl {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.anim-encounter-dl div {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 0.5rem;
}

.anim-encounter-dl dt {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted, #6b5f58);
}

.anim-encounter-dl dd {
    margin: 0;
    font-weight: 600;
}

.anim-encounter-header {
    margin-bottom: 1rem;
}

.anim-encounter-when {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted, #6b5f58);
}

.anim-encounter-section {
    margin-bottom: 0.85rem;
}

.anim-encounter-section-title {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.anim-encounter-story-text {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    line-height: 1.7;
    font-weight: 600;
}

.anim-encounter-affinity-hint {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted, #6b5f58);
}

.anim-encounter-meta-list dd .anim-encounter-affinity-hint {
    line-height: 1.45;
}

.anim-encounter-empty {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: var(--text-muted, #6b5f58);
}

.anim-encounter-meta-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
}

.anim-encounter-meta-list div {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.5rem;
}

.anim-encounter-meta-list dt {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted, #6b5f58);
}

.anim-encounter-meta-list dd {
    margin: 0;
    font-weight: 600;
}

.anim-encounter-entity {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.anim-encounter-anim-thumb {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 248, 243, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.anim-encounter-anim-thumb--empty {
    display: block;
    background: linear-gradient(145deg, rgba(126, 200, 168, 0.25), rgba(155, 180, 217, 0.2));
}

.anim-encounter-entity-dl {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    flex: 1;
}

.anim-encounter-entity-dl div {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 0.45rem;
}

.anim-encounter-entity-dl dt {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted, #6b5f58);
}

.anim-encounter-entity-dl dd {
    margin: 0;
    font-weight: 600;
}

.anim-encounter-personality {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-soft, rgba(107, 95, 88, 0.12));
}

.anim-encounter-personality-title {
    margin: 0 0 0.55rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted, #6b5f58);
    letter-spacing: 0.04em;
}

.anim-encounter-personality-empty {
    margin: 0;
    color: var(--text-muted, #6b5f58);
    font-size: 0.92rem;
}

.anim-encounter-personality-impression {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

.anim-encounter-personality-traits,
.anim-encounter-personality-full {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.anim-encounter-personality-trait,
.anim-encounter-personality-full-row {
    display: grid;
    gap: 0.2rem;
}

.anim-encounter-personality-trait-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent, #7a5c45);
}

.anim-encounter-personality-trait-phrase {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.anim-encounter-personality-contrast {
    margin: 0.75rem 0 0;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--border-soft, rgba(107, 95, 88, 0.16));
    display: grid;
    gap: 0.2rem;
}

.anim-encounter-personality-contrast-label {
    font-size: 0.76rem;
    color: var(--text-muted, #6b5f58);
}

.anim-encounter-personality-full-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.anim-encounter-personality-full-score {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted, #6b5f58);
    font-variant-numeric: tabular-nums;
}

.anim-encounter-personality-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--border-soft, rgba(107, 95, 88, 0.12));
    overflow: hidden;
}

.anim-encounter-personality-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #c4a882, #8f7358);
}

.anim-encounter-personality-locked {
    list-style: none;
    margin: 0.65rem 0 0;
    padding: 0;
    display: flex;
    gap: 0.45rem;
}

.anim-encounter-personality-locked li {
    font-size: 0.78rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--surface-muted, rgba(107, 95, 88, 0.08));
    color: var(--text-muted, #6b5f58);
    letter-spacing: 0.08em;
}

.anim-encounter-personality-teaser {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-muted, #6b5f58);
}

.anim-encounter-owner-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.anim-encounter-owner-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.anim-encounter-owner-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.anim-encounter-owner-name {
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
}

.anim-encounter-owner-meta {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: var(--text-muted, #6b5f58);
}

.anim-encounter-owner-bio {
    margin: 0.45rem 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.anim-encounter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
}

.anim-encounter-tags li {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--color-primary-soft);
    font-size: 0.75rem;
}

.anim-encounter-hint,
.anim-connections-lead,
.anim-connection-chat-lead {
    font-size: 0.85rem;
    color: var(--text-muted, #6b5f58);
    line-height: 1.55;
}

.anim-connections-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.anim-connections-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.anim-connections-item.has-notification {
    background: rgba(229, 57, 53, 0.04);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: 0.65rem;
}

.anim-connections-item-body {
    flex: 1 1 12rem;
    min-width: 0;
}

.anim-connections-peer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.anim-connections-peer-visual {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
}

.anim-connections-owner-avatar {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    object-fit: cover;
    background: rgba(255, 248, 243, 0.9);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.anim-connections-owner-avatar--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted, #6b5f58);
    background: rgba(155, 180, 217, 0.25);
}

.anim-connections-anim-badge {
    position: absolute;
    right: -4px;
    bottom: -2px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 0 0 2px var(--color-surface, #fff8f3);
    background: #fff;
}

.anim-connections-anim-badge--empty {
    display: block;
    background: rgba(244, 162, 97, 0.35);
}

.anim-connections-peer-meta {
    min-width: 0;
}

.anim-connections-owner-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.anim-connections-anim-line {
    margin: 0.12rem 0 0;
    min-width: 0;
}

.anim-connections-anim-name {
    font-size: 0.78rem;
    color: var(--text-muted, #6b5f58);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anim-connections-status {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
}

.anim-connections-note {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #8a6b3d;
}

.anim-connections-note.is-muted {
    color: var(--text-muted, #6b5f58);
}

.anim-connections-flash {
    margin: 0 0 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    line-height: 1.5;
}

.anim-connections-flash--error {
    background: rgba(229, 57, 53, 0.08);
    color: #b71c1c;
    border: 1px solid rgba(229, 57, 53, 0.18);
}

.anim-connections-flash--success {
    background: rgba(46, 125, 50, 0.08);
    color: #1b5e20;
    border: 1px solid rgba(46, 125, 50, 0.18);
}

.anim-connections-invite-card {
    margin-bottom: 0.85rem;
    padding: 1rem 1.1rem;
}

.anim-connections-invite-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.anim-connections-invite-reveal {
    margin-top: 0.75rem;
}

.anim-connections-invite-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.15rem;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    transition: color var(--transition);
}

.anim-connections-invite-summary::-webkit-details-marker {
    display: none;
}

.anim-connections-invite-summary::before {
    content: "▸";
    font-size: 0.72rem;
    transition: transform var(--transition);
}

.anim-connections-invite-reveal[open] .anim-connections-invite-summary::before {
    transform: rotate(90deg);
}

.anim-connections-invite-summary:hover,
.anim-connections-invite-summary:focus-visible {
    color: var(--color-primary);
}

.anim-connections-invite-panel {
    margin-top: 0.65rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.anim-connections-invite-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.anim-connections-invite-lead {
    margin: 0 0 0.75rem;
    color: var(--text-muted, #6b5f58);
    font-size: 0.88rem;
    line-height: 1.5;
}

.anim-invite-code {
    margin: 0 0 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    background: var(--surface-muted, #f7f3ef);
    border: 1px dashed rgba(0, 0, 0, 0.12);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.15rem;
    letter-spacing: 0.12em;
    text-align: center;
}

.anim-connections-invite-actions,
.anim-invite-code-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.anim-connections-add-card {
    padding: 1rem 1.1rem;
}

.anim-invite-lookup-form {
    margin-bottom: 1rem;
}

.anim-invite-preview {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.anim-invite-preview-label {
    margin: 0 0 0.25rem;
    font-size: 0.82rem;
    color: var(--text-muted, #6b5f58);
}

.anim-invite-preview-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.anim-invite-preview-anim {
    margin: 0.15rem 0 0.85rem;
    color: var(--text-muted, #6b5f58);
    font-size: 0.9rem;
}

.anim-connections-item-actions .anim-encounter-pref {
    flex-basis: 100%;
    margin-top: 0.65rem;
}

.btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-muted, #6b5f58);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.anim-encounter-note--muted {
    color: var(--text-muted, #6b5f58);
    font-size: 0.88rem;
}

.anim-encounter-note--warn {
    color: #8a6b3d;
    font-size: 0.88rem;
    line-height: 1.55;
}

.anim-connections-alert {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #c62828;
}

.anim-connections-btn-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    margin-left: 0.35rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #fff;
    color: var(--color-primary, #e76f51);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
}

.anim-connections-status.is-pending {
    color: #c62828;
}

.anim-connections-item:last-child {
    border-bottom: none;
}

.anim-connection-chat-messages {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.anim-connection-chat-log.is-empty {
    padding: 0.75rem 1.25rem;
}

.anim-connection-chat-empty {
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted, #6b5f58);
}

.anim-connection-chat-log:not(.is-empty) {
    max-height: min(60vh, 28rem);
    overflow-y: auto;
}

.anim-connection-chat-msg {
    max-width: 85%;
    padding: 0.65rem 0.85rem;
    border-radius: 1rem;
    background: rgba(255, 248, 243, 0.9);
}

.anim-connection-chat-msg.is-mine {
    margin-left: auto;
    background: rgba(126, 200, 168, 0.22);
}

.anim-connection-chat-form textarea {
    width: 100%;
    margin-bottom: 0.65rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.65rem 0.75rem;
    font: inherit;
}

.anim-connection-chat-compose {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.anim-connection-chat-file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.anim-connection-chat-image-name {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: var(--text-muted, #6b5f58);
}

.anim-connection-chat-photo {
    margin: 0 0 0.35rem;
}

.anim-connection-chat-img {
    display: block;
    max-width: min(100%, 16rem);
    height: auto;
    border-radius: 0.65rem;
}

.anim-connection-chat-text {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.anim-connection-chat-time {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted, #6b5f58);
}

.inline-form {
    display: inline;
}

.anim-room-baby-wrap .anim-touch-ripple {
    position: absolute;
    width: 3.5rem;
    height: 3.5rem;
    margin: -1.75rem 0 0 -1.75rem;
    border-radius: 999px;
    pointer-events: none;
    z-index: 6;
    background: radial-gradient(circle, rgba(255, 190, 160, 0.55) 0%, rgba(255, 190, 160, 0) 68%);
    opacity: 0;
    transform: scale(0.35);
    transition: opacity 0.45s ease, transform 0.55s ease;
}

.anim-room-baby-wrap .anim-touch-ripple.is-active {
    opacity: 1;
    transform: scale(1.35);
}

.anim-room-baby-wrap {
    position: relative;
}

/* @req FR-SOC-002 オーナー交流設定 */
.anim-encounter-pref {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.anim-encounter-pref-details {
    margin: 0;
}

.anim-encounter-pref-summary {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    list-style: none;
    cursor: pointer;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-muted, #6b5f58);
}

.anim-encounter-pref-summary::-webkit-details-marker {
    display: none;
}

.anim-encounter-pref-summary-label {
    flex-shrink: 0;
}

.anim-encounter-pref-summary-value {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 700;
    color: var(--color-text, #2c2420);
}

.anim-encounter-pref-summary-action {
    flex-shrink: 0;
    font-size: 0.82rem;
    color: var(--color-primary, #8b5a3c);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.anim-encounter-pref-details[open] .anim-encounter-pref-summary-action {
    visibility: hidden;
}

.anim-encounter-pref-panel {
    margin-top: 0.75rem;
}

.anim-encounter-pref-title {
    margin: 0 0 0.5rem;
    font-size: 0.92rem;
    font-weight: 700;
}

.anim-encounter-pref-lead,
.anim-encounter-pref-note,
.anim-encounter-pref-current,
.anim-encounter-pref-hint {
    margin: 0 0 0.45rem;
    font-size: 0.85rem;
    color: var(--text-muted, #6b5f58);
    line-height: 1.55;
}

.anim-encounter-pref-note {
    color: var(--color-primary, #8b5a3c);
}

.anim-encounter-pref-current strong {
    color: var(--color-text, #2c2420);
}

.anim-encounter-pref-hint {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.8rem;
}

.anim-encounter-pref-form {
    margin-top: 0.65rem;
}

.anim-encounter-pref-options {
    border: 0;
    margin: 0 0 0.75rem;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.anim-encounter-pref-option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.15rem 0.55rem;
    align-items: start;
    padding: 0.55rem 0.65rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.anim-encounter-pref-option:has(input:checked) {
    border-color: rgba(139, 90, 60, 0.35);
    background: rgba(255, 248, 242, 0.9);
}

.anim-encounter-pref-option input {
    margin-top: 0.2rem;
}

.anim-encounter-pref-option-label {
    font-size: 0.88rem;
    font-weight: 700;
}

.anim-encounter-pref-option-hint {
    grid-column: 2;
    font-size: 0.78rem;
    color: var(--text-muted, #6b5f58);
    line-height: 1.45;
}

.anim-encounters-partner-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem;
    align-items: start;
}

.anim-encounter-pref-menu {
    position: relative;
}

.anim-encounter-pref-menu-trigger {
    list-style: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 0.55rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-muted, #6b5f58);
    white-space: nowrap;
}

.anim-encounter-pref-menu-trigger::-webkit-details-marker {
    display: none;
}

.anim-encounter-pref-menu-body {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 20;
    width: min(22rem, calc(100vw - 2rem));
    padding: 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--color-surface, #fff);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.anim-encounter-pref-menu-body .anim-encounter-pref {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.page-anim-encounters-partner .anim-encounter-section,
.page-anim-encounter .anim-encounter-section {
    margin-bottom: 0.85rem;
}

#encounter-pref {
    scroll-margin-top: 5rem;
}

.anim-encounter-owner-pref {
    margin-top: 1rem;
}

@media (max-width: 640px) {
    .anim-encounter-pref-menu-body {
        position: static;
        width: 100%;
        margin-top: 0.35rem;
        box-shadow: none;
    }

    .anim-encounters-partner-row {
        grid-template-columns: 1fr;
    }
}
