@charset "UTF-8";

/**
 * Shared public styles for the Mango site directory.
 */

:root {
    --color-green: #2ca25f;
    --font-size-control: 14px;
    --border-color-row: #999;
    --border-color-panel: #c2c2c2;
    --border-panel: 2px solid var(--border-color-panel);
}

/* ==========================================
 * 1. Base reset and typography
 * ========================================== */
* {
    box-sizing: border-box;
}

body, table, tr, td, form {
    margin: 0;
    padding: 0;
    font-family: "굴림", Gulim, Arial, sans-serif;
    font-size: 15px;
    color: #3D3D3D;
    line-height: 200%;
    letter-spacing: 0.1px;
}

img {
    border: none;
}

strong {
    font-weight: bold;
}

a {
    text-decoration: none;
    color: #0068E3;
}

a:hover {
    text-decoration: underline;
}

H1 {
    font-weight: bold;
    color: #BFBFBF;
    font-size: 12px;
    text-align: center;
}

/* ==========================================
 * 2. Layout
 * ========================================== */
.main-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    text-align: left;
}

/* Fade page content once without delaying interaction or image loading. */
@media (prefers-reduced-motion: no-preference) {
    .page-content {
        animation: page-reveal 0.18s ease-out;
    }
}

@keyframes page-reveal {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================
 * 3. Navigation
 * ========================================== */
.nav-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
    padding: 8px 0;
}

.nav-menu a,
.nav-toggle-button,
a.site-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    text-decoration: none;
    border-style: solid;
    border-width: 1px;
    white-space: nowrap;
    transition: background-color 0.2s, border-color 0.2s;
}

.nav-menu a,
.nav-toggle-button {
    padding: 6px 12px;
    color: #333;
    border-color: #999;
    font-size: var(--font-size-control);
}

.nav-toggle-button {
    display: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-menu a:hover,
.nav-toggle-button:hover,
a.site-tag:hover {
    background: #f0f0f0;
    border-color: #666;
    text-decoration: none;
}

.nav-menu a:active,
.nav-toggle-button:active,
a.site-tag:active {
    background: #e0e0e0;
}

/* ==========================================
 * 4. Search
 * ========================================== */
.search-box {
    background: #f5f5f5;
    padding: 10px;
    border: var(--border-panel);
    margin-bottom: 10px;
}

.search-box form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.search-box .search-label {
    color: #333;
    font-size: 13px;
    flex-shrink: 0;
}

.search-box input[type="text"] {
    flex: 1;
    min-width: 100px;
    max-width: 200px;
    padding: 6px 10px;
    border: 1px solid #999;
    font-size: 14px;
}

.search-box button {
    flex-shrink: 0;
    padding: 6px 15px;
    border: 1px solid #999;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.search-box button:hover {
    background: #e5e5e5;
}

.site-submission-page {
    max-width: 620px;
    margin: 18px auto;
    padding: 18px;
    border: var(--border-panel);
    background: #fff;
}

.site-submission-page h1 {
    margin: 0 0 10px;
    font-size: 20px;
}

.site-submission-help {
    margin: 0 0 14px;
    line-height: 1.7;
}

.site-submission-form label {
    display: block;
    margin: 12px 0 5px;
    font-size: 14px;
}

.site-submission-form label span {
    color: #777;
    font-weight: normal;
}

.site-submission-form input,
.site-submission-form select,
.site-submission-form textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #999;
    background: #fff;
    color: #333;
    font: inherit;
}

.site-submission-form textarea {
    resize: vertical;
}

.site-submission-form button {
    margin-top: 16px;
    padding: 9px 18px;
    border: 1px solid #d95757;
    background: #ff6b6b;
    color: #fff;
    cursor: pointer;
    font: inherit;
}

.site-submission-form button:hover {
    background: #e85d5d;
}

.site-submission-success,
.site-submission-error {
    margin: 10px 0;
    padding: 9px 11px;
    border: 1px solid #add8bb;
    background: #f1fff5;
}

.site-submission-error {
    border-color: #efb3b3;
    background: #fff4f4;
    color: #b52b2b;
}

