:root {
    color-scheme: dark;
    --bg: #10151d;
    --panel: #18212c;
    --panel-strong: #202b38;
    --ink: #f3f7fb;
    --muted: #a8b4c4;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #78d6ff;
    --accent-2: #f6c85f;
    --warn: #f59e6b;
    --bad: #ff7a90;
    --ok: #7ddc96;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body.web-link-check-page {
    margin: 0;
    min-width: 0;
    color: var(--ink);
    background: linear-gradient(135deg, #10151d 0%, #13202a 48%, #17171f 100%);
}

a { color: #a8e8ff; }

button,
input,
textarea {
    font: inherit;
}

button {
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.07);
    cursor: pointer;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(246, 200, 95, 0.75);
    outline-offset: 2px;
}

.wlc-primary {
    color: #071217;
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 700;
}

.wlc-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.wlc-hero,
.wlc-panel,
.wlc-card,
.wlc-comments,
.wlc-return a {
    border: 1px solid var(--line);
    background: rgba(24, 33, 44, 0.88);
    box-shadow: var(--shadow);
}

.wlc-hero {
    padding: 28px;
    border-radius: 8px;
}

.wlc-back {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
}

.wlc-kicker {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
}

h1,
h2,
h3,
p,
td,
th {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.12;
    letter-spacing: 0;
}

h2 {
    margin: 0 0 16px;
    font-size: 1.35rem;
    letter-spacing: 0;
}

h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    letter-spacing: 0;
}

code {
    color: #d4f3ff;
}

.wlc-lead {
    max-width: 820px;
    margin: 16px 0 0;
    color: #d8e4ef;
    line-height: 1.8;
}

.wlc-notice,
.wlc-help,
.wlc-comment-note {
    color: var(--muted);
    line-height: 1.7;
}

.wlc-notice {
    margin: 18px 0 0;
    padding: 14px 16px;
    border: 1px solid rgba(120, 214, 255, 0.28);
    background: rgba(120, 214, 255, 0.08);
    border-radius: 8px;
}

.wlc-policy {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.wlc-policy span {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #d8e4ef;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.76rem;
    font-weight: 700;
}

.wlc-workspace {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
    gap: 18px;
    align-items: start;
}

.wlc-panel,
.wlc-card,
.wlc-comments {
    padding: 22px;
    border-radius: 8px;
}

.wlc-card,
.wlc-comments,
.wlc-return,
.wlc-footer {
    margin-top: 18px;
}

.wlc-field {
    display: grid;
    gap: 8px;
    color: #d8e4ef;
    font-weight: 700;
}

.wlc-field textarea {
    width: 100%;
    min-height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: var(--ink);
    background: #111923;
    padding: 12px;
    resize: vertical;
    line-height: 1.55;
    font-family: "Consolas", "SFMono-Regular", "Yu Gothic", monospace;
}

.wlc-field textarea::placeholder {
    color: rgba(216, 228, 239, 0.58);
}

.wlc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 0;
}

.wlc-status {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid rgba(120, 214, 255, 0.26);
    border-radius: 8px;
    background: rgba(120, 214, 255, 0.08);
    color: #d8e4ef;
}

.wlc-status.is-ok { border-color: rgba(125, 220, 150, 0.45); }
.wlc-status.is-warn { border-color: rgba(245, 158, 107, 0.55); }
.wlc-status.is-bad { border-color: rgba(255, 122, 144, 0.55); }

.wlc-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.wlc-summary-grid div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
}

.wlc-summary-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
}

.wlc-summary-grid strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: 1.45rem;
}

.wlc-box {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.wlc-list {
    display: grid;
    gap: 10px;
}

.wlc-empty {
    margin: 0;
    color: var(--muted);
}

.wlc-issue-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(245, 158, 107, 0.38);
    border-left: 4px solid var(--warn);
    border-radius: 8px;
    background: rgba(245, 158, 107, 0.08);
}

.wlc-issue-card.is-bad {
    border-color: rgba(255, 122, 144, 0.44);
    border-left-color: var(--bad);
    background: rgba(255, 122, 144, 0.08);
}

.wlc-issue-card strong,
.wlc-issue-card span {
    display: block;
}

.wlc-issue-card strong {
    margin-bottom: 5px;
}

.wlc-issue-card span {
    color: var(--muted);
    font-size: 0.9rem;
}

.wlc-reasons {
    margin: 8px 0 0;
    padding-left: 1.15rem;
    color: #ffe0ba;
}

