* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    overflow-y: scroll;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background: #f7f8fa;
    color: #151922;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Arial, sans-serif;
    display: flex;
    flex-direction: column;
}


/* =========================================================
   Header
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #fff;
    border-bottom: 1px solid #e8e9ed;
}

.brand {
    display: block;
}

.brand img {
    display: block;
    width: 160px;
    height: auto;
}

.brand a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.brand span {
    margin-top: 4px;
    margin-left: 2px;
    color: #858b95;
    font-size: 11px;
    letter-spacing: -0.04em;
}

.header-action {
    margin-left: auto;
}

.header-action a {
    display: inline-flex;
    align-items: center;
    padding: 8px 11px;
    border: 1px solid #c94c4c;
    border-radius: 7px;
    background: #c94c4c;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .03em;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease,
    border-color .15s ease;
}

.header-action a:hover {
    background: #b94a48;
    border-color: #b94a48;
}


/* =========================================================
   Main
   ========================================================= */

main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 0;
}


/* =========================================================
   Platform Navigation
   ========================================================= */

.platform-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.platform {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(20, 25, 35, .04);
    color: inherit;
    text-decoration: none;
    transition: .2s;
}

.platform:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(20, 25, 35, .08);
}

.platform .icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.new-badge {
    margin-left: 5px;
    color: #2563EB;
    font-size: 0.55em;
    font-weight: 600;
    line-height: 0;
    vertical-align: super;
    letter-spacing: 0.02em;
}


/* =========================================================
   Content Notice
   ========================================================= */

.content-notice {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px 10px;
    color: #888;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.content-notice p {
    margin: 2px 0;
}


/* =========================================================
   Platform Colors
   ========================================================= */

.youtube .icon {
    background: #f11;
}

.world .icon,
.records .icon,
.love-sh .icon,
.privacy .icon {
    background: #f5f3ee;
}

.world .icon svg {
    color: #397a91;
}

.records .icon svg {
    color: #c09232;
}

.love-sh .icon svg {
    color: #c05b6b;
}

.privacy .icon svg {
    color: #536b83;
}

.platform .icon svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.platform b {
    display: block;
    font-size: 14px;
}

.platform > span:nth-child(2) {
    flex: 1;
}


/* =========================================================
   Archive Sections
   ========================================================= */