.site-submission-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.site-submission-replies {
    margin-top: 14px;
}

.site-submission-replies ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-submission-replies li {
    margin-top: 10px;
    border: 1px solid #bbb;
    border-top: 3px solid #ff6b6b;
}

.site-submission-replies li:first-child {
    margin-top: 0;
}

.site-submission-reply-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
}

.site-submission-reply-heading span,
.site-submission-reply-heading time {
    color: #777;
    font-size: 12px;
}

.site-submission-reply-heading time {
    margin-left: auto;
}

.site-submission-reply-label {
    padding: 7px 10px 0;
    border-top: 1px solid #ddd;
    background: #f7f7f7;
    color: #d94343;
    font-size: 12px;
    font-weight: bold;
}

.site-submission-replies li p {
    margin: 0;
    padding: 2px 10px 9px;
    background: #f7f7f7;
    line-height: 1.65;
}

@media screen and (max-width: 480px) {
    .site-submission-reply-heading {
        flex-wrap: wrap;
    }

    .site-submission-reply-heading time {
        width: 100%;
        margin-left: 0;
    }
}

.search-result-notice,
.search-empty-result {
    margin: 10px 0;
    padding: 8px 10px;
    border: 1px solid #cfd8e3;
    background: #f7fbff;
    color: #333;
    font-size: 14px;
}

.search-empty-result {
    background: #fff8f0;
    border-color: #e5c6a3;
}

.page-intro {
    margin: 14px 20px;
    color: #3D3D3D;
}

.empty-state-message {
    padding: 14px 4px;
    color: #777;
}

/* ==========================================
 * 6. Online and offline site lists
 * ========================================== */
.vivo,
.death {
    margin: 4px 0 15px -15px;
    list-style: none;
    padding-left: 0;
}

.vivo li,
.death li {
    margin-left: 15px;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Shared bordered surface used by site lists and logos. */
.site-row-box,
.floating-action-button.back-to-top-button {
    border: 1px solid var(--border-color-row);
    background: #fff;
}

.site-row-box.is-hoverable {
    transition: background-color 0.12s ease;
}

.site-row-box.is-hoverable:hover {
    background-color: #f8f8f8;
}

.site-row-box.is-hoverable:active {
    background-color: #eeeeee;
}

.vivo li {
    -webkit-hyphens: auto;
    padding: 3px 0;
}

.vivo a,
.death a {
    display: inline;
    word-break: break-word;
}

.vivo a {
    color: red;
}

.death {
    color: #a0a0a0;
    padding-top: 5px;
    margin-top: 10px;
}

.death a {
    color: #5f5f5f;
}

.site-num,
.site-num-offline {
    width: 1.5em;
    margin-right: 3px;
    text-align: right;
}

.site-num {
    color: #666;
}

.site-num-offline {
    color: #999;
}

.offline-warning {
    display: inline-block;
    margin-right: 3px;
    color: #ff6666;
    font-size: 17px;
    line-height: 1;
    vertical-align: -1px;
}

/* Native disclosure keeps offline lists usable without JavaScript. */
.offline-sites-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 6px 10px;
    border: 1px solid #e6bcbc;
    background: #fff3f3;
    color: #873e3e;
    font-weight: 600;
    line-height: 1.6;
    word-break: keep-all;
    cursor: pointer;
    list-style: none;
}

.offline-sites-toggle::-webkit-details-marker {
    display: none;
}

.offline-sites-count,
.offline-sites-expand,
.offline-sites-collapse {
    white-space: nowrap;
}

.offline-sites-expand,
.offline-sites-collapse {
    flex-shrink: 0;
    padding: 2px 8px;
    border: 1px solid #d7aaaa;
    background: #fff;
    font-size: var(--font-size-control);
    font-weight: normal;
    line-height: 24px;
}

.offline-sites-collapse,
.offline-sites[open] .offline-sites-expand {
    display: none;
}

.offline-sites[open] .offline-sites-collapse {
    display: inline;
}

.site-desc {
    color: #666;
    text-decoration: none;
}

.site-name {
    font-size: calc(1em + 1px);
}

