:root {
    color-scheme: light;
    --green: #5e805e;
    --green-dark: #4e704e;
    --green-light: #cfe6b8;
    --border: #cbd8c5;
    --muted: #626c62;
    font-family: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", Meiryo, メイリオ, sans-serif;
    font-size: 16px;
    color: #333;
    background: #f9f9f9;
    line-height: 1.75;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: #356c35; text-underline-offset: .2em; }
a:hover { color: #244d24; }
button, input, textarea, select { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #916318; outline-offset: 4px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; z-index: 30; left: 1rem; top: -100px; padding: .6rem 1rem; background: white; }
.skip-link:focus { top: .5rem; }
.site-header { background: var(--green); border-bottom: 1px solid var(--green-dark); }
.header-inner { max-width: 1220px; margin: auto; min-height: 72px; display: flex; align-items: center; padding: 0 24px; gap: 26px; }
.brand { font-size: 20px; color: #fff; text-decoration: none; white-space: nowrap; letter-spacing: -.02em; }
.brand:hover { color: white; }
.site-navigation { display: flex; align-items: stretch; gap: 4px; }
.nav-link, .nav-dropdown > summary { display: flex; align-items: center; min-height: 72px; padding: 0 16px; color: #fff; text-decoration: none; font-size: 15px; cursor: pointer; }
.nav-dropdown { position: relative; }
.nav-dropdown > summary { list-style: none; gap: 9px; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-link:hover, .nav-dropdown > summary:hover, .nav-dropdown[open] > summary { background: rgba(0, 0, 0, .12); color: #fff; }
.nav-dropdown.is-active > summary { box-shadow: inset 0 -3px 0 #d9edc6; }
.caret { width: 0; height: 0; border: 4px solid transparent; border-bottom: 0; border-top-color: currentColor; margin-top: 4px; }
.nav-dropdown[open] .caret { transform: rotate(180deg); }
.dropdown-links { position: absolute; z-index: 20; top: 100%; left: 0; margin: 0; padding: 6px; min-width: 260px; list-style: none; background: #fff; border: 1px solid #d5dfd0; border-radius: 0 0 4px 4px; box-shadow: 0 6px 16px #263d2626; }
.dropdown-links a { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 2px; color: #3f4f3f; text-decoration: none; font-size: 14px; }
.dropdown-links a:hover { background: #eff5e9; }
.dropdown-links a[aria-current="page"] { background: #e4efd9; color: #355535; font-weight: 700; }
.external-mark { margin-left: auto; color: var(--muted); }
.nav-toggle { display: none; }
.main-container { width: min(1170px, calc(100% - 48px)); margin: 26px auto 0; flex: 1; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 7px 12px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { text-decoration: none; }
.tool-panel { background: #fff; border: 1px solid #b8cba9; border-radius: 4px; box-shadow: 0 2px 4px #34513408; overflow: hidden; }
.page-heading { background: var(--green-light); border-bottom: 1px solid #b8cba9; padding: 15px 24px; }
h1 { margin: 0; color: #395939; font-size: 21px; line-height: 1.5; font-weight: 600; }
.panel-body { padding: 26px; }
p { margin: 0 0 10px; }
.tool-intro { margin-bottom: 24px; }
.muted { color: var(--muted); font-size: 14px; }
.specifications { display: flex; gap: 8px; padding: 0; margin: 18px 0 0; list-style: none; }
.specifications li { padding: 2px 11px; font-size: 12px; color: var(--green-dark); background: #eef4e8; border: 1px solid #d9e5cf; border-radius: 3px; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.result-panel { border: 1px solid #ecd7b7; border-radius: 3px; overflow: hidden; }
.section-heading { margin: 0; padding: 11px 16px; font-size: 16px; font-weight: 500; color: #88560a; background: #fdedd4; border-bottom: 1px solid #ecd7b7; line-height: 1.6; }
.result-body { padding: 16px; }
pre { margin: 0; padding: 14px 18px; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 17px; line-height: 2.05; background: #f6f7f4; border: 1px solid #e3e6de; border-radius: 3px; overflow-x: auto; tab-size: 4; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 18px; border: 1px solid transparent; border-radius: 4px; text-decoration: none; font-size: 15px; font-weight: 500; line-height: 1.5; cursor: pointer; transition: background-color .15s; }
.button-primary { background: #cc4032; border-color: #be382b; color: white; }
.button-primary:hover { background: #b73529; color: white; }
.button-copy { background: #fff; border-color: #b7c8ad; color: #456545; font-size: 13px; min-height: 36px; padding: 6px 12px; }
.button-copy:hover { background: #eef4e8; }
.copy-actions { min-height: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.copy-status { font-size: 12px; color: var(--green-dark); }
.page-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 24px; }
.section-nav { margin: 28px -26px -26px; padding: 14px 26px; background: #f3f6ee; border-top: 1px solid var(--border); }
.section-nav ul { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0; padding: 0; list-style: none; }
.section-nav a { display: block; padding: 7px 12px; border-radius: 3px; text-decoration: none; font-size: 14px; }
.section-nav a:hover { background: #e4efd9; }
.section-nav a[aria-current="page"] { background: #dcebcf; color: #355535; font-weight: 700; }
.field-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 7px; }
label { display: block; font-size: 15px; font-weight: 600; }
output { color: var(--muted); font-size: 12px; white-space: nowrap; }
textarea, select { width: 100%; padding: 11px 13px; border: 1px solid #abbba1; border-radius: 3px; background: #fff; color: #333; }
textarea { display: block; resize: vertical; min-height: 180px; line-height: 1.8; }
textarea::placeholder { color: #747b71; }
textarea:focus, select:focus { border-color: var(--green-dark); outline: 2px solid #cfe6b8; outline-offset: 1px; }
.field-help { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.form-options { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-top: 24px; }
.grade-field { max-width: 520px; flex: 1; }
.grade-field label { margin-bottom: 7px; }
.form-options .button { align-self: flex-start; margin-top: 33px; min-width: 160px; }
.ruby-form + .result-panel, .analysis-form + .result-panel { margin-top: 30px; }
.ruby-result { padding: 22px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 2.8; }
.attribution { margin: 24px 0 0; font-size: 12px; text-align: right; }
.access-table { border: 1px solid var(--border); border-radius: 3px; overflow: hidden; }
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
th, td { text-align: left; padding: 20px; vertical-align: top; overflow-wrap: anywhere; border-bottom: 1px solid #e1e7dc; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
th { width: 26%; background: #f3f6ee; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; font-weight: 500; }
td { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.9; }
.field-description { display: block; margin-top: 5px; font-family: Meiryo, sans-serif; font-size: 12px; color: var(--muted); }
.keyphrase-table { border: 1px solid #e1e7dc; }
.keyphrase-table th:first-child { width: auto; }
.keyphrase-table th, .keyphrase-table td { padding: 12px 16px; }
.keyphrase-table td:first-child { font-family: inherit; }
.keyphrase-table .score-column { width: 135px; text-align: right; }
.score-value { font-variant-numeric: tabular-nums; }
.score-track { display: block; margin-top: 5px; height: 5px; border-radius: 3px; background: #edf2e8; overflow: hidden; }
.score-track > span { display: block; height: 100%; background: var(--green); }
.result-summary { margin: 0 0 16px; }
.empty-result { margin: 4px 0; color: var(--muted); font-size: 14px; }
.cookie-value + .cookie-value { margin-top: 6px; }
.error { border: 1px solid #ebc2b8; border-left: 4px solid #c94c35; background: #fff5f1; color: #8a3424; padding: 12px 16px; margin-bottom: 22px; border-radius: 3px; }
.contact { width: min(1170px, calc(100% - 48px)); margin: 20px auto 26px; text-align: right; font-size: 14px; }
.button-contact { background: #f3a626; border-color: #e39b20; color: #49320d; font-size: 14px; min-height: 36px; padding: 6px 15px; margin: 0 5px; }
.button-contact:hover { background: #e89c20; color: #362408; }
.site-footer { background: var(--green-dark); color: #fff; padding: 24px 16px; text-align: center; font-size: 13px; }
@media (max-width: 900px) {
    .header-inner { flex-wrap: wrap; gap: 0; min-height: 64px; padding: 0 20px; }
    .brand { padding: 15px 0; font-size: 18px; }
    .js .nav-toggle { display: inline-flex; gap: 8px; align-items: center; margin-left: auto; min-height: 40px; padding: 5px 10px; background: transparent; color: white; border: 1px solid #adc2a4; border-radius: 3px; font-size: 13px; cursor: pointer; }
    .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 15px; height: 1px; background: currentColor; }
    .menu-icon { position: relative; }
    .menu-icon::before, .menu-icon::after { content: ''; position: absolute; left: 0; }
    .menu-icon::before { top: -5px; }.menu-icon::after { top: 5px; }
    .site-navigation { flex-basis: 100%; display: flex; flex-direction: column; padding: 0 0 12px; gap: 2px; }
    .js .site-navigation:not(.is-open) { display: none; }
    .nav-link, .nav-dropdown > summary { min-height: 46px; padding: 8px 12px; }
    .nav-dropdown.is-active > summary { box-shadow: inset 3px 0 0 #d9edc6; }
    .dropdown-links { position: static; margin: 2px 0 6px; min-width: 0; box-shadow: none; border-radius: 3px; }
    .main-container { margin-top: 20px; }
}
@media (max-width: 680px) {
    .main-container, .contact { width: calc(100% - 24px); }
    .header-inner { padding: 0 12px; }
    .brand { font-size: 17px; }
    .breadcrumb { font-size: 11px; gap: 4px 8px; margin-bottom: 12px; }
    .page-heading { padding: 13px 16px; }
    h1 { font-size: 19px; }
    .panel-body { padding: 20px 16px; }
    .section-nav { margin: 24px -16px -20px; padding: 12px 16px; }
    .columns { grid-template-columns: 1fr; gap: 18px; }
    .tool-intro { font-size: 14px; }
    .muted { font-size: 13px; }
    .result-body { padding: 12px; }
    pre { font-size: 16px; padding: 12px 14px; }
    .form-options { flex-direction: column; gap: 16px; }
    .grade-field { width: 100%; }
    .form-options .button { margin-top: 0; width: 100%; }
    .page-actions { gap: 10px; }
    th, td { padding: 12px; font-size: 12px; }
    th { width: 34%; }
    .contact { margin: 20px auto; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.diary-archive > summary { padding: 7px 12px; border-radius: 3px; color: var(--link); font-size: 14px; cursor: pointer; }
.diary-archive > summary:hover { background: #e4efd9; }
.section-nav .diary-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); max-height: 320px; overflow-y: auto; margin-top: 8px; }
.section-nav > ul > li:has(.diary-archive[open]) { flex-basis: 100%; }

.legacy-markup pre { overflow-x: auto; white-space: pre; }
.legacy-markup .wiki-red { color: #b42318; }
.legacy-markup .table-scroll { overflow-x: auto; }

.wiki-categories { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin: 12px 0 24px; }
.wiki-categories-label { color: var(--muted); font-size: 12px; }
.wiki-categories ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.wiki-categories li { max-width: 100%; }
.wiki-categories a { display: block; padding: 4px 12px; border: 1px solid var(--border); border-radius: 16px; background: #eef4e8; color: #395939; font-size: 13px; line-height: 1.6; text-decoration: none; overflow-wrap: anywhere; }
.wiki-categories a:hover { background: #dcebcf; border-color: #a9bf9b; }
