/* Kaeru Voyage — after Hokusai: washi paper, sumi ink, Prussian blue, a seigaiha band.
   No web fonts: the reader's own Japanese fonts (mincho for headings, gothic for the rest). */
:root {
  --bg: #f6f1e7; --paper: #fffdf8; --ink: #1b2433; --muted: #5a6273; --line: #e3d9c6;
  --ai: #1f4e79; --ai-soft: #e8eef4; --ai-ink: #ffffff;
  --ok: #2b6a4c; --ok-bg: #e2eee6; --edge: #8a5a10; --edge-bg: #f6e9cf; --past: #8a8f99; --bengara: #a63c28;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", "Noto Serif CJK JP", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --radius: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.8 var(--sans); }
a { color: var(--ai); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid #9bb6cf; outline-offset: 2px; }
h1, h2, .brand .name { font-family: var(--serif); font-weight: 700; letter-spacing: .02em; }

/* header and the wave band */
header.site { background: var(--paper); }
header.site .inner { max-width: 980px; margin: 0 auto; padding: 14px 16px 8px; }
.brand { display: inline-flex; align-items: baseline; gap: 12px; flex-wrap: wrap; text-decoration: none; color: var(--ink); }
.brand .name { font-size: 23px; }
.brand .name::before { content: ""; display: inline-block; width: 17px; height: 17px; margin-right: 8px; vertical-align: -1px;
  background: url("favicon.svg") no-repeat center / contain; }
.brand .tag { font-size: 14px; color: var(--muted); }
header.site nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin-top: 8px; }
header.site nav a { padding: 6px 10px; border-radius: 6px; font-size: 14px; text-decoration: none; color: var(--ink); }
header.site nav a:hover { background: var(--ai-soft); }
header.site nav a[aria-current="page"] { background: var(--ai); color: var(--ai-ink); }
.seigaiha { height: 15px; background: url("seigaiha.svg") repeat-x left top / 20px 10px; border-top: 1px solid var(--line); }

/* the print on the top page */
figure.print { margin: 0 auto; max-width: 980px; padding: 0 16px; }
figure.print img { display: block; width: 100%; height: auto; border-radius: 0 0 var(--radius) var(--radius); }
figure.print figcaption { font-size: 12px; color: var(--muted); text-align: right; padding: 4px 2px 0; line-height: 1.5; }
figure.print figcaption a { color: var(--muted); }

main { max-width: 980px; margin: 0 auto; padding: 4px 16px 40px; }
h1 { font-size: 25px; line-height: 1.5; margin: 18px 0 8px; }
.nb { display: inline-block; }
h2 { font-size: 21px; margin: 32px 0 6px; padding-bottom: 4px; border-bottom: 2px solid var(--ai); }
h3.month { font-size: 15px; color: var(--muted); margin: 22px 0 8px; font-weight: 600; letter-spacing: .04em; }
.intro p { margin: 6px 0; }
.meta { color: var(--muted); font-size: 14px; line-height: 1.75; }
.note { color: var(--muted); font-size: 13.5px; margin-top: 18px; }
.crumb { font-size: 13.5px; color: var(--muted); margin: 16px 0 0; }

/* cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 12px; }
.card.past { opacity: .6; }
.card.single { margin: 8px 0 18px; }
.card .date { margin: 0; font-weight: 700; color: var(--ai); font-size: 15px; }
.card h4 { margin: 2px 0 8px; font-family: var(--serif); font-size: 18.5px; line-height: 1.45; }
.card h4 a { color: var(--ink); text-decoration: none; }
.card h4 a:hover { text-decoration: underline; }
.chip { display: inline-block; font-family: var(--sans); font-size: 12px; font-weight: 600; line-height: 1.65; padding: 0 8px; border-radius: 999px; margin-left: 6px; vertical-align: 3px; white-space: nowrap; }
.chip.pref { background: var(--ai-soft); color: var(--ai); }
.chip.sex { background: #f1ebe0; color: #6b5636; }
.chip.past { background: #ebe7df; color: var(--past); }
.card dl { margin: 0; display: grid; grid-template-columns: 7.4em 1fr; gap: 4px 10px; font-size: 14.5px; line-height: 1.7; }
.card dt { color: var(--muted); }
.card dd { margin: 0; }
.card dd ul { margin: 0; padding-left: 1.1em; }
.card .notes { font-size: 13.5px; background: var(--ai-soft); border-radius: 6px; padding: 4px 9px; margin: 10px 0 0; }
.src { margin: 10px 0 0; font-size: 13.5px; }
@media (max-width: 420px) { .card dl { grid-template-columns: 1fr; gap: 0; } .card dd { margin-bottom: 6px; } }
.d { white-space: nowrap; }
.d.done { color: var(--past); }
.d.done::after { content: "（済）"; font-size: .85em; }

/* deadlines and recent updates */
p.latest { margin-top: 10px; }
ul.recent { list-style: none; padding: 0; margin: 6px 0; font-size: 14px; }
ul.recent li { padding: 2px 0; }
ul.recent .when { display: inline-block; min-width: 4.6em; color: var(--muted); }
.deadlines-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 10px; margin: 18px 0 8px; }
.deadlines-box h2 { font-size: 18px; margin: 12px 0 6px; }
ul.deadlines { list-style: none; padding: 0; margin: 6px 0; font-size: 14.5px; }
ul.deadlines li { padding: 7px 0; border-bottom: 1px dashed var(--line); display: grid; grid-template-columns: 9.4em 1fr; column-gap: .6em; align-items: baseline; }
ul.deadlines li:last-child { border-bottom: 0; }
ul.deadlines li .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
ul.deadlines li .when .d { font-weight: 700; color: var(--bengara); font-size: 14.5px; }
ul.deadlines li .when .d.done { color: var(--past); font-weight: 400; }
ul.deadlines li .what { display: flex; flex-wrap: wrap; column-gap: .6em; align-items: baseline; }
ul.deadlines li .what a { color: var(--ink); }
ul.deadlines li .sub { color: var(--muted); font-size: 13px; }
.how { color: var(--muted); font-size: 13px; }
dd .win { display: flex; flex-wrap: wrap; column-gap: .6em; align-items: baseline; }
dd .win + .win { margin-top: 6px; }
dd .win > .nb:first-child { margin-right: -.6em; }
dd .win .why { flex-basis: 100%; }
ul.deadlines li .why { flex-basis: 100%; }
.deadlines-box ul.deadlines li.past, .deadlines-box ul.deadlines li.over, .deadlines-box.empty { display: none; }
ul.deadlines.all li { grid-template-columns: 1fr; row-gap: 2px; }
ul.deadlines.all li .when { font-size: 13.5px; white-space: normal; }
@media (max-width: 520px) {   /* phones: the day on its own line, then the school and the exam */
  .deadlines-box ul.deadlines li { grid-template-columns: 1fr; row-gap: 1px; }
}
ul.deadlines.all li .what { padding-left: 1em; }
ul.deadlines.all li.past .what { opacity: .65; }
h2.month { font-size: 17px; }