.site-name-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.site-new-badge,
.site-response-time,
.site-status-badge {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 0 4px;
    border: 1px solid currentColor;
    border-radius: 2px;
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    vertical-align: 1px;
}

.site-new-badge {
    color: #ff3b30;
    letter-spacing: 0.2px;
}

.site-response-time {
    gap: 2px;
    color: var(--color-green);
}

.site-status-badge {
    gap: 2px;
    cursor: help;
}

.site-status-icon,
.site-response-icon {
    width: 14px;
    height: 11px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.5;
}

.site-status-icon {
    width: 13px;
}

.site-status-tooltip {
    position: fixed;
    z-index: 10000;
    max-width: calc(100vw - 16px);
    padding: 5px 8px;
    border: 1px solid #888;
    background: #fff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    font-size: 14px;
    line-height: 1.4;
    pointer-events: none;
}

.site-status-badge.site-status-orange {
    color: #d28a00;
}

.site-status-badge.site-status-red {
    color: #c83c36;
}

.site-status-badge.site-status-green {
    color: var(--color-green);
}

.content-status-badge {
    min-width: 20px;
    justify-content: center;
    padding: 0 3px;
    cursor: default;
    vertical-align: 1px;
}

.site-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

a.site-tag {
    min-height: 24px;
    padding: 1px 6px;
    border-color: #999;
    color: var(--tag-color);
    font-size: 13px;
    line-height: 20px;
}

a.site-main-link:hover {
    text-decoration: none;
}

a.site-main-link:hover .site-name {
    text-decoration: underline;
}

a.site-main-link:active {
    opacity: 0.72;
}

/* Reviews and status activity. */
.review-item {
    padding: 8px 0;
    border-top: 1px solid #eee;
}

.review-item:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.activity-list {
    max-height: 320px;
    overflow-y: auto;
}

.activity-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 8px;
    overflow-wrap: anywhere;
}

.activity-item .review-meta {
    grid-column: 2;
    grid-row: 1;
    white-space: nowrap;
}

.activity-url-link {
    grid-column: 1 / -1;
}

.review-meta {
    color: #777;
    font-size: 13px;
}

.review-content {
    color: #333;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Compact article spacing is shared by desktop and mobile. */
.article-list,
.article-content {
    font-size: 16px;
}

.article-list {
    margin: 8px 0 8px 20px;
    padding-left: 20px;
    line-height: 1.5;
}

.article-list a {
    color: inherit;
}

.article-list li {
    margin-bottom: 2px;
    padding: 1px 0;
    overflow-wrap: anywhere;
}

/* Article text uses the shared panels and content wrapping above. */
.article-title {
    margin: 0 0 10px;
    color: #333;
    font-size: 20px;
    text-align: left;
    overflow-wrap: anywhere;
}

/* ==========================================
 * 7. Category headers
 * ========================================== */
.category-header {
    width: 100%;
    border: 0;
    padding: 0;
    border-spacing: 0;
    cursor: pointer;
    transition: filter 0.12s ease;
}

.category-header:hover {
    filter: brightness(1.04);
}

.category-header:active {
    filter: brightness(0.96);
}

.category-header td {
    padding: 5px 10px;
}

.category-title {
    color: #ffffff;
    font-size: 16px;
}

.category-title-link {
    text-decoration: none;
}

.category-title-link:hover {
    text-decoration: underline;
}

.category-toggle {
    float: right;
    margin-left: 10px;
}

.category-toggle-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 1;
}

.category-toggle-button:focus {
    outline: 1px dotted #333;
    outline-offset: 2px;
}

.category-toggle-button:disabled {
    cursor: wait;
    opacity: 0.75;
}

.toggle-label {
    display: block;
    min-width: 48px;
    color: #ffffff;
    font-size: var(--font-size-control);
    line-height: 18px;
    letter-spacing: 0;
    text-align: right;
    white-space: nowrap;
}

.update-date {
    color: gray;
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
}

.category-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 4px 0;
}

.category-submission-prompt {
    flex: 0 0 auto;
    color: #555;
    font-size: 14px;
    white-space: nowrap;
}

