:root {
    color-scheme: dark;
    --night: #060815;
    --deep: #0b1024;
    --navy: #111a35;
    --violet: #4e436d;
    --gold: #dccb8b;
    --green: #a9e8bd;
    --text: #f3f0e8;
    --muted: rgba(243, 240, 232, 0.68);
    --line: rgba(255, 255, 255, 0.14);
    --panel: rgba(15, 21, 43, 0.72);
    --panel-strong: rgba(17, 24, 50, 0.9);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Pretendard", "Inter", "Noto Sans KR", system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 15%, rgba(95, 83, 130, 0.28), transparent 34rem),
        linear-gradient(180deg, #050611 0%, #0b1024 48%, #15122a 100%);
    overflow-x: hidden;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 4px;
}

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

.star-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background: radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.07), transparent 20rem);
}

.star-field,
.dust-field,
.aurora,
.cursor-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: var(--size);
    height: var(--size);
    border-radius: 999px;
    background: rgba(255, 249, 218, var(--alpha));
    box-shadow: 0 0 calc(var(--size) * 6) rgba(255, 246, 199, 0.55);
    animation: twinkle var(--duration) ease-in-out infinite alternate;
}

.dust {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: rgba(169, 232, 189, 0.18);
    animation: floatDust var(--duration) linear infinite;
}

.aurora-one {
    background: radial-gradient(ellipse at 20% 25%, rgba(169, 232, 189, 0.14), transparent 36%),
        radial-gradient(ellipse at 75% 10%, rgba(220, 203, 139, 0.1), transparent 28%);
    filter: blur(18px);
    animation: auroraMove 22s ease-in-out infinite alternate;
}

.aurora-two {
    background: linear-gradient(110deg, transparent 20%, rgba(122, 100, 164, 0.18), transparent 68%);
    filter: blur(26px);
    transform: translateY(10vh);
    animation: auroraMove 28s ease-in-out infinite alternate-reverse;
}

.cursor-glow {
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(169, 232, 189, 0.15), transparent 17rem);
    transition: background 160ms ease;
}

.philosophy-lock {
    position: fixed;
    inset: 0;
    z-index: 20;
    background:
        radial-gradient(circle at 50% 45%, rgba(220, 203, 139, 0.08), transparent 18rem),
        rgba(4, 6, 15, 0.48);
    backdrop-filter: blur(10px);
}

.philosophy-lock.is-unlocked {
    display: none;
}

.constellation-lock {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 560px;
    overflow: hidden;
    touch-action: none;
    cursor: crosshair;
}

.constellation-lock::before {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(62vw, 640px);
    height: min(62vw, 640px);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(169, 232, 189, 0.07), transparent 68%);
    transform: translate(-50%, -50%);
    filter: blur(6px);
    opacity: 0.8;
    pointer-events: none;
}

.constellation-square {
    position: absolute;
    left: 50%;
    top: 50%;
    width: clamp(154px, 25vw, 250px);
    height: clamp(154px, 25vw, 250px);
    transform: translate(-50%, -50%);
    opacity: 0.72;
    transition: opacity 260ms ease, filter 260ms ease, transform 260ms ease;
}

.constellation-lock.is-complete .constellation-square {
    opacity: 1;
    filter: drop-shadow(0 0 26px rgba(169, 232, 189, 0.34));
    transform: translate(-50%, -50%) scale(1.04);
}

.square-line {
    position: absolute;
    display: block;
    background: linear-gradient(90deg, transparent, rgba(220, 203, 139, 0.34), transparent);
    transform-origin: center;
}

.square-line-top,
.square-line-bottom {
    left: 12px;
    right: 12px;
    height: 1px;
}

.square-line-top {
    top: 12px;
}

.square-line-bottom {
    bottom: 12px;
}

.square-line-left,
.square-line-right {
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(220, 203, 139, 0.34), transparent);
}

.square-line-left {
    left: 12px;
}

.square-line-right {
    right: 12px;
}

.star-slot {
    position: absolute;
    width: 23px;
    height: 23px;
    border: 1px solid rgba(220, 203, 139, 0.38);
    border-radius: 999px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(220, 203, 139, 0.14), transparent 62%);
    box-shadow: inset 0 0 14px rgba(220, 203, 139, 0.16), 0 0 18px rgba(220, 203, 139, 0.08);
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.star-slot.is-filled {
    border-color: rgba(169, 232, 189, 0.82);
    background: radial-gradient(circle, rgba(169, 232, 189, 0.3), transparent 64%);
    box-shadow: 0 0 28px rgba(169, 232, 189, 0.28);
}