/* tables on the school pages *//* tables on the school pages */
.tablewrap { overflow-x: auto; }
table.elig { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 14px; }
table.elig th, table.elig td { border-bottom: 1px solid var(--line); padding: 8px 8px; text-align: left; vertical-align: top; }
table.elig th { background: var(--ai-soft); font-size: 13px; }
table.elig td.name { font-weight: 600; }
th.c-name { width: 17%; } th.c-date { width: 13%; }
.track { color: var(--muted); font-size: 13px; font-weight: 400; }
.why { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 719px) {
  table.elig, table.elig tbody, table.elig tr, table.elig td { display: block; width: 100%; }
  table.elig thead { display: none; }
  table.elig tr { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 10px; padding: 8px 12px; }
  table.elig td { border: 0; padding: 3px 0; }
  table.elig td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  table.elig td.name { font-size: 15.5px; }
}

/* 受験資格から探す: the combinations, as links (no input fields) */
.combos h3 { font-size: 15px; margin: 20px 0 6px; }
.cells { display: grid; grid-template-columns: 1fr; gap: 6px; }
@media (min-width: 720px) { .cells { grid-template-columns: repeat(5, 1fr); } }
.cell { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 10px; text-decoration: none; color: var(--ink); min-height: 44px; font-size: 14px; line-height: 1.45; }
a.cell:hover { border-color: var(--ai); background: var(--ai-soft); }
.cell .n { font-weight: 700; color: var(--ok); white-space: nowrap; }
.cell .sub { font-weight: 400; color: var(--edge); font-size: 12.5px; margin-left: 4px; }
.cell.none { color: var(--muted); background: transparent; }
.cell.none .n { color: var(--muted); font-weight: 400; }
@media (min-width: 720px) { .cell { flex-direction: column; align-items: flex-start; } }

/* one combination */
.status { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; white-space: nowrap; }
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.mostly { background: #fff; color: var(--ok); box-shadow: inset 0 0 0 1.5px var(--ok); }
.status.edge { background: var(--edge-bg); color: var(--edge); }
ul.hits { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 10px; }
ul.hits li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
ul.hits li.past { opacity: .6; }
ul.hits .head { margin: 0 0 4px; font-weight: 700; font-size: 16px; }
ul.hits .head .status { margin-right: 8px; vertical-align: 1px; }
ul.hits .head a { color: var(--ink); font-family: var(--serif); }
ul.hits .why { margin: 0 0 4px; font-size: 13px; color: var(--edge); }
ul.hits .rule { margin: 4px 0; font-size: 14px; }

/* this year's changes */
ul.events { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
ul.events li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
ul.events p { margin: 2px 0; }
ul.events .ev { font-weight: 700; }
ul.events .ev a { color: var(--ink); font-family: var(--serif); }
ul.events .kind { display: inline-block; font-size: 12px; background: var(--ai); color: var(--ai-ink); border-radius: 4px; padding: 0 7px; margin-right: 8px; vertical-align: 2px; }

.prose h2 { font-size: 19px; }
.prose li { margin: 4px 0; }
.prose figure { margin: 12px 0; }
.prose figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }

footer.site { background: var(--paper); color: var(--muted); font-size: 13px; }
footer.site .inner { max-width: 980px; margin: 0 auto; padding: 12px 16px 16px; }
footer.site p { margin: 0 0 6px; }

@media print {
  header.site nav, .seigaiha, figure.print, footer.site { display: none; }
  body { background: #fff; }
  .card, ul.hits li { break-inside: avoid; }
}
