:root {
    --text: #eef3f7;
    --muted: rgba(238, 243, 247, 0.68);
    --faint: rgba(238, 243, 247, 0.36);
    --line: rgba(238, 243, 247, 0.2);
    --glass: rgba(229, 239, 248, 0.1);
    --glass-strong: rgba(229, 239, 248, 0.22);
    --shadow: rgba(210, 229, 247, 0.34);
}

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

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    touch-action: pan-y manipulation;
    background:
        radial-gradient(ellipse at 18% 34%, rgba(78, 130, 153, 0.28), transparent 34%),
        radial-gradient(ellipse at 73% 16%, rgba(88, 82, 142, 0.22), transparent 30%),
        radial-gradient(ellipse at 50% 73%, rgba(24, 48, 86, 0.3), transparent 42%),
        radial-gradient(circle at 52% 45%, #0d1726 0%, #050a14 48%, #01040a 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    opacity: 0.82;
    background-image:
        radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.62) 0 1px, transparent 1.8px),
        radial-gradient(circle at 34% 58%, rgba(210, 230, 255, 0.44) 0 1px, transparent 1.7px),
        radial-gradient(circle at 68% 32%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.6px),
        radial-gradient(circle at 84% 72%, rgba(202, 222, 255, 0.42) 0 1px, transparent 1.8px),
        radial-gradient(ellipse at 27% 44%, rgba(118, 174, 196, 0.16), transparent 40%),
        radial-gradient(ellipse at 70% 42%, rgba(114, 104, 170, 0.13), transparent 38%),
        radial-gradient(ellipse at 48% 58%, rgba(50, 92, 132, 0.1), transparent 45%);
    background-size: 430px 305px, 365px 265px, 530px 365px, 475px 335px, 100% 100%, 100% 100%, 100% 100%;
    mix-blend-mode: screen;
}

body::after {
    background:
        radial-gradient(ellipse at 50% 42%, transparent 0%, transparent 46%, rgba(0, 0, 0, 0.6) 100%),
        radial-gradient(circle at 18% 82%, rgba(65, 120, 150, 0.13), transparent 28%),
        radial-gradient(circle at 92% 12%, rgba(150, 148, 220, 0.13), transparent 23%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.38), transparent 20%, transparent 80%, rgba(0, 0, 0, 0.32));
}

button,
textarea,
input {
    font: inherit;
}

button {
    border: 0;
}

svg {
    display: block;
}

.sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.star,
.glint {
    position: absolute;
    display: block;
}

.star {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 12px rgba(230, 242, 255, 0.85);
}

.star-1 { left: 8%; top: 41%; }
.star-2 { left: 18%; top: 19%; }
.star-3 { left: 30%; top: 74%; }
.star-4 { left: 42%; top: 34%; }
.star-5 { right: 22%; top: 21%; }
.star-6 { right: 10%; top: 12%; }
.star-7 { right: 8%; bottom: 30%; }
.star-8 { left: 67%; bottom: 20%; }

.glint {
    width: 28px;
    height: 28px;
    opacity: 0.88;
    filter: drop-shadow(0 0 10px rgba(235, 245, 255, 0.9));
}

.glint::before,
.glint::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: #f8fbff;
}

.glint::before {
    width: 100%;
    height: 3px;
}

.glint::after {
    width: 3px;
    height: 100%;
}

.glint-1 {
    left: 50%;
    top: 18%;
    transform: rotate(45deg) scale(0.52);
}

.glint-2 {
    right: 7%;
    bottom: 17%;
    transform: rotate(45deg) scale(0.86);
}

.glint-3 {
    right: 3.8%;
    bottom: 7%;
    transform: rotate(45deg) scale(1.24);
}

.topbar,
.hero,
.corner-actions,
.toast {
    position: relative;
    z-index: 2;
}

.topbar {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 34px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: rgba(246, 250, 255, 0.92);
    text-decoration: none;
    font-size: 42px;
    text-shadow: 0 0 22px rgba(215, 233, 249, 0.55);
}

