:root {
    --bg: #070a10;
    --bg-2: #0f1626;
    --card: rgba(18, 27, 44, 0.5);
    --card-soft: rgba(17, 24, 38, 0.74);
    --text: #edf3ff;
    --muted: #a5b3ce;
    --accent: #70a7ff;
    --accent-2: #6ff4ca;
    --danger: #ff859d;
    --ok: #7de1a7;
    --line: rgba(156, 182, 255, 0.22);
    --glass-highlight: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
    min-height: 100vh;
    background: radial-gradient(circle at 30% -10%, #273e74, var(--bg-2) 28%, var(--bg) 65%);
    overflow-x: hidden;
    color: var(--text);
}

.container::before,
.container::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    filter: blur(40px);
    opacity: 0.45;
    animation: drift 12s ease-in-out infinite;
}

.container::before {
    width: 260px;
    height: 260px;
    top: -90px;
    left: -70px;
    background: #4e79ff;
}

.container::after {
    width: 320px;
    height: 320px;
    right: -120px;
    bottom: 10%;
    background: #3bd7b2;
    animation-delay: -4s;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}

.hero {
    text-align: center;
    margin: 1.2rem 0 2.2rem;
    animation: fadeUp 0.7s ease;
}

.eyebrow {
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.75rem;
}

h1 {
    margin: 0.4rem 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.subtitle,
.panel-description {
    color: var(--muted);
}

a {
    color: #8fc1ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.counter-card {
    margin: 1.1rem auto 0.5rem;
    background: linear-gradient(145deg, rgba(30, 47, 79, 0.55), rgba(14, 20, 33, 0.45));
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: inset 0 1px var(--glass-highlight), 0 12px 35px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 1.35rem 1.2rem;
    max-width: 700px;
}

.counter {
    font-size: clamp(1.2rem, 3.4vw, 2rem);
    font-weight: 800;
    line-height: 1.35;
    animation: pulseText 3s ease-in-out infinite;
}

.notice {
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
}

.notice.error {
    border-color: rgba(255, 127, 150, 0.5);
    background: rgba(255, 127, 150, 0.08);
}

.notice.success {
    border-color: rgba(117, 212, 155, 0.45);
    background: rgba(117, 212, 155, 0.1);
}

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: inset 0 1px var(--glass-highlight), 0 14px 28px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem;
}

.new-comment-panel {
    margin-top: 1rem;
}

.slide-wrap {
    margin: 0.2rem 0 0.5rem;
}

.slide-label {
    margin: 0 0 0.45rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.slide-track {
    position: relative;
    height: 58px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: linear-gradient(120deg, rgba(27, 41, 66, 0.85), rgba(14, 22, 37, 0.9));
    overflow: hidden;
    user-select: none;
    touch-action: none;
}

.slide-progress {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: linear-gradient(90deg, rgba(111, 244, 202, 0.35), rgba(112, 167, 255, 0.38));
    transition: width 0.08s linear;
}

.slide-target {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: rgba(237, 243, 255, 0.78);
    font-weight: 700;
}

.slide-thumb {
    position: absolute;
    left: 4px;
    top: 4px;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    background: linear-gradient(145deg, #86b5ff, #4f7df0);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 12px rgba(31, 50, 97, 0.4);
    font-size: 1.4rem;
    display: grid;
    place-items: center;
    z-index: 2;
    cursor: grab;
    transition: transform 0.1s ease;
}

.slide-thumb:active {
    cursor: grabbing;
    transform: scale(1.03);
}

.slide-track.is-confirmed {
    border-color: rgba(125, 225, 167, 0.6);
    box-shadow: 0 0 0 2px rgba(125, 225, 167, 0.15) inset;
}

#submit-comment:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.2);
    transform: none;
}

.comments-section {
    max-width: 760px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.comments-section.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.form {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

label {
    display: grid;
    gap: 0.3rem;
    font-size: 0.95rem;
}

input,
textarea,
button {
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--card-soft);
    color: var(--text);
    padding: 0.7rem 0.8rem;
    font: inherit;
}

input:focus,
textarea:focus {
    outline: 2px solid rgba(110, 168, 254, 0.4);
    border-color: var(--accent);
}

button {
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent), #5d7bff);
    border: none;
    font-weight: 700;
    transition: transform 0.2s ease, filter 0.2s ease;
}

button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.hp-field {
    display: none;
}

.list {
    display: grid;
    gap: 0.65rem;
}

.memorial-cloud {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.8rem;
    align-items: flex-start;
}

.item {
    background: rgba(11, 17, 30, 0.68);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.75rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeUp 0.45s ease;
}

.memorial-item {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0.15rem 0.2rem;
    max-width: min(100%, 360px);
    animation: floatComment 8s ease-in-out infinite;
    will-change: translate;
    transition: translate 0.2s ease-out;
}

.memorial-item:nth-child(3n) {
    animation-duration: 10s;
}

.memorial-item:nth-child(4n) {
    animation-duration: 7s;
}

.memorial-cloud.is-parallax-active .memorial-item {
    transition: translate 0.08s linear;
}

.item-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.item-head span {
    color: var(--muted);
}

.memorial-head {
    margin-bottom: 0.2rem;
}

.memorial-item p {
    display: inline;
    margin: 0;
    color: #dce7ff;
    background: transparent;
    line-height: 1.45;
}

.memorial-item strong {
    color: #8dc4ff;
    font-size: 0.88rem;
}

.memorial-item .item-head span {
    font-size: 0.76rem;
    opacity: 0.8;
}

.item p {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.empty {
    color: var(--muted);
    margin: 0.2rem 0;
}

@keyframes drift {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(24px) translateX(10px); }
}

@keyframes pulseText {
    0%, 100% { text-shadow: 0 0 0 rgba(112, 167, 255, 0); }
    50% { text-shadow: 0 0 20px rgba(112, 167, 255, 0.3); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes floatComment {
    0%, 100% { transform: translateY(0); opacity: 0.95; }
    50% { transform: translateY(-5px); opacity: 1; }
}

@media (max-width: 580px) {
    .container {
        padding-inline: 0.75rem;
    }
    .counter-card {
        border-radius: 15px;
    }
}

