:root {
            --bg-deep: #072f5a;
            --bg-mid: #0b3f73;
            --bg-image-edge: #00011c;
            --line-gold: #d7b350;
            --text-light: #f4f5f8;
            --panel-soft: rgba(255, 255, 255, 0.12);
            --panel-soft-2: rgba(255, 255, 255, 0.18);
            --blue-btn: #115daf;
            --blue-btn-2: #0a4f99;
            --yellow-btn: #edcb5e;
            --yellow-btn-2: #d7a83a;
            --freeze-blue: #7bb7ff;
            --shell-max: 470px;
            --content-max: 415px;
        }

        * {
            box-sizing: border-box;
        }

html,
        body {
            margin: 0;
            padding: 0;
            min-height: 100%;
            overflow-x: hidden;
            font-family: Cambria, Georgia, "Times New Roman", serif;
            color: var(--text-light);
            background-color: var(--bg-image-edge);
        }

        body::before {
            content: "";
            position: fixed;
            inset: -6px;
            pointer-events: none;
            z-index: 0;
            background-color: var(--bg-image-edge);
            background-image:
                radial-gradient(132% 96% at 16% 14%, rgba(108, 196, 255, 0.48) 0%, rgba(29, 101, 188, 0.24) 36%, rgba(4, 16, 34, 0.3) 100%),
                linear-gradient(155deg, rgba(2, 12, 28, 0.18) 0%, rgba(8, 61, 130, 0.14) 34%, rgba(2, 10, 24, 0.22) 100%),
                url("fond_orion.jpg");
            background-repeat: no-repeat, no-repeat, no-repeat;
            background-position: center center, center center, 57% 41%;
            background-size: cover, cover, 122%;
            filter: saturate(1.12) contrast(1.18) brightness(1.04);
        }

        body.view-all::before,
        body.view-all-own::before,
        body.view-all-foreign::before {
            background-position: center center, center center, 57% 47%;
        }

        body.view-new-edit::before,
        body.view-new-readonly::before,
        body.view-login::before,
        body.view-ritual::before {
            inset: 0;
            background-position: left top, left top, left top;
            background-size: cover, cover, 122%;
        }

        a {
            color: inherit;
            text-decoration: none;
        }

.app-shell {
            width: min(100%, var(--shell-max));
            margin: 0 auto;
            min-height: 100dvh;
            position: relative;
            z-index: 1;
            container-type: inline-size;
            --ui-header-text-size: 1.06rem;
            --ui-subtitle-size: 1.52rem;
            --ui-content-label-size: var(--ui-subtitle-size);
            --ui-title-input-size: 2.3rem;
            --ui-body-input-size: 1.04rem;
            --ui-type-btn-minh: 62px;
            --ui-type-emoji-size: 2.35rem;
            --ui-type-label-size: 1.06rem;
            --ui-type-label-line: 1.08;
            --score-seg-active-scale: 1.24;
        }

        @container (max-width: 719px) {
            .all-screen {
                --all-head-offset: 118px;
            }

            .new-screen {
                padding-bottom: 10px;
            }

            .app-shell > * {
                --ui-header-text-size: 0.94rem;
                --ui-subtitle-size: 1.2rem;
                --ui-content-label-size: var(--ui-subtitle-size);
                --ui-title-input-size: 1.78rem;
                --ui-body-input-size: 0.95rem;
                --ui-type-btn-minh: 55px;
                --ui-type-emoji-size: 1.95rem;
                --ui-type-label-size: 0.64rem;
                --ui-type-label-line: 1.06;
            }

            .new-screen .new-dream-form {
                padding-bottom: 0;
            }

            .new-screen .type-btn-label {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: flex-start;
                min-height: 2.12em;
                line-height: 1.02;
                font-size: 0.61rem;
                white-space: normal;
            }

            .new-screen .type-label {
                font-size: 1.02rem;
            }

            .new-screen .score-bar {
                width: 80%;
                max-width: 80%;
                margin-inline: auto;
            }

            .new-screen .score-seg {
                font-size: 1rem;
                height: clamp(42px, 7.7vh, 56px);
            }

            .new-screen {
                --score-seg-active-scale: 1.18;
            }

            .all-screen .week-label-long {
                display: none;
            }

            .all-screen .week-label-short {
                display: inline;
            }

            .all-screen .week-top {
                font-size: 0.84rem;
                line-height: 1.03;
            }

            .all-onirotag-line {
                font-size: 0.92rem;
                gap: 5px;
            }

            .all-lookup-inline {
                gap: 5px;
                font-size: 0.78rem;
            }

            .all-lookup-input {
                width: 112px;
                padding: 7px 10px;
            }

            .all-lookup-btn {
                padding: 7px 10px;
            }

            .new-screen .dream-body-input {
                flex: 1 1 auto;
                min-height: clamp(180px, 30dvh, 320px);
                max-height: none;
            }

            .new-screen .dream-title-row {
                gap: 8px;
            }
        }

        @container (min-width: 720px) {
            .all-screen {
                --all-head-offset: 132px;
            }

            .app-shell > * {
                --ui-header-text-size: 1.22rem;
                --ui-subtitle-size: 1.72rem;
                --ui-content-label-size: var(--ui-subtitle-size);
                --ui-title-input-size: 2.56rem;
                --ui-body-input-size: 1.14rem;
                --ui-type-btn-minh: 68px;
                --ui-type-emoji-size: 2.45rem;
                --ui-type-label-size: 1.42rem;
                --ui-type-label-line: 1.02;
            }

            .all-screen .week-top {
                font-size: 0.95rem;
                line-height: 1.08;
            }

            .all-screen .day-title {
                font-size: 0.95rem;
                line-height: 1.08;
            }

            .all-screen .week-countdown {
                font-size: 1.16rem;
            }

            .all-screen .all-bottom-greeting {
                font-size: 1.16rem;
            }

            .all-screen .days-progress-label,
            .all-screen .lucid-total-line {
                font-size: 1.16rem;
            }

            .all-screen .logout-scroll-btn {
                font-size: 1.08rem;
                padding: 12px 17px;
            }

            .all-screen .bottom-add {
                font-size: 1.62rem;
            }

            .all-screen .bottom-add.bottom-ritual {
                font-size: 1.13rem;
            }

            .all-screen .bottom-row.is-single {
                padding-bottom: 0;
            }

            .all-screen .bottom-fixed {
                padding-bottom: calc(env(safe-area-inset-bottom) + 8px);
            }
        }

.title-gold {
            position: relative;
            margin: 0;
            text-align: center;
            font-size: clamp(2.2rem, 8.5vw, 3.4rem);
            letter-spacing: 0.07em;
            line-height: 1;
            color: #fff0c6;
            text-shadow:
                0 1px 0 #a27a24,
                0 0 8px rgba(255, 236, 176, 0.42),
                0 0 20px rgba(255, 236, 176, 0.34),
                0 0 34px rgba(255, 255, 255, 0.14);
            font-weight: 900;
            isolation: isolate;
        }

.title-gold::before {
            content: '';
            position: absolute;
            left: 50%;
            top: 50%;
            width: 108%;
            height: 104%;
            transform: translate(-50%, -50%);
            background:
                radial-gradient(circle, rgba(255, 250, 225, 0.34) 0%, rgba(255, 242, 197, 0.18) 34%, rgba(255, 244, 216, 0) 74%);
            filter: blur(11px);
            z-index: -1;
            pointer-events: none;
            animation: title-halo-pulse 1.85s ease-in-out infinite;
        }

.title-gold::after {
            content: attr(data-text);
            position: absolute;
            inset: 0;
            color: transparent;
            background:
                linear-gradient(
                    104deg,
                    rgba(255, 255, 255, 0) 0%,
                    rgba(255, 255, 255, 0) 28%,
                    rgba(255, 255, 255, 0.18) 39%,
                    rgba(255, 255, 255, 0.98) 47%,
                    rgba(255, 255, 255, 0.36) 53%,
                    rgba(255, 255, 255, 0) 63%,
                    rgba(255, 255, 255, 0) 100%
                );
            background-size: 220% 100%;
            -webkit-background-clip: text;
            background-clip: text;
            animation: title-shine 2.7s linear infinite;
            pointer-events: none;
            opacity: 0.96;
        }

@keyframes title-shine {
            0% { background-position: 210% 0; }
            100% { background-position: -10% 0; }
        }

        @keyframes title-halo-pulse {
            0%, 100% {
                transform: translate(-50%, -50%) scale(0.94);
                opacity: 0.34;
            }
            50% {
                transform: translate(-50%, -50%) scale(1.08);
                opacity: 0.96;
            }
        }

        .top-links {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            margin-bottom: 7px;
            font-size: 0.84rem;
            color: #dce8fa;
        }

        .top-link {
            background: rgba(255, 255, 255, 0.12);
            border: 1px solid rgba(255, 255, 255, 0.25);
            border-radius: 999px;
            padding: 4px 10px;
            white-space: nowrap;
        }

        .flash-stack {
            display: grid;
            gap: 6px;
            margin: 8px 0 10px;
        }

        .flash-stack:empty {
            display: none;
            margin: 0;
        }

        .flash {
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.22);
            padding: 7px 9px;
            font-size: 0.86rem;
            line-height: 1.25;
            background: rgba(255, 255, 255, 0.1);
        }

        .flash-ok {
            border-color: rgba(105, 209, 127, 0.7);
            background: rgba(76, 158, 91, 0.2);
        }

        .flash-warning {
            border-color: rgba(228, 188, 80, 0.7);
            background: rgba(228, 188, 80, 0.18);
        }

        .flash-error {
            border-color: rgba(255, 154, 154, 0.75);
            background: rgba(186, 58, 58, 0.25);
        }

        .flash-info {
            border-color: rgba(151, 202, 255, 0.7);
            background: rgba(151, 202, 255, 0.14);
        }

        .auth-wrap {
            min-height: 100dvh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px 12px;
        }