.brand-mark {
    width: 68px;
    height: 68px;
    color: rgba(235, 246, 255, 0.97);
    filter: drop-shadow(0 0 20px rgba(224, 239, 255, 0.72));
}

.brand-mark svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.brand-mark path + path {
    fill: none;
    stroke: rgba(4, 12, 18, 0.76);
    stroke-width: 1.2;
    stroke-linecap: round;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pill-button,
.icon-button,
.control-button,
.round-button,
.send-button,
.text-button,
.close-button {
    cursor: pointer;
    color: rgba(247, 250, 255, 0.9);
    background: var(--glass);
    border: 1px solid var(--line);
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.08),
        0 0 22px rgba(206, 225, 247, 0.14);
    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, opacity 180ms ease;
}

.pill-button,
.icon-button,
.control-button,
.round-button,
.send-button,
.text-button,
.close-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.pill-button:hover,
.icon-button:hover,
.control-button:hover,
.round-button:hover,
.send-button:hover,
.text-button:hover,
.close-button:hover {
    transform: translateY(-1px);
    border-color: rgba(244, 249, 255, 0.44);
    box-shadow:
        inset 0 0 15px rgba(255, 255, 255, 0.13),
        0 0 30px rgba(210, 230, 255, 0.24);
}

.pill-button {
    min-height: 62px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 35px;
    border-radius: 999px;
    font-size: 20px;
    overflow: clip;
    background:
        linear-gradient(180deg, rgba(237, 244, 252, 0.16), rgba(255, 255, 255, 0.065)),
        rgba(20, 27, 40, 0.58);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: translateZ(0);
}

.pill-button:hover {
    transform: translateZ(0);
    border-color: rgba(244, 249, 255, 0.36);
    background:
        linear-gradient(180deg, rgba(247, 251, 255, 0.18), rgba(255, 255, 255, 0.075)),
        rgba(26, 33, 48, 0.62);
    box-shadow:
        inset 0 0 14px rgba(255, 255, 255, 0.1),
        0 0 24px rgba(210, 230, 255, 0.2);
}

.pill-button svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-button,
.round-button,
.send-button,
.close-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
}

.icon-button {
    width: 48px;
    height: 48px;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.icon-button svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
}

.hero {
    min-height: calc(100vh - 184px);
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    align-items: center;
    justify-items: center;
    padding: 20px 24px 155px;
    text-align: center;
}

.thought {
    grid-row: 2;
    width: min(980px, 100%);
    min-height: 168px;
    margin: 0;
    display: block;
    align-content: center;
    color: rgba(224, 240, 249, 0.9);
    font-size: clamp(34px, 4.3vw, 64px);
    line-height: 1.18;
    text-wrap: balance;
    overflow-wrap: break-word;
    text-shadow:
        0 1px 0 rgba(0, 0, 0, 0.62),
        0 0 34px rgba(178, 219, 248, 0.2);
}

.thought.swap {
    animation: thoughtIn 520ms ease both;
}

.thought.slide-next {
    animation: thoughtSlideNext 360ms ease both;
}

.thought.slide-prev {
    animation: thoughtSlidePrev 360ms ease both;
}

.thought.liked {
    animation: thoughtLiked 420ms ease both;
}

.control-button.like-pop svg {
    animation: heartPop 300ms ease both;
}

.controls {
    position: fixed;
    left: 50%;
    bottom: 54px;
    z-index: 3;
    width: min(520px, calc(100vw - 36px));
    display: grid;
    grid-template-columns: minmax(46px, 1fr) auto minmax(46px, 1fr);
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 0;
    transform: translateX(-50%);
    isolation: isolate;
}

.controls .control-button:first-child {
    justify-self: end;
}

.controls .control-button.primary {
    justify-self: center;
    min-width: 178px;
}

.controls .control-button:last-child {
    justify-self: start;
}

.control-button {
    position: relative;
    overflow: hidden;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 9px 22px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 18px;
}

.control-button.icon-only {
    width: 100%;
    padding: 0;
}