.star-slot[data-slot="0"] {
    left: 12px;
    top: 12px;
}

.star-slot[data-slot="1"] {
    right: -11px;
    top: 12px;
}

.star-slot[data-slot="2"] {
    right: -11px;
    bottom: -11px;
}

.star-slot[data-slot="3"] {
    left: 12px;
    bottom: -11px;
}

.puzzle-star {
    position: absolute;
    left: var(--x);
    top: var(--y);
    z-index: 2;
    width: clamp(30px, 5vw, 42px);
    height: clamp(30px, 5vw, 42px);
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: transparent;
    cursor: grab;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 18px rgba(220, 203, 139, 0.55));
    touch-action: none;
    transition: filter 160ms ease, transform 160ms ease;
}

.puzzle-star::before,
.puzzle-star::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
}

.puzzle-star::before {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #fff4be;
    box-shadow: 0 0 18px rgba(255, 244, 190, 0.95), 0 0 38px rgba(220, 203, 139, 0.35);
}

.puzzle-star::after {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, transparent 47%, rgba(255, 244, 190, 0.92) 50%, transparent 53%),
        linear-gradient(0deg, transparent 47%, rgba(255, 244, 190, 0.78) 50%, transparent 53%);
    opacity: 0.8;
}

.puzzle-star:hover,
.puzzle-star:focus-visible {
    filter: drop-shadow(0 0 26px rgba(169, 232, 189, 0.76));
    transform: translate(-50%, -50%) scale(1.08);
}

.puzzle-star.is-dragging {
    cursor: grabbing;
    filter: drop-shadow(0 0 34px rgba(169, 232, 189, 0.88));
    transform: translate(-50%, -50%) scale(1.18);
    transition: none;
}

.puzzle-star.is-snapped {
    filter: drop-shadow(0 0 26px rgba(169, 232, 189, 0.72));
}

.constellation-lock.is-complete .puzzle-star {
    animation: solvedStarPulse 620ms ease both;
}