.wlc-table-wrap {
    overflow-x: auto;
}

.wlc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.wlc-table th,
.wlc-table td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    color: #d8e4ef;
    text-align: left;
    vertical-align: top;
    font-size: 0.92rem;
}

.wlc-table th {
    color: var(--accent);
    font-size: 0.78rem;
    letter-spacing: 0;
}

.wlc-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(120, 214, 255, 0.28);
    border-radius: 999px;
    padding: 2px 8px;
    color: #d4f3ff;
    background: rgba(120, 214, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 700;
}

.wlc-badge.external { border-color: rgba(246, 200, 95, 0.42); color: #ffe5a6; background: rgba(246, 200, 95, 0.08); }
.wlc-badge.mailto { border-color: rgba(125, 220, 150, 0.42); color: #bff4cc; background: rgba(125, 220, 150, 0.08); }
.wlc-badge.tel { border-color: rgba(173, 143, 255, 0.42); color: #d8ccff; background: rgba(173, 143, 255, 0.08); }
.wlc-badge.anchor { border-color: rgba(245, 158, 107, 0.42); color: #ffd3b7; background: rgba(245, 158, 107, 0.08); }
.wlc-badge.other { border-color: rgba(255, 255, 255, 0.18); color: var(--muted); }

.wlc-table .has-issue {
    color: #ffe0ba;
}

.wlc-check-list {
    margin: 0;
    padding-left: 1.3rem;
    color: #d8e4ef;
    line-height: 1.85;
}

.wlc-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.wlc-link-grid a,
.wlc-return a {
    display: block;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--ink);
    padding: 14px;
    text-decoration: none;
}

.wlc-link-grid a:hover,
.wlc-link-grid a:focus-visible,
.wlc-return a:hover,
.wlc-return a:focus-visible {
    border-color: rgba(120, 214, 255, 0.65);
    outline: none;
}

.wlc-link-grid strong,
.wlc-link-grid span,
.wlc-return strong,
.wlc-return span,
.wlc-return small {
    display: block;
}

.wlc-link-grid span,
.wlc-return span,
.wlc-return small {
    color: var(--muted);
    margin-top: 0.35rem;
    font-size: 0.9rem;
    line-height: 1.55;
}

.wlc-comments #app-comments,
.wlc-comments #app-comments * {
    color: var(--ink);
}

.wlc-comments #app-comments input:not([type="hidden"]),
.wlc-comments #app-comments textarea,
.wlc-comments #app-comments select {
    color: var(--ink);
    background: #111923;
    border-color: rgba(255, 255, 255, 0.16);
}

.wlc-comments #app-comments button,
.wlc-comments #app-comments input[type="submit"] {
    color: #07121b;
    background: var(--accent);
}

.wlc-return {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.wlc-footer {
    color: var(--muted);
    text-align: center;
    font-size: 0.86rem;
}

@media (max-width: 900px) {
    .wlc-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .wlc-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 14px;
    }

    .wlc-hero,
    .wlc-panel,
    .wlc-card,
    .wlc-comments {
        padding: 16px;
    }

    .wlc-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wlc-field textarea {
        min-height: 240px;
    }

    .wlc-actions button {
        width: 100%;
    }

    .wlc-table-wrap {
        overflow-x: visible;
    }

    .wlc-table,
    .wlc-table tbody,
    .wlc-table tr,
    .wlc-table td {
        display: block;
        width: 100%;
    }

    .wlc-table {
        min-width: 0;
    }

    .wlc-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .wlc-table tr {
        margin-bottom: 10px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.035);
    }

    .wlc-table td {
        display: grid;
        grid-template-columns: 5.8rem minmax(0, 1fr);
        gap: 8px;
        padding: 6px 0;
        border-bottom: 0;
    }

    .wlc-table td::before {
        color: var(--muted);
        font-size: 0.78rem;
        font-weight: 700;
    }

    .wlc-table td:nth-child(1)::before { content: "#"; }
    .wlc-table td:nth-child(2)::before { content: "種別"; }
    .wlc-table td:nth-child(3)::before { content: "リンク文字"; }
    .wlc-table td:nth-child(4)::before { content: "href"; }
    .wlc-table td:nth-child(5)::before { content: "target / rel"; }
    .wlc-table td:nth-child(6)::before { content: "注意"; }

    .wlc-table td[colspan] {
        display: block;
    }

    .wlc-table td[colspan]::before {
        content: none;
    }
}