.control-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.control-button.primary {
    color: rgba(14, 21, 27, 0.9);
    background:
        linear-gradient(180deg, rgba(251, 253, 255, 0.92), rgba(198, 215, 229, 0.72));
    border-color: rgba(255, 255, 255, 0.62);
    box-shadow:
        inset 0 0 13px rgba(255, 255, 255, 0.42),
        0 0 24px var(--shadow);
}

.control-button.primary svg {
    fill: currentColor;
}

.controls .control-button:hover {
    transform: none;
    background: var(--glass);
    border-color: var(--line);
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.08),
        0 0 22px rgba(206, 225, 247, 0.14);
}

.controls .control-button.primary:hover {
    background:
        linear-gradient(180deg, rgba(251, 253, 255, 0.92), rgba(198, 215, 229, 0.72));
    border-color: rgba(255, 255, 255, 0.62);
    box-shadow:
        inset 0 0 13px rgba(255, 255, 255, 0.42),
        0 0 24px var(--shadow);
}

.control-button.responded {
    opacity: 0.82;
}

.control-button:disabled {
    cursor: default;
    transform: none;
}

.response-count {
    position: fixed;
    left: 50%;
    bottom: 112px;
    z-index: 3;
    min-height: 20px;
    margin: 0;
    color: var(--faint);
    font-size: 13px;
    transform: translateX(-50%);
}

.corner-actions {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 16px;
}

.round-button {
    width: 64px;
    height: 64px;
    color: rgba(240, 248, 255, 0.9);
    background: rgba(230, 239, 247, 0.14);
    box-shadow:
        inset 0 0 14px rgba(255, 255, 255, 0.14),
        0 0 28px rgba(222, 238, 255, 0.22);
}

.round-button:last-child {
    width: 56px;
    height: 56px;
    color: rgba(229, 239, 247, 0.58);
    background: rgba(230, 239, 247, 0.08);
    box-shadow:
        inset 0 0 11px rgba(255, 255, 255, 0.08),
        0 0 18px rgba(223, 238, 255, 0.1);
}

.round-button svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.round-button:last-child svg {
    width: 24px;
    height: 24px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(1, 5, 10, 0.54);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.modal.hidden {
    display: none;
}

.modal-panel {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: 32px;
    border: 1px solid rgba(238, 245, 252, 0.18);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(18, 31, 41, 0.88), rgba(5, 10, 18, 0.9)),
        radial-gradient(circle at 20% 20%, rgba(217, 236, 250, 0.18), transparent 36%);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.44),
        0 0 34px rgba(213, 231, 248, 0.1);
}

.modal-panel h2 {
    margin: 0 42px 20px 0;
    color: rgba(247, 250, 255, 0.92);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
}

.text-panel p {
    margin: 0 0 14px;
    color: rgba(235, 242, 248, 0.76);
    font-size: 16px;
    line-height: 1.55;
}

textarea {
    width: 100%;
    min-height: 142px;
    resize: none;
    color: rgba(247, 250, 255, 0.92);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(238, 245, 252, 0.18);
    border-radius: 8px;
    outline: 0;
    padding: 16px;
    line-height: 1.45;
    box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.18);
}

textarea:focus {
    border-color: rgba(239, 248, 255, 0.42);
    box-shadow:
        inset 0 0 22px rgba(0, 0, 0, 0.18),
        0 0 18px rgba(220, 237, 255, 0.12);
}

textarea::placeholder {
    color: rgba(238, 245, 252, 0.38);
}

input {
    color: rgba(247, 250, 255, 0.92);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(238, 245, 252, 0.18);
    border-radius: 8px;
    outline: 0;
}

input:focus {
    border-color: rgba(239, 248, 255, 0.42);
    box-shadow: 0 0 18px rgba(220, 237, 255, 0.12);
}

input::placeholder {
    color: rgba(238, 245, 252, 0.34);
}

.modal-row {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: var(--faint);
    font-size: 13px;
}