.lock-back-link {
    position: absolute;
    left: 22px;
    bottom: 22px;
    z-index: 3;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 999px;
    color: rgba(243, 240, 232, 0.46);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.95rem;
    text-decoration: none;
    backdrop-filter: blur(12px);
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.lock-back-link:hover,
.lock-back-link:focus-visible {
    color: var(--text);
    border-color: rgba(169, 232, 189, 0.3);
    background: rgba(169, 232, 189, 0.07);
    transform: translateY(-2px);
}

.section-kicker {
    margin: 0 0 14px;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.chat-form textarea,
.reflection-form textarea {
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
}

.hero-actions a,
.section-heading button,
.chat-form button,
.reflection-actions button,
.loneliness-copy button {
    border: 1px solid rgba(169, 232, 189, 0.35);
    border-radius: 999px;
    color: #07100c;
    background: linear-gradient(135deg, var(--green), #d8edb0);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.hero-actions a:hover,
.section-heading button:hover,
.chat-form button:hover,
.reflection-actions button:hover,
.loneliness-copy button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(169, 232, 189, 0.18);
}

.philosophy-page {
    min-height: 100vh;
}

.philosophy-locked .philosophy-page {
    display: none;
}

.philosophy-header {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 10;
    width: min(1120px, calc(100% - 28px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(7, 10, 24, 0.62);
    backdrop-filter: blur(18px);
}

.philosophy-brand {
    display: grid;
    gap: 1px;
    padding-left: 8px;
    text-decoration: none;
}

.philosophy-brand span {
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.philosophy-brand small {
    color: var(--muted);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
}

.philosophy-header nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.philosophy-header a,
.philosophy-header button {
    border: 0;
    border-radius: 999px;
    padding: 9px 12px;
    color: rgba(243, 240, 232, 0.72);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
}

.philosophy-header a:hover,
.philosophy-header button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.philosophy-hero {
    min-height: 100svh;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 22px;
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 132px 0 80px;
    text-align: center;
}

.philosophy-hero h1 {
    max-width: 980px;
    margin: 0;
    font-size: clamp(3rem, 10vw, 8.8rem);
    font-weight: 900;
    letter-spacing: -0.1em;
    line-height: 0.92;
    text-shadow: 0 0 46px rgba(220, 203, 139, 0.18);
}

.hero-subtitle {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.22rem);
    line-height: 1.8;
}

.hero-manifesto {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: min(760px, 100%);
    margin-top: 10px;
}

.hero-manifesto p {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: rgba(243, 240, 232, 0.82);
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(12px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.hero-actions a {
    padding: 15px 20px;
    font-weight: 800;
    text-decoration: none;
}

.hero-actions .secondary-cta {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--line);
}

.hero-constellation {
    position: absolute;
    inset: 16% 12% auto;
    height: 260px;
    opacity: 0.62;
    pointer-events: none;
}

.hero-constellation span {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--gold);
    box-shadow: 0 0 30px rgba(220, 203, 139, 0.8);
}

.hero-constellation span:nth-child(1) { left: 15%; top: 35%; }
.hero-constellation span:nth-child(2) { left: 38%; top: 8%; }
.hero-constellation span:nth-child(3) { left: 61%; top: 42%; }
.hero-constellation span:nth-child(4) { left: 84%; top: 19%; }

.philosophy-section {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto 120px;
    padding: clamp(24px, 5vw, 44px);
    border: 1px solid var(--line);
    border-radius: clamp(28px, 5vw, 48px);
    background: linear-gradient(145deg, rgba(14, 20, 43, 0.78), rgba(12, 13, 31, 0.58));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.section-heading,
.mentor-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
}

.section-heading h2,
.mentor-copy h2,
.loneliness-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.4rem);
    letter-spacing: -0.08em;
    line-height: 0.98;
}

.section-heading button {
    padding: 13px 18px;
    font-weight: 850;
}

.daily-code-card {
    margin: 28px 0 18px;
    padding: 22px;
    border: 1px solid rgba(220, 203, 139, 0.28);
    border-radius: 26px;
    background: radial-gradient(circle at 18% 30%, rgba(220, 203, 139, 0.18), transparent 18rem),
        rgba(255, 255, 255, 0.055);
}

.daily-code-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.daily-code-card strong {
    font-size: clamp(1.2rem, 3vw, 2rem);
    letter-spacing: -0.04em;
}

.code-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.code-card {
    position: relative;
    min-height: 168px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.052);
    overflow: hidden;
    transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.code-card::before {
    content: "";
    position: absolute;
    inset: auto -20% -40% 15%;
    height: 120px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(220, 203, 139, 0.26), transparent 68%);
    opacity: 0;
    transition: opacity 220ms ease, transform 220ms ease;
}

.code-card:hover {
    transform: translateY(-8px);
    border-color: rgba(220, 203, 139, 0.36);
    background: rgba(255, 255, 255, 0.075);
}

.code-card:hover::before {
    opacity: 1;
    transform: translateY(-12px);
}

.code-card span {
    display: block;
    margin-bottom: 34px;
    color: var(--green);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.code-card p {
    position: relative;
    margin: 0;
    font-size: 1.04rem;
    font-weight: 750;
    line-height: 1.52;
    letter-spacing: -0.03em;
}

.mentor-section {
    align-items: stretch;
}

.mentor-copy {
    align-self: center;
}

.mentor-copy p:not(.section-kicker),
.loneliness-copy p {
    color: var(--muted);
    line-height: 1.8;
}

.mentor-panel {
    position: relative;
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.055);
}

.breathing-circle {
    width: 56px;
    height: 56px;
    margin: 2px auto 0;
    border-radius: 999px;
    border: 1px solid rgba(169, 232, 189, 0.52);
    background: radial-gradient(circle, rgba(169, 232, 189, 0.55), rgba(169, 232, 189, 0.08) 45%, transparent 70%);
    animation: breathe 4.8s ease-in-out infinite;
}

.mode-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.mode-tabs button {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: rgba(243, 240, 232, 0.72);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.mode-tabs button.is-active {
    color: #08100d;
    background: var(--green);
    border-color: transparent;
}

.chat-window {
    display: grid;
    align-content: start;
    gap: 12px;
    height: 360px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow-y: auto;
    background: rgba(4, 6, 15, 0.42);
}

.chat-message {
    width: min(86%, 520px);
    padding: 13px 15px;
    border-radius: 20px;
    line-height: 1.7;
}

.chat-message span {
    display: block;
    margin-bottom: 5px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.chat-message p {
    margin: 0;
}

.chat-message.mentor {
    border: 1px solid rgba(220, 203, 139, 0.2);
    background: rgba(220, 203, 139, 0.09);
}

.chat-message.user {
    justify-self: end;
    color: #07100c;
    background: rgba(169, 232, 189, 0.86);
}

.chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.chat-form label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.chat-form textarea {
    resize: vertical;
    min-height: 96px;
    padding: 15px;
    line-height: 1.6;
}

.chat-form button {
    height: 96px;
    padding: 0 22px;
    font-weight: 900;
}

.mentor-safety-note {
    margin: 0;
    color: rgba(243, 240, 232, 0.54);
    font-size: 0.84rem;
    line-height: 1.7;
}

.reflection-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.reflection-form label {
    display: grid;
    gap: 10px;
}

.reflection-form span {
    color: rgba(243, 240, 232, 0.82);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.reflection-form textarea {
    min-height: 150px;
    resize: vertical;
    padding: 16px;
    line-height: 1.7;
}

.reflection-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.reflection-actions button {
    padding: 13px 18px;
    font-weight: 850;
}

.reflection-actions button:last-child {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.07);
}

#reflection-status {
    grid-column: 1 / -1;
    min-height: 1.4em;
    margin: 0;
    color: var(--green);
}

.reflection-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.reflection-entry {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.046);
}

.reflection-entry time {
    display: block;
    margin-bottom: 12px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.reflection-entry dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.reflection-entry dt {
    color: rgba(243, 240, 232, 0.56);
    font-size: 0.8rem;
}

.reflection-entry dd {
    margin: 0;
    line-height: 1.75;
}

.loneliness-section {
    display: grid;
    grid-template-columns: 0.9fr 1.2fr;
    gap: 24px;
    align-items: center;
}

.loneliness-copy button {
    margin-top: 12px;
    padding: 14px 20px;
    font-weight: 900;
}

.protocol-cards {
    display: grid;
    gap: 12px;
}

.protocol-cards article {
    padding: 20px;
    border: 1px solid rgba(169, 232, 189, 0.18);
    border-radius: 26px;
    background: rgba(169, 232, 189, 0.06);
    animation: protocolIn 480ms ease both;
}

.protocol-cards article:nth-child(2) {
    animation-delay: 110ms;
}

.protocol-cards article:nth-child(3) {
    animation-delay: 220ms;
}

.protocol-cards span {
    display: block;
    margin-bottom: 10px;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 900;
}

.protocol-cards p {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.75;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 700ms ease, transform 700ms ease;
}

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

@keyframes twinkle {
    from {
        transform: translate3d(0, 0, 0) scale(0.78);
        opacity: 0.46;
    }
    to {
        transform: translate3d(10px, -14px, 0) scale(1.18);
        opacity: 1;
    }
}

@keyframes floatDust {
    from {
        transform: translateY(8vh);
        opacity: 0;
    }
    15%,
    80% {
        opacity: 1;
    }
    to {
        transform: translateY(-108vh);
        opacity: 0;
    }
}

@keyframes auroraMove {
    from {
        transform: translate3d(-3vw, -2vh, 0) scale(1);
    }
    to {
        transform: translate3d(5vw, 4vh, 0) scale(1.08);
    }
}

@keyframes breathe {
    0%,
    100% {
        transform: scale(0.88);
        opacity: 0.58;
    }
    50% {
        transform: scale(1.12);
        opacity: 1;
    }
}

@keyframes protocolIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes solvedStarPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    45% {
        transform: translate(-50%, -50%) scale(1.42);
        filter: drop-shadow(0 0 46px rgba(169, 232, 189, 0.95));
    }
    100% {
        transform: translate(-50%, -50%) scale(1.08);
    }
}

@media (max-width: 920px) {
    .philosophy-header {
        align-items: flex-start;
        border-radius: 24px;
    }

    .philosophy-header nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .hero-manifesto,
    .section-heading,
    .mentor-section,
    .loneliness-section,
    .reflection-form {
        grid-template-columns: 1fr;
    }

    .code-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mode-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .philosophy-header {
        position: absolute;
        top: 12px;
        width: calc(100% - 24px);
    }

    .philosophy-brand small {
        display: none;
    }

    .philosophy-header a,
    .philosophy-header button {
        padding: 8px 9px;
        font-size: 0.82rem;
    }

    .philosophy-hero {
        width: min(100% - 24px, 1040px);
        padding-top: 150px;
    }

    .hero-manifesto {
        gap: 8px;
    }

    .hero-manifesto p {
        border-radius: 22px;
        text-align: left;
    }

    .philosophy-section {
        width: calc(100% - 20px);
        margin-bottom: 72px;
        padding: 22px;
        border-radius: 30px;
    }

    .code-grid,
    .mode-tabs,
    .chat-form {
        grid-template-columns: 1fr;
    }

    .chat-form button {
        height: auto;
        padding: 14px 18px;
    }

    .chat-window {
        height: 340px;
    }

    .chat-message {
        width: 100%;
    }

    .constellation-lock {
        min-height: 100svh;
    }

    .lock-back-link {
        left: 14px;
        bottom: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
