/*
Theme Name: でんわチェック
Theme URI: https://denwachek.com
Description: でんわチェック専用テーマ
Version: 0.1.0
Text Domain: denwachek-theme
*/

/* ===== Reset / Base ===== */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.7;
    font-size: 16px;
}
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
.container { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* ===== Header ===== */
.site-header { background: #1a3a5c; color: #fff; }
.header-top { padding: 12px 0; }
.header-top .container {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}

/* Branding */
.site-branding { flex-shrink: 0; }
.site-logo {
    display: flex; align-items: center; gap: 8px;
    color: #fff; font-size: 1.3rem; font-weight: bold;
}
.site-logo:hover { text-decoration: none; opacity: .85; }
.logo-icon { font-size: 1.4rem; line-height: 1; }
.logo-text strong { color: #ff9f6b; }
.site-tagline { color: rgba(255,255,255,.6); font-size: .72rem; margin-top: 2px; display: block; }

/* Header search */
.header-search { display: flex; flex: 1; min-width: 200px; gap: 6px; }
.header-search input {
    flex: 1; padding: 8px 12px;
    border: none; border-radius: 4px; font-size: .95rem;
}
.header-search input:focus { outline: 2px solid #ff9f6b; }
.header-search button {
    padding: 8px 18px; background: #ff6b35; color: #fff;
    border: none; border-radius: 4px; cursor: pointer; font-size: .95rem; white-space: nowrap;
    font-weight: bold;
}
.header-search button:hover { background: #e55a25; }

/* Global nav */
.global-nav { background: rgba(0,0,0,.25); border-top: 1px solid rgba(255,255,255,.1); }
.global-nav .container { display: flex; align-items: center; }
.global-nav ul { display: flex; }
.global-nav ul li a {
    display: block; padding: 10px 16px;
    color: rgba(255,255,255,.85); font-size: .88rem;
}
.global-nav ul li a:hover {
    background: rgba(255,255,255,.12); text-decoration: none; color: #fff;
}
.global-nav ul li.current a { color: #ff9f6b; border-bottom: 2px solid #ff6b35; }

/* Hamburger */
.nav-toggle {
    display: none; margin-left: auto;
    background: none; border: none; color: #fff; font-size: 1.4rem;
    cursor: pointer; padding: 8px;
}

/* ===== Main ===== */
.site-main { padding: 24px 0 56px; }

/* ===== Hero ===== */
.hero-section {
    background: linear-gradient(135deg, #1a3a5c 0%, #2a5298 100%);
    border-radius: 10px; padding: 40px 24px;
    text-align: center; margin-bottom: 24px;
    color: #fff;
}
.hero-section h1 { margin: 0 0 8px; font-size: 1.9rem; color: #fff; }
.hero-section p { color: rgba(255,255,255,.8); margin: 0 0 24px; font-size: .95rem; }
.hero-search { display: flex; max-width: 520px; margin: 0 auto; gap: 8px; }
.hero-search input {
    flex: 1; padding: 14px 16px;
    border: none; border-radius: 6px; font-size: 1.05rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.hero-search input:focus { outline: 2px solid #ff9f6b; }
.hero-search button {
    padding: 14px 28px; background: #ff6b35; color: #fff;
    border: none; border-radius: 6px; cursor: pointer;
    font-size: 1.05rem; font-weight: bold; white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.hero-search button:hover { background: #e55a25; }

/* Stats bar */
.stats-bar {
    display: flex; justify-content: center; gap: 40px;
    flex-wrap: wrap; margin: 24px 0 0;
}
.stat-item { text-align: center; }
.stat-value { font-size: 1.7rem; font-weight: bold; color: #ff9f6b; line-height: 1.2; }
.stat-label { font-size: .75rem; color: rgba(255,255,255,.7); }

/* ===== Cards / Sections ===== */
.card {
    background: #fff; border-radius: 8px; padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-bottom: 20px;
}
.section-title {
    font-size: 1.1rem; margin: 0 0 16px;
    padding-bottom: 8px; border-bottom: 2px solid #1a3a5c;
    color: #1a3a5c;
}

/* ===== Recent reviews (index) ===== */
.recent-review-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: start;
}
.recent-review-item:last-child { border-bottom: none; }
.recent-number { font-weight: bold; font-size: .95rem; grid-row: 1; }
.recent-excerpt {
    color: #555; font-size: .88rem;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    grid-column: 2; grid-row: 2;
}
.recent-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; grid-column: 2; grid-row: 1; }
.recent-time { color: #999; font-size: .78rem; grid-column: 3; grid-row: 1; white-space: nowrap; }

/* ===== Badge ===== */
.badge {
    display: inline-block; padding: 2px 9px;
    border-radius: 12px; font-size: .75rem; font-weight: bold; white-space: nowrap;
}
.badge-mobile   { background: #e3f2fd; color: #1565c0; }
.badge-landline { background: #e8f5e9; color: #2e7d32; }
.badge-ip       { background: #f3e5f5; color: #6a1b9a; }
.badge-freedial { background: #fff3e0; color: #e65100; }
.badge-danger   { background: #ffebee; color: #c62828; }

/* ===== Phone detail ===== */
.phone-detail { background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.phone-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.phone-number { font-size: 2rem; margin: 0 0 10px; letter-spacing: .06em; color: #1a3a5c; }
.phone-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.business-name { font-weight: bold; font-size: 1rem; }
.phone-description { color: #555; margin: 10px 0 0; }
.phone-stats { display: flex; gap: 20px; margin-top: 12px; font-size: .85rem; color: #666; }
.phone-stats span strong { color: #1a3a5c; }

/* ===== Reviews ===== */
.reviews-section h2, .review-form-section h2 { @extend .section-title; }
.reviews-section h2, .review-form-section h2 {
    font-size: 1.1rem; margin: 0 0 16px;
    padding-bottom: 8px; border-bottom: 2px solid #1a3a5c; color: #1a3a5c;
}
.reviews-section { margin-bottom: 32px; }
.review-item { padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
.review-item:last-child { border-bottom: none; }
.review-header {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin-bottom: 8px; font-size: .82rem; color: #666;
}
.reviewer { font-weight: bold; color: #333; font-size: .9rem; }
.stars-display { display: flex; gap: 1px; }
.star { color: #ddd; font-size: .9rem; line-height: 1; }
.star.filled { color: #f5a623; }
.call-type { background: #f5f5f5; padding: 2px 8px; border-radius: 3px; font-size: .78rem; }
.review-body { margin: 0; color: #333; line-height: 1.75; }
.report-btn {
    margin-top: 8px; background: none; border: 1px solid #e0e0e0;
    border-radius: 3px; padding: 3px 10px; font-size: .75rem; color: #bbb; cursor: pointer;
}
.report-btn:hover { color: #c62828; border-color: #c62828; }
.no-reviews { color: #aaa; text-align: center; padding: 32px 0; font-size: .95rem; }

/* ===== Review form ===== */
.review-form-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid #eee; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 6px; font-size: .88rem; }
.required { color: #c62828; }
.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%; padding: 10px 12px;
    border: 1px solid #d0d0d0; border-radius: 4px;
    font-size: .95rem; font-family: inherit; transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: #1a3a5c; box-shadow: 0 0 0 2px rgba(26,58,92,.1);
}
.form-group textarea { resize: vertical; }

/* Star input */
.star-input { display: flex; gap: 4px; cursor: pointer; user-select: none; }
.star-btn {
    font-size: 1.8rem; color: #ddd; line-height: 1;
    transition: color .1s, transform .1s;
}
.star-btn.hover, .star-btn.active { color: #f5a623; transform: scale(1.1); }

.btn-submit {
    padding: 12px 36px; background: #1a3a5c; color: #fff;
    border: none; border-radius: 4px; font-size: 1rem;
    cursor: pointer; font-weight: bold; transition: background .2s;
}
.btn-submit:hover { background: #0d2840; }
.btn-submit:disabled { opacity: .55; cursor: not-allowed; }
.btn-cancel {
    padding: 12px 24px; background: #fff; color: #555;
    border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; cursor: pointer; margin-left: 8px;
}
.btn-cancel:hover { background: #f5f5f5; }
.form-message { margin-top: 12px; font-size: .88rem; min-height: 1.4em; }
.form-message.success { color: #2e7d32; }
.form-message.error   { color: #c62828; }

/* ===== Modal ===== */
.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-inner {
    background: #fff; border-radius: 8px; padding: 28px 24px;
    width: 92%; max-width: 460px; box-shadow: 0 4px 24px rgba(0,0,0,.2);
}
.modal-inner h3 { margin: 0 0 16px; font-size: 1.1rem; }

/* ===== Not found ===== */
.phone-notfound {
    background: #fff; border-radius: 8px; padding: 40px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08); text-align: center;
}
.notfound-number { font-size: 1.9rem; font-weight: bold; color: #1a3a5c; margin-bottom: 12px; }
.notfound-msg { font-size: 1.05rem; color: #666; margin-bottom: 6px; }
.notfound-sub { color: #999; font-size: .9rem; margin-bottom: 28px; }
.notfound-form { text-align: left; max-width: 540px; margin: 0 auto; }
.notfound-form h2 {
    font-size: 1.05rem; margin: 0 0 16px;
    padding-bottom: 8px; border-bottom: 2px solid #1a3a5c; color: #1a3a5c;
}

/* ===== Search results ===== */
.search-result-page { background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.search-result-page h1 { font-size: 1.25rem; margin: 0 0 20px; padding-bottom: 10px; border-bottom: 2px solid #1a3a5c; color: #1a3a5c; }
.result-item { padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.result-item:last-child { border-bottom: none; }
.result-number a { font-size: 1.1rem; font-weight: bold; color: #1a3a5c; }
.result-number a:hover { color: #ff6b35; text-decoration: none; }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0; font-size: .82rem; color: #666; }
.result-excerpt { color: #555; font-size: .88rem; margin: 4px 0 0; line-height: 1.6; }
.result-count { color: #888; font-size: .8rem; }
.empty-result { color: #aaa; text-align: center; padding: 40px 0; font-size: .95rem; }

/* ===== Footer ===== */
.site-footer { background: #1a3a5c; color: #8aa5c0; padding: 24px 0; text-align: center; font-size: .85rem; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-bottom: 12px; }
.footer-nav a { color: #8aa5c0; }
.footer-nav a:hover { color: #fff; text-decoration: none; }
.footer-nav .sep { color: #3a5a7c; }
.copyright { color: #5a7a9c; font-size: .78rem; margin: 0; }

/* ===== Column pages ===== */
.column-top, .column-single { }

.column-page-hero { text-align: center; padding: 32px 24px; margin-bottom: 20px; }
.column-page-hero h1 { margin: 0 0 8px; font-size: 1.7rem; color: #1a3a5c; }
.column-page-hero p { color: #666; margin: 0; }

.column-category-block { margin-bottom: 20px; }

/* Category badges */
.column-cat-badge {
    display: inline-block; padding: 3px 12px; border-radius: 3px;
    font-size: .8rem; font-weight: bold; margin-right: 6px;
}
.column-cat-scam    { background: #ffebee; color: #c62828; }
.column-cat-tips    { background: #e8f5e9; color: #2e7d32; }
.column-cat-number  { background: #e3f2fd; color: #1565c0; }
.column-cat-history { background: #f3e5f5; color: #6a1b9a; }

/* Article list */
.column-list { list-style: none; margin: 0; padding: 0; }
.column-list-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 0; border-bottom: 1px solid #f0f0f0; gap: 12px;
}
.column-list-item:last-child { border-bottom: none; }
.column-list-item a { color: #1a3a5c; flex: 1; line-height: 1.5; }
.column-list-item a:hover { color: #ff6b35; text-decoration: none; }
.column-date { color: #aaa; font-size: .78rem; white-space: nowrap; flex-shrink: 0; }
.column-empty { color: #bbb; text-align: center; padding: 20px 0; font-size: .9rem; }

/* Breadcrumb */
.breadcrumb {
    font-size: .82rem; color: #999; margin-bottom: 16px;
    display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.breadcrumb a { color: #0066cc; }
.breadcrumb a:hover { text-decoration: underline; }
.bc-sep { color: #ccc; }

/* Column article */
.column-article { margin-bottom: 20px; }
.column-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.column-title { font-size: 1.6rem; margin: 10px 0 8px; color: #1a3a5c; line-height: 1.4; }
.column-meta { color: #888; font-size: .85rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.column-meta-label { font-size: .75rem; background: #f0f0f0; color: #666; padding: 1px 6px; border-radius: 3px; margin-right: 3px; }
.column-meta-sep { color: #ccc; }
.column-meta time { color: #666; }
.updated-at { color: #bbb; }

/* Article body */
.column-body {
    font-size: 1rem; line-height: 1.9; color: #333;
}
.column-body .article-date { font-size: .82rem; color: #888; background: #f8f8f8; border-left: 3px solid #ccc; padding: 8px 12px; margin-bottom: 20px; line-height: 1.6; }
.column-body .disclaimer { font-size: .82rem; color: #999; background: #fafafa; border: 1px solid #e8e8e8; border-radius: 4px; padding: 10px 14px; margin-top: 28px; line-height: 1.7; }
.column-body h2 { font-size: 1.25rem; color: #1a3a5c; border-left: 4px solid #1a3a5c; padding-left: 10px; margin: 28px 0 12px; }
.column-body h3 { font-size: 1.1rem; color: #1a3a5c; margin: 24px 0 8px; }
.column-body p { margin: 0 0 16px; }
.column-body ul, .column-body ol { padding-left: 1.6em; margin: 0 0 16px; }
.column-body li { margin-bottom: 6px; }
.column-body strong { color: #1a3a5c; }
.column-body a { color: #0066cc; }
.column-body blockquote {
    border-left: 4px solid #e0e0e0; margin: 16px 0; padding: 8px 16px;
    color: #666; background: #fafafa; border-radius: 0 4px 4px 0;
}

/* Back button */
.btn-back {
    display: inline-block; color: #0066cc; font-size: .9rem;
    padding: 8px 0;
}
.btn-back:hover { text-decoration: underline; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .nav-toggle { display: block; }
    .global-nav ul { display: none; flex-direction: column; width: 100%; }
    .global-nav.open ul { display: flex; }
    .global-nav ul li a { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); }

    .header-top .container { flex-wrap: wrap; gap: 10px; }
    .header-search { min-width: 100%; order: 3; }
    .site-branding { order: 1; }
    .nav-toggle { order: 2; }

    .phone-number { font-size: 1.5rem; }
    .hero-section h1 { font-size: 1.4rem; }
    .hero-search { flex-direction: column; }
    .stats-bar { gap: 20px; }

    .btn-cancel { margin-left: 0; margin-top: 8px; display: block; width: 100%; text-align: center; }
    .btn-submit { width: 100%; }

    .recent-review-item { grid-template-columns: 1fr auto; }
    .recent-excerpt { grid-column: 1 / -1; grid-row: 3; }
}

/* ===== Ranking Page ===== */
.ranking-header { margin-bottom: 16px; }
.ranking-header h1 { margin: 0 0 4px; }
.ranking-subtitle { color: #666; font-size: .875rem; margin: 0 0 16px; }
.ranking-tabs { display: flex; gap: 8px; }
.ranking-tab { display: inline-block; padding: 6px 18px; border-radius: 20px; background: #f0f0f0; color: #444; text-decoration: none; font-size: .875rem; transition: background .2s; }
.ranking-tab:hover { background: #e0e0e0; }
.ranking-tab.active { background: var(--primary); color: #fff; }

.ranking-list { list-style: none; padding: 0; margin: 0; }
.ranking-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eee; }
.ranking-item:last-child { border-bottom: none; }
.ranking-rank { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 700; font-size: .9rem; background: #e0e0e0; color: #555; flex-shrink: 0; }
.ranking-rank.rank-1 { background: #ffd700; color: #7a5800; }
.ranking-rank.rank-2 { background: #c0c0c0; color: #444; }
.ranking-rank.rank-3 { background: #cd7f32; color: #fff; }
.ranking-info { flex: 1; min-width: 0; }
.ranking-number { font-size: 1.05rem; font-weight: 700; color: var(--primary); text-decoration: none; display: block; }
.ranking-number:hover { text-decoration: underline; }
.ranking-biz { display: block; font-size: .8rem; color: #666; margin-top: 2px; }
.ranking-stats { display: flex; gap: 12px; flex-shrink: 0; }
.ranking-stats .stat-item { display: flex; flex-direction: column; align-items: center; font-size: .75rem; }
.ranking-stats .stat-label { color: #999; }
.ranking-stats .stat-value { font-weight: 700; color: #333; }
.ranking-empty { color: #999; text-align: center; padding: 32px 0; }

/* ===== Number Band Page ===== */
.number-band-list { list-style: none; padding: 0; margin: 0; }
.number-band-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.number-band-item:last-child { border-bottom: none; }
.number-band-link { font-weight: 600; color: var(--primary); text-decoration: none; font-size: 1rem; }
.number-band-link:hover { text-decoration: underline; }
.number-band-biz { color: #666; font-size: .85rem; flex: 1; }
.number-band-reviews { font-size: .8rem; color: #999; white-space: nowrap; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #eee; }
.page-link { color: var(--primary); text-decoration: none; font-size: .875rem; }
.page-link:hover { text-decoration: underline; }
.page-current { font-size: .875rem; color: #666; }

/* ===== Static Pages ===== */
.static-page .card h1 { font-size: 1.5rem; margin: 0 0 8px; color: var(--primary); }
.static-updated { color: #999; font-size: .8rem; margin: 0 0 24px; }
.static-page section { margin-bottom: 28px; }
.static-page section h2 { font-size: 1rem; color: #333; border-left: 3px solid var(--primary); padding-left: 10px; margin-bottom: 10px; }
.static-page section ul, .static-page section p { color: #555; line-height: 1.8; margin: 0 0 8px; }
.static-page section ul { padding-left: 20px; }
.static-page section li { margin-bottom: 6px; }
.static-page a { color: var(--primary); }

.guideline-list { list-style: none; padding: 0; }
.guideline-list > li { padding: 14px; background: #fafafa; border-radius: 8px; margin-bottom: 10px; }
.guideline-list > li strong { display: block; margin-bottom: 4px; color: #333; }
.guideline-list > li p { margin: 0; font-size: .875rem; color: #666; }
.guideline-ng > li { border-left: 3px solid #ef5350; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .875rem; font-weight: 600; color: #444; margin-bottom: 6px; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; font-family: inherit; transition: border-color .2s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 120px; }
.required { color: #e53935; }

.privacy-table { width: 100%; border-collapse: collapse; font-size: .875rem; margin: 10px 0; }
.privacy-table th, .privacy-table td { padding: 10px 12px; border: 1px solid #e0e0e0; vertical-align: top; }
.privacy-table th { background: #f5f7fa; font-weight: 600; color: #444; width: 130px; }
.privacy-table td:first-child { white-space: nowrap; font-weight: 600; }