.top-thought-option {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 13px;
    padding: 8px 12px;
    border: 1px solid rgba(238, 245, 252, 0.14);
    border-radius: 999px;
    color: rgba(239, 247, 255, 0.78);
    background: rgba(255, 255, 255, 0.045);
    cursor: pointer;
}

.top-thought-option.hidden {
    display: none;
}

.top-thought-option input {
    width: 15px;
    height: 15px;
    accent-color: #dbe9f4;
}

.feedback-label {
    display: block;
    margin: 22px 0 8px;
    color: rgba(247, 250, 255, 0.94);
    font-size: 17px;
    text-shadow: 0 0 16px rgba(217, 235, 255, 0.2);
}

.menu-panel,
.share-panel {
    width: min(420px, 100%);
}

#menu-modal {
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
}

#menu-modal .menu-panel {
    width: min(360px, 100%);
    min-height: 100vh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 34px 28px;
    border-block: 0;
    border-right: 0;
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(18, 31, 41, 0.94), rgba(5, 10, 18, 0.96)),
        radial-gradient(circle at 20% 14%, rgba(217, 236, 250, 0.14), transparent 34%);
}

.menu-options,
.share-options {
    display: grid;
    gap: 12px;
}

.menu-options {
    grid-template-columns: 1fr;
}

.account-box {
    margin-top: 22px;
    padding: 14px;
    border: 1px solid rgba(238, 245, 252, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.install-link + .account-box,
.menu-options + .account-box {
    margin-top: 36px;
}

.profile-code-box {
    border-color: rgba(213, 232, 248, 0.24);
    background:
        linear-gradient(180deg, rgba(229, 239, 248, 0.08), rgba(229, 239, 248, 0.035)),
        rgba(255, 255, 255, 0.03);
    box-shadow:
        inset 0 0 18px rgba(255, 255, 255, 0.04),
        0 0 22px rgba(178, 219, 248, 0.07);
}

.login-code-box {
    margin-top: 14px;
    border-color: rgba(178, 193, 232, 0.22);
    background:
        linear-gradient(180deg, rgba(138, 154, 204, 0.08), rgba(229, 239, 248, 0.03)),
        rgba(255, 255, 255, 0.025);
    box-shadow:
        inset 0 0 18px rgba(255, 255, 255, 0.035),
        0 0 20px rgba(150, 166, 218, 0.055);
}

.account-box span,
.account-box label {
    display: block;
    margin-bottom: 9px;
    color: rgba(240, 248, 255, 0.76);
    font-size: 14px;
}

.account-box-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.account-box-head span {
    margin-bottom: 0;
}

.code-help-link {
    padding: 0;
    border: 0;
    color: rgba(250, 253, 255, 0.9);
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-shadow: 0 0 12px rgba(225, 239, 255, 0.22);
}

.code-help-link:hover {
    color: #fff;
}

.code-chip {
    display: block;
    width: 100%;
    min-height: 38px;
    padding: 9px 10px;
    overflow-wrap: anywhere;
    border: 1px solid rgba(238, 245, 252, 0.18);
    border-radius: 8px;
    color: rgba(239, 247, 255, 0.92);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    text-align: left;
}

.code-login-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.code-login-row input {
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
}

.legal-link {
    width: fit-content;
    margin: auto auto 0;
    padding: 24px 0 4px;
    border: 0;
    color: rgba(235, 242, 248, 0.44);
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.legal-link:hover {
    color: rgba(238, 245, 252, 0.72);
}

.install-link {
    width: fit-content;
    margin: 26px auto 0;
    padding: 0;
    border: 0;
    color: rgba(250, 253, 255, 0.9);
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-shadow: 0 0 12px rgba(225, 239, 255, 0.22);
}

.install-link:hover {
    color: #fff;
}

.menu-icon-actions {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 6px 0 0;
    padding: 4px 0 2px;
}

.menu-icon-action {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(238, 245, 252, 0.2);
    border-radius: 999px;
    color: rgba(240, 248, 255, 0.82);
    background:
        radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.14), transparent 42%),
        rgba(255, 255, 255, 0.055);
    box-shadow:
        inset 0 0 14px rgba(255, 255, 255, 0.055),
        0 0 22px rgba(185, 217, 244, 0.09);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.menu-icon-action:hover {
    transform: translateY(-1px);
    border-color: rgba(244, 249, 255, 0.42);
    color: rgba(250, 253, 255, 0.96);
    background:
        radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.2), transparent 44%),
        rgba(255, 255, 255, 0.095);
}