.archive-section {
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

main > .archive-section:last-child {
    margin-bottom: 0;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-head > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-head h2 {
    margin: 0;
    font-size: 16px;
}

.section-head span {
    color: #666c75;
    font-size: 12px;
}

.section-head a {
    color: inherit;
    font-size: 12px;
    text-decoration: none;
}

.section-head a:hover {
    color: #44A162;
}

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

a:focus-visible,
button:focus-visible {
    outline: 3px solid #397a91;
    outline-offset: 3px;
}


/* =========================================================
   Section Accent
   ========================================================= */

.youtube-section {
    border-left: 3px solid #f11;
}

/* =========================================================
   Social Home
   ========================================================= */

.social-home-section {
    border-left: 3px solid #FFCC00;
}

.social-home-cards {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
}

.social-home-card {
    display: block;
    overflow: hidden;
    min-width: 0;
    border: 1px solid #e8e9ed;
    border-radius: 9px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.social-home-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1.25;
    object-fit: cover;
    background: #dfe2e7;
}

.social-home-card-body {
    padding: 7px 8px 8px;
}

.social-home-platform {
    display: block;
    overflow: hidden;
    color: #666c75;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.social-home-card:nth-child(n + 9) {
    display: none;
}

/* =========================================================
   Cards
   ========================================================= */

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

.youtube-cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.card {
    overflow: hidden;
    border: 1px solid #e8e9ed;
    border-radius: 10px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #dfe2e7;
}

.card-body {
    padding: 10px;
}

.rank {
    font-size: 11px;
    font-weight: 700;
}

.title {
    display: -webkit-box;
    margin: 6px 0;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.meta {
    display: flex;
    justify-content: space-between;
    color: #858b95;
    font-size: 10px;
}


/* =========================================================
   Twitter
   ========================================================= */

.tweet {
    padding: 0;
}

.tweet .thumb {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.tweet .card-body {
    padding: 14px;
}

.tweet-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.avatar {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #d9dce2;
}

.tweet-date {
    margin-left: auto;
    color: #666c75;
    font-size: 10px;
    white-space: nowrap;
}

.tweet-text {
    min-height: 55px;
    margin: 12px 0;
    font-size: 12px;
    line-height: 1.55;
}

.tweet-stats {
    display: flex;
    justify-content: space-between;
    color: #858b95;
    font-size: 10px;
}


/* =========================================================
   Common
   ========================================================= */

.common-count {
    color: #666c75;
    font-size: 12px;
}

.common-count strong {
    color: #151922;
    display: inline-block;
    min-width: 5ch;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.common-filters {
    display: flex;
    align-items: center;
    gap: 8px;
}

.common-info {
    position: relative;
    display: inline-flex;
    margin-right: 2px;
    vertical-align: middle;
}

.common-info-button {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid #d9dce1;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #858b95;
    font-family: Georgia, serif;
    font-size: 14px;
    font-style: italic;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(20, 25, 35, .08);
    cursor: help;
    transition: background-color .15s ease,
    border-color .15s ease,
    color .15s ease;
}

.common-info-button:hover,
.common-info-button:focus-visible {
    background: #f8f9fa;
    border-color: #cfd3d9;
    color: #5f7f91;
    outline: none;
}

.common-info-tooltip {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 1000;
    width: max-content;
    max-width: min(280px, calc(100vw - 40px));
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #e1e3e7;
    border-radius: 7px;
    background: rgba(255, 255, 255, .96);
    color: #656b75;
    font-size: 10px;
    line-height: 1.6;
    text-align: left;
    white-space: normal;
    word-break: keep-all;
    box-shadow: 0 4px 14px rgba(20, 25, 35, .12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(3px);
    transition: opacity .15s ease,
    visibility .15s ease,
    transform .15s ease;
    pointer-events: none;
}

.common-info-tooltip.left {
    left: auto;
    right: 0;
}

.common-info:hover .common-info-tooltip,
.common-info-button:focus-visible + .common-info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* =========================================================
   Note
   ========================================================= */

.note {
    margin: 13px 0 0;
    color: #777d87;
    font-size: 10px;
}


/* =========================================================
   Footer
   ========================================================= */

footer {
    max-width: 1200px;
    margin: 32px auto 0;
    padding: 24px 20px 32px;
    border-top: 1px solid #e5e7eb;
}

.footer-notice {
    color: #666c75;
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}

.footer-notice p {
    margin: 0;
}

.footer-notice strong {
    color: #656b75;
    font-weight: 600;
    letter-spacing: -0.05em;
}


/* =========================================================
   Back to Top
   ========================================================= */

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;

    border: 1px solid #e1e3e6;
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    color: #4a4d52;

    font-size: 30px;
    font-weight: 300;
    line-height: 1;

    box-shadow: 0 3px 12px rgba(20, 25, 34, .12);

    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);

    transition: opacity .2s ease,
    visibility .2s ease,
    transform .2s ease,
    background-color .15s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #fff;
}


/* =========================================================
   Privacy Rights Link
   ========================================================= */

.privacy-rights-link {
    display: inline-block;
    margin-top: 4px;
    color: #aa2828;
    font-size: 12px;
    line-height: 1.5;
    text-decoration: none;
}

.privacy-rights-link:hover {
    text-decoration: underline;
}


/* ---------------------------------------------------------
   Site Navigation
   --------------------------------------------------------- */

.site-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 12px;
    color: #666c75;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .04em;
    white-space: nowrap;
}

.site-nav a {
    color: inherit;
    text-decoration: none;
}

.site-nav a:hover {
    color: #151922;
}

.site-nav a[aria-current="page"] {
    color: #151922;
    font-weight: 600;
}

.site-nav span {
    color: #d5d8dd;
}


/* ---------------------------------------------------------
   Empty Quote
   --------------------------------------------------------- */

.empty-quote {
    grid-column: 1 / -1;
    max-width: 720px;
    margin: 48px auto 64px;
    padding: 20px 24px;
    text-align: center;
}

.empty-quote blockquote {
    margin: 0;
    padding: 0;
    color: #555;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.9;
}

.empty-quote blockquote::before {
    content: "“";
    display: block;
    margin-bottom: 4px;
    color: #b8b8b8;
    font-family: Georgia, serif;
    font-size: 34px;
    line-height: 1;
}

.empty-quote cite {
    display: block;
    margin-top: 16px;
    color: #999;
    font-size: 11px;
    font-style: normal;
    line-height: 1.6;
}

.empty-quote cite strong {
    color: #777;
    font-weight: 500;
}

/* =========================================================
   Random Message — Home
   ========================================================= */

.random-message {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px 0;
}

.random-message-inner {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    padding: 9px 12px;
    background: #E9F0F2;
    /*background: #9BBBEF;*/
    /*color: #405C66;*/
    /*color: #ffffff;*/
    color: #243B60;
    font-size: 11px;
    line-height: 1.5;
    border-radius: 5px;
}

.random-message-year {
    flex-shrink: 0;
    color: #243B60;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.random-message-text {
    flex: 1;
    min-width: 0;
}

.random-message-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0;
}

.random-message-refresh {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 26px;
    height: 26px;
    margin: 0;
    padding: 5px;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: #243B60;
    cursor: pointer;
    transition:
            color .15s ease,
            background-color .15s ease,
            transform .2s ease;
}

.random-message-refresh svg {
    display: block;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.random-message-refresh:hover {
    background: rgba(64, 92, 102, .08);
    color: #A47FF1;
    color: #0f1114;
}

.random-message-refresh:active {
    transform: rotate(-30deg);
}

.random-message-tmi {
    flex: 0 0 auto;
    margin: 0 0 0 2px;
    color: #243B60;
    font-size: 11px;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    top: 1px;
}

.random-message-tmi:hover {
    color: #44A162;
}

.random-message-year,
.random-message-text {
    transition: opacity 0.35s ease;
}

.random-message-inner.is-changing .random-message-year,
.random-message-inner.is-changing .random-message-text {
    opacity: 0;
    transform: none;
}

.random-message-inner.is-entering .random-message-year,
.random-message-inner.is-entering .random-message-text {
    opacity: 0;
    transform: none;
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 900px) {
    .social-home-cards {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .social-home-card:nth-child(n + 7) {
        display: none;
    }
}

@media (max-width: 800px) {

    main {
        padding: 20px 12px 0;
    }

    .header-action a {
        padding: 6px 8px;
        font-size: 9px;
    }


    .platform-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .platform {
        gap: 12px;
        padding: 16px 14px;
    }

    .platform .icon {
        width: 36px;
        height: 36px;
    }

    .platform b {
        font-size: 13px;
    }

    .youtube-cards {
        grid-template-columns: 1fr;
    }

    .youtube-cards .card:nth-child(n + 6) {
        display: none;
    }

    .youtube-cards .card {
        display: grid;
        grid-template-columns: 120px 1fr;
    }

    .youtube-cards .thumb {
        height: 100%;
        aspect-ratio: auto;
    }

    footer {
        margin-top: 24px;
        padding: 24px 20px 32px;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 50px;
        height: 50px;
        font-size: 27px;
    }

    .random-message {
        padding: 10px 12px 0;
    }

    .random-message-inner {
        gap: 3px;
        font-size: 10px;
    }

    .random-message-refresh {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 630px) {
    .site-nav {
        display: none;
    }

    .empty-quote {
        margin: 24px auto 40px;
        padding: 16px 18px;
    }

    .empty-quote blockquote {
        font-size: 14px;
        line-height: 1.85;
    }

    .site-header {
        padding: 0 16px;
    }

    .social-home-cards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .social-home-card:nth-child(n + 5) {
        display: none;
    }
}

@media (max-width: 500px) {
    .social-home-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .social-home-card:nth-child(n + 4) {
        display: none;
    }

    .platform-nav {
        gap: 10px;
    }

    .platform {
        gap: 8px;
        padding: 14px 10px;
    }

    .platform .icon {
        width: 30px;
        height: 30px;
    }

    .platform b {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .social-home-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .social-home-card:nth-child(n + 3) {
        display: none;
    }
}

/* =========================================================
   Accessibility
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* =========================================================
   System Dark Mode
   ========================================================= */

@media (prefers-color-scheme: dark) {

    html {
        color-scheme: dark;
        background: #0f1114;
    }

    body {
        background: #0f1114;
        color: #eceef1;
    }

    /* ---------------------------------------------------------
       Header / Footer
       --------------------------------------------------------- */
    .site-header {
        background: #121418;
        border-bottom-color: #30353d;
    }

    .brand img {
        filter: brightness(1.45) saturate(0.85);
    }

    .brand strong {
        color: #eceef1;
    }

    .brand span,
    .platform small,
    .section-head span {
        color: #858b95;
    }

    .header-action a {
        color: #fff;
    }

    footer {
        border-top-color: #30353d;
    }

    .footer-notice strong {
        color: #aab0b8;
    }

    /* ---------------------------------------------------------
       Platform / Sections
       --------------------------------------------------------- */
    .platform,
    .archive-section {
        background: #16191e;
        border-color: #30353d;
    }

    .platform:hover {
        background: #1c2026;
        border-color: #383d46;
    }

    /* ---------------------------------------------------------
       Cards
       --------------------------------------------------------- */
    .card {
        background: #1c2026;
        border-color: #383d46;
    }

    .card .title,
    .card .rank {
        color: #eceef1;
    }

    .card .meta {
        color: #858b95;
    }

    /* ---------------------------------------------------------
       Back to Top
       --------------------------------------------------------- */
    .back-to-top {
        background: rgba(22, 25, 30, .96);
        border-color: #353a42;
        color: #d8dbe0;
        box-shadow: 0 3px 12px rgba(0, 0, 0, .35);
    }

    .back-to-top:hover {
        background: #1c2026;
    }

    /* ---------------------------------------------------------
       Privacy
       --------------------------------------------------------- */
    .privacy-rights-link {
        color: #c87552;
    }

    .privacy-rights-link:hover {
        color: #e0a083;
    }

    .new-badge {
        color: #60A5FA;
    }

    /* ---------------------------------------------------------
       Social
       --------------------------------------------------------- */
    .social-card {
        background: #1c2026;
        border-color: #383d46;
        color: #eceef1;
    }

    .social-card:hover {
        background: #20242a;
        border-color: #383d46;
        box-shadow: 0 5px 16px rgba(0, 0, 0, .22);
    }

    .social-year-title,
    .social-day {
        color: #eceef1;
    }

    .social-month,
    .social-label,
    .social-arrow {
        color: #858b95;
    }

    .social-info {
        border-left-color: #30343b;
    }

    .social-account {
        color: #d5d8dd;
    }

    .social-card:hover .social-arrow {
        color: #eceef1;
    }

    /* ---------------------------------------------------------
       Social Home
       --------------------------------------------------------- */
    .social-home-card {
        background: #16191e;
        border-color: #30353d;
        color: #eceef1;
    }

    .social-home-platform {
        color: #858b95;
    }

    /* ---------------------------------------------------------
       Site Navigation
       --------------------------------------------------------- */
    .site-nav {
        color: #858b95;
    }

    .site-nav a:hover,
    .site-nav a[aria-current="page"] {
        color: #eceef1;
    }

    .site-nav span {
        color: #3a3f47;
    }

    /* ---------------------------------------------------------
       Empty Quote
       --------------------------------------------------------- */
    .empty-quote blockquote {
        color: #c5c8cd;
    }

    .empty-quote blockquote::before {
        color: #666b73;
    }

    .empty-quote cite {
        color: #777d86;
    }

    .empty-quote cite strong {
        color: #999fa8;
    }

    /* ---------------------------------------------------------
       Common
       --------------------------------------------------------- */
    .common-count,
    .common-info {
        color: #858b95;
    }

    .common-count strong {
        color: #eceef1;
    }

    .common-info-button {
        background: rgba(22, 25, 30, .94);
        border-color: #353a42;
        color: #858b95;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
    }

    .common-info-button:hover,
    .common-info-button:focus-visible {
        background: #1c2026;
        border-color: #4a5059;
        color: #6fa1b5;
    }

    .common-info-tooltip {
        background: rgba(28, 32, 38, .97);
        border-color: #353a42;
        color: #aeb4bc;
        box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
    }

    /* ---------------------------------------------------------
       Legacy icon backgrounds
       --------------------------------------------------------- */
    .archive .icon,
    .world .icon,
    .records .icon,
    .love-sh .icon,
    .privacy .icon {
        background: #20242a;
    }

    .random-message-inner {
        background: #10112F;
        color: #E6E6F0;
    }

    .random-message-year,
    .random-message-refresh {
        color: #E6E6F0;
    }

    .random-message-refresh:hover {
        background: rgba(64, 92, 102, .08);
        color: #ffffff;
    }

    .random-message-tmi {
        color: #E6E6F0;
    }
}