.ipipipip-728 { width: 970px; height: 250px; display:inline-block; }
@media(max-width: 728px) { .ipipipip-728 { width: 300px; height: 250px; display:inline-block; } }

.ipipipip-336 { width: 300px; height: 250px; display:inline-block; }
@media(max-width: 728px) { .ipipipip-336 { width: 300px; height: 250px; display:inline-block; } }

.ipipipip-160 { width: 300px; height: 250px; display:inline-block; }
@media(min-width: 728px) { .ipipipip-160 { width: 300px; height: 600px; display:inline-block; } }


:root {
    --base-size: 18px;
    --page-bg: #f4f6f8;
    --card-bg: #ffffff;
    --text: #20252b;
    --muted: #6b737c;
    --line: #e2e6ea;
    --accent: #e0005f;
    --accent-hover: #c00050;
    --accent-blue: #1769aa;
}
* { box-sizing: border-box; }
html { font-size: var(--base-size); }
body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Arial, sans-serif;
    line-height: 1.5;
}
/* Global links – site theme */
a { color: var(--accent); text-decoration: none; }
a:link { color: var(--accent); }
a:visited { color: #9a0045; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
a:active { color: #c00050; }

.container { width: min(1100px, calc(100% - 28px)); margin: 0 auto; padding-bottom: 80px; }

/* Top bar */
.topbar { padding: 12px 0; }
.topbar-inner {
    display: flex; justify-content: flex-end; align-items: center;
    gap: 8px; flex-wrap: wrap;
}
.control {
    height: 36px; border: 1px solid var(--line); background: #fff;
    border-radius: 6px; color: var(--text); padding: 0 10px; font-size: .9rem;
}
.size-buttons { display: flex; gap: 4px; }
.size-buttons button { min-width: 36px; cursor: pointer; }

/* Header / Logo */
.header { padding: 10px 0 18px; text-align: center; }
.header .logo {
    font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800;
    color: var(--accent); margin: 0; letter-spacing: -0.02em;
    text-decoration: none; display: inline-block;
}
.header .logo span { color: var(--text); }
.header .logo:hover { opacity: .85; }
.header p { color: var(--muted); margin: 8px 0 0; font-size: .95rem; }

/* Menu (PC + mobile horizontal – kept as is) */
.nav-menu {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 4px;
    margin-bottom: 18px; background: #fff; border: 1px solid var(--line);
    border-radius: 10px; padding: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.03);
}
.nav-menu a {
    display: inline-block; padding: 8px 14px; border-radius: 6px;
    text-decoration: none; color: var(--text); font-size: .88rem; font-weight: 600;
    transition: background .15s, color .15s;
}
.nav-menu a:hover { background: #f8f0f4; color: var(--accent); }
.nav-menu a.active { background: var(--accent); color: #fff; }

/* Visitor IP banner (large, centered, like screenshot) */
.visitor-ip-banner {
    text-align: center;
    margin: 18px 0 22px;
    font-size: clamp(1.15rem, 3.5vw, 1.55rem);
    font-weight: 600;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.visitor-ip-banner a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}
.visitor-ip-banner a:hover { text-decoration: underline; }
.visitor-ip-label { font-weight: 600; color: var(--text); }
.visitor-ip-value { margin-top: 4px; }
.visitor-ip-value a { color: var(--accent); font-weight: 700; }

/* Search card – 1.3x larger, centered text */
.search-card, .info-card, .map-card, .history-card, .content-card {
    background: var(--card-bg); border: 1px solid var(--line);
    border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.search-card { padding: 22px; margin-bottom: 18px; }
.search-form {
    display: flex; gap: 12px; align-items: center; justify-content: center;
}
.search-form input {
    min-width: 0; flex: 1; max-width: 640px;
    height: 62px;
    border: 1px solid #ccd2d8;
    border-radius: 9px; padding: 0 18px;
    font-size: 1.2rem; line-height: 1.4; outline: none;
    text-align: center;
}
.search-form input:focus { border-color: var(--accent); }
.search-form button {
    height: 62px; border: 0; border-radius: 9px;
    padding: 0 28px;
    background: var(--accent); color: #fff; cursor: pointer;
    font-size: 1.15rem; font-weight: 600; white-space: nowrap;
}
.search-form button:hover { background: var(--accent-hover); }
.search-form button.btn-reset {
    background: #6b737c;
}
.search-form button.btn-reset:hover { background: #555b63; }

.error {
    margin-top: 14px; padding: 12px 14px; border-radius: 7px;
    background: #fff1f1; color: #a52828; text-align: center;
}

/* Map right below search */
.map-card { overflow: hidden; margin-bottom: 18px; }
.map-title { padding: 14px 18px; font-size: 1.1rem; font-weight: 700; }
#map {
    height: 420px;
    min-height: 320px;
    width: 100%;
    background: #dce6ee;
    z-index: 1;
    position: relative;
}
.leaflet-container { width: 100% !important; height: 100% !important; font: inherit; }
.map-card { position: relative; z-index: 1; }

/* Grid results */
.grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px;
}
.info-card { padding: 20px; }
.info-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td {
    padding: 9px 0; border-bottom: 1px solid var(--line);
    text-align: left; vertical-align: top; font-size: .95rem;
}
.info-table th {
    width: 7.5em;
    min-width: 7.5em;
    max-width: 8.5em;
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
}
.info-table td {
    word-break: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
}
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }

.note { margin: 0 0 24px; color: var(--muted); font-size: .86rem; }
/* WHOIS search */
.whois-search-area {
    margin: 0 0 18px;
    text-align: center;
}
.whois-search-form {
    margin: 0;
    text-align: center;
}
.whois-search-button {
    width: 100%;
    min-height: 48px;
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.3;
}
.whois-search-button:hover { background: var(--accent-hover); }
.whois-card { scroll-margin-top: 18px; }
.whois-card .whois-search-form { margin-top: 4px; }
.whois-help {
    margin-top: 9px;
    color: var(--muted);
    font-size: .82rem;
    text-align: center;
}
.whois-data {
    margin: 0;
    padding: 14px;
    background: #f7f8fa;
    border: 1px solid var(--line);
    border-radius: 8px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: .78rem;
    line-height: 1.55;
    overflow-x: auto;
}


/* History */
.history-card { padding: 16px 18px; margin-bottom: 18px; }
.history-card h3 { margin: 0 0 10px; font-size: 1rem; }
.history-list { display: flex; flex-wrap: wrap; gap: 6px; }
.history-list a {
    display: inline-block; padding: 4px 10px; background: #f0f2f5;
    border-radius: 20px; font-size: .85rem; text-decoration: none; color: var(--text);
}
.history-list a:hover { background: #e8dce3; color: var(--accent); }
.history-clear {
    margin-left: 8px; font-size: .8rem; color: var(--muted); cursor: pointer;
    background: none; border: none; text-decoration: underline;
}

/* Content pages */
.content-card { padding: 24px; margin-bottom: 18px; }
.content-card h2 { margin-top: 0; color: var(--accent); }
.content-card table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.content-card th, .content-card td {
    border: 1px solid var(--line); padding: 8px 12px; text-align: left; font-size: .9rem;
}
.content-card th { background: #f8f9fb; }

/* Ads */
.ad-slot { text-align: center; margin: 14px 0; }
.ad-slot:empty { display: none; }
.ad-300 {
    min-height: 250px;
    max-width: 300px;
    margin: 14px auto;
}
.ad-placeholder {
    background: repeating-linear-gradient(
        -45deg, #f0f0f0, #f0f0f0 8px, #e4e4e4 8px, #e4e4e4 16px
    );
    border: 2px dashed #bbb;
    color: #666;
    font-size: .85rem;
    font-weight: 600;
    padding: 18px 12px;
    border-radius: 8px;
    min-height: 60px;
    display: flex; align-items: center; justify-content: center;
}

/* Footer */
.footer {
    border-top: 1px solid var(--line); padding: 18px 0 32px;
    color: var(--muted); font-size: .85rem; text-align: center;
}
.footer a { color: var(--muted); text-decoration: underline; }
.footer a:hover { color: var(--accent); }
.footer .cookie-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    background: #111;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: .85rem;
}
.footer .cookie-btn:hover { opacity: .85; color: #fff; }
html { scroll-behavior: smooth; }
/* Cookie consent overlay */
.cookie-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.55);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.cookie-box {
    background: #111; color: #fff; max-width: 520px; width: 100%;
    padding: 28px 24px; border-radius: 12px; text-align: center;
    opacity: 0.92; box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.cookie-box h3 { margin: 0 0 12px; font-size: 1.2rem; }
.cookie-box p { margin: 0 0 18px; font-size: .95rem; line-height: 1.6; opacity: .9; }
.cookie-box .btn {
    display: inline-block; background: #0ea1d1; color: #fff;
    padding: 10px 28px; border-radius: 8px; text-decoration: none;
    font-weight: 600; border: none; cursor: pointer; font-size: 1rem;
}
.cookie-box .btn:hover { opacity: .85; }
.cookie-box .policy-link {
    display: block; margin-top: 12px; color: #aaa; font-size: .85rem;
}



/* ===== Mobile fixed hamburger (bottom-left) – ADDITIONAL ===== */
.mobile-fab {
    display: none;
    position: fixed;
    left: 16px;
    bottom: 20px;
    z-index: 10040;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(224,0,95,.35);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.mobile-fab .bars {
    display: flex; flex-direction: column; gap: 5px; width: 22px;
}
.mobile-fab .bars span {
    display: block; height: 2.5px; background: #fff; border-radius: 1px;
    transition: transform .28s ease, opacity .2s;
}
.mobile-fab.open .bars span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.mobile-fab.open .bars span:nth-child(2) { opacity: 0; }
.mobile-fab.open .bars span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-overlay-menu {
    display: none;
    position: fixed;
    left: 16px;
    bottom: 80px;
    z-index: 10030;
    min-width: 200px;
    max-width: 80vw;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 32px rgba(0,0,0,.18);
    padding: 8px 0;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transform-origin: bottom left;
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}
.mobile-overlay-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.mobile-overlay-menu a {
    display: block;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: .95rem;
    transition: background .15s, color .15s, padding-left .15s;
}
.mobile-overlay-menu a:hover,
.mobile-overlay-menu a.active {
    background: #f8f0f4;
    color: var(--accent);
    padding-left: 22px;
}
.mobile-overlay-menu a.active {
    background: var(--accent);
    color: #fff;
}

@media (max-width: 720px) {
	.topbar-inner {margin-right:5px} 
    html { font-size: calc(var(--base-size) * 1.2); }
    .container { width: min(100%, 1100px); padding-bottom: 96px; }
    .grid { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }

    .search-card { padding: 18px 14px; margin-bottom: 0; border: 0; }
    .search-form {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    /* search input ~20% larger */
    .search-form input {
        max-width: 100%;
        width: 100%;
        height: 72px;
        font-size: 1.25rem;
        line-height: 1.4;
        padding: 13px 16px;
        border-radius: 10px;
    }
    /* search + reset buttons ~20% smaller */
    .search-form button {
        width: 100%;
        height: 42px;           /* was ~52 → -20% */
        font-size: 0.95rem;
        padding: 0 16px;
        border-radius: 8px;
    }
    .search-form button.btn-reset {
        height: 42px;
        font-size: 0.95rem;
    }

    .visitor-ip-banner {
        margin: 14px 0 16px;
        padding: 0 8px;
        font-size: clamp(1.05rem, 4vw, 1.35rem);
        line-height: 1.45;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    .visitor-ip-label {
        font-size: 0.95em;
        font-weight: 600;
        color: var(--text);
    }
    .visitor-ip-value {
        margin-top: 0;
        font-size: 1.15em;
    }
    .visitor-ip-value a {
        color: var(--accent);
        font-weight: 700;
        word-break: break-all;
    }

    .header { padding: 8px 0 14px; }
    .header p { padding: 0 6px; font-size: .9rem; }

    #map { height: 300px; min-height: 260px; width: 100%; }
    .map-card { margin-bottom: 0; border: 0; }
    .map-title { padding: 12px 14px; }

    .info-card { padding: 16px 14px; }
    .history-card { padding: 14px; }
    .content-card { padding: 16px 14px; }

    .nav-menu { gap: 2px; padding: 6px; margin-bottom: 14px; display:none}
    .nav-menu a { padding: 7px 10px; font-size: .8rem; }

    .ad-slot { margin: 12px 0; }
    .ad-placeholder { padding: 14px 10px; min-height: 48px; font-size: .8rem; }

    .footer { padding: 16px 8px 40px; font-size: .82rem; }

    .mobile-fab { display: flex; }
    .mobile-overlay-menu { display: block; }

    /* cards: no margin, no border on mobile */
    .search-card,
    .info-card,
    .map-card,
    .history-card,
    .content-card {
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
        margin-bottom: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .grid,
    .grid-3 {
        gap: 0;
        margin-bottom: 0;
    }
    .search-card { margin-bottom: 0; padding: 18px 14px; }
    .map-card { margin-bottom: 0; }
    .history-card { margin-bottom: 0; }
    .content-card { margin-bottom: 0; }
    .note { margin: 12px 14px; }

    /* ads centered on mobile */
    .ad-slot,
    .ad-placeholder,
    .ad-300 {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .ad-300 {
        margin-left: auto;
        margin-right: auto;
    }

}

.geolite-note {
    display: inline-block;
    margin-top: 8px;
    font-size: .8rem;
    color: var(--muted);
}
.geolite-note a { color: var(--accent); }

/* Page search + pager */
.page-search {
    display: flex; gap: 10px; margin: 16px auto 20px; flex-wrap: wrap;
    align-items: center; justify-content: center; max-width: 720px;
}
.page-search input[type=text] {
    flex: 1; min-width: 200px; max-width: 480px;
    height: 55px; /* ~1.3x of 42 */
    border: 1px solid var(--line);
    border-radius: 9px; padding: 0 16px; font-size: 1.15rem;
    text-align: center;
}
.page-search button {
    height: 55px; border: 0; border-radius: 9px; padding: 0 24px;
    background: var(--accent); color: #fff; font-weight: 600;
    cursor: pointer; font-size: 1.1rem;
}
.page-search .btn-clear {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%; background: #eee;
    color: #333; text-decoration: none; font-size: 1.2rem;
}
.data-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.data-table th, .data-table td {
    border: 1px solid var(--line); padding: 8px 12px; text-align: left; font-size: .9rem;
    word-break: break-word; overflow-wrap: anywhere;
}
.data-table th { background: #f8f9fb; white-space: nowrap; }
mark.hl {
    background: var(--accent);
    color: #fff;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
}
.pager {
    display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
    margin: 18px 0 8px;
}
.pager a, .pager span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 10px;
    border-radius: 6px; border: 1px solid var(--line);
    text-decoration: none; color: var(--text); font-weight: 600; font-size: .9rem;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .current {
    background: var(--accent); color: #fff; border-color: var(--accent);
}
.grid-3 {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px;
}
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: 1fr; }
}

/* 국가코드/TLD/용어사전/유용한사이트/사이트맵 페이지: PC는 컨텐츠 좌측 + 300x600 광고 우측,
   모바일은 컨텐츠 아래에 광고가 오도록 세로 스택 */
.page-layout {
    display: flex; align-items: flex-start; gap: 20px;
}
.page-layout .page-main { flex: 1; min-width: 0; }
.page-layout .page-side-ad {
    flex: 0 0 300px; width: 300px; display: flex; justify-content: center;
}
@media (max-width: 900px) {
    .page-layout { flex-direction: column; }
    .page-layout .page-side-ad { width: 100%; flex: 0 0 auto; }
}

/* OSM embed map (reliable, no blank tiles) */
.map-frame-wrap {
    width: 100%;
    height: 420px;
    min-height: 320px;
    background: #dce6ee;
    position: relative;
    overflow: hidden;
}
.map-iframe {
    border: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.map-open-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    font-size: .85rem;
    background: #f7f8fa;
    border-top: 1px solid var(--line);
}
.map-open-link a { font-weight: 600; }
.map-coords { color: #666; font-family: monospace; }
@media (max-width: 720px) {
    .map-frame-wrap { height: 300px; min-height: 260px; }
}

.map-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.map-coords-inline { font-size: .85rem; font-weight: 500; color: #666; font-family: ui-monospace, monospace; }
#map {
    height: 420px !important;
    min-height: 320px;
    width: 100% !important;
    background: #d0dce6;
    z-index: 1;
    position: relative;
}
.leaflet-container { width: 100% !important; height: 100% !important; background: #d0dce6; }
.leaflet-control-zoom a { width: 30px !important; height: 30px !important; line-height: 30px !important; font-size: 16px !important; }
@media (max-width: 720px) {
    #map { height: 320px !important; min-height: 280px; }
}

.map-wrap {
    position: relative;
    width: 100%;
}
.map-info-box {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #c8c8c8;
    border-radius: 12px;
    padding: 12px 16px;
    min-width: 200px;
    max-width: min(320px, 90%);
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    font-size: 0.9rem;
    line-height: 1.55;
    pointer-events: auto;
}
.map-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    align-items: baseline;
}
.map-info-row .k {
    color: #333;
    font-weight: 600;
    white-space: nowrap;
}
.map-info-row .sep { color: #333; margin-right: 2px; }
.map-info-row .v {
    color: #111;
    word-break: break-all;
}
@media (max-width: 720px) {
    .map-info-box {
        right: 8px;
        bottom: 8px;
        padding: 10px 12px;
        font-size: 0.74rem;
        border-radius: 10px;
        max-width: calc(100% - 16px);
    }
}

.map-legal {
    margin: 8px 4px 14px;
    padding: 0 4px;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.45;
    text-align: center;
}


/* WHOIS / additional network registration information */
.whois-layout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.whois-layout .whois-card {
    flex: 1 1 auto;
    min-width: 0;
}
.whois-side-ad {
    flex: 0 0 300px;
    width: 300px;
    display: flex;
    justify-content: center;
}
.whois-card {
    margin-top: 0;
    margin-bottom: 15px;
}
.whois-data {
    margin: 0;
    padding: 16px;
    background: #f7f8fa;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .82rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    overflow-x: auto;
}
@media (max-width: 900px) {
    .whois-layout {
        flex-direction: column;
    }
    .whois-side-ad {
        width: 100%;
        flex: 0 0 auto;
    }
}
@media (max-width: 720px) {
    .whois-data {
        padding: 12px;
        font-size: .72rem;
    }
}