.menu-icon-action svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-icon-action span {
    font-size: 25px;
    line-height: 1;
    font-weight: 700;
    transform: translateY(-1px);
}

.menu-action,
.share-action {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(238, 245, 252, 0.18);
    border-radius: 8px;
    color: rgba(247, 250, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    text-align: left;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.menu-action:hover,
.share-action:hover {
    transform: translateY(-1px);
    border-color: rgba(244, 249, 255, 0.42);
    background: rgba(255, 255, 255, 0.1);
}

.menu-action {
    min-height: 58px;
    justify-content: space-between;
    padding: 14px 16px;
    color: rgba(239, 247, 255, 0.92);
    font-size: 18px;
}

.menu-action::after {
    content: ">";
    color: rgba(238, 245, 252, 0.36);
    font-size: 18px;
}

.featured-menu-action {
    border-color: rgba(223, 238, 250, 0.32);
    color: rgba(250, 253, 255, 0.98);
    background:
        linear-gradient(180deg, rgba(244, 250, 255, 0.12), rgba(255, 255, 255, 0.055)),
        rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 34px rgba(184, 216, 240, 0.1);
}

.featured-menu-action::after {
    color: rgba(238, 245, 252, 0.62);
}

.thought-list {
    display: grid;
    gap: 12px;
    max-height: min(420px, 52vh);
    overflow: auto;
    padding-right: 4px;
}

.history-search {
    width: 100%;
    min-height: 42px;
    margin: 0 0 14px;
    padding: 9px 12px;
}

.history-tools {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
}

.history-tools .history-search {
    min-width: 0;
    margin: 0;
}

.history-undo.hidden {
    display: none;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 15px;
    border: 1px solid rgba(238, 245, 252, 0.14);
    border-radius: 8px;
    color: rgba(237, 246, 255, 0.84);
    background: rgba(255, 255, 255, 0.045);
    line-height: 1.45;
}

.history-body {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.history-response-line {
    color: rgba(235, 242, 248, 0.52);
    font-size: 13px;
}

.history-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-share,
.history-delete,
.history-unrespond {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(238, 245, 252, 0.18);
    border-radius: 999px;
    color: rgba(239, 247, 255, 0.72);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.history-share:hover,
.history-delete:hover,
.history-unrespond:hover {
    transform: translateY(-1px);
    border-color: rgba(244, 249, 255, 0.4);
    color: rgba(247, 250, 255, 0.95);
    background: rgba(255, 255, 255, 0.1);
}

.history-delete {
    color: rgba(229, 239, 247, 0.5);
    background: rgba(255, 255, 255, 0.035);
}

.history-unrespond {
    color: rgba(229, 239, 247, 0.62);
    background: rgba(255, 255, 255, 0.045);
}

.history-delete:hover {
    color: rgba(247, 250, 255, 0.78);
}

.history-unrespond:hover {
    color: rgba(247, 250, 255, 0.9);
}

.history-share svg,
.history-delete svg,
.history-unrespond svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.history-empty {
    margin: 0;
    color: rgba(235, 242, 248, 0.58);
    line-height: 1.5;
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-item {
    display: grid;
    gap: 7px;
    padding: 14px 15px;
    border: 1px solid rgba(238, 245, 252, 0.14);
    border-radius: 8px;
    color: rgba(237, 246, 255, 0.84);
    background: rgba(255, 255, 255, 0.045);
    line-height: 1.45;
}

.notification-item strong {
    color: rgba(247, 250, 255, 0.94);
}

.notification-item time {
    color: rgba(235, 242, 248, 0.48);
    font-size: 13px;
}

.share-action svg {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.send-button {
    width: 42px;
    height: 42px;
}

.send-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.text-button {
    min-height: 34px;
    padding: 7px 16px;
    border-radius: 999px;
}

.close-button {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    color: rgba(238, 245, 252, 0.7);
    background: rgba(255, 255, 255, 0.06);
}

.close-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.toast {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: 12px;
    transform: translate(-50%, 0);
    max-width: calc(100vw - 40px);
    padding: 10px 16px;
    border: 1px solid rgba(238, 245, 252, 0.18);
    border-radius: 999px;
    color: rgba(247, 250, 255, 0.88);
    background: rgba(5, 11, 18, 0.78);
    box-shadow: 0 0 26px rgba(216, 232, 248, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 14px;
    opacity: 1;
    transition: opacity 220ms ease, transform 220ms ease;
}

.toast.hidden {
    opacity: 0;
    transform: translate(-50%, 8px);
    pointer-events: none;
}

.install-toast {
    position: fixed;
    z-index: 30;
    left: 50%;
    top: 50%;
    width: min(430px, calc(100vw - 34px));
    display: grid;
    gap: 12px;
    padding: 26px 28px;
    border: 1px solid rgba(238, 245, 252, 0.2);
    border-radius: 8px;
    color: rgba(247, 250, 255, 0.92);
    background:
        linear-gradient(180deg, rgba(18, 31, 41, 0.94), rgba(5, 10, 18, 0.96)),
        rgba(5, 11, 18, 0.9);
    box-shadow:
        0 0 0 9999px rgba(0, 0, 0, 0.34),
        0 24px 70px rgba(0, 0, 0, 0.42),
        0 0 34px rgba(216, 232, 248, 0.16);
    transform: translate(-50%, -50%);
    opacity: 1;
    transition: opacity 260ms ease, transform 260ms ease;
}

.install-toast.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(-50% + 10px));
}

.install-toast strong {
    padding-right: 36px;
    font-size: 24px;
    line-height: 1.15;
}

.install-toast span {
    color: rgba(235, 242, 248, 0.76);
    font-size: 17px;
    line-height: 1.45;
}

.install-toast-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(238, 245, 252, 0.16);
    border-radius: 50%;
    color: rgba(247, 250, 255, 0.76);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.install-toast-close svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.modal-open {
    overflow: hidden;
}

@keyframes thoughtIn {
    from {
        opacity: 0;
        transform: translateY(7px);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes thoughtSlideNext {
    from {
        opacity: 0;
        transform: translateX(28px);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes thoughtSlidePrev {
    from {
        opacity: 0;
        transform: translateX(-28px);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes thoughtLiked {
    0% {
        opacity: 0;
        transform: translateY(9px) scale(0.98);
        filter: blur(6px);
    }
    60% {
        opacity: 1;
        transform: translateY(0) scale(1.015);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.28);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 720px) {
    .topbar {
        min-height: 68px;
        padding: 12px 14px;
    }

    .top-actions {
        gap: 8px;
        flex-shrink: 0;
    }

    .brand {
        gap: 9px;
        font-size: 18px;
    }

    .brand-logo {
        width: 118px;
        height: 35px;
    }

    .brand-mark {
        width: 28px;
        height: 28px;
    }

    .pill-button {
        width: 44px;
        height: 44px;
        min-height: 44px;
        justify-content: center;
        padding: 0;
    }

    .pill-button svg {
        width: 21px;
        height: 21px;
    }

    .icon-button {
        width: 38px;
        height: 38px;
    }

    .icon-button svg {
        width: 28px;
        height: 28px;
    }

    .pill-button span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .hero {
        min-height: calc(100vh - 136px);
        padding: 12px 14px 148px;
    }

    .thought {
        min-height: 160px;
        width: min(100%, calc(100vw - 56px));
        font-size: clamp(24px, 6.5vw, 32px);
        line-height: 1.22;
    }

    .controls {
        width: min(390px, calc(100vw - 42px));
        grid-template-columns: minmax(48px, 1fr) auto minmax(48px, 1fr);
        bottom: 58px;
        margin-top: 0;
        gap: clamp(7px, 2.4vw, 10px);
    }

    .response-count {
        bottom: 108px;
    }

    .control-button {
        min-width: 0;
        min-height: 38px;
        padding: 7px 12px;
        font-size: 14px;
    }

    .control-button.icon-only {
        width: 48px;
        padding: 0;
    }

    .controls .control-button:not(.primary) {
        width: 48px;
        padding: 0;
    }

    .controls .control-button:not(.primary) span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .controls .control-button.primary {
        min-width: 144px;
    }

    .corner-actions {
        top: 82px;
        right: 20px;
        bottom: auto;
        z-index: 3;
        flex-direction: row;
        gap: 9px;
    }

    .round-button {
        width: 39px;
        height: 39px;
    }

    .round-button:last-child {
        width: 37px;
        height: 37px;
    }

    .round-button svg {
        width: 20px;
        height: 20px;
    }

    .round-button:last-child svg {
        width: 18px;
        height: 18px;
    }

    .modal {
        align-items: flex-start;
        justify-content: center;
        padding: max(20px, env(safe-area-inset-top)) 12px 12px;
    }

    .modal-panel {
        width: min(100%, 520px);
        max-height: calc(100dvh - max(32px, env(safe-area-inset-top)) - 20px);
        padding: 26px 20px 20px;
    }

    #whisper-modal {
        align-items: flex-start;
        padding-top: max(84px, calc(env(safe-area-inset-top) + 62px));
    }

    #whisper-modal .modal-panel {
        max-height: calc(100dvh - max(104px, calc(env(safe-area-inset-top) + 82px)) - 12px);
    }

    #whisper-modal textarea {
        min-height: 120px;
    }

    #menu-modal {
        align-items: stretch;
        justify-content: flex-end;
        padding: 0;
    }

    #menu-modal .menu-panel {
        width: min(280px, 76vw);
        min-height: 100vh;
        max-height: 100dvh;
        overflow-y: auto;
        padding: 24px 16px;
    }

    .menu-panel h2 {
        margin-bottom: 14px;
        font-size: 23px;
    }

    .menu-options {
        gap: 9px;
    }

    .menu-action {
        min-height: 42px;
        padding: 9px 11px;
        font-size: 14px;
    }

    .menu-icon-actions {
        justify-content: space-between;
        gap: 10px;
        margin-top: 10px;
        padding: 2px 4px 0;
    }

    .menu-icon-action {
        width: 46px;
        height: 46px;
    }

    .menu-icon-action svg {
        width: 20px;
        height: 20px;
    }

    .menu-icon-action span {
        font-size: 22px;
    }

    .account-box {
        margin-top: 12px;
        padding: 11px;
    }

    .install-link + .account-box,
    .menu-options + .account-box {
        margin-top: 30px;
    }

    .code-chip,
    .code-login-row input {
        min-height: 34px;
        padding: 7px 9px;
        font-size: 14px;
    }

    .account-box-head {
        gap: 10px;
    }

    .code-help-link {
        font-size: 12px;
    }

    .legal-link {
        padding-top: 16px;
        font-size: 12px;
    }

    .install-link {
        margin-top: 24px;
        font-size: 12px;
    }

    .code-login-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 390px) {
    .top-actions {
        gap: 8px;
    }

    .thought {
        width: min(100%, calc(100vw - 38px));
        font-size: clamp(22px, 6.7vw, 29px);
    }

    .controls {
        width: min(340px, calc(100vw - 18px));
        bottom: 60px;
        grid-template-columns: minmax(52px, 1fr) auto minmax(52px, 1fr);
        gap: 7px;
    }

    .response-count {
        bottom: 110px;
    }

    .control-button {
        width: 100%;
        min-height: 36px;
        padding: 7px 9px;
        font-size: 13px;
    }

    .controls .control-button.primary {
        min-width: 138px;
    }

    .controls .control-button:not(.primary) {
        width: 46px;
        padding: 0;
    }

    .control-button svg {
        width: 16px;
        height: 16px;
    }
}