.category-submission-prompt a {
    color: #ff0000;
}

@media screen and (max-width: 480px) {
    .category-submission-prompt,
    .update-date {
        font-size: clamp(10px, 3.3vw, 14px);
    }
}

.category-load-status {
    margin: 8px 0;
    padding: 10px;
    border: 1px solid #d8d8d8;
    background: #fafafa;
    color: #555;
    font-size: 13px;
}

.category-load-error {
    border-color: #e3b7b7;
    background: #fff6f6;
    color: #9b2c2c;
}

/* Delay below-the-fold painting while retaining all links in HTML for crawlers. */
.public-home .category-content {
    content-visibility: auto;
    contain-intrinsic-size: auto 700px;
}

/* ==========================================
 * 8. Notices and footer
 * ========================================== */
.notice-box {
    background-color: #CBCBE7;
    padding: 10px;
}

.notice-box .notice-title {
    text-align: center;
    font-weight: bold;
}

.notice-box ol {
    margin: 10px 0 0 20px;
    padding: 0;
}

.notice-box li {
    margin-bottom: 5px;
}

.footer-copyright {
    text-align: center;
    margin: 20px 0;
}

.footer-copyright a {
    color: #666;
}

/* ==========================================
 * 9. Floating action buttons
 * ========================================== */
.floating-action-button {
    --floating-edge: max(4px, calc((100% - 900px) / 2 - 60px));
    position: fixed;
    right: var(--floating-edge);
    bottom: calc(4px + env(safe-area-inset-bottom, 0px));
    z-index: 9999;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--color-green);
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    transition: opacity 0.2s ease, transform 0.15s ease, visibility 0.2s ease;
}

.floating-action-button[hidden] {
    display: none;
}

.floating-action-button:hover {
    transform: scale(1.05);
}

.floating-action-button:active {
    transform: scale(0.95);
}

.back-to-top-button {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.back-to-top-button.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ==========================================
 * 11. Utilities
 * ========================================== */
.text-center {
    text-align: center;
}

.logo-wrapper {
    display: inline-block;
    width: 150px;
}

.logo-wrapper img {
    width: 100%;
    height: auto;
}

.logo-wrapper a {
    cursor: pointer;
}

.sr-only {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ==========================================
 * 12. Responsive layout
 * ========================================== */
@media screen and (max-width: 768px) {
    .main-container {
        padding: 0 5px;
    }

    .logo-wrapper {
        width: 125px;
    }

    .nav-menu {
        gap: 4px;
    }

    .nav-menu a {
        padding: 5px 10px;
    }

    .search-box {
        padding: 8px;
    }

    .search-box input[type="text"] {
        max-width: 150px;
    }

    .category-toggle-button {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        min-width: 48px;
        min-height: 32px;
    }

}

@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .main-container {
        table-layout: fixed;
    }

    .toggle-label {
        line-height: 20px;
    }

    .nav-menu {
        margin-bottom: 6px;
        padding: 3px 0;
    }

    .nav-menu a {
        padding: 5px 8px;
    }

    .js-enabled [data-mobile-nav]:not(.is-expanded) a:nth-of-type(n+6) {
        display: none;
    }

    .js-enabled [data-mobile-nav] .nav-toggle-button {
        display: inline-flex;
        padding: 5px 8px;
    }

    .search-box {
        margin-bottom: 6px;
        padding: 6px 8px;
    }

    .search-box input[type="text"] {
        min-width: 0;
        max-width: none;
        font-size: 16px;
    }

    .search-box button {
        padding: 6px 12px;
    }

    .site-submission-page {
        margin: 12px 0;
        padding: 14px 12px;
    }

    .site-submission-form input,
    .site-submission-form select,
    .site-submission-form textarea {
        font-size: 16px;
    }

    .vivo li,
    .death li {
        font-size: 16px;
    }

    .site-tags {
        gap: 4px;
        margin-top: 2px;
    }

    a.site-tag {
        min-height: 28px;
        padding: 2px 7px;
        font-size: 14px;
    }

    .category-title {
        font-size: 15px;
    }
}