.auth-card {
            width: min(100%, 620px);
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.28);
            background: rgba(6, 33, 69, 0.58);
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
            padding: 14px 12px 13px;
        }

        .auth-stack {
            position: relative;
            width: min(100%, 620px);
            padding-top: 92px;
        }

        .auth-stack .auth-card {
            width: 100%;
        }

        .auth-seal {
            position: absolute;
            left: 50%;
            top: 0;
            width: clamp(86px, 20vw, 116px);
            height: auto;
            transform: translate(-50%, -18px);
            filter: brightness(0) invert(1)
                drop-shadow(0 0 10px rgba(244, 222, 141, 0.72))
                drop-shadow(0 0 20px rgba(214, 167, 66, 0.46));
            opacity: 0.96;
            pointer-events: none;
            animation: auth-seal-pulse 2.05s ease-in-out infinite;
        }

        .auth-title {
            margin: 8px 0 7px;
            font-size: 1.5rem;
            color: #f7e0a2;
        }

        .auth-text {
            margin: 0 0 8px;
            font-size: 0.95rem;
            line-height: 1.35;
            color: #e8eef9;
        }

        .auth-welcome {
            margin: 12px 0 10px;
            text-align: center;
            font-size: clamp(1.45rem, 4vw, 2rem);
            line-height: 1.15;
            color: #fff1bd;
            text-shadow: 0 0 14px rgba(255, 237, 176, 0.18);
        }

        .auth-question {
            margin: 4px 0 8px;
            font-size: 1rem;
            font-weight: 700;
            color: #f0cf71;
            text-shadow: 0 0 10px rgba(240, 207, 113, 0.22);
        }

        .auth-text-lead {
            margin-top: 10px;
            margin-bottom: 6px;
            font-size: 1rem;
            line-height: 1.45;
            color: #f4f7ff;
        }

        .auth-blue {
            color: #8fc8ff;
            font-weight: 700;
        }

        .auth-gold {
            color: #f0cf71;
            font-weight: 700;
            text-shadow: 0 0 8px rgba(240, 207, 113, 0.2);
        }

        @keyframes auth-seal-pulse {
            0%, 100% {
                filter: brightness(0) invert(1)
                    drop-shadow(0 0 8px rgba(244, 222, 141, 0.5))
                    drop-shadow(0 0 16px rgba(214, 167, 66, 0.3));
            }
            50% {
                filter: brightness(0) invert(1)
                    drop-shadow(0 0 16px rgba(248, 229, 160, 0.82))
                    drop-shadow(0 0 28px rgba(221, 175, 73, 0.58));
            }
        }

        .auth-benefits {
            margin: 12px 0 4px;
            padding-left: 22px;
            display: grid;
            gap: 8px;
            color: #eef4ff;
            font-size: 0.95rem;
            line-height: 1.4;
        }

        .auth-divider {
            width: 100%;
            height: 1px;
            margin: 12px 0;
            background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(150, 205, 255, 0.7) 18%, rgba(244, 230, 173, 0.9) 50%, rgba(150, 205, 255, 0.7) 82%, rgba(255, 255, 255, 0) 100%);
            box-shadow: 0 0 10px rgba(150, 205, 255, 0.16);
        }

        .auth-benefits li::marker {
            color: #f1d57a;
        }

        .auth-confirm {
            display: grid;
            gap: 6px;
            margin: 12px 0 10px;
            padding: 11px 12px;
            border-radius: 14px;
            border: 1px solid rgba(132, 231, 161, 0.55);
            background: linear-gradient(180deg, rgba(113, 222, 147, 0.18) 0%, rgba(24, 109, 50, 0.22) 100%);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 0 16px rgba(113, 222, 147, 0.12);
        }

        .auth-confirm-title {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            font-size: 1.05rem;
            font-weight: 700;
            color: #a7ffbe;
        }

        .auth-confirm-title-icon {
            font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
            line-height: 1;
            flex: 0 0 auto;
        }

        .auth-confirm-text,
        .auth-confirm-wait {
            font-size: 0.93rem;
            line-height: 1.35;
            color: #ecfff1;
        }

        .field {
            display: grid;
            gap: 5px;
            margin: 8px 0;
        }

        .field label {
            font-size: 0.84rem;
            color: #dce6f7;
        }

        .field input,
        .field textarea {
            width: 100%;
            border: 1px solid rgba(255, 255, 255, 0.5);
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
            padding: 10px 11px;
            font: inherit;
        }

        .auth-actions {
            display: grid;
            grid-template-columns: 1fr;
            gap: 8px;
            margin-top: 10px;
        }

        .btn {
            border: 1px solid rgba(255, 255, 255, 0.35);
            border-radius: 12px;
            background: linear-gradient(180deg, #1d6bc0 0%, #0c4f98 100%);
            color: #f7fbff;
            padding: 10px 12px;
            text-align: center;
            cursor: pointer;
            font-size: 1.02rem;
            font-family: inherit;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.42em;
            transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, border-color 160ms ease, background 160ms ease;
        }

        .btn-emoji {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
            line-height: 1;
            vertical-align: -0.08em;
            font-size: 1.14em;
            flex: 0 0 auto;
        }

        .auth-submit-btn {
            font-size: clamp(1.02rem, 4vw, 1.18rem);
            letter-spacing: 0.01em;
            gap: 0.5em;
        }

        .auth-submit-btn .btn-ico-butterfly {
            width: 1.28em;
            height: 1.28em;
        }

        .is-juicy {
            animation: juicy-pop 250ms ease;
        }

        @keyframes juicy-pop {
            0% { transform: scale(1) rotate(0deg); }
            30% { transform: scale(1.08) rotate(-2.4deg); }
            60% { transform: scale(1.03) rotate(1.6deg); }
            100% { transform: scale(1) rotate(0deg); }
        }

        .btn.secondary {
            background: rgba(255, 255, 255, 0.12);
        }

        .btn.gold {
            color: #1d2340;
            border-color: rgba(255, 255, 255, 0.35);
            border-radius: 999px;
            background: linear-gradient(180deg, #f4e6ad 0%, #d5a742 100%);
            font-weight: 700;
            min-height: 56px;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
        }

        .btn[disabled],
        .btn.is-disabled {
            opacity: 0.58;
            cursor: not-allowed;
            filter: saturate(0.72);
        }

.new-screen {
            min-height: 100svh;
            height: 100svh;
            max-height: 100svh;
            padding: 8px 10px 14px;
            display: flex;
            flex-direction: column;
            --new-gap: 6px;
            gap: var(--new-gap);
            overflow: hidden;
        }

        .new-screen.is-public-share {
            padding-bottom: 108px;
        }

        .new-screen.is-readonly-view {
            min-height: 100svh;
            height: auto;
            max-height: none;
            overflow: visible;
            padding-bottom: calc(env(safe-area-inset-bottom) + 112px);
        }

        .new-screen .title-gold {
            margin-bottom: -8px;
        }

        .new-screen.is-readonly-view .title-gold {
            margin-bottom: 4px;
        }

        .dream-consult-sheet {
            display: flex;
            flex-direction: column;
            gap: 10px;
            width: 100%;
            margin-top: 4px;
        }

        .dream-consult-meta-line {
            display: flex;
            align-items: baseline;
            justify-content: flex-start;
            gap: 10px 14px;
            flex-wrap: wrap;
            font-size: clamp(0.98rem, 3.55vw, 1.08rem);
            line-height: 1.26;
            text-align: left;
        }

        .dream-consult-score {
            color: #f5e8be;
        }

        .dream-consult-score strong {
            color: #fff6dd;
            font-weight: 800;
        }

        .dream-consult-score-moon {
            display: inline-block;
            margin-left: 2px;
            font-size: 1.08em;
        }

        .dream-consult-visibility {
            color: #7cb6ff;
            font-weight: 400;
            position: relative;
        }

        .dream-consult-visibility-wrap {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            flex-wrap: wrap;
        }

        .dream-consult-type-line {
            color: #f5e8be;
            font-size: clamp(0.98rem, 3.6vw, 1.08rem);
            line-height: 1.28;
            text-align: left;
        }

        .dream-consult-privacy-wrap {
            position: static;
            display: inline-flex;
            align-items: center;
            vertical-align: middle;
        }

        .dream-consult-privacy-btn.dream-consult-privacy-trigger {
            width: auto;
            min-width: 24px;
            min-height: 30px;
            height: 30px;
            padding: 0 5px;
            border-width: 1px;
            border-radius: 999px;
            font-size: 1.06rem;
            line-height: 1;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 10px rgba(0, 0, 0, 0.2);
        }

        .dream-consult-visibility .dream-privacy-panel {
            top: calc(100% + 6px);
            left: 50%;
            right: auto;
            transform: translateX(-50%);
            width: min(calc(100vw - 24px), 360px);
        }

        .dream-consult-type-value {
            color: #ffffff;
        }

        .dream-consult-card {
            flex: 1 1 auto;
            width: 100%;
            border-radius: 22px;
            border: 1px solid rgba(255, 255, 255, 0.16);
            background: rgba(10, 16, 28, 0.62);
            box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
            padding: 18px 16px 20px;
        }

        .dream-consult-title {
            margin: 0 0 14px;
            text-align: center;
            font-size: clamp(1.34rem, 5vw, 1.92rem);
            line-height: 1.08;
            font-weight: 800;
            letter-spacing: 0.01em;
        }

        .dream-consult-title.privacy-private {
            color: #ffffff;
            text-shadow: 0 0 9px rgba(255, 255, 255, 0.12);
        }

        .dream-consult-title.privacy-friends {
            color: rgba(231, 197, 104, 0.98);
            text-shadow: 0 0 10px rgba(231, 197, 104, 0.22);
        }

        .dream-consult-title.privacy-public {
            color: rgba(96, 214, 255, 1);
            text-shadow: 0 0 10px rgba(96, 214, 255, 0.26);
        }

        .dream-consult-body {
            color: #ffffff;
            font-size: clamp(1rem, 3.85vw, 1.14rem);
            line-height: 1.5;
            white-space: normal;
            word-break: break-word;
        }

        .dream-consult-line.is-dialogue {
            font-style: italic;
        }

        .consult-bottom-fixed {
            z-index: 42;
        }

        .consult-bottom-row {
            position: relative;
            z-index: 1;
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 8px;
            pointer-events: auto;
        }

        .consult-bottom-btn {
            min-height: 58px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.24);
            background: rgba(13, 23, 43, 0.98);
            color: #f7f9ff;
            display: grid;
            place-items: center;
            font-size: clamp(1.48rem, 6vw, 2.02rem);
            line-height: 1;
            text-decoration: none;
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
            transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, border-color 160ms ease, background 160ms ease;
        }

        .consult-bottom-btn.is-close {
            color: #9ecbff;
            background: linear-gradient(180deg, rgba(38, 46, 76, 0.98) 0%, rgba(18, 25, 48, 0.98) 100%);
        }

        .consult-bottom-btn.is-close .btn-ico-gray {
            color: #5f6678;
            transform: translateY(-1px);
        }

        .consult-bottom-btn.is-delete {
            color: #ffc2c2;
            background: linear-gradient(180deg, rgba(81, 20, 24, 0.98) 0%, rgba(46, 10, 14, 0.98) 100%);
        }

        .consult-bottom-btn.is-edit {
            color: #12182e;
            background: linear-gradient(180deg, #f4e6ad 0%, #d5a742 100%);
        }

        .consult-bottom-btn.is-nav {
            color: #9ecbff;
        }

        .consult-bottom-btn.is-disabled {
            opacity: 0.32;
            pointer-events: none;
        }

        .consult-bottom-btn.is-placeholder {
            visibility: hidden;
            pointer-events: none;
        }

        .dream-onirotag-line {
            margin: 6px auto 2px;
            width: fit-content;
            max-width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            flex-wrap: wrap;
            text-align: center;
            font-size: clamp(0.94rem, 3.2vw, 1.08rem);
            line-height: 1.04;
        }

        .dream-onirotag-label {
            color: #9fd0ff;
            letter-spacing: 0.05em;
            font-weight: 700;
        }

        .dream-onirotag-value {
            color: #f0ca62;
            letter-spacing: 0.04em;
            text-decoration-line: underline;
            text-decoration-style: solid;
            text-decoration-color: rgba(240, 202, 98, 0.86);
            text-underline-offset: 4px;
        }

        .dream-onirotag-link {
            font-weight: 700;
        }

        .dream-onirotag-link:hover,
        .dream-onirotag-link:focus-visible {
            color: #f7d57f;
            text-decoration-color: rgba(247, 213, 127, 0.98);
        }

        .new-header-text {
            margin: 0;
            text-align: center;
            font-size: var(--ui-header-text-size);
            line-height: 1.22;
        }

        .new-header-line {
            margin: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .dream-inline-share-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            min-height: 34px;
            padding: 6px 12px;
            border: 1px solid rgba(182, 222, 255, 0.62);
            border-radius: 999px;
            background: linear-gradient(180deg, #79c4ff 0%, #286fcb 100%);
            color: #ffffff;
            font: inherit;
            font-size: clamp(0.84rem, 2.9vw, 0.96rem);
            font-weight: 800;
            line-height: 1;
            cursor: pointer;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
        }

        .dream-inline-share-btn:hover,
        .dream-inline-share-btn:focus-visible {
            background: linear-gradient(180deg, #91d2ff 0%, #327bd9 100%);
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
        }

        .new-header-subtext {
            margin-top: 4px;
            font-size: clamp(0.88rem, 3.1vw, 1rem);
            color: rgba(255, 255, 255, 0.96);
        }

        .gold-inline {
            color: #f3cc69;
            font-weight: 700;
            text-shadow: 0 0 7px rgba(243, 204, 105, 0.55);
        }

        .new-screen .gold-inline {
            text-shadow: none;
        }

        .new-screen > .flash-stack:empty + .new-header-line,
        .new-screen > .flash-stack:empty + .new-header-text {
            margin-top: -14px;
        }

        .new-screen > .flash-stack {
            margin: 0;
        }

        .new-dream-form {
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-height: 0;
            flex: 1 1 auto;
            padding-bottom: 0;
        }

        .new-screen.ritual-screen {
            height: auto;
            max-height: none;
            min-height: 100svh;
            overflow-y: auto;
            padding-bottom: calc(env(safe-area-inset-bottom) + 96px);
            align-items: stretch;
        }

        .ritual-card {
            position: relative;
            width: min(100%, 520px);
            margin: 22px auto 0;
            padding: 15px 13px;
            border-radius: 18px;
            border: 1px solid rgba(173, 222, 255, 0.34);
            background:
                linear-gradient(180deg, rgba(13, 49, 98, 0.76) 0%, rgba(5, 19, 45, 0.86) 100%);
            box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
            color: #eef6ff;
        }

        .ritual-tip-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 2;
            min-width: 108px;
            min-height: 42px;
            padding: 5px 10px 5px 8px;
            border-radius: 999px;
            border: 1px solid rgba(244, 223, 155, 0.72);
            background:
                linear-gradient(180deg, rgba(255, 245, 194, 0.96) 0%, rgba(216, 169, 64, 0.96) 100%);
            color: #161616;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            font: inherit;
            cursor: pointer;
            box-shadow: 0 8px 17px rgba(0, 0, 0, 0.28), 0 0 14px rgba(240, 202, 98, 0.22);
        }

        .ritual-tip-icon {
            font-size: 1.14rem;
            line-height: 1;
        }

        .ritual-tip-label {
            display: block;
            font-size: 0.72rem;
            font-weight: 800;
            line-height: 0.98;
            text-align: left;
        }

        .ritual-card-active .ritual-kicker,
        .ritual-card-active .ritual-title {
            padding-right: 116px;
        }

        .ritual-kicker {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            color: #9ed2ff;
            font-size: 0.92rem;
            font-weight: 800;
            letter-spacing: 0.03em;
        }

        .ritual-title {
            margin: 8px 0 8px;
            color: #f0ca62;
            font-size: clamp(1.45rem, 5vw, 2rem);
            line-height: 1.05;
            text-shadow: 0 0 12px rgba(240, 202, 98, 0.18);
        }

        .ritual-text {
            margin: 0;
            color: #e7f0ff;
            font-size: clamp(0.96rem, 3.3vw, 1.08rem);
            line-height: 1.38;
        }

        .ritual-stage {
            position: relative;
            margin-top: 13px;
            padding: 15px 12px 13px;
            border-radius: 16px;
            border: 1px solid rgba(240, 202, 98, 0.34);
            background:
                radial-gradient(circle at 50% 0%, rgba(129, 193, 255, 0.18) 0%, rgba(129, 193, 255, 0) 58%),
                rgba(3, 13, 33, 0.58);
            text-align: center;
            box-shadow: inset 0 0 26px rgba(35, 127, 219, 0.2);
        }

        .ritual-stage.is-pulse .ritual-stage-value {
            animation: ritual-timer-text-pulse 150ms steps(1, end);
        }

        .ritual-stage.is-countdown-pulse .ritual-stage-label {
            animation: ritual-countdown-blue-flash 560ms ease-out;
        }

        .ritual-stage.is-interval-blue .ritual-stage-value {
            color: #5fc3ff !important;
            text-shadow:
                0 0 18px rgba(95, 195, 255, 0.72),
                0 0 42px rgba(68, 158, 255, 0.46),
                0 0 78px rgba(30, 110, 255, 0.28);
        }

        .ritual-stage.is-interval-blue.is-pulse .ritual-stage-value {
            animation: none;
        }

        .ritual-stage-value {
            color: #fff0b9;
            font-size: clamp(3.45rem, 18vw, 6.6rem);
            font-weight: 800;
            line-height: 1;
            font-variant-numeric: tabular-nums;
            text-shadow:
                0 0 18px rgba(120, 198, 255, 0.5),
                0 0 42px rgba(68, 158, 255, 0.36),
                0 0 78px rgba(30, 110, 255, 0.24);
        }

        .ritual-stage-label {
            margin-top: 8px;
            color: #f3e7c4;
            font-size: clamp(0.92rem, 3vw, 1.04rem);
            font-weight: 700;
            line-height: 1.25;
        }

        .ritual-orientation {
            margin-top: 7px;
            color: #9ed2ff;
            font-size: 0.92rem;
            font-weight: 700;
            line-height: 1.25;
        }

        .ritual-orientation.is-ready {
            color: #96f3ad;
        }

        .ritual-orientation.is-alert {
            color: #ff9b9b;
        }

        .ritual-orientation:empty {
            display: none;
        }

        .ritual-tilt {
            --ritual-phone-angle: -90deg;
            --ritual-tilt-color: #9ed2ff;
            margin-top: 12px;
            padding: 11px 10px 10px;
            border-radius: 14px;
            border: 1px solid rgba(173, 222, 255, 0.26);
            background: rgba(2, 12, 31, 0.38);
            text-align: center;
            box-shadow: inset 0 0 18px rgba(126, 190, 255, 0.1);
        }

        .ritual-phone-viewport {
            position: relative;
            height: 92px;
            margin: 0 auto;
            overflow: hidden;
        }

        .ritual-phone-ground {
            position: absolute;
            left: 12%;
            right: 12%;
            bottom: 17px;
            height: 2px;
            border-radius: 999px;
            background: linear-gradient(90deg, rgba(158, 210, 255, 0) 0%, rgba(158, 210, 255, 0.82) 50%, rgba(158, 210, 255, 0) 100%);
            box-shadow: 0 0 12px rgba(158, 210, 255, 0.18);
        }

        .ritual-phone-viewport::after {
            content: "";
            position: absolute;
            left: 50%;
            bottom: 17px;
            height: 72px;
            border-left: 2px dashed rgba(216, 236, 255, 0.46);
            transform: translateX(-50%);
            filter: drop-shadow(0 0 5px rgba(126, 190, 255, 0.24));
        }

        .ritual-phone-figure {
            position: absolute;
            left: 50%;
            bottom: 17px;
            z-index: 1;
            width: 18px;
            height: 72px;
            border-radius: 7px;
            border: 2px solid rgba(255, 245, 210, 0.92);
            background:
                linear-gradient(180deg, rgba(158, 210, 255, 0.5) 0%, rgba(32, 109, 205, 0.64) 100%);
            box-shadow: 0 0 18px rgba(158, 210, 255, 0.24), inset 0 0 8px rgba(255, 255, 255, 0.18);
            transform-origin: 50% 100%;
            transform: translateX(-50%) rotate(var(--ritual-phone-angle));
            transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
        }

        .ritual-phone-figure::before {
            content: "";
            position: absolute;
            left: 50%;
            top: 5px;
            width: 6px;
            height: 2px;
            border-radius: 999px;
            transform: translateX(-50%);
            background: rgba(255, 255, 255, 0.76);
        }

        .ritual-tilt-value {
            margin-top: 2px;
            color: var(--ritual-tilt-color);
            font-size: clamp(1.3rem, 5vw, 1.8rem);
            font-weight: 800;
            line-height: 1;
            font-variant-numeric: tabular-nums;
            text-shadow: 0 0 12px rgba(158, 210, 255, 0.28);
        }

        .ritual-tilt-caption {
            margin-top: 4px;
            color: #d7e9ff;
            font-size: 0.84rem;
            font-weight: 700;
            line-height: 1.15;
        }

        .ritual-tilt.is-low .ritual-tilt-value {
            animation: ritual-tilt-alert 680ms ease-in-out infinite;
            text-shadow: 0 0 14px rgba(255, 96, 96, 0.55);
        }

        .ritual-tilt.is-low .ritual-phone-figure {
            border-color: rgba(255, 132, 132, 0.95);
            box-shadow: 0 0 20px rgba(255, 90, 90, 0.32), inset 0 0 8px rgba(255, 255, 255, 0.14);
        }

        .ritual-options {
            margin-top: 12px;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 7px;
        }

        .ritual-control {
            display: grid;
            align-content: start;
            gap: 7px;
            min-width: 0;
            padding: 8px 8px;
            border-radius: 12px;
            border: 1px solid rgba(173, 222, 255, 0.26);
            background: rgba(2, 12, 31, 0.36);
            box-shadow: inset 0 0 16px rgba(126, 190, 255, 0.08);
        }

        .ritual-control-head,
        .ritual-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 7px;
            color: #e7f0ff;
            font-size: 0.82rem;
            font-weight: 800;
            line-height: 1.15;
        }

        .ritual-control-value {
            color: #9ed2ff;
            font-variant-numeric: tabular-nums;
        }

        .ritual-range {
            width: 100%;
            accent-color: #6dbdff;
        }

        .ritual-toggle {
            justify-content: flex-start;
            cursor: pointer;
        }

        .ritual-toggle input {
            width: 16px;
            height: 16px;
            accent-color: #6dbdff;
        }

        .ritual-stepper {
            display: grid;
            grid-template-columns: 30px minmax(0, 1fr) 30px auto;
            align-items: center;
            gap: 5px;
        }

        .ritual-stepper-btn,
        .ritual-stepper-input {
            min-height: 32px;
            border-radius: 999px;
            border: 1px solid rgba(173, 222, 255, 0.42);
            background: rgba(255, 255, 255, 0.11);
            color: #eef6ff;
            font: inherit;
            font-weight: 800;
            text-align: center;
        }

        .ritual-stepper-btn {
            cursor: pointer;
            font-size: 1rem;
            line-height: 1;
        }

        .ritual-stepper-input {
            min-width: 0;
            padding: 0 4px;
            font-size: 0.88rem;
            font-variant-numeric: tabular-nums;
        }

        .ritual-stepper-unit {
            color: #9ed2ff;
            font-size: 0.78rem;
            font-weight: 800;
        }

        .ritual-saved-card {
            position: fixed;
            left: 50%;
            top: 50%;
            z-index: 12040;
            width: min(calc(100vw - 30px), 430px);
            margin: 0;
            padding: 14px 12px;
            border-radius: 16px;
            border: 1px solid rgba(126, 202, 255, 0.42);
            background: linear-gradient(180deg, rgba(21, 69, 125, 0.72) 0%, rgba(5, 24, 58, 0.82) 100%);
            box-shadow: 0 20px 42px rgba(0, 0, 0, 0.46), inset 0 0 20px rgba(102, 183, 255, 0.12);
            transform: translate(-50%, -50%);
        }

        .ritual-saved-card[hidden] {
            display: none;
        }

        body.is-ritual-saved-open .app-shell::after,
        body.is-ritual-leave-open .app-shell::after,
        body.is-ritual-tips-open .app-shell::after {
            content: "";
            position: fixed;
            inset: 0;
            z-index: 12020;
            background: rgba(0, 5, 18, 0.58);
            backdrop-filter: blur(2px);
        }

        .ritual-saved-kicker {
            color: #9ed2ff;
            font-size: 0.94rem;
            font-weight: 800;
            line-height: 1.15;
            text-align: center;
        }

        .ritual-saved-title {
            color: #f0ca62;
            font-size: 1rem;
            font-weight: 800;
            line-height: 1.1;
            text-align: center;
            margin-top: 4px;
        }

        .ritual-saved-text {
            margin: 6px 0 9px;
            color: #e7f0ff;
            font-size: 0.92rem;
            line-height: 1.25;
            text-align: center;
        }

        .ritual-saved-text strong {
            color: #ffffff;
        }

        .ritual-saved-actions {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
            gap: 7px;
        }

        .ritual-saved-btn {
            min-height: 40px;
            padding: 8px 10px;
            border-radius: 999px;
            border: 1px solid #d9b857;
            background: linear-gradient(180deg, #f4e4a8 0%, #d6a944 100%);
            color: #212640;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font: inherit;
            font-size: 0.84rem;
            font-weight: 800;
            line-height: 1.08;
            text-align: center;
            text-decoration: none;
            cursor: pointer;
        }

        .ritual-saved-btn.secondary {
            border-color: rgba(174, 220, 255, 0.58);
            background: rgba(255, 255, 255, 0.12);
            color: #eaf4ff;
        }

        .ritual-tips-card {
            position: fixed;
            left: 50%;
            top: 50%;
            z-index: 12045;
            width: min(calc(100vw - 30px), 430px);
            padding: 16px 14px 14px;
            border-radius: 16px;
            border: 1px solid rgba(173, 222, 255, 0.42);
            background:
                radial-gradient(circle at 50% 0%, rgba(126, 202, 255, 0.22) 0%, rgba(126, 202, 255, 0) 58%),
                linear-gradient(180deg, rgba(21, 69, 125, 0.82) 0%, rgba(5, 24, 58, 0.92) 100%);
            color: #eef6ff;
            box-shadow: 0 20px 42px rgba(0, 0, 0, 0.46), inset 0 0 20px rgba(102, 183, 255, 0.12);
            transform: translate(-50%, -50%);
        }

        .ritual-tips-card[hidden] {
            display: none;
        }

        .ritual-tips-close {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 34px;
            height: 34px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.24);
            background: rgba(255, 255, 255, 0.1);
            color: #eef6ff;
            font: inherit;
            font-size: 1.3rem;
            line-height: 1;
            cursor: pointer;
        }

        .ritual-tips-title {
            padding-right: 34px;
            color: #f0ca62;
            font-size: 1.08rem;
            font-weight: 800;
            line-height: 1.12;
            text-align: center;
        }

        .ritual-tips-intro {
            margin: 10px 0 0;
            padding: 9px 10px;
            border-radius: 12px;
            border: 1px solid rgba(173, 222, 255, 0.24);
            background: rgba(2, 12, 31, 0.28);
            color: #e7f0ff;
            font-size: 0.92rem;
            font-weight: 700;
            line-height: 1.28;
            text-align: center;
        }

        .ritual-tips-list {
            margin: 12px 0 0;
            padding-left: 0;
            list-style: none;
            display: grid;
            gap: 8px;
            color: #e7f0ff;
            font-size: 0.94rem;
            line-height: 1.25;
        }

        @keyframes ritual-tilt-alert {
            0%, 100% {
                opacity: 1;
                text-shadow: 0 0 10px rgba(255, 105, 105, 0.28);
            }
            50% {
                opacity: 0.46;
                text-shadow: 0 0 20px rgba(255, 105, 105, 0.7);
            }
        }

        @keyframes ritual-timer-text-pulse {
            0%,
            42% {
                color: #ffffff;
            }
            43%,
            100% {
                color: #fff0b9;
            }
        }

        @keyframes ritual-countdown-blue-flash {
            0%,
            100% {
                color: #f3e7c4;
                text-shadow:
                    0 0 8px rgba(126, 190, 255, 0.22);
            }
            50% {
                color: #b9e5ff;
                text-shadow:
                    0 0 10px rgba(255, 255, 255, 0.76),
                    0 0 24px rgba(126, 207, 255, 0.86),
                    0 0 48px rgba(39, 129, 255, 0.58);
            }
        }

        .ritual-actions {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 9px;
            margin-top: 13px;
        }

        .ritual-action-btn,
        .ritual-link-btn {
            appearance: none;
            -webkit-appearance: none;
            min-height: 48px;
            padding: 10px 14px;
            border-radius: 999px;
            border: 1px solid #d9b857;
            background: linear-gradient(180deg, #f4e4a8 0%, #d6a944 100%);
            color: #212640;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font: inherit;
            font-size: clamp(0.96rem, 3.5vw, 1.1rem);
            font-weight: 800;
            line-height: 1.05;
            text-align: center;
            text-decoration: none;
            cursor: pointer;
            box-shadow: 0 8px 17px rgba(0, 0, 0, 0.3);
            transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, border-color 160ms ease, background 160ms ease;
        }

        .ritual-main-action {
            width: 100%;
            min-height: 64px;
            gap: 9px;
            font-size: clamp(1.08rem, 4vw, 1.24rem);
        }

        .ritual-main-action.is-running {
            border-color: rgba(174, 220, 255, 0.82);
            background: linear-gradient(180deg, #9ed2ff 0%, #2b77d3 100%);
            color: #071a36;
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32), 0 0 16px rgba(88, 162, 233, 0.38);
        }

        .ritual-action-emoji {
            font-size: 1.22em;
            line-height: 1;
            color: #080808;
            text-shadow: none;
        }

        .ritual-action-btn.secondary {
            border-color: rgba(174, 220, 255, 0.58);
            background: rgba(255, 255, 255, 0.12);
            color: #eaf4ff;
        }

        .ritual-action-btn:disabled {
            opacity: 0.52;
            cursor: default;
            filter: saturate(0.75);
        }

        .ritual-link-btn {
            margin-top: 13px;
            width: 100%;
        }

        .ritual-bottom-fixed {
            padding-bottom: calc(env(safe-area-inset-bottom) + 14px);
        }

        .ritual-bottom-row {
            position: relative;
            z-index: 1;
            display: flex;
            align-items: center;
            gap: 10px;
            justify-content: flex-start;
            pointer-events: auto;
        }

        .ritual-close-btn {
            flex: 0 0 auto;
        }

        .ritual-private-badge {
            margin-left: auto;
            max-width: min(64vw, 320px);
            padding: 7px 10px;
            border-radius: 999px;
            border: 1px solid rgba(173, 222, 255, 0.46);
            background: rgba(3, 18, 43, 0.86);
            color: #dceeff;
            font-size: clamp(0.72rem, 2.7vw, 0.86rem);
            font-weight: 800;
            line-height: 1.05;
            text-align: right;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            box-shadow: 0 0 18px rgba(95, 170, 255, 0.18);
        }

        .label {
            margin: 0;
            text-align: center;
            font-size: var(--ui-subtitle-size);
            line-height: 1.05;
            color: #f6f1df;
        }

        .label small {
            font-size: 0.62em;
            color: #e9dca8;
        }

.score-bar {
            border: 0;
            border-radius: 0;
            overflow: visible;
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 4px;
            width: 80%;
            max-width: 80%;
            min-width: 0;
            background: transparent;
            box-shadow: none;
            padding: 0;
            position: relative;
            isolation: isolate;
            margin-inline: auto;
        }

        .score-bar.field-missing {
            animation: missing-red 420ms ease 2;
            box-shadow: 0 0 0 2px rgba(232, 76, 76, 0.9), 0 0 15px rgba(232, 76, 76, 0.55);
        }

.score-seg {
            appearance: none;
            -webkit-appearance: none;
            -webkit-tap-highlight-color: transparent;
            border: 0;
            margin: 0;
            padding: 0;
            font: inherit;
            font-weight: 700;
            height: clamp(44px, 8.3vh, 58px);
            min-width: 0;
            display: grid;
            place-items: center;
            line-height: 1;
            color: #f8f8fb;
            cursor: pointer;
            transition: transform 120ms ease, box-shadow 120ms ease, filter 140ms ease;
            position: relative;
            background: linear-gradient(180deg, rgba(117, 177, 255, 0.22) 0%, rgba(33, 98, 174, 0.22) 44%, rgba(8, 42, 101, 0.16) 100%);
            border: 1px solid rgba(255, 255, 255, 0.18);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 7px 14px rgba(0, 0, 0, 0.18);
            transform-origin: center center;
            touch-action: manipulation;
            user-select: none;
            outline: none;
            overflow: hidden;
        }

        .score-seg[data-score="0"] {
            background: linear-gradient(180deg, #5db3ff 0%, #2e86dc 48%, #0e4e9b 100%);
        }

        .score-seg[data-score="1"] {
            background: linear-gradient(180deg, #4ea6fb 0%, #2279d0 48%, #0b458d 100%);
        }

        .score-seg[data-score="2"] {
            background: linear-gradient(180deg, #3f97f2 0%, #1c6bbf 48%, #083d82 100%);
        }

        .score-seg[data-score="3"] {
            background: linear-gradient(180deg, #3286e4 0%, #155eab 48%, #073573 100%);
        }

        .score-seg[data-score="4"] {
            background: linear-gradient(180deg, #2578d5 0%, #0f5197 48%, #052a64 100%);
        }

.score-seg-icon {
            width: clamp(31px, 7.6vw, 42px);
            height: clamp(31px, 7.6vw, 42px);
            object-fit: contain;
            filter:
                drop-shadow(0 0 7px rgba(255, 255, 255, 0.38))
                drop-shadow(0 0 14px rgba(255, 255, 255, 0.22));
            pointer-events: none;
            user-select: none;
        }

        .score-seg.is-static {
            display: grid;
            place-items: center;
            cursor: default;
            user-select: none;
        }

        .score-seg:first-child {
            border-top-left-radius: 999px;
            border-bottom-left-radius: 999px;
            margin-left: -6px;
            padding-left: 6px;
        }

        .score-seg:last-child {
            border-top-right-radius: 999px;
            border-bottom-right-radius: 999px;
            margin-right: -6px;
            padding-right: 6px;
        }

        .score-seg[data-score="4"] {
            color: #f8f8fb;
        }

        .score-seg.is-active {
            z-index: 2;
            transform: scale(var(--score-seg-active-scale));
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.44),
                0 0 0 2px rgba(229, 188, 99, 0.34);
            background: linear-gradient(180deg, #faefcb 0%, #ddb05a 46%, #b77d1c 100%);
            filter: saturate(1.2) brightness(1.08);
            animation: score-pulse 1.75s ease-in-out infinite;
        }

.score-seg.is-active .score-seg-icon {
            filter:
                drop-shadow(0 0 8px rgba(255, 255, 255, 0.44))
                drop-shadow(0 0 16px rgba(255, 255, 255, 0.26));
        }

        .score-seg:focus {
            outline: none;
        }

        .score-seg.is-wobble {
            animation: wobble 260ms ease;
        }

@keyframes wobble {
            0% { transform: scale(var(--score-seg-active-scale)) rotate(0deg); }
            25% { transform: scale(var(--score-seg-active-scale)) rotate(-5deg); }
            50% { transform: scale(var(--score-seg-active-scale)) rotate(4deg); }
            75% { transform: scale(var(--score-seg-active-scale)) rotate(-2deg); }
            100% { transform: scale(var(--score-seg-active-scale)) rotate(0deg); }
        }

        @keyframes score-pulse {
            0%, 100% {
                box-shadow:
                    inset 0 0 0 4px rgba(246, 210, 104, 0.95),
                    0 0 0 2px rgba(246, 210, 104, 0.84),
                    0 0 10px rgba(246, 210, 104, 0.52);
            }
            50% {
                box-shadow:
                    inset 0 0 0 4px rgba(246, 210, 104, 1),
                    0 0 0 3px rgba(246, 210, 104, 0.96),
                    0 0 18px rgba(246, 210, 104, 0.82);
            }
        }

        .score-tip {
            position: fixed;
            z-index: 12000;
            min-width: 0;
            width: min(90vw, 360px);
            max-width: min(90vw, 360px);
            color: #fff;
            background: rgba(5, 16, 34, 0.82);
            border: 1px solid rgba(255, 255, 255, 0.22);
            border-radius: 12px;
            padding: 8px 10px 8px;
            box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            line-height: 1.16;
            pointer-events: none;
            opacity: 0;
            transform: translateY(4px);
            transition: opacity 130ms ease, transform 130ms ease;
        }

        .score-tip.is-visible {
            opacity: 1;
            transform: translateY(0);
        }

        .score-tip::after {
            content: '';
            position: absolute;
            left: var(--arrow-left, 50%);
            bottom: -7px;
            transform: translateX(-50%);
            border-left: 7px solid transparent;
            border-right: 7px solid transparent;
            border-top: 7px solid rgba(5, 16, 34, 0.82);
        }

        .score-tip-head {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: nowrap;
            margin-bottom: 4px;
        }

        .score-tip-kicker {
            display: inline-block;
            font-size: 1.02rem;
            font-weight: 700;
            color: #ffffff;
            letter-spacing: 0.02em;
            flex: 0 0 auto;
        }

        .score-tip-title {
            display: inline-block;
            white-space: nowrap;
            font-size: 1rem;
            line-height: 1;
            padding: 3px 7px 4px;
            border-radius: 7px;
            background: var(--tip-color, #0f2f8f);
            color: #fff;
            font-weight: 800;
            max-width: 90%;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .score-tip-title.is-plain {
            padding: 0;
            border-radius: 0;
            background: transparent;
            max-width: none;
            overflow: visible;
            text-overflow: clip;
        }

        .score-tip-accent {
            display: inline-flex;
            margin: 0;
            padding: 3px 8px 4px;
            border-radius: 999px;
            font-size: 0.84rem;
            font-weight: 800;
            letter-spacing: 0.01em;
            white-space: nowrap;
            flex: 0 0 auto;
        }

        .score-tip-body {
            display: block;
            white-space: pre-line;
            font-size: 0.88rem;
            line-height: 1.18;
            color: rgba(255, 255, 255, 0.95);
        }

        @keyframes missing-red {
            0%, 100% { box-shadow: 0 0 0 0 rgba(232, 76, 76, 0); }
            50% { box-shadow: 0 0 0 2px rgba(232, 76, 76, 0.92), 0 0 16px rgba(232, 76, 76, 0.62); }
        }

        .editor-topline {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .content-label,
        .privacy-label {
            margin: 0;
            font-size: var(--ui-content-label-size);
            text-align: left;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 8px;
            color: #f8f2de;
        }

        .privacy-label {
            justify-content: flex-end;
            text-align: right;
            flex: 0 0 auto;
        }

        .privacy-label small {
            font-size: 0.62em;
            color: #e9dca8;
        }

        .content-label.is-alert {
            animation: content-label-alert 420ms ease 2;
        }

        .label.is-alert {
            animation: oniroscore-label-alert 420ms ease 2;
        }

        @keyframes oniroscore-label-alert {
            0%, 100% {
                color: #f6f1df;
                text-shadow: none;
            }
            50% {
                color: #ff6f6f;
                text-shadow: 0 0 9px rgba(255, 111, 111, 0.5);
            }
        }

        @keyframes content-label-alert {
            0%, 100% {
                color: #f8f2de;
                text-shadow: none;
            }
            50% {
                color: #ff6f6f;
                text-shadow: 0 0 9px rgba(255, 111, 111, 0.5);
            }
        }

        .dream-editor {
            border-radius: 0;
            border: 0;
            background: transparent;
            color: #111;
            display: flex;
            flex-direction: column;
            min-height: 0;
            flex: 1 1 auto;
            overflow: visible;
        }

        .dream-title-row {
            display: flex;
            align-items: stretch;
            justify-content: space-between;
            gap: 10px;
            padding: 0;
            min-width: 0;
        }

        .dream-editor input,
        .dream-editor textarea {
            border: 1px solid rgba(162, 191, 232, 0.42);
            font: inherit;
            color: #101010;
            background: rgba(228, 238, 252, 0.92);
            box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
        }

.dream-title-input {
            border-bottom: 1px solid rgba(130, 155, 191, 0.8) !important;
            padding: 12px 14px 10px;
            font-size: var(--ui-title-input-size) !important;
            font-weight: 800;
            line-height: 1.06 !important;
            min-height: 58px;
            color: #0f1218 !important;
            background: rgba(228, 238, 252, 0.94);
            flex: 1 1 auto;
            width: auto;
            max-width: none;
            min-width: 0;
            align-self: flex-start;
            border-radius: 14px;
        }

        .dream-title-input.field-missing {
            animation: missing-red 420ms ease 2;
            border-bottom-color: rgba(232, 76, 76, 0.92) !important;
            box-shadow: 0 0 0 2px rgba(232, 76, 76, 0.35) inset;
        }

        .dream-body-input {
            padding: 12px 14px;
            font-size: var(--ui-body-input-size) !important;
            line-height: 1.22 !important;
            resize: none;
            overflow: auto;
            min-height: clamp(186px, 28dvh, 400px);
            flex: 1 1 auto;
            color: #101010 !important;
            margin-top: 8px;
            border-radius: 16px;
        }

        .new-screen .dream-title-input,
        .new-screen .dream-body-input {
            color: #ffffff !important;
            background: rgba(0, 8, 28, 0.35);
            border-color: rgba(118, 166, 236, 0.5);
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.06),
                0 12px 22px rgba(0, 0, 0, 0.18);
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
        }

        .dream-title-input::placeholder,
        .dream-body-input::placeholder {
            font-size: inherit;
            line-height: inherit;
        }

        .new-screen .dream-title-input::placeholder,
        .new-screen .dream-body-input::placeholder {
            color: rgba(255, 255, 255, 0.72);
        }

        .dream-editor.is-readonly {
            border-color: transparent;
            box-shadow: none;
        }

        .type-label {
            margin: 0;
            text-align: center;
            font-size: var(--ui-subtitle-size);
        }

        .type-label small {
            font-size: 0.62em;
            color: #e9dca8;
        }

        .dream-privacy-wrap {
            position: relative;
            flex: 0 0 72px;
            width: 72px;
            align-self: stretch;
        }

        .dream-privacy-btn,
        .dream-privacy-option,
        .week-summary-dream-bubble {
            --privacy-ring-color: rgba(255, 255, 255, 0.72);
            --privacy-ring-glow: rgba(255, 255, 255, 0.18);
            --privacy-ring-bg: rgba(255, 255, 255, 0.04);
        }

        .day-sphere {
            --privacy-ring-color: transparent;
            --privacy-ring-glow: transparent;
        }

        .dream-privacy-btn.privacy-private,
        .dream-privacy-option[data-privacy-option="private"],
        .day-sphere.privacy-private,
        .week-summary-dream-bubble.privacy-private {
            --privacy-ring-color: rgba(86, 92, 108, 0.95);
            --privacy-ring-glow: rgba(86, 92, 108, 0.28);
            --privacy-ring-bg: rgba(86, 92, 108, 0.08);
        }

        .dream-privacy-btn.privacy-friends,
        .dream-privacy-option[data-privacy-option="friends"],
        .day-sphere.privacy-friends,
        .week-summary-dream-bubble.privacy-friends {
            --privacy-ring-color: rgba(231, 197, 104, 0.96);
            --privacy-ring-glow: rgba(231, 197, 104, 0.3);
            --privacy-ring-bg: rgba(231, 197, 104, 0.1);
        }

        .dream-privacy-btn.privacy-public,
        .dream-privacy-option[data-privacy-option="public"],
        .day-sphere.privacy-public,
        .week-summary-dream-bubble.privacy-public {
            --privacy-ring-color: rgba(136, 210, 255, 0.96);
            --privacy-ring-glow: rgba(136, 210, 255, 0.32);
            --privacy-ring-bg: rgba(136, 210, 255, 0.11);
        }

        .dream-privacy-btn {
            width: 72px;
            min-width: 72px;
            min-height: 58px;
            height: 100%;
            border: 3px solid var(--privacy-ring-color);
            border-radius: 14px;
            background: linear-gradient(180deg, #3b9bf3 0%, #1462b4 48%, #07326d 100%);
            color: #f2f8ff;
            font-size: 2.25rem;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 12px var(--privacy-ring-glow), 0 10px 18px rgba(0, 0, 0, 0.16);
        }

        .dream-privacy-btn-icon {
            width: 40px;
            height: 40px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .dream-privacy-btn-icon img {
            width: 96%;
            height: 96%;
            object-fit: contain;
            filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.26));
        }

        .dream-privacy-btn.is-open {
            background: linear-gradient(180deg, #faefcb 0%, #ddb05a 46%, #b77d1c 100%);
            color: #3d2a06;
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.42),
                0 0 0 2px rgba(229, 188, 99, 0.34),
                0 0 12px var(--privacy-ring-glow),
                0 10px 18px rgba(0, 0, 0, 0.16);
        }

        .dream-privacy-btn.is-wobble {
            animation: privacy-btn-wobble 220ms ease;
        }

        .dream-privacy-btn.is-confirmed {
            animation: privacy-btn-confirm 500ms ease;
        }

        .dream-privacy-btn.is-static {
            cursor: default;
        }

        @keyframes privacy-btn-wobble {
            0% { transform: scale(1) rotate(0deg); }
            25% { transform: scale(1.02) rotate(-2deg); }
            50% { transform: scale(1.03) rotate(1.6deg); }
            75% { transform: scale(1.015) rotate(-1deg); }
            100% { transform: scale(1) rotate(0deg); }
        }

        @keyframes privacy-btn-confirm {
            0%, 100% {
                background: linear-gradient(180deg, #3b9bf3 0%, #1462b4 48%, #07326d 100%);
                color: #f2f8ff;
                box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 18px rgba(0, 0, 0, 0.16);
            }
            18%, 34%, 58%, 74% {
                background: linear-gradient(180deg, #faefcb 0%, #ddb05a 46%, #b77d1c 100%);
                color: #3d2a06;
                box-shadow:
                    inset 0 1px 0 rgba(255, 255, 255, 0.42),
                    0 0 0 2px rgba(229, 188, 99, 0.34),
                    0 10px 18px rgba(0, 0, 0, 0.16);
            }
        }

        .dream-privacy-panel {
            position: absolute;
            top: calc(100% + 10px);
            right: 0;
            width: min(92vw, 360px);
            display: grid;
            gap: 7px;
            padding: 11px;
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.26);
            background: rgba(7, 18, 38, 0.98);
            box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
            z-index: 12020;
            pointer-events: auto;
        }

        .dream-privacy-panel[hidden] {
            display: none !important;
        }

        .dream-privacy-option {
            border: 1px solid rgba(255, 255, 255, 0.18);
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.05);
            color: #eef6ff;
            text-align: left;
            display: grid;
            grid-template-columns: 52px minmax(0, 1fr);
            gap: 10px;
            padding: 10px 12px;
            cursor: pointer;
            font: inherit;
        }

        .dream-privacy-option.is-active {
            border-color: rgba(240, 202, 114, 0.86);
            background: rgba(240, 202, 114, 0.2);
            box-shadow: inset 0 0 0 1px rgba(240, 202, 114, 0.48), 0 0 16px rgba(240, 202, 114, 0.08);
        }

        .dream-privacy-option-icon {
            width: 48px;
            height: 48px;
            border-radius: 999px;
            border: 3px solid var(--privacy-ring-color);
            background: var(--privacy-ring-bg);
            font-size: 2.15rem;
            line-height: 1;
            text-align: center;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 12px var(--privacy-ring-glow);
        }

        .dream-privacy-option-icon img {
            width: 74%;
            height: 74%;
            object-fit: contain;
            filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.26));
        }

        .dream-privacy-option-text {
            font-size: 0.84rem;
            line-height: 1.22;
        }

        .type-grid {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            align-items: start;
            gap: 6px;
            width: 100%;
            overflow: visible;
            position: relative;
            padding-top: 2px;
        }

        .tech-pop,
        .type-item {
            min-width: 0;
        }

        .tech-pop {
            position: relative;
            z-index: 15;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .type-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .type-btn {
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            background: linear-gradient(180deg, #2f88e0 0%, #1157a9 48%, #052b67 100%);
            color: #f9fcff;
            min-height: var(--ui-type-btn-minh);
            font-family: inherit;
            font-size: 1rem;
            line-height: 1;
            padding: 4px;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            width: 100%;
            overflow: hidden;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
        }

        .type-btn.is-static {
            cursor: default;
            user-select: none;
        }

        .type-btn .emoji {
            font-size: var(--ui-type-emoji-size);
            line-height: 1;
            display: block;
            text-align: center;
        }

        .type-btn .type-icon {
            width: calc(100% - 8px);
            height: calc(100% - 8px);
            max-width: calc(100% - 8px);
            max-height: calc(var(--ui-type-btn-minh) - 8px);
            object-fit: contain;
            object-position: center center;
            display: block;
            align-self: center;
            margin: 0 auto;
            filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.26));
        }

        .type-btn-label {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            gap: 0.06em;
            max-width: 100%;
            white-space: normal;
            overflow-wrap: normal;
            word-break: normal;
            text-align: center;
            font-size: var(--ui-type-label-size);
            line-height: 1.02;
            color: #deebff;
            min-height: 2.18em;
            width: 100%;
        }

        .type-line {
            display: block;
            white-space: nowrap;
        }

        .type-line.is-small {
            font-size: 0.86em;
        }

        .type-word-tight {
            font-size: 0.94em;
        }

        .type-btn.is-active {
            border-color: #e5bc63;
            background: linear-gradient(180deg, #faefcb 0%, #ddb05a 46%, #b77d1c 100%);
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.44),
                0 0 0 2px rgba(229, 188, 99, 0.34);
        }

        .type-btn.is-active + .type-btn-label {
            color: #efc768;
            text-shadow: 0 0 7px rgba(239, 199, 104, 0.45);
        }

        .tech-popover {
            position: absolute;
            left: var(--pop-left, 0px);
            bottom: calc(100% + 10px);
            width: calc(100vw - 28px);
            max-width: calc(100vw - 28px);
            padding: 10px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.32);
            background: rgba(7, 18, 38, 0.98);
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
            z-index: 12010;
            opacity: 0;
            pointer-events: none;
            transform: translateY(4px);
            transition: opacity 150ms ease, transform 150ms ease;
        }

        @supports (width: 100cqw) {
            .tech-popover {
                width: calc(100cqw - 28px);
                max-width: calc(100cqw - 28px);
            }
        }

        .tech-popover::after {
            content: '';
            position: absolute;
            left: var(--pop-arrow-left, 22px);
            bottom: -8px;
            border-left: 8px solid transparent;
            border-right: 8px solid transparent;
            border-top: 8px solid rgba(7, 18, 38, 0.98);
        }

        .tech-pop.is-open .tech-popover {
            opacity: 1;
            pointer-events: auto;
            transform: translateY(0);
        }

        .tech-popover-label {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            color: #f6f7fa;
            font-size: 0.93rem;
            margin-bottom: 7px;
        }

        .tech-popover-label .emoji {
            font-size: 1.1rem;
        }

        .tech-input {
            width: 100%;
            border: 1px solid rgba(255, 255, 255, 0.45);
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
            font: inherit;
            padding: 8px 9px;
        }

        .tech-pop.is-active > .type-btn {
            border-color: #e5bc63;
            background: linear-gradient(180deg, #faefcb 0%, #ddb05a 46%, #b77d1c 100%);
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.44),
                0 0 0 2px rgba(229, 188, 99, 0.34);
        }

        .tech-pop.is-active > .type-btn + .type-btn-label {
            color: #efc768;
            text-shadow: 0 0 7px rgba(239, 199, 104, 0.45);
        }

        .tech-pop.is-open > .type-btn {
            border-color: #e5bc63;
            background: linear-gradient(180deg, #faefcb 0%, #ddb05a 46%, #b77d1c 100%);
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.44),
                0 0 0 2px rgba(229, 188, 99, 0.34);
        }

        .tech-pop.is-open > .type-btn + .type-btn-label {
            color: #efc768;
            text-shadow: 0 0 7px rgba(239, 199, 104, 0.45);
        }

        .actions-row {
            display: grid;
            grid-template-columns: 72px minmax(0, 1fr);
            gap: 3px;
        }

        .close-btn,
        .save-btn {
            border: 1px solid rgba(255, 255, 255, 0.35);
            border-radius: 999px;
            font-family: inherit;
            font-size: clamp(1.5rem, 6vw, 2rem);
            cursor: pointer;
            min-height: 56px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, border-color 160ms ease, background 160ms ease;
        }

        .close-btn {
            color: #3f4455;
            background: linear-gradient(180deg, #f6e7b3 0%, #e0bc64 52%, #cb9933 100%);
            min-width: 56px;
            width: 56px;
            padding: 0;
        }

        .save-btn {
            color: #1d2340;
            background: linear-gradient(180deg, #f4e6ad 0%, #d5a742 100%);
            font-size: clamp(1.04rem, 4vw, 1.46rem);
            font-weight: 800;
            gap: 8px;
        }

        .save-btn .btn-ico-butterfly {
            width: 1.4em;
            height: 1.4em;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            align-self: center;
        }

        .close-btn .btn-ico-gray {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            transform: translateY(-2px);
            color: #8f6416;
            text-shadow: 0 0 8px rgba(248, 210, 112, 0.52);
        }

        .save-btn.is-disabled {
            opacity: 0.58;
            filter: saturate(0.65);
        }

        .save-blocked-tip {
            position: fixed;
            z-index: 12055;
            min-width: min(280px, calc(100vw - 28px));
            max-width: min(92vw, 420px);
            padding: 10px 12px;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.24);
            background: rgba(7, 18, 38, 0.96);
            color: #f8fbff;
            font-size: 0.93rem;
            line-height: 1.35;
            text-align: center;
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.42);
            opacity: 0;
            pointer-events: none;
            transform: translateY(4px);
            transition: opacity 150ms ease, transform 150ms ease;
        }

        .save-blocked-tip.is-visible {
            opacity: 1;
            transform: translateY(0);
        }

        .save-blocked-tip::after {
            content: '';
            position: absolute;
            left: var(--save-tip-arrow-left, 22px);
            bottom: -8px;
            border-left: 8px solid transparent;
            border-right: 8px solid transparent;
            border-top: 8px solid rgba(7, 18, 38, 0.96);
        }

        .leave-confirm-tip {
            position: fixed;
            z-index: 12060;
            min-width: 0;
            max-width: min(92vw, 420px);
            color: #fff;
            background: rgba(7, 18, 38, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.28);
            border-radius: 12px;
            padding: 10px 10px 9px;
            box-shadow: 0 14px 30px rgba(0, 0, 0, 0.52);
            line-height: 1.26;
            opacity: 0;
            pointer-events: none;
            transform: translateY(5px);
            transition: opacity 140ms ease, transform 140ms ease;
        }

        .leave-confirm-tip.is-visible {
            opacity: 1;
            pointer-events: auto;
            transform: translateY(0);
        }

        .leave-confirm-tip::after {
            content: '';
            position: absolute;
            left: var(--leave-arrow-left, 50%);
            bottom: -8px;
            transform: translateX(-50%);
            border-left: 8px solid transparent;
            border-right: 8px solid transparent;
            border-top: 8px solid rgba(7, 18, 38, 0.98);
        }

        .leave-confirm-text {
            margin: 0 0 8px;
            font-size: 1rem;
            text-align: center;
            color: rgba(255, 255, 255, 0.97);
        }

        .leave-confirm-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
        }

        .leave-confirm-btn {
            border: 1px solid rgba(255, 255, 255, 0.25);
            border-radius: 11px;
            min-height: 44px;
            color: #fff;
            font-size: 1.02rem;
            font-weight: 800;
            cursor: pointer;
            font-family: inherit;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 0 12px;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
            transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, border-color 160ms ease, background 160ms ease;
        }

        .leave-confirm-btn.is-stay {
            background:
                linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(0, 0, 0, 0.29) 100%),
                #424852;
        }

        .leave-confirm-btn.is-leave {
            background:
                linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(0, 0, 0, 0.29) 100%),
                #d3a13e;
        }

        .leave-confirm-btn:focus-visible {
            outline: 2px solid rgba(255, 255, 255, 0.82);
            outline-offset: 2px;
        }

        .btn-ico-gray {
            color: #5f6678;
            font-weight: 700;
        }

        .btn-ico-butterfly {
            display: inline-block;
            width: 1.1em;
            height: 1.1em;
            background-color: currentColor;
            -webkit-mask-image: url("sceau-onir-papillon.png");
            mask-image: url("sceau-onir-papillon.png");
            -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
            -webkit-mask-position: center;
            mask-position: center;
            -webkit-mask-size: contain;
            mask-size: contain;
            flex: 0 0 auto;
        }

        .save-btn[disabled],
        .close-btn[disabled] {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .dream-nav {
            display: grid;
            grid-template-columns: 68px 1fr 68px;
            gap: 8px;
            align-items: center;
        }

        .dream-nav.is-readonly-nav {
            grid-template-columns: max-content 64px minmax(0, 1fr) 64px;
            margin-bottom: 14px;
        }

        .dream-nav.is-readonly-nav.is-edit-nav {
            grid-template-columns: max-content 64px minmax(0, 1fr) 64px;
        }

        .dream-nav-primary-group {
            display: inline-grid;
            grid-auto-flow: column;
            gap: 8px;
            align-items: center;
            justify-self: start;
        }

        .dream-nav-meta {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            min-width: 0;
            justify-self: center;
        }

        .dream-nav-btn {
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.34);
            min-height: 50px;
            display: grid;
            place-items: center;
            font-size: 2rem;
            background: rgba(255, 255, 255, 0.1);
            transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, border-color 160ms ease, background 160ms ease;
        }

        .dream-nav-btn.nav-x {
            border: 1px solid rgba(255, 255, 255, 0.35);
            border-radius: 999px;
            color: #3f4455;
            background: linear-gradient(180deg, #f6e7b3 0%, #e0bc64 52%, #cb9933 100%);
            font-size: clamp(1.5rem, 6vw, 2rem);
            min-height: 56px;
            min-width: 56px;
            width: 56px;
            padding: 0;
        }

        .dream-nav-btn.nav-save {
            border: 1px solid rgba(255, 255, 255, 0.35);
            border-radius: 999px;
            color: #fff8d0;
            background:
                radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 247, 178, 0.92) 16%, rgba(255, 217, 76, 0.96) 42%, rgba(255, 157, 0, 0.98) 100%);
            font-size: 0;
            font-weight: 700;
            min-height: 56px;
            min-width: 56px;
            width: 56px;
            padding: 0;
            display: grid;
            place-items: center;
            justify-self: start;
            line-height: 0;
            box-shadow:
                0 0 0 2px rgba(255, 229, 126, 0.46),
                0 0 18px rgba(255, 214, 74, 0.82),
                0 0 34px rgba(255, 166, 0, 0.62);
        }

        .dream-nav-btn.nav-save .btn-ico-butterfly {
            width: 1.7rem;
            height: 1.7rem;
            background-color: #111111;
            filter: drop-shadow(0 0 8px rgba(255, 249, 208, 0.88));
        }

        .dream-nav-btn.nav-share {
            border: 1px solid rgba(255, 255, 255, 0.35);
            border-radius: 999px;
            color: #1d2340;
            background: linear-gradient(180deg, #f4e6ad 0%, #d5a742 100%);
            font-size: clamp(1.9rem, 7vw, 2.45rem);
            min-height: 56px;
            min-width: 56px;
            width: 56px;
            padding: 0;
            line-height: 1;
            display: grid;
            place-items: center;
        }

        .dream-nav-btn.nav-x .btn-ico-gray {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transform: translateY(-2px);
            color: #8f6416;
            text-shadow: 0 0 8px rgba(248, 210, 112, 0.52);
        }

        .dream-nav-btn.is-hidden {
            display: none !important;
        }

        .dream-nav-btn.is-disabled {
            opacity: 0.34;
            pointer-events: none;
        }

        .dream-nav-label {
            text-align: center;
            font-size: 1.02rem;
            color: #f4e9c4;
            letter-spacing: 0.03em;
            display: inline-flex;
            align-items: center;
            white-space: nowrap;
        }

        .dream-nav.is-readonly-nav .dream-nav-label {
            font-size: clamp(1.62rem, 5.9vw, 2.12rem);
            line-height: 1;
        }

        .dream-nav.is-readonly-nav .dream-nav-current {
            color: #efc768;
            font-weight: 900;
            text-shadow: 0 0 14px rgba(239, 199, 104, 0.9), 0 0 4px rgba(239, 199, 104, 0.95);
        }

        .dream-nav.is-readonly-nav .dream-nav-total {
            color: #f4e9c4;
        }

        .dream-nav-orbs {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-width: 0;
            margin-right: 2px;
        }

        .dream-nav-orb {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            border: 2px solid rgba(255, 255, 255, 0.62);
            box-shadow: 0 0 8px rgba(0, 0, 0, 0.38);
        }

        .dream-nav-orb.is-active {
            transform: scale(1.24);
            border-color: #e7c465;
            box-shadow:
                0 0 0 2px rgba(231, 196, 101, 0.58),
                0 0 18px rgba(231, 196, 101, 0.86);
            animation: nav-orb-pulse 1.08s ease-in-out infinite;
        }

        @keyframes nav-orb-pulse {
            0%, 100% {
                box-shadow:
                    0 0 0 2px rgba(231, 196, 101, 0.5),
                    0 0 10px rgba(231, 196, 101, 0.55);
            }
            50% {
                box-shadow:
                    0 0 0 3px rgba(231, 196, 101, 0.9),
                    0 0 22px rgba(231, 196, 101, 0.98);
            }
        }

        .all-screen {
            --all-head-offset: 124px;
            min-height: 100dvh;
            padding-bottom: 108px;
            overflow-x: visible;
        }

        .all-sticky-head {
            position: fixed;
            left: 50%;
            top: 0;
            transform: translateX(-50%);
            width: min(100%, var(--shell-max));
            box-sizing: border-box;
            z-index: 25;
            background: transparent;
            padding: calc(env(safe-area-inset-top) + 8px) 10px 7px;
            isolation: isolate;
        }

        .all-onirotag-line {
            margin: 2px auto 6px;
            width: fit-content;
            max-width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            flex-wrap: wrap;
            text-align: center;
            font-size: 1.06rem;
            line-height: 1.02;
        }

        .all-onirotag-label {
            color: #9fd0ff;
            letter-spacing: 0.05em;
            font-weight: 700;
        }

        .all-onirotag-value {
            color: #f0ca62;
            letter-spacing: 0.04em;
            text-transform: none;
            text-decoration-line: underline;
            text-decoration-style: dotted;
            text-decoration-color: rgba(240, 202, 98, 0.86);
            text-underline-offset: 4px;
        }

        .all-sticky-head::before {
            content: '';
            position: absolute;
            left: 50%;
            top: 0;
            bottom: 0;
            width: 100dvw;
            transform: translateX(-50%);
            background: linear-gradient(180deg, rgba(6, 40, 79, 0.98), rgba(6, 40, 79, 0.95));
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
            z-index: -1;
        }

        .weekdays {
            margin-top: 6px;
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 2px;
            font-size: clamp(0.85rem, 3.2vw, 1rem);
            color: #efe7c7;
            text-align: center;
            letter-spacing: 0.03em;
        }

        .weekday-full {
            display: none;
        }

        .weekdays-line {
            margin-top: 3px;
            height: 5px;
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 5px;
            overflow: hidden;
            border-radius: 999px;
        }

        .weekdays-line-seg {
            display: block;
            height: 100%;
        }

        .weekdays-line-seg:nth-child(1) { background: linear-gradient(180deg, #f6e7b9 0%, #deb767 100%); }
        .weekdays-line-seg:nth-child(2) { background: linear-gradient(180deg, #f2dfaa 0%, #d5aa55 100%); }
        .weekdays-line-seg:nth-child(3) { background: linear-gradient(180deg, #edd598 0%, #c99b44 100%); }
        .weekdays-line-seg:nth-child(4) { background: linear-gradient(180deg, #e6ca87 0%, #bc8d34 100%); }
        .weekdays-line-seg:nth-child(5) { background: linear-gradient(180deg, #dcbc76 0%, #aa7e2a 100%); }
        .weekdays-line-seg:nth-child(6) { background: linear-gradient(180deg, #cfac63 0%, #956b20 100%); }
        .weekdays-line-seg:nth-child(7) { background: linear-gradient(180deg, #be9750 0%, #7e5618 100%); }

        .all-screen.is-foreign-view .weekdays-line-seg:nth-child(1) { background: linear-gradient(180deg, #d8efff 0%, #7ec9ff 100%); }
        .all-screen.is-foreign-view .weekdays-line-seg:nth-child(2) { background: linear-gradient(180deg, #cae8ff 0%, #68bbff 100%); }
        .all-screen.is-foreign-view .weekdays-line-seg:nth-child(3) { background: linear-gradient(180deg, #b8dfff 0%, #53abff 100%); }
        .all-screen.is-foreign-view .weekdays-line-seg:nth-child(4) { background: linear-gradient(180deg, #a6d4ff 0%, #4298f2 100%); }
        .all-screen.is-foreign-view .weekdays-line-seg:nth-child(5) { background: linear-gradient(180deg, #8dc8ff 0%, #2e84df 100%); }
        .all-screen.is-foreign-view .weekdays-line-seg:nth-child(6) { background: linear-gradient(180deg, #74b9fb 0%, #216ec8 100%); }
        .all-screen.is-foreign-view .weekdays-line-seg:nth-child(7) { background: linear-gradient(180deg, #5aa6ed 0%, #1857aa 100%); }
        
        @container (min-width: 720px) {
            .weekday-short {
                display: none;
            }
            .weekday-full {
                display: inline;
            }
        }

        .all-list {
            padding: calc(var(--all-head-offset) + env(safe-area-inset-top)) 10px 16px;
            display: grid;
            gap: 0;
        }

        .all-weeks-start {
            height: 0;
            scroll-margin-top: calc(var(--all-head-offset) + env(safe-area-inset-top) + 10px);
        }

        .week-start-note {
            margin: 0 auto 14px;
            width: fit-content;
            padding: 7px 14px 8px;
            border-radius: 999px;
            border: 1px dashed rgba(133, 186, 255, 0.72);
            background: linear-gradient(180deg, rgba(8, 39, 86, 0.96) 0%, rgba(5, 26, 59, 0.94) 100%);
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
            text-align: center;
            color: rgba(225, 240, 255, 0.98);
            font-size: clamp(0.9rem, 3.1vw, 1.08rem);
            line-height: 1.32;
        }

        .all-foreign-note {
            margin: 10px auto 14px;
            width: min(100%, 760px);
            padding: 10px 12px;
            border-radius: 14px;
            border: 1px solid rgba(179, 220, 255, 0.34);
            background: rgba(5, 23, 56, 0.96);
            color: #eef6ff;
            text-align: center;
            box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
        }

        .all-foreign-note-text {
            line-height: 1.42;
        }

        .all-foreign-note-emoji {
            margin-right: 6px;
        }

        .all-foreign-note-tag {
            color: #f0ca62;
            text-shadow: 0 0 10px rgba(240, 202, 98, 0.28);
        }

        .all-follow-form {
            margin-top: 12px;
        }

        .all-follow-btn {
            width: 100%;
            min-height: 48px;
            border-radius: 16px;
            border: 1px solid rgba(137, 198, 255, 0.45);
            background: linear-gradient(180deg, #95d2ff 0%, #2f7fda 100%);
            color: #ffffff;
            font: inherit;
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
        }

        .all-follow-btn.is-unfollow {
            border-color: rgba(164, 197, 229, 0.48);
            background: linear-gradient(180deg, #8ca8c4 0%, #4e6a87 52%, #32465f 100%);
            color: #f1f7ff;
        }

        .all-follow-btn-check {
            color: #84f4a3;
        }

        .week-band {
            border-radius: 0;
            padding: 5px 2px 6px;
            border: 0;
            background: transparent;
            position: relative;
            z-index: 0;
        }

        .week-band[data-week-summary-trigger] {
            cursor: pointer;
            user-select: none;
        }

        .week-band.week-tone-a {
            background: rgba(255, 255, 255, 0);
        }

        .week-band.week-tone-b {
            background: rgba(0, 0, 0, 0);
        }

        .week-band::after {
            content: '';
            position: absolute;
            left: 50%;
            width: 100dvw;
            transform: translateX(-50%);
            top: 0;
            bottom: 0;
            z-index: 0;
            pointer-events: none;
        }

        .week-band > * {
            position: relative;
            z-index: 1;
        }

        .week-band.week-tone-a::after {
            background: rgba(0, 0, 0, 0);
        }

        .week-band.week-tone-b::after {
            background: rgba(0, 0, 0, 0.2);
        }

        .week-band + .week-band::before {
            content: '';
            position: absolute;
            left: 50%;
            width: 100dvw;
            transform: translateX(-50%);
            top: 0;
            height: 1px;
            background: rgba(255, 255, 255, 0.7);
            z-index: 1;
            pointer-events: none;
        }

        .week-band.month-sep {
            margin-top: 0;
            padding-top: 6px;
            border-top: 0;
        }

        .week-top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 6px;
            font-size: 0.95rem;
            line-height: 1.08;
        }

        .week-left {
            color: #f6efda;
        }

        .week-left-text {
            color: #8ec9ff;
            text-shadow: 0 0 8px rgba(106, 171, 255, 0.4);
        }

        .week-left-text.is-current-live,
        .week-right-label.is-current-live,
        .week-right-value.is-current-live {
            animation: week-current-glow 2.1s ease-in-out infinite;
        }

        .week-label-short {
            display: none;
        }

        .week-compact-row {
            display: none;
            align-items: center;
            grid-template-columns: 1.45rem 80px 2rem minmax(70px, 1fr) minmax(34px, max-content);
            column-gap: 6px;
            min-height: 24px;
            color: #9ed2ff;
            font-size: 0.86rem;
            font-weight: 800;
            line-height: 1.05;
            text-shadow: 0 0 8px rgba(106, 171, 255, 0.4);
        }

        .week-compact-row[hidden] {
            display: none !important;
        }

        .week-compact-emoji {
            width: 1.45rem;
            text-align: center;
            font-size: 1rem;
            line-height: 1;
        }

        .week-compact-name {
            min-width: 0;
            overflow: hidden;
            white-space: nowrap;
            color: #dbeeff;
            text-overflow: clip;
        }

        .week-compact-score {
            color: #efc768;
            text-align: right;
            font-variant-numeric: tabular-nums;
        }

        .week-compact-score.is-negative {
            color: #ff8f8f;
        }

        .week-compact-gauge {
            position: relative;
            min-width: 0;
            height: 13px;
            overflow: hidden;
            border-radius: 999px;
            border: 1px solid rgba(0, 0, 0, 0.92);
            background: rgba(4, 8, 18, 0.92);
            box-shadow: inset 0 0 7px rgba(255, 255, 255, 0.18), inset 0 1px 5px rgba(0, 0, 0, 0.35);
        }

        .week-compact-gauge-fill {
            display: block;
            width: var(--compact-fill-width, 0%);
            height: 100%;
            border-radius: inherit;
            background: var(--compact-fill-color, #2d8fff);
            box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.2), 0 0 10px rgba(106, 171, 255, 0.42);
        }

        .week-compact-lucid {
            justify-self: end;
            min-width: 34px;
            color: #fff0c6;
            text-align: right;
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
        }

        .week-compact-lucid.is-zero {
            color: #ff6f6f;
            text-shadow: 0 0 8px rgba(255, 111, 111, 0.35);
        }

        .week-right {
            position: relative;
            text-align: right;
            color: #8ec9ff;
            white-space: nowrap;
        }

        .week-band[data-week-summary-trigger]:hover .week-left-text,
        .week-band[data-week-summary-trigger]:hover .week-right-label,
        .week-band[data-week-summary-trigger]:hover .week-right-value,
        .week-band[data-week-summary-trigger]:hover .week-trend,
        .week-band[data-week-summary-trigger]:focus-visible .week-left-text,
        .week-band[data-week-summary-trigger]:focus-visible .week-right-label,
        .week-band[data-week-summary-trigger]:focus-visible .week-right-value,
        .week-band[data-week-summary-trigger]:focus-visible .week-trend,
        .week-band[data-week-summary-trigger]:active .week-left-text,
        .week-band[data-week-summary-trigger]:active .week-right-label,
        .week-band[data-week-summary-trigger]:active .week-right-value,
        .week-band[data-week-summary-trigger]:active .week-trend {
            color: #efc768;
            text-shadow: 0 0 8px rgba(239, 199, 104, 0.62);
        }

        .week-band[data-week-summary-trigger]:focus-visible {
            outline: 2px solid rgba(177, 220, 255, 0.82);
            outline-offset: 4px;
            border-radius: 10px;
        }

        .all-screen.is-compact {
            --all-head-offset: 82px;
        }

        .all-screen.is-compact.is-foreign-view {
            --all-head-offset: 102px;
        }

        .all-screen.is-compact .weekdays,
        .all-screen.is-compact .weekdays-line,
        .all-screen.is-compact .week-start-note,
        .all-screen.is-compact .week-top,
        .all-screen.is-compact .day-grid {
            display: none;
        }

        .all-screen.is-compact .week-band {
            padding: 1px 0;
            scroll-margin-top: calc(var(--all-head-offset) + env(safe-area-inset-top) + 12px);
        }

        .all-screen.is-compact .week-band + .week-band::before {
            display: none;
        }

        .all-screen.is-compact .week-compact-row {
            display: grid;
        }

        .week-score-trigger {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            color: inherit;
            pointer-events: none;
        }

        .week-trend {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            line-height: 1;
            vertical-align: middle;
        }

        .week-score-popover {
            display: none;
        }

        .week-score-modal {
            position: fixed;
            left: 50%;
            top: 50%;
            width: min(calc(var(--content-max) + 8px), calc(100vw - 16px));
            max-height: min(92vh, 980px);
            overflow: auto;
            padding: 0;
            border-radius: 24px;
            border: 0;
            background: transparent;
            box-shadow: 0 26px 64px rgba(0, 0, 0, 0.5);
            color: #edf6ff;
            opacity: 0;
            pointer-events: none;
            transform: translate(-50%, calc(-50% - 12px)) scale(0.96);
            transition: opacity 180ms ease, transform 220ms ease;
            z-index: 12140;
            white-space: normal;
        }

        .week-score-modal.is-visible {
            opacity: 1;
            pointer-events: auto;
            transform: translate(-50%, -50%) scale(1);
            animation: week-summary-wobble 460ms cubic-bezier(.2, .9, .24, 1.12);
        }

        .week-score-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(1, 8, 20, 0.44);
            backdrop-filter: blur(2px);
            opacity: 0;
            pointer-events: none;
            transition: opacity 140ms ease;
            z-index: 12130;
        }

        .week-score-backdrop.is-visible {
            opacity: 1;
            pointer-events: auto;
        }

        .week-summary-template {
            display: none;
        }

        .week-summary-card {
            position: relative;
            width: 100%;
            padding: 16px 12px 18px;
            border-radius: 22px;
            border: 1px solid rgba(190, 225, 255, 0.2);
            background-color: #082041;
            background-image:
                radial-gradient(118% 88% at 18% 16%, rgba(72, 166, 255, 0.58) 0%, rgba(18, 78, 154, 0.34) 40%, rgba(4, 16, 34, 0.56) 100%),
                linear-gradient(155deg, rgba(3, 16, 36, 0.4) 0%, rgba(10, 61, 122, 0.24) 38%, rgba(2, 10, 24, 0.5) 100%),
                url("fond_orion.jpg");
            background-repeat: no-repeat, no-repeat, no-repeat;
            background-position: center center, center center, center center;
            background-size: cover, cover, cover;
            box-sizing: border-box;
            overflow: hidden;
        }

        .week-summary-card::before {
            content: '';
            position: absolute;
            inset: 0;
            pointer-events: none;
            border-radius: inherit;
            box-shadow:
                inset 0 0 0 1px rgba(188, 223, 255, 0.15),
                inset 0 18px 28px rgba(1, 8, 20, 0.36),
                inset 0 -22px 30px rgba(1, 8, 20, 0.42),
                inset 18px 0 24px rgba(1, 8, 20, 0.28),
                inset -18px 0 24px rgba(1, 8, 20, 0.28);
        }

        .week-summary-close {
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 4;
            width: 38px;
            height: 38px;
            border: 0;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08);
            color: #eef6ff;
            font-size: 1.55rem;
            line-height: 1;
            cursor: pointer;
        }

        .week-summary-logo {
            margin: 0 auto 6px;
            display: block;
            width: 100%;
            max-width: none;
            text-align: center;
            font-size: clamp(1.7rem, 8vw, 2.35rem);
        }

        .week-summary-title {
            margin: 10px 0 6px;
            text-align: center;
            color: #f0c860;
            font-size: clamp(1.4rem, 3.4vw, 2.15rem);
            line-height: 1.08;
            text-shadow: 0 0 10px rgba(240, 200, 96, 0.18);
        }

        .week-summary-hint {
            margin: 0 0 6px;
            text-align: center;
            color: #8ec9ff;
            font-size: 0.92rem;
            line-height: 1.2;
        }

        .week-summary-subtitle {
            text-align: center;
            color: #f8e7b4;
            font-size: clamp(0.92rem, 2.3vw, 1.08rem);
            line-height: 1.3;
        }

        .week-summary-tag {
            margin-top: 6px;
            text-align: center;
            color: #eef6ff;
            font-size: 0.98rem;
        }

        .week-summary-tag strong {
            color: #f0ca62;
        }

        .week-summary-grid-wrap {
            margin-top: 14px;
            overflow: hidden;
            padding-bottom: 2px;
        }

        .week-summary-grid {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 0;
            min-width: 0;
        }

        .week-summary-col {
            min-height: 346px;
            padding: 8px 3px 8px;
            background: transparent;
            border-right: 0;
            position: relative;
        }

        .week-summary-col::after {
            content: '';
            position: absolute;
            top: 6px;
            right: 0;
            width: 1px;
            height: calc(100% - 12px);
            background: linear-gradient(180deg, rgba(232, 242, 255, 0.46) 0%, rgba(214, 230, 255, 0.3) 48%, rgba(214, 230, 255, 0.08) 100%);
            pointer-events: none;
        }

        .week-summary-col:last-child::after {
            display: none;
        }

        .week-summary-day-label {
            margin-bottom: 5px;
            text-align: center;
            color: #f6e6b4;
            font-size: 0.82rem;
            font-weight: 800;
            letter-spacing: 0.04em;
        }

        .week-summary-day-full {
            display: none;
        }

        .week-summary-day-score {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            margin: -1px 0 6px;
            color: #cfe6ff;
            font-size: 0.7rem;
            font-weight: 700;
            line-height: 1;
        }

        .week-summary-day-score.is-zero {
            color: #ffffff;
        }

        .week-summary-day-score.is-negative {
            color: #ff6f6f;
        }

        .week-summary-day-score.is-blank {
            color: rgba(233, 242, 255, 0.62);
        }

        .week-summary-day-score-moon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 15px;
            min-height: 15px;
            flex: 0 0 auto;
        }

        .week-summary-day-score-dash {
            display: inline-block;
            line-height: 1;
            transform: translateY(-1px);
        }

        .week-summary-ritual {
            margin: -2px 0 5px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            width: 100%;
            color: #9ed2ff;
            font-size: 0.66rem;
            font-weight: 800;
            line-height: 1;
        }

        .week-summary-ritual-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            border: 1px solid rgba(210, 236, 255, 0.9);
            background: #2f94ff;
            box-shadow: 0 0 7px rgba(47, 148, 255, 0.82);
            flex: 0 0 auto;
        }

        .week-summary-dream-list {
            display: grid;
            gap: 0;
        }

        .week-summary-dream-item {
            min-height: 74px;
            padding: 1px 1px 1px;
            display: grid;
            justify-items: center;
            align-content: start;
            gap: 1px;
        }

        .week-summary-dream-bubble {
            width: 33px;
            height: 33px;
            border-radius: 999px;
            background: transparent;
            border: 1px solid transparent;
            display: grid;
            place-items: center;
            text-align: center;
            box-shadow: 0 0 6px rgba(255, 255, 255, 0.78);
            position: relative;
            overflow: visible;
            transition: box-shadow 160ms ease, transform 160ms ease;
        }

        .week-summary-dream-bubble::after {
            content: '';
            position: absolute;
            inset: -2px;
            border-radius: 999px;
            border: 2px solid var(--privacy-ring-color);
            box-shadow: 0 0 10px var(--privacy-ring-glow);
            pointer-events: none;
            z-index: 2;
        }

        .week-summary-dream-link {
            display: inline-flex;
            border-radius: 999px;
            text-decoration: none;
        }

        .week-summary-dream-link:hover .week-summary-dream-bubble,
        .week-summary-dream-link:focus-visible .week-summary-dream-bubble,
        .week-summary-dream-link:active .week-summary-dream-bubble {
            border-color: rgba(244, 207, 112, 0.98);
            box-shadow: 0 0 0 2px rgba(244, 207, 112, 0.62), 0 0 22px rgba(244, 207, 112, 0.92);
            transform: scale(1.04);
        }

        .week-summary-dream-link:hover + .week-summary-dream-title,
        .week-summary-dream-link:focus-visible + .week-summary-dream-title,
        .week-summary-dream-link:active + .week-summary-dream-title {
            color: #efc768;
            text-shadow: 0 0 8px rgba(239, 199, 104, 0.62);
        }

        .week-summary-dream-moon {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
            height: 100%;
            object-fit: contain;
            filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.38));
            z-index: 1;
            pointer-events: none;
        }

        .week-summary-dream-emoji {
            display: block;
            max-width: 24px;
            font-size: 0.7rem;
            line-height: 1;
            position: relative;
            z-index: 3;
        }

        .week-summary-dream-emoji.is-score-zero {
            color: #ff8f8f;
        }

        .week-summary-dream-icons {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 1px;
            max-width: 28px;
            flex-wrap: wrap;
            position: relative;
            z-index: 3;
        }

        .week-summary-dream-icon-item {
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .week-summary-dream-icon {
            width: 12px;
            height: 12px;
            object-fit: contain;
            filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.92)) drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.95));
        }

        .week-summary-dream-icons[data-icon-count="1"] {
            max-width: 24px;
        }

        .week-summary-dream-icons[data-icon-count="1"] .week-summary-dream-icon {
            width: 24px;
            height: 24px;
        }

        .week-summary-dream-title {
            display: -webkit-box;
            overflow: hidden;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            text-align: center;
            color: #eef6ff;
            font-size: 0.53rem;
            line-height: 1.08;
            word-break: break-word;
        }

        .week-summary-dream-title.privacy-private {
            color: #ffffff;
        }

        .week-summary-dream-title.privacy-friends {
            color: rgba(231, 197, 104, 0.98);
            text-shadow: 0 0 7px rgba(231, 197, 104, 0.24);
        }

        .week-summary-dream-title.privacy-public {
            color: rgba(96, 214, 255, 1);
            text-shadow: 0 0 8px rgba(96, 214, 255, 0.32);
        }

        .week-summary-empty-day {
            min-height: 80px;
            padding: 10px 4px 8px;
            color: rgba(233, 242, 255, 0.7);
            text-align: center;
            font-size: 0.68rem;
            line-height: 1.18;
        }

        .week-summary-empty-bubble {
            width: 33px;
            height: 33px;
            margin: 0 auto 6px;
            border-radius: 999px;
            display: grid;
            place-items: center;
            border: 2px dashed rgba(255, 255, 255, 0.74);
            background: transparent;
            box-shadow: none;
        }

        .week-summary-empty-emoji {
            color: #ffffff;
            font-size: 0.94rem;
            line-height: 1;
        }

        .week-summary-empty-text {
            color: rgba(233, 242, 255, 0.82);
        }

        .week-summary-empty-day.is-forgotten .week-summary-empty-text {
            color: #ffffff;
            font-size: 0.53rem;
            line-height: 1.08;
        }

        .week-summary-empty-day.is-blank {
            min-height: 80px;
            padding: 10px 4px 8px;
        }

        .week-summary-empty-day.is-future .week-summary-empty-emoji,
        .week-summary-empty-day.is-today .week-summary-empty-emoji {
            color: #f8e7b4;
        }

        .week-summary-more {
            text-align: center;
            color: #8ec9ff;
            font-size: 0.68rem;
            font-weight: 600;
        }

        .week-summary-footer-line {
            margin-top: 12px;
            color: #8ec9ff;
            text-align: center;
            font-size: 1rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0;
            flex-wrap: nowrap;
        }

        .week-summary-footer-line strong {
            color: #ffffff;
        }

        .week-summary-footer-line strong.week-summary-footer-score {
            margin-left: 6px;
            color: #efc768;
            text-shadow: 0 0 8px rgba(239, 199, 104, 0.24);
        }

        .week-summary-footer-line > strong:not(.week-summary-footer-score) {
            margin-left: 6px;
        }

        .week-summary-footer-line strong.week-summary-footer-score.is-zero {
            color: #efc768;
        }

        .week-summary-footer-line strong.week-summary-footer-score.is-negative {
            color: #efc768;
        }

        .week-summary-footer-moon {
            display: inline-block;
            margin: 0 0 0 1px;
            line-height: 1;
            vertical-align: -3px;
        }

        .week-summary-lucid-note {
            display: block;
            width: 100%;
            margin-top: 2px;
            text-align: center;
            color: #cfe6ff;
            font-size: 0.92em;
            font-weight: 400;
        }

        @media (min-width: 560px) {
            .week-score-modal {
                width: min(700px, calc(100vw - 24px));
            }

            .week-summary-grid {
                grid-template-columns: repeat(7, minmax(0, 1fr));
            }

            .week-summary-col {
                min-height: 372px;
                padding: 8px 4px 9px;
            }

            .week-summary-day-label {
                font-size: 0.9rem;
            }

            .week-summary-day-score {
                font-size: 0.74rem;
            }

            .week-summary-dream-list {
                gap: 1px;
            }

            .week-summary-dream-item {
                min-height: 78px;
                gap: 2px;
            }

            .week-summary-dream-bubble {
                width: 36px;
                height: 36px;
            }

            .week-summary-dream-icon {
                width: 13px;
                height: 13px;
            }

            .week-summary-dream-icons[data-icon-count="1"] {
                max-width: 26px;
            }

            .week-summary-dream-icons[data-icon-count="1"] .week-summary-dream-icon {
                width: 26px;
                height: 26px;
            }

            .week-summary-dream-icons {
                max-width: 31px;
            }

            .week-summary-dream-title {
                font-size: 0.58rem;
                line-height: 1.1;
            }

            .week-summary-empty-day {
                font-size: 0.74rem;
            }

            .week-summary-empty-day.is-forgotten .week-summary-empty-text {
                font-size: 0.58rem;
                line-height: 1.1;
            }
        }

        @media (min-width: 760px) {
            .week-score-modal {
                width: min(980px, calc(100vw - 32px));
            }

            .week-summary-card {
                padding: 18px 16px 20px;
            }

            .week-summary-day-short {
                display: none;
            }

            .week-summary-day-full {
                display: inline;
            }

            .week-summary-col {
                min-height: 404px;
                padding: 10px 6px 10px;
            }

            .week-summary-day-label {
                margin-bottom: 6px;
                font-size: 1rem;
                letter-spacing: 0.03em;
            }

            .week-summary-day-score {
                font-size: 0.78rem;
            }

            .week-summary-dream-list {
                gap: 2px;
            }

            .week-summary-dream-item {
                min-height: 82px;
                padding: 2px 2px 2px;
            }

            .week-summary-dream-bubble {
                width: 42px;
                height: 42px;
            }

            .week-summary-dream-icon {
                width: 14px;
                height: 14px;
            }

            .week-summary-dream-icons[data-icon-count="1"] {
                max-width: 28px;
            }

            .week-summary-dream-icons[data-icon-count="1"] .week-summary-dream-icon {
                width: 28px;
                height: 28px;
            }

            .week-summary-dream-icons {
                max-width: 36px;
            }

            .week-summary-dream-title {
                font-size: 0.62rem;
                line-height: 1.1;
            }

            .week-summary-empty-day {
                font-size: 0.8rem;
            }

            .week-summary-empty-day.is-forgotten .week-summary-empty-text {
                font-size: 0.62rem;
                line-height: 1.1;
            }
        }

        .week-summary-card.is-capture-compact {
            width: 423px !important;
            max-width: 423px !important;
            padding: 16px 12px 18px !important;
        }

        .week-summary-card.is-capture-compact .week-summary-day-short {
            display: inline !important;
        }

        .week-summary-card.is-capture-compact .week-summary-day-full {
            display: none !important;
        }

        .week-summary-card.is-capture-compact .week-summary-grid-wrap {
            overflow: hidden !important;
        }

        .week-summary-card.is-capture-compact .week-summary-grid {
            grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
            min-width: 0 !important;
        }

        .week-summary-card.is-capture-compact .week-summary-col {
            min-height: 346px !important;
            padding: 8px 3px 8px !important;
        }

        .week-summary-card.is-capture-compact .week-summary-day-label {
            font-size: 0.82rem !important;
        }

        .week-summary-card.is-capture-compact .week-summary-day-score {
            font-size: 0.7rem !important;
        }

        .week-summary-card.is-capture-compact .week-summary-dream-list {
            gap: 0 !important;
        }

        .week-summary-card.is-capture-compact .week-summary-dream-item {
            min-height: 74px !important;
            padding: 1px 1px 1px !important;
            gap: 1px !important;
        }

        .week-summary-card.is-capture-compact .week-summary-dream-bubble {
            width: 33px !important;
            height: 33px !important;
        }

        .week-summary-card.is-capture-compact .week-summary-dream-icon {
            width: 12px !important;
            height: 12px !important;
        }

        .week-summary-card.is-capture-compact .week-summary-dream-icons[data-icon-count="1"] {
            max-width: 24px !important;
        }

        .week-summary-card.is-capture-compact .week-summary-dream-icons[data-icon-count="1"] .week-summary-dream-icon {
            width: 24px !important;
            height: 24px !important;
        }

        .week-summary-card.is-capture-compact .week-summary-dream-icons {
            max-width: 28px !important;
        }

        .week-summary-card.is-capture-compact .week-summary-dream-title {
            font-size: 0.53rem !important;
            line-height: 1.08 !important;
        }

        .week-summary-card.is-capture-compact .week-summary-empty-day.is-forgotten .week-summary-empty-text {
            font-size: 0.53rem !important;
            line-height: 1.08 !important;
        }

        .week-summary-footer-dot {
            display: inline-block;
            width: 13px;
            height: 13px;
            margin-left: 6px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.88);
            vertical-align: middle;
        }

        .week-summary-share-btn {
            display: block;
            width: min(100%, 520px);
            margin: 16px auto 0;
            min-height: 50px;
            border: 0;
            border-radius: 18px;
            background: linear-gradient(180deg, #79c4ff 0%, #286fcb 100%);
            color: #ffffff;
            font: inherit;
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
        }

        .week-summary-share-btn[disabled] {
            opacity: 0.75;
            cursor: wait;
        }

        @keyframes week-summary-wobble {
            0% { transform: translate(-50%, calc(-50% - 20px)) scale(0.9) rotate(-1.4deg); }
            38% { transform: translate(-50%, -50%) scale(1.01) rotate(0.9deg); }
            62% { transform: translate(-50%, -50%) scale(0.994) rotate(-0.45deg); }
            100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
        }

        .week-score-popover::before {
            content: "";
            display: none;
        }

        .week-score-popover-title {
            color: #f8efce;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .week-score-popover-body {
            display: grid;
            gap: 6px;
        }

        .week-score-line {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding-bottom: 5px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }

        .week-score-day {
            color: #cfe7ff;
        }

        .week-score-value {
            color: #ffffff;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .week-score-value-wrap {
            display: grid;
            justify-items: end;
            gap: 2px;
        }

        .week-score-ritual {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            color: #9ed2ff;
            font-size: 0.78rem;
            font-weight: 800;
            line-height: 1;
        }

        .week-score-ritual-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            border: 1px solid rgba(210, 236, 255, 0.9);
            background: #2f94ff;
            box-shadow: 0 0 7px rgba(47, 148, 255, 0.82);
            flex: 0 0 auto;
        }

        .week-score-value.is-negative {
            color: #ff6f6f;
        }

        .week-score-value-icon {
            width: 14px;
            height: 14px;
            object-fit: contain;
            flex: 0 0 auto;
        }

        .week-score-total {
            margin-top: 10px;
            color: #f7efcf;
        }

        .week-score-total strong.is-negative {
            color: #ff6f6f;
        }

        .week-score-note {
            margin-top: 8px;
            color: #c8def6;
            font-size: 0.87rem;
            line-height: 1.35;
        }

        .week-right-label {
            color: #8ec9ff;
            text-shadow: 0 0 8px rgba(106, 171, 255, 0.4);
        }

        .week-right-value {
            color: #ffffff;
            font-weight: 700;
        }

        .week-right-value.is-negative {
            color: #ff6f6f;
        }

        .week-moon.is-current-live {
            animation: week-current-dot 2.1s ease-in-out infinite;
        }

        @keyframes week-current-glow {
            0%, 100% {
                color: #8ec9ff;
                text-shadow: 0 0 8px rgba(106, 171, 255, 0.4);
            }
            50% {
                color: #f2cf6d;
                text-shadow: 0 0 10px rgba(242, 207, 109, 0.4);
            }
        }

        @keyframes week-current-dot {
            0%, 100% {
                transform: scale(1);
                box-shadow: 0 0 0 rgba(106, 171, 255, 0);
            }
            50% {
                transform: scale(1.08);
                box-shadow: 0 0 10px rgba(242, 207, 109, 0.34);
            }
        }

        @keyframes oni-crossfade-a {
            0%, 44% {
                opacity: 1;
                transform: translateY(0);
            }
            50%, 100% {
                opacity: 0;
                transform: translateY(-5px);
            }
        }

        @keyframes oni-crossfade-b {
            0%, 44% {
                opacity: 0;
                transform: translateY(5px);
            }
            50%, 94% {
                opacity: 1;
                transform: translateY(0);
            }
            100% {
                opacity: 0;
                transform: translateY(0);
            }
        }

        .week-moon {
            display: inline-block;
            margin-left: 2px;
            width: 18px;
            height: 18px;
            object-fit: contain;
            vertical-align: middle;
            filter: drop-shadow(0 0 7px rgba(142, 201, 255, 0.24));
        }

        .day-grid {
            margin-top: 7px;
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 3px;
        }

        .day-cell {
            text-align: center;
        }

        .day-hit {
            display: block;
            border-radius: 10px;
            padding: 2px 0;
        }

        .new-screen.is-readonly-view .score-seg,
        .new-screen.is-readonly-view .type-btn {
            pointer-events: none;
            cursor: default;
        }

        .week-band[data-week-summary-trigger]:hover .day-title,
        .week-band[data-week-summary-trigger]:focus-visible .day-title,
        .week-band[data-week-summary-trigger]:active .day-title {
            color: #efc768;
            text-shadow: 0 0 8px rgba(239, 199, 104, 0.7);
        }

        .week-band[data-week-summary-trigger]:hover .day-sphere,
        .week-band[data-week-summary-trigger]:focus-visible .day-sphere,
        .week-band[data-week-summary-trigger]:active .day-sphere {
            outline: 3px solid #e7c465;
            outline-offset: -1px;
            box-shadow: 0 0 0 2px rgba(231, 196, 101, 0.38), 0 0 14px rgba(231, 196, 101, 0.62);
        }

.day-sphere {
            --sphere-tint: #7bb8ff;
            width: clamp(40px, 9.2vw, 49px);
            height: clamp(40px, 9.2vw, 49px);
            margin: 0 auto 3px;
            border-radius: 50%;
            border: 1px solid transparent;
            box-shadow: 0 0 7px rgba(255, 255, 255, 0.8);
            position: relative;
            background: transparent;
            overflow: visible;
        }

        .day-sphere::before {
            display: none;
        }

        .day-sphere-dots {
            position: absolute;
            left: 50%;
            top: 3px;
            transform: translateX(-50%);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 3px;
            max-width: 84%;
            pointer-events: none;
            z-index: 3;
        }

        .day-sphere-count {
            position: absolute;
            top: -7px;
            right: -6px;
            z-index: 4;
            min-width: 1.2em;
            padding: 1px 5px;
            border-radius: 999px;
            background: rgba(0, 0, 0, 0.84);
            color: #ffffff;
            font-size: clamp(0.72rem, 2.6vw, 0.9rem);
            line-height: 1.35;
            font-weight: 800;
            text-shadow: none;
            box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.34);
        }

        .day-ritual-dot {
            position: absolute;
            top: -4px;
            left: -4px;
            z-index: 5;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            border: 1px solid rgba(210, 236, 255, 0.92);
            background: #2f94ff;
            box-shadow: 0 0 7px rgba(47, 148, 255, 0.82), 0 0 0 1px rgba(5, 19, 47, 0.78);
        }

        .day-sphere-moon {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
            height: 100%;
            object-fit: contain;
            filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.38));
            z-index: 1;
            pointer-events: none;
        }

        .day-sphere-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #050505;
            border: 1px solid rgba(255, 255, 255, 0.35);
            transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
        }

        .day-sphere-dot.is-active {
            background: #2e8cff;
            border-color: #9ac8ff;
            box-shadow: 0 0 8px rgba(46, 140, 255, 0.82);
            transform: translateY(-1px) scale(1.2);
        }

        .day-sphere-emoji {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            width: 92%;
            display: grid;
            align-content: center;
            justify-items: center;
            gap: 2px 3px;
            grid-auto-flow: row;
            text-align: center;
            line-height: 1;
            text-shadow: 0 0 8px rgba(0, 0, 0, 0.56);
            pointer-events: none;
            z-index: 3;
        }

        .day-sphere-emoji-item {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .day-sphere-emoji-fallback {
            display: inline-block;
            color: #ffffff;
            font-size: clamp(0.92rem, 3.8vw, 1.32rem);
            line-height: 1;
        }

        .day-sphere-emoji-fallback.is-forgotten {
            color: #ffffff;
            text-shadow: 0 0 8px rgba(255, 255, 255, 0.28);
        }

        .day-sphere-type-icon {
            width: 100%;
            max-width: clamp(13px, 3.8vw, 21px);
            aspect-ratio: 1 / 1;
            object-fit: contain;
            display: block;
            filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.92)) drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.95));
        }

        .day-sphere-emoji[data-icon-count="0"] {
            display: none;
        }

        .day-sphere-emoji[data-icon-count="emoji"] {
            display: grid;
            grid-template-columns: 1fr;
        }

        .day-sphere-emoji[data-icon-count="1"] {
            grid-template-columns: 1fr;
        }

        .day-sphere-emoji[data-icon-count="1"] .day-sphere-type-icon {
            max-width: clamp(18px, 5vw, 28px);
        }

        .day-sphere-emoji[data-icon-count="2"] {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .day-sphere-emoji[data-icon-count="3"] {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .day-sphere-emoji[data-icon-count="3"] .day-sphere-emoji-item:nth-child(3) {
            grid-column: 1 / span 2;
        }

        .day-sphere-emoji[data-icon-count="4"] {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .day-sphere-emoji[data-icon-count="5"],
        .day-sphere-emoji[data-icon-count="6"],
        .day-sphere-emoji[data-icon-count="7"],
        .day-sphere-emoji[data-icon-count="8"] {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

.day-cell.state-today .day-sphere {
            outline: 2px solid #f1c95b;
            outline-offset: -2px;
            box-shadow: 0 0 24px rgba(241, 201, 91, 0.88);
            animation: pulse-gold-border 1.2s ease-in-out infinite;
        }

        @keyframes pulse-gold-border {
            0%, 100% {
                outline-width: 2px;
                box-shadow: 0 0 10px rgba(241, 201, 91, 0.62);
            }
            50% {
                outline-width: 6px;
                box-shadow: 0 0 30px rgba(241, 201, 91, 1);
            }
        }

        .day-cell.state-future .day-sphere,
        .day-cell.state-past-empty .day-sphere {
            background: transparent !important;
            background-image: none !important;
            border: 2px dashed rgba(255, 255, 255, 0.74);
            outline: none;
            box-shadow: none;
        }

        .day-cell.state-pre-start-empty .day-sphere,
        .day-blank-slot {
            background: transparent !important;
            background-image: none !important;
            border: 1px dashed rgba(203, 210, 223, 0.72);
            border-radius: 50%;
            box-shadow: none;
        }

        .day-title {
            min-height: 2.4em;
            max-height: 2.4em;
            font-size: clamp(0.65rem, 2.4vw, 0.84rem);
            line-height: 1.08;
            white-space: normal;
            overflow: hidden;
            color: #f4f5f7;
            padding: 0 2px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            text-overflow: ellipsis;
        }

        .day-title-cycle {
            display: grid;
        }

        .day-title-cycle-item {
            grid-area: 1 / 1;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
            opacity: 0;
            transform: translateY(4px);
            animation: oni-crossfade-a 5.8s ease-in-out infinite;
        }

        .day-title-cycle-item.is-primary {
            opacity: 1;
            transform: translateY(0);
            font-weight: 700;
        }

        .day-title-cycle-item.is-alt {
            animation-name: oni-crossfade-b;
            font-weight: 400;
        }

        @container (min-width: 720px) {
            .all-screen .day-title {
                max-height: 3.24em;
                -webkit-line-clamp: 3;
            }

            .all-screen .day-title-cycle-item {
                -webkit-line-clamp: 3;
            }
        }

        .day-cell.state-past-empty .day-title {
            color: #ffffff;
            text-shadow: 0 0 8px rgba(255, 255, 255, 0.24);
        }

        .day-hit.is-blank {
            min-height: 76px;
        }

        .day-blank-slot {
            width: clamp(40px, 9.2vw, 49px);
            height: clamp(40px, 9.2vw, 49px);
            margin: 0 auto 3px;
        }

        .day-cell.state-pre-start-empty .day-title {
            color: rgba(233, 238, 245, 0.78);
            text-shadow: none;
        }

        .day-cell.state-today .day-sphere.is-ingest {
            animation: today-ingest 560ms cubic-bezier(0.22, 0.78, 0.26, 1.18);
            box-shadow:
                0 0 0 3px rgba(243, 213, 126, 0.86),
                0 0 42px rgba(247, 219, 130, 1),
                0 0 85px rgba(247, 219, 130, 0.9);
        }

        .day-cell.state-today .day-sphere.is-save-burst {
            animation: today-save-burst 640ms cubic-bezier(0.14, 0.9, 0.2, 1.2);
            border-color: #ffffff;
            box-shadow:
                0 0 0 5px rgba(255, 255, 255, 0.94),
                0 0 62px rgba(255, 255, 255, 1),
                0 0 120px rgba(255, 255, 255, 0.98);
        }

        .day-cell.state-today.is-hit .day-hit {
            animation: today-hit-shake 390ms ease;
        }

        .day-cell.state-today.is-save-burst .day-hit {
            animation: today-hit-shake-strong 640ms cubic-bezier(0.15, 0.92, 0.2, 1);
        }

        @keyframes today-ingest {
            0% { transform: scale(1) rotate(0deg); }
            18% { transform: scale(1.26) rotate(-11deg); }
            40% { transform: scale(1.14) rotate(9deg); }
            62% { transform: scale(1.1) rotate(-7deg); }
            82% { transform: scale(1.03) rotate(4deg); }
            100% { transform: scale(1) rotate(0deg); }
        }

        @keyframes today-hit-shake {
            0%, 100% { transform: translateX(0); }
            20% { transform: translateX(-2px); }
            40% { transform: translateX(2px); }
            60% { transform: translateX(-1px); }
            80% { transform: translateX(1px); }
        }

        @keyframes today-save-burst {
            0% { transform: scale(1) rotate(0deg); }
            15% { transform: scale(1.46) rotate(-17deg); }
            34% { transform: scale(1.22) rotate(14deg); }
            52% { transform: scale(1.3) rotate(-11deg); }
            74% { transform: scale(1.1) rotate(6deg); }
            100% { transform: scale(1) rotate(0deg); }
        }

        @keyframes today-hit-shake-strong {
            0%, 100% { transform: translateX(0); }
            14% { transform: translateX(-5px); }
            28% { transform: translateX(5px); }
            42% { transform: translateX(-4px); }
            56% { transform: translateX(4px); }
            70% { transform: translateX(-2px); }
            84% { transform: translateX(2px); }
        }

        .day-cell.state-today .day-title {
            color: #f0ca62;
            font-weight: 700;
        }

        .day-cell.state-future .day-title {
            color: rgba(255, 255, 255, 0.9);
        }

        .week-countdown {
            margin-top: 8px;
            text-align: center;
            font-size: clamp(0.86rem, 3.1vw, 1.02rem);
            color: #f4e7bf;
        }

        .week-countdown-hourglass {
            display: inline-block;
            margin-right: 0.2em;
            transform-origin: 50% 50%;
            animation: week-countdown-hourglass-spin 2.6s ease-in-out infinite;
        }

        @keyframes week-countdown-hourglass-spin {
            0%, 42% {
                transform: rotate(0deg);
            }
            50%, 92% {
                transform: rotate(180deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }

        .all-bottom-greeting {
            margin: 10px 0 2px;
            text-align: center;
            color: #ffffff;
            font-size: clamp(0.86rem, 3.1vw, 1.02rem);
            line-height: 1.22;
        }

        .all-bottom-pseudo {
            color: #efc768;
            font-weight: 700;
        }

        .all-bottom-link {
            color: inherit;
            text-decoration: underline;
            text-underline-offset: 2px;
        }

        .all-sunday-announcement {
            margin: 10px auto 4px;
            width: min(100%, 720px);
            display: grid;
            gap: 4px;
            justify-items: center;
            animation: allSundayBlink 1.5s ease-in-out infinite alternate;
        }

        .all-sunday-line,
        .all-sunday-tip {
            margin: 0;
        }

        .all-sunday-link {
            color: #ffffff;
            text-decoration: underline;
            text-underline-offset: 2px;
            font-weight: 700;
            cursor: pointer;
        }

        .all-sunday-gold {
            color: #efc768;
            font-weight: 700;
            text-shadow: 0 0 10px rgba(239, 199, 104, 0.38);
        }

        @keyframes allSundayBlink {
            0% {
                opacity: 0.82;
                text-shadow: 0 0 7px rgba(255, 255, 255, 0.32);
            }
            100% {
                opacity: 1;
                text-shadow: 0 0 15px rgba(104, 173, 255, 0.55), 0 0 6px rgba(255, 255, 255, 0.5);
            }
        }

        .week-countdown [data-countdown-label] {
            color: #f4cf66;
            text-shadow: 0 0 8px rgba(244, 207, 102, 0.52);
        }

        .days-progress-panel {
            margin: 8px auto 2px;
            width: min(100%, 700px);
            display: grid;
            gap: 6px;
        }

        .days-progress-label {
            font-size: clamp(0.86rem, 3.2vw, 1.04rem);
            color: #8ec9ff;
            text-shadow: 0 0 8px rgba(106, 171, 255, 0.45);
            text-align: center;
        }

        .days-progress-current {
            color: #8ec9ff;
            text-shadow: 0 0 8px rgba(106, 171, 255, 0.45);
            font-weight: 700;
        }

        .days-progress-target {
            color: #8ec9ff;
            text-shadow: 0 0 8px rgba(106, 171, 255, 0.45);
            font-weight: 700;
        }

        .all-stats-card {
            margin: 10px auto 8px;
            width: min(100%, 740px);
            padding: 10px 12px;
            border-radius: 14px;
            border: 1px solid rgba(126, 182, 255, 0.45);
            background: linear-gradient(180deg, rgba(8, 35, 78, 0.9) 0%, rgba(5, 23, 55, 0.92) 100%);
            box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
            display: grid;
            gap: 5px;
        }

        .all-stats-title {
            color: #f4d67c;
            text-align: center;
            font-size: 0.8rem;
            font-weight: 400;
            letter-spacing: 0.03em;
            line-height: 1.18;
            text-shadow: 0 0 8px rgba(244, 214, 124, 0.32);
            margin: 0 0 4px;
        }

        .all-lookup-inline {
            margin: 10px auto 8px;
            width: min(100%, 760px);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            flex-wrap: nowrap;
        }

        .all-lookup-label {
            color: #d9ecff;
            white-space: nowrap;
        }

        .all-lookup-input {
            width: clamp(240px, 42vw, 360px);
            border: 1px solid rgba(255, 255, 255, 0.34);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
            font: inherit;
            padding: 8px 12px;
            min-width: 0;
            min-height: 42px;
            text-transform: none;
            position: relative;
            z-index: 1;
            pointer-events: auto;
        }

        .all-lookup-btn {
            border: 1px solid rgba(255, 255, 255, 0.34);
            border-radius: 999px;
            background: linear-gradient(180deg, #f3e3ab 0%, #d39f38 100%);
            color: #1d2340;
            font: inherit;
            font-weight: 700;
            padding: 8px 14px;
            min-height: 42px;
            cursor: pointer;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .all-lookup-btn.is-icon-only {
            width: 42px;
            min-width: 42px;
            padding: 8px 0;
            font-size: 1.05rem;
            line-height: 1;
        }

        .all-tag-manage {
            margin: 10px auto 2px;
            width: min(100%, 760px);
            display: grid;
            gap: 10px;
            justify-items: center;
            padding: 12px 12px 14px;
            border-radius: 14px;
            border: 1px solid rgba(126, 182, 255, 0.45);
            background: linear-gradient(180deg, rgba(8, 35, 78, 0.9) 0%, rgba(5, 23, 55, 0.92) 100%);
            box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
        }

        .all-tag-divider {
            width: 100%;
            height: 1px;
            margin: 4px 0 2px;
            border-radius: 999px;
            background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, rgba(220, 236, 255, 0.88) 18%, rgba(255, 255, 255, 0.98) 50%, rgba(220, 236, 255, 0.88) 82%, rgba(255, 255, 255, 0.08) 100%);
            box-shadow: 0 0 10px rgba(220, 236, 255, 0.4);
        }

        .all-followers-line {
            width: 100%;
            text-align: center;
            font-size: 0.98rem;
            line-height: 1.35;
        }

        .all-followers-label {
            color: #f0ca62;
        }

        .all-followers-line strong {
            color: #ffffff;
        }

        .all-followers-view-btn {
            border: 0;
            padding: 0;
            margin: 0 0 0 2px;
            background: transparent;
            color: #ffffff;
            font: inherit;
            text-decoration: underline;
            text-underline-offset: 2px;
            cursor: pointer;
        }

        .all-following-card {
            width: 100%;
            display: grid;
            gap: 6px;
            padding: 2px 0 4px;
        }

        .all-following-head {
            width: 100%;
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
        }

        .all-following-title,
        .all-followers-title {
            color: #f0ca62;
            font-size: 0.96rem;
            text-align: left;
        }

        .all-following-title-score {
            text-align: right;
            flex: 0 0 auto;
        }

        .all-following-list {
            display: grid;
            gap: 4px;
            width: 100%;
        }

        .all-following-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
            padding: 3px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }

        .all-following-tag {
            color: #ffffff;
            font-weight: 800;
            text-decoration: underline;
            text-underline-offset: 2px;
            flex: 0 0 auto;
        }

        .all-following-metrics {
            display: flex;
            justify-content: flex-end;
            flex-wrap: wrap;
            gap: 8px 10px;
            align-items: center;
        }

        .all-following-metric {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            color: #dcecff;
            font-size: 0.88rem;
        }

        .all-following-score-pack {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            flex: 0 0 auto;
        }

        .all-following-metric-value {
            color: #ffffff;
            font-weight: 800;
            line-height: 1;
        }

        .all-following-metric-value.is-negative,
        .all-stats-value.is-negative {
            color: #ff6f6f;
            text-shadow: 0 0 8px rgba(255, 111, 111, 0.38);
        }

        .all-following-metric-dot {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 15px;
            height: 15px;
            font-size: 1rem;
            line-height: 1;
            flex: 0 0 15px;
        }

        .all-following-icons {
            display: inline-flex;
            align-items: center;
            flex-wrap: nowrap;
            gap: 4px;
            max-width: 132px;
            overflow: hidden;
        }

        .all-following-icon-item {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 1px;
            min-width: 0;
            height: 20px;
        }

        .all-following-icon-count {
            color: #ffffff;
            font-size: 0.72rem;
            font-weight: 800;
            line-height: 1;
        }

        .all-following-icon {
            width: 18px;
            height: 18px;
            object-fit: contain;
            filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.34));
        }

        .all-following-icon-overflow {
            color: #dbeeff;
            font-size: 0.98rem;
            font-weight: 800;
            line-height: 1;
        }

        .all-following-empty {
            color: #d7e8ff;
            text-align: center;
            font-size: 0.93rem;
        }

        @container (max-width: 719px) {
            .all-following-title,
            .all-following-title-score {
                font-size: 0.7rem;
                line-height: 1.08;
                letter-spacing: 0.01em;
            }

            .all-following-head {
                gap: 6px;
            }

            .all-following-icons {
                max-width: 108px;
                gap: 3px;
            }

            .all-following-icon {
                width: 16px;
                height: 16px;
            }

            .all-following-icon-count {
                font-size: 0.66rem;
            }
        }

        .all-followers-card {
            width: 100%;
            display: grid;
            gap: 4px;
        }

        .all-lookup-inline.is-inside-tag-manage {
            width: 100%;
            margin: 2px 0 0;
        }

        .all-onirotag-line-owned {
            margin: 0;
        }

        .all-tag-actions {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
        }

        .all-tag-action-btn {
            border: 1px solid rgba(255, 255, 255, 0.28);
            border-radius: 999px;
            background: linear-gradient(180deg, rgba(126, 191, 240, 0.98) 0%, rgba(34, 103, 187, 0.98) 100%);
            border-color: rgba(121, 186, 235, 0.58);
            color: #ffffff;
            font: inherit;
            font-weight: 700;
            letter-spacing: 0.02em;
            min-height: 0;
            padding: 8px 14px;
            cursor: pointer;
            box-shadow: none;
            flex: 0 1 auto;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1.15;
        }

        .all-tag-action-btn.secondary {
            background: rgba(255, 255, 255, 0.1);
            color: #eef5ff;
            border-color: rgba(255, 255, 255, 0.2);
        }

        .onirotag-modal-input {
            min-height: 46px;
        }

        .onirotag-modal-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 15, 0.72);
            opacity: 0;
            pointer-events: none;
            transition: opacity 180ms ease;
            z-index: 70;
        }

        .onirotag-modal-backdrop.is-visible,
        .followers-modal-backdrop.is-visible,
        .suggestion-modal-backdrop.is-visible {
            opacity: 1;
            pointer-events: auto;
        }

        .followers-modal-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 15, 0.76);
            opacity: 0;
            pointer-events: none;
            transition: opacity 180ms ease;
            z-index: 71;
        }

        .suggestion-modal-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 15, 0.78);
            opacity: 0;
            pointer-events: none;
            transition: opacity 180ms ease;
            z-index: 72;
        }

        .onirotag-modal,
        .followers-modal,
        .suggestion-modal {
            position: fixed;
            inset: 0;
            display: grid;
            place-items: center;
            padding: 18px;
            box-sizing: border-box;
            z-index: 71;
            opacity: 0;
            pointer-events: none;
            transition: opacity 180ms ease;
        }

        .followers-modal {
            z-index: 72;
        }

        .suggestion-modal {
            z-index: 73;
        }

        .onirotag-modal.is-visible,
        .followers-modal.is-visible,
        .suggestion-modal.is-visible {
            opacity: 1;
            pointer-events: auto;
        }

        .onirotag-modal-card,
        .followers-modal-card,
        .suggestion-modal-card {
            width: min(100%, 470px);
            border-radius: 22px;
            border: 1px solid rgba(245, 225, 166, 0.32);
            background: linear-gradient(180deg, rgba(7, 18, 38, 0.98) 0%, rgba(8, 13, 28, 0.98) 100%);
            box-shadow: 0 28px 54px rgba(0, 0, 0, 0.45);
            padding: 18px 16px 16px;
            display: grid;
            gap: 10px;
        }

        .suggestion-modal-card {
            width: min(100%, 520px);
        }

        .followers-modal-card {
            position: relative;
            width: min(100%, 430px);
            max-height: min(78vh, 620px);
            overflow: auto;
            padding-top: 20px;
        }

        .followers-modal-close {
            position: absolute;
            top: 10px;
            right: 10px;
            border: 0;
            width: 34px;
            height: 34px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08);
            color: #eef5ff;
            font-size: 1.4rem;
            line-height: 1;
            cursor: pointer;
        }

        .followers-modal-title {
            margin: 0;
            color: #f0ca62;
            text-align: center;
            font-size: 1rem;
            line-height: 1.15;
        }

        .followers-modal-list {
            display: grid;
            gap: 8px;
            margin-top: 2px;
        }

        .followers-modal-link {
            display: block;
            width: 100%;
            padding: 11px 12px;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: rgba(255, 255, 255, 0.06);
            color: #ffffff;
            font-weight: 700;
            text-align: center;
            text-decoration: underline;
            text-underline-offset: 2px;
        }

        .followers-modal-link.is-already-followed {
            color: #8ec9ff;
        }

        .followers-modal-check {
            display: inline-block;
            margin-left: 4px;
            color: #8ec9ff;
            font-weight: 800;
        }

        .onirotag-modal-kicker,
        .suggestion-modal-kicker {
            color: #f4d67c;
            font-size: 0.98rem;
            letter-spacing: 0.05em;
        }

        .onirotag-modal-title,
        .suggestion-modal-title {
            margin: 0;
            color: #fff7dd;
            font-size: clamp(1.22rem, 4vw, 1.52rem);
            line-height: 1.12;
        }

        .onirotag-modal-text,
        .onirotag-modal-cooldown,
        .suggestion-modal-text,
        .suggestion-modal-note,
        .suggestion-modal-cooldown {
            color: #d7e8ff;
            line-height: 1.4;
            font-size: 0.96rem;
        }

        .onirotag-modal-cooldown.is-ready,
        .suggestion-modal-cooldown.is-ready {
            color: #baffcc;
        }

        .suggestion-modal-note {
            color: #f0ca62;
        }

        .onirotag-modal-label,
        .suggestion-modal-label {
            color: #9fd0ff;
            font-size: 0.95rem;
        }

        .onirotag-modal-input,
        .suggestion-modal-select,
        .suggestion-modal-textarea {
            width: 100%;
            box-sizing: border-box;
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
            font: inherit;
            font-size: 1.02rem;
            padding: 12px 13px;
        }

        .suggestion-modal-textarea {
            min-height: 172px;
            resize: vertical;
            line-height: 1.45;
        }

        .suggestion-modal-file-input {
            position: absolute;
            left: -9999px;
            width: 1px;
            height: 1px;
            opacity: 0;
            pointer-events: none;
        }

        .suggestion-modal-file {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            padding: 12px 13px;
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(255, 255, 255, 0.06);
            cursor: pointer;
        }

        .suggestion-modal-file-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 38px;
            padding: 0 14px;
            border-radius: 999px;
            background: linear-gradient(180deg, #f2e2ae 0%, #d4a43f 100%);
            color: #15203a;
            font-weight: 800;
        }

        .suggestion-modal-file-btn.is-remove {
            background: rgba(255, 255, 255, 0.18);
            color: #eef5ff;
        }

        .suggestion-modal-file-name {
            flex: 1 1 180px;
            min-width: 0;
            color: #eef5ff;
            font-size: 0.95rem;
            line-height: 1.3;
            word-break: break-word;
        }

        .suggestion-modal-file-optional {
            color: #f0ca62;
            white-space: nowrap;
        }

        .suggestion-modal-file-status {
            color: #d7e8ff;
            font-size: 0.92rem;
            line-height: 1.35;
        }

        .suggestion-modal-file-status.is-ready {
            color: #baffcc;
        }

        .suggestion-modal-file-status.is-error {
            color: #ff9f9f;
        }

        .suggestion-modal-remove-image {
            border: 1px solid rgba(255, 255, 255, 0.22);
            border-radius: 999px;
            min-height: 38px;
            padding: 7px 14px;
            background: rgba(255, 255, 255, 0.06);
            color: #eef5ff;
            font: inherit;
            cursor: pointer;
        }

        .suggestion-modal-select {
            appearance: none;
            background-color: #000;
            background-image:
                linear-gradient(45deg, transparent 50%, #f0ca62 50%),
                linear-gradient(135deg, #f0ca62 50%, transparent 50%);
            background-position:
                calc(100% - 22px) calc(50% - 3px),
                calc(100% - 15px) calc(50% - 3px);
            background-size: 8px 8px, 8px 8px;
            background-repeat: no-repeat;
            color: #fff;
            padding-right: 42px;
        }

        .suggestion-modal-select option,
        .suggestion-modal-select optgroup {
            background: #000;
            color: #fff;
        }

        .onirotag-modal-input[disabled] {
            opacity: 0.56;
            cursor: not-allowed;
        }

        .suggestion-modal-honeypot {
            position: absolute;
            left: -9999px;
            width: 1px;
            height: 1px;
            opacity: 0;
            pointer-events: none;
        }

        .onirotag-modal-actions,
        .suggestion-modal-actions {
            display: flex;
            flex-wrap: nowrap;
            justify-content: flex-end;
            gap: 10px;
        }

        .onirotag-modal-btn,
        .suggestion-modal-btn {
            border: 1px solid rgba(255, 255, 255, 0.26);
            border-radius: 999px;
            min-height: 44px;
            padding: 9px 16px;
            background: linear-gradient(180deg, #f2e2ae 0%, #d4a43f 100%);
            color: #15203a;
            font: inherit;
            font-weight: 800;
            cursor: pointer;
        }

        .onirotag-modal-btn.secondary,
        .suggestion-modal-btn.secondary {
            background: rgba(255, 255, 255, 0.08);
            color: #eef5ff;
        }

        .onirotag-modal-btn[disabled],
        .suggestion-modal-btn[disabled] {
            opacity: 0.46;
            cursor: not-allowed;
        }

        @media (max-width: 640px) {
            .new-screen .score-seg-icon {
                width: clamp(34px, 9vw, 46px);
                height: clamp(34px, 9vw, 46px);
            }

            .all-lookup-inline {
                flex-wrap: wrap;
            }

            .all-lookup-label {
                width: 100%;
                text-align: center;
            }

            .all-lookup-inline.is-inside-tag-manage {
                display: grid;
                grid-template-columns: minmax(0, 1fr) auto;
                gap: 8px;
                align-items: center;
            }

            .all-lookup-inline.is-inside-tag-manage .all-lookup-label {
                grid-column: 1 / -1;
            }

            .all-lookup-inline.is-inside-tag-manage .all-lookup-input {
                width: 100%;
                min-width: 0;
            }

            .all-tag-actions {
                flex-wrap: wrap;
            }

            .onirotag-modal-btn,
            .suggestion-modal-btn {
                flex: 1 1 0;
                min-width: 0;
            }

            .suggestion-modal-file-btn,
            .suggestion-modal-remove-image {
                width: 100%;
            }
        }

        .all-stats-line {
            display: block;
            text-align: center;
            font-size: clamp(0.96rem, 3.35vw, 1.14rem);
            line-height: 1.22;
        }

        .all-stats-emoji {
            margin-right: 4px;
        }

        .all-stats-label {
            color: #8ec9ff;
            text-shadow: 0 0 8px rgba(106, 171, 255, 0.42);
        }

        .all-stats-value {
            color: #ffffff;
            font-weight: 800;
            text-shadow: 0 0 8px rgba(255, 255, 255, 0.42);
            margin-left: 4px;
        }

        .lucid-total-line {
            margin: 9px 0 3px;
            text-align: center;
            color: #f4e3b3;
            font-size: clamp(0.9rem, 3.3vw, 1.06rem);
        }

        .lucid-total-number {
            color: #f4cf66;
            text-shadow: 0 0 8px rgba(244, 207, 102, 0.52);
            font-weight: 700;
        }

        .days-progress-track {
            height: 20px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.62);
            background: linear-gradient(180deg, #101010 0%, #000000 100%);
            overflow: hidden;
        }

        .days-progress-fill {
            height: 100%;
            width: 0%;
            border-radius: inherit;
            border: 1px solid rgba(0, 0, 0, 0.75);
            box-sizing: border-box;
            background: linear-gradient(180deg, #b5dcff 0%, #4d8ff0 52%, #2357bf 100%);
            box-shadow: 0 0 12px rgba(106, 171, 255, 0.6);
            animation: progress-blue-pulse 1.8s ease-in-out infinite;
        }

        @keyframes progress-blue-pulse {
            0%, 100% { box-shadow: 0 0 8px rgba(106, 171, 255, 0.45); }
            50% { box-shadow: 0 0 18px rgba(106, 171, 255, 0.86); }
        }

        .logout-scroll-wrap {
            margin: 8px auto 6px;
            width: min(100%, var(--content-max));
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 8px;
        }

        .all-credit-line {
            margin: 4px auto 0;
            width: min(100%, var(--content-max));
            color: #4478b8;
            text-align: center;
            font-size: 0.86rem;
            line-height: 1.35;
        }

        .logout-scroll-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.4);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.12);
            color: #f7f2df;
            padding: 10px 15px;
            font-size: 0.95rem;
            font-family: inherit;
            font-weight: 400;
            line-height: 1.15;
            letter-spacing: 0.02em;
            width: auto;
            cursor: pointer;
            text-decoration: none;
            appearance: none;
            transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, border-color 160ms ease, background 160ms ease;
        }

        .shortcut-btn {
            background: linear-gradient(180deg, rgba(36, 92, 170, 0.46) 0%, rgba(18, 53, 107, 0.44) 100%);
        }

        .logout-scroll-btn[data-compact-toggle][aria-pressed="true"] {
            border-color: rgba(178, 221, 255, 0.82);
            background: linear-gradient(180deg, rgba(126, 191, 240, 1) 0%, rgba(34, 103, 187, 1) 100%);
            color: #ffffff;
            box-shadow: 0 0 14px rgba(88, 162, 233, 0.34);
        }

        .logout-x-emoji {
            display: inline-block;
            margin-right: 6px;
            color: #d9e8ff;
            text-shadow: 0 0 8px rgba(217, 232, 255, 0.7);
        }

        .bottom-fixed {
            position: fixed;
            left: 50%;
            transform: translateX(-50%);
            bottom: 0;
            width: min(100%, var(--shell-max));
            padding: 0 10px calc(env(safe-area-inset-bottom) + 14px);
            z-index: 40;
            pointer-events: none;
        }

        .bottom-fixed::before {
            content: "";
            position: absolute;
            left: 50%;
            bottom: 0;
            width: 100dvw;
            height: 112px;
            transform: translateX(-50%);
            background: linear-gradient(180deg, rgba(3, 14, 34, 0) 0%, rgba(4, 19, 49, 0.74) 42%, rgba(4, 23, 61, 0.98) 100%);
            z-index: 0;
        }

        .bottom-row {
            position: relative;
            z-index: 1;
            display: grid;
            grid-template-columns: minmax(0, 1fr) 64px;
            gap: 8px;
            pointer-events: auto;
        }

        .bottom-row.is-single {
            grid-template-columns: minmax(0, 1fr);
        }

        .bottom-row.is-home-actions {
            grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
            align-items: center;
        }

        .bottom-add,
        .bottom-ritual {
            appearance: none;
            -webkit-appearance: none;
            border-radius: 999px;
            border: 1px solid #d9b857;
            background: linear-gradient(180deg, #f4e4a8 0%, #d6a944 100%);
            color: #212640;
            min-height: 58px;
            display: grid;
            place-items: center;
            font-family: inherit;
            font-size: clamp(1.65rem, 6.5vw, 2.1rem);
            box-shadow: 0 8px 17px rgba(0, 0, 0, 0.3);
            pointer-events: auto;
            text-align: center;
            text-decoration: none;
            transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, border-color 160ms ease, background 160ms ease;
        }

        .bottom-add {
            font-size: clamp(1rem, 4vw, 1.58rem);
            font-weight: 600;
            padding: 0 10px;
        }

        .bottom-ritual {
            border-color: rgba(174, 220, 255, 0.72);
            background: linear-gradient(180deg, #9ed2ff 0%, #2b77d3 100%);
            color: #0f1e3f;
            display: inline-flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 6px;
            cursor: pointer;
            font-size: 0.78rem;
            font-weight: 700;
            line-height: 1.03;
        }

        .bottom-ritual-emoji {
            flex: 0 0 auto;
            font-size: 1.24rem;
            line-height: 1;
        }

        .bottom-ritual-label {
            min-width: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            text-align: center;
        }

        .bottom-add.has-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.52em;
        }

        .bottom-add .btn-ico-butterfly {
            width: 1.08em;
            height: 1.08em;
            flex: 0 0 auto;
        }

        .bottom-add.bottom-return {
            border-color: rgba(174, 220, 255, 0.72);
            background: linear-gradient(180deg, #9ed2ff 0%, #2b77d3 100%);
            color: #0f1e3f;
        }

        @media (hover: hover) and (pointer: fine) {
            .btn:not([disabled]):not(.is-disabled):hover,
            .close-btn:not([disabled]):hover,
            .save-btn:not([disabled]):not(.is-disabled):hover,
            .leave-confirm-btn:hover,
            .dream-nav-btn:not(.is-disabled):hover,
            .consult-bottom-btn:not(.is-disabled):hover,
            .logout-scroll-btn:hover,
            .bottom-ritual:hover,
            .bottom-add:hover {
                transform: translateY(-2px);
                filter: brightness(1.08) saturate(1.1);
                box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28), 0 0 16px rgba(255, 244, 199, 0.18);
            }

            .btn.gold:not([disabled]):not(.is-disabled):hover,
            .save-btn:not([disabled]):not(.is-disabled):hover,
            .dream-nav-btn.nav-save:not(.is-disabled):hover,
            .dream-nav-btn.nav-share:not(.is-disabled):hover,
            .bottom-ritual:hover,
            .bottom-add:hover {
                border-color: #f4df9b;
            }

            .bottom-add:hover,
            .bottom-ritual:hover,
            .ritual-action-btn:not([disabled]):hover,
            .ritual-link-btn:hover {
                background: linear-gradient(180deg, #f8edbf 0%, #e1b24f 100%);
            }

            .bottom-ritual:hover {
                border-color: rgba(198, 227, 255, 0.86);
                background: linear-gradient(180deg, #bce1ff 0%, #3a89e6 100%);
            }

            .ritual-main-action.is-running:not([disabled]):hover {
                border-color: rgba(198, 227, 255, 0.9);
                background: linear-gradient(180deg, #bce1ff 0%, #3a89e6 100%);
            }

            .close-btn:not([disabled]):hover,
            .dream-nav-btn.nav-x:not(.is-disabled):hover {
                border-color: #f4df9b;
                background: linear-gradient(180deg, #f8ecc4 0%, #e6c16d 54%, #d6a644 100%);
            }

            .btn.secondary:not([disabled]):not(.is-disabled):hover,
            .logout-scroll-btn:hover,
            .ritual-action-btn.secondary:not([disabled]):hover {
                border-color: rgba(198, 227, 255, 0.82);
                background: rgba(255, 255, 255, 0.18);
            }

            .logout-scroll-btn[data-compact-toggle][aria-pressed="true"]:hover {
                border-color: rgba(178, 221, 255, 0.9);
                background: linear-gradient(180deg, rgba(142, 203, 248, 1) 0%, rgba(42, 116, 202, 1) 100%);
            }

            .leave-confirm-btn.is-stay:hover {
                background:
                    linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(0, 0, 0, 0.26) 100%),
                    #4c535e;
            }

            .leave-confirm-btn.is-leave:hover {
                background:
                    linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(0, 0, 0, 0.26) 100%),
                    #e0b255;
            }

            .leave-confirm-btn.is-leave:active,
            .leave-confirm-btn.is-leave:focus-visible {
                background:
                    linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(0, 0, 0, 0.26) 100%),
                    #e0b255;
            }

            .bottom-add.bottom-return:hover {
                border-color: #d8eeff;
                background: linear-gradient(180deg, #bce1ff 0%, #3a89e6 100%);
            }
        }

        .save-toast {
            position: fixed;
            left: 50%;
            top: 72px;
            bottom: auto;
            transform: translateX(-50%) translateY(16px) scale(0.94);
            width: min(92vw, 520px);
            padding: 9px 12px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.38);
            background: rgba(6, 20, 41, 0.92);
            color: #f4e8c2;
            text-align: center;
            font-size: 0.94rem;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
            opacity: 0;
            pointer-events: none;
            transition: opacity 220ms ease, transform 220ms ease;
            z-index: 12050;
        }

        .action-toast {
            position: fixed;
            left: 50%;
            bottom: calc(env(safe-area-inset-bottom) + 88px);
            transform: translateX(-50%) translateY(16px) scale(0.96);
            width: min(92vw, 520px);
            max-width: calc(100vw - 24px);
            padding: 11px 14px;
            box-sizing: border-box;
            border-radius: 14px;
            border: 1px solid rgba(173, 222, 255, 0.34);
            background: rgba(4, 19, 43, 0.94);
            color: #f6ecc9;
            text-align: center;
            font-size: 0.94rem;
            line-height: 1.35;
            overflow-wrap: anywhere;
            box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
            opacity: 0;
            pointer-events: none;
            transition: opacity 200ms ease, transform 200ms ease;
            z-index: 12060;
        }

        .action-toast.is-anchored {
            bottom: auto;
        }

        .save-toast.is-visible {
            opacity: 1;
            transform: translateX(-50%) translateY(0) scale(1);
        }

        .action-toast.is-visible {
            opacity: 1;
            transform: translateX(-50%) translateY(0) scale(1);
        }

        .save-toast.is-leaving {
            opacity: 0;
            transform: translateX(-50%) translateY(-7px) scale(0.99);
            transition: opacity 130ms ease, transform 130ms ease;
        }

        .settings-screen {
            min-height: 100dvh;
            padding: 10px;
            display: grid;
            align-content: start;
            gap: 10px;
        }

        .settings-panel {
            margin-top: 12px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.26);
            background: rgba(255, 255, 255, 0.12);
            min-height: 220px;
            padding: 12px;
            color: #dfebfb;
        }

.muted {
            color: #d0ddf5;
            font-size: 0.88rem;
        }

        @media (min-width: 980px) {
            :root {
                --shell-max: 980px;
                --content-max: 920px;
            }

            .all-sticky-head,
            .all-list,
            .new-screen,
            .settings-screen {
                padding-left: 22px;
                padding-right: 22px;
            }

            .new-screen {
                --new-gap: 8px;
                gap: 8px;
                padding-bottom: 14px;
            }

            .all-screen {
                padding-bottom: 152px;
            }

            .all-list {
                padding-bottom: 34px;
            }
        }

@media (max-height: 700px) {
            .new-screen {
                --new-gap: 6px;
                gap: var(--new-gap);
                padding-top: 6px;
            }

            .title-gold {
                font-size: clamp(1.9rem, 7vw, 2.8rem);
            }

            .actions-row {
                margin-top: 2px;
            }

            .type-btn {
                min-height: 50px;
                font-size: 0.68rem;
            }
        }

@media (max-height: 540px) and (orientation: landscape) {
            .new-screen {
                padding: 5px 8px 10px;
                --new-gap: 5px;
                gap: var(--new-gap);
            }

            .label {
                font-size: var(--ui-subtitle-size);
            }

            .score-seg {
                height: clamp(34px, 8.7vh, 44px);
                font-size: 1rem;
            }

            .type-grid {
                gap: 3px;
            }

            .type-btn {
                min-height: 42px;
                font-size: 0.62rem;
            }

            .actions-row {
                grid-template-columns: 60px 1fr;
                gap: 2px;
            }

            .save-btn,
            .close-btn {
                min-height: 44px;
                border-radius: 999px;
            }

            .close-btn {
                min-width: 44px;
                width: 44px;
            }
        }

        @media (display-mode: standalone) {
            .app-shell {
                min-height: 100svh;
            }

            .new-screen {
                min-height: 100svh;
                height: 100svh;
                max-height: 100svh;
                --new-gap: 5px;
                gap: var(--new-gap);
                padding: 6px 8px 8px;
            }

            .new-screen .title-gold {
                margin-bottom: -12px;
            }

            .new-dream-form {
                gap: 6px;
            }

            .dream-title-input {
                padding: 10px 12px 8px;
                min-height: 52px;
            }

            .dream-privacy-btn {
                width: 60px;
                min-width: 60px;
                min-height: 52px;
                font-size: 1.9rem;
            }

            .dream-privacy-wrap {
                flex-basis: 60px;
                width: 60px;
            }

            .dream-body-input {
                min-height: clamp(148px, 22dvh, 230px);
                padding: 6px 10px 7px;
            }

            .type-grid {
                gap: 3px;
            }

            .dream-nav.is-readonly-nav {
                margin-bottom: 8px;
                grid-template-columns: max-content 56px minmax(0, 1fr) 56px;
            }

            .dream-nav.is-readonly-nav.is-edit-nav {
                grid-template-columns: max-content 56px minmax(0, 1fr) 56px;
            }

            .dream-nav-btn.nav-x,
            .dream-nav-btn.nav-save,
            .dream-nav-btn.nav-share {
                min-height: 48px;
            }

            .dream-nav-btn.nav-x,
            .dream-nav-btn.nav-save,
            .dream-nav-btn.nav-share {
                min-width: 48px;
                width: 48px;
            }

            .dream-nav-btn.nav-share {
                font-size: clamp(1.62rem, 6.5vw, 2.08rem);
            }

            .dream-nav-btn.nav-save .btn-ico-butterfly {
                width: 1.42rem;
                height: 1.42rem;
            }

            .dream-nav.is-readonly-nav .dream-nav-label {
                font-size: clamp(1.44rem, 5.2vw, 1.82rem);
            }
        }

        .dream-consult-visibility .dream-consult-privacy-btn.dream-consult-privacy-trigger {
            width: auto !important;
            min-width: 24px !important;
            height: 30px !important;
            min-height: 30px !important;
            padding: 0 5px !important;
            font-size: 1.06rem !important;
        }

