/*
Theme Name: Horse Harbor
Description: Horse Harbor の予想、実績、競馬場情報を表示する独自テーマ。
Version: 0.2.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: horse-harbor
*/

:root {
  --hh-ink: #102e32;
  --hh-deep: #092d35;
  --hh-muted: #435d5c;
  --hh-line: #d7d9cb;
  --hh-soft: #e6ece3;
  --hh-white: #faf7ee;
  --hh-gold: #ffb098;
  --hh-teal: #075654;
  --hh-signal: #a43a26;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--hh-ink); background: var(--hh-white); font: 1rem/1.7 system-ui, sans-serif; }
a { color: var(--hh-teal); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .15em; }
:focus-visible { outline: 3px solid #2b80c3; outline-offset: 3px; }
img { max-width: 100%; height: auto; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
button, input, select { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.3; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.8rem, 5vw, 3.2rem); margin-block: .25em .45em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); }
.hh-wrap { width: min(1220px, 100% - clamp(2rem, 7vw, 6rem)); margin-inline: auto; }
.hh-main { padding-block: clamp(1.25rem, 4vw, 3.5rem); min-height: 60vh; }
.hh-skip { position: absolute; inset: .5rem auto auto .5rem; z-index: 10; padding: .5rem; background: white; transform: translateY(-160%); }
.hh-skip:focus { transform: none; }
.hh-header, .hh-footer { color: white; background: var(--hh-deep); }
.hh-header a, .hh-footer a { color: inherit; }
.hh-header { background: var(--hh-white); color: var(--hh-ink); }
.hh-headline { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1.5rem; padding-block: .8rem; }
.hh-brand { display: inline-flex; align-items: center; gap: .55rem; font: 700 clamp(1.25rem, 4vw, 1.8rem)/1.04 Georgia, serif; letter-spacing: -.035em; text-decoration: none; }
.hh-brand-symbol { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--hh-deep); color: var(--hh-gold); }
.hh-brand-symbol svg { width: 1.7rem; height: 1.7rem; }
.hh-brand small { display: block; font: 700 .6rem/1.7 system-ui, sans-serif; letter-spacing: .08em; }
.hh-nav ul { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 0; padding: 0; list-style: none; }
.hh-nav a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; font-size: .84rem; font-weight: 700; }
.hh-nav a:hover { text-decoration: underline; }
.hh-footer { padding-block: 2.2rem; }
.hh-footer .hh-nav { margin-block: .5rem 1rem; }
.hh-ticker { background: var(--hh-deep); color: white; }
.hh-ticker-inner { display: flex; gap: .65rem 1rem; min-width: 0; align-items: center; min-height: 2.75rem; }
.hh-ticker strong { white-space: nowrap; background: var(--hh-signal); color: white; font-size: .78rem; padding: .12rem .55rem; border-radius: 2px; }
.hh-ticker-list { display: flex; gap: 1.25rem; flex: 1; overflow: auto; scrollbar-width: thin; scrollbar-color: #608687 var(--hh-deep); margin: 0; padding: .25rem 0; list-style: none; white-space: nowrap; font-size: .88rem; }
.hh-ticker-list li + li { border-inline-start: 1px solid #527476; padding-inline-start: 1.25rem; }
.hh-ticker-list a { display: flex; align-items: center; gap: .55rem; min-height: 34px; color: white; text-decoration: none; }
.hh-ticker-list a:hover { text-decoration: underline; }
.hh-ticker-date { color: #c4dcdb; font-variant-numeric: tabular-nums; }
.hh-ticker-amount { color: var(--hh-gold); font-weight: 750; }
.hh-ticker-controls { display: flex; flex: none; gap: 2px; }
.hh-ticker-controls button { display: grid; place-items: center; min-width: 34px; min-height: 38px; padding: 0; border: 0; background: #24484d; color: white; border-radius: 3px; font: 1.4rem/1 system-ui, sans-serif; }
.hh-ticker-controls button[aria-disabled="true"] { opacity: .42; }
.hh-label { color: var(--hh-muted); margin: 0; font-size: .82rem; font-weight: 700; letter-spacing: .07em; }
.hh-meta { color: var(--hh-muted); font-size: .9rem; }
.hh-hero { background: var(--hh-ink); color: white; padding: clamp(1.3rem, 4vw, 3rem); border-block-end: .25rem solid var(--hh-gold); }
.hh-hero .hh-label { color: var(--hh-gold); }
.hh-hero p:last-child { margin-block-end: 0; }
.hh-section { margin-block: 2rem; }
.hh-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.hh-filter, .hh-button { display: inline-flex; align-items: center; min-height: 44px; padding: .35rem .8rem; border: 1px solid var(--hh-line); border-radius: .3rem; color: var(--hh-ink); background: white; font-weight: 650; text-decoration: none; }
.hh-button-primary, .hh-filter[aria-current="true"] { color: white; background: var(--hh-ink); border-color: var(--hh-ink); }
.hh-list { list-style: none; padding: 0; margin: .75rem 0 1.25rem; border-top: 1px solid var(--hh-line); }
.hh-list-item { border-bottom: 1px solid var(--hh-line); padding: .85rem 0; }
.hh-list-item h2, .hh-list-item h3 { font-size: 1.12rem; margin: .2rem 0; }
.hh-list-item a { color: var(--hh-ink); font-weight: 700; }
.hh-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 250px); align-items: start; gap: 2.5rem; }
.hh-side { border-inline-start: 1px solid var(--hh-line); padding-inline-start: 1.15rem; }
.hh-article { min-width: 0; }
.hh-article-header { padding-block-end: 1rem; border-block-end: 1px solid var(--hh-line); }
.hh-content { margin-block: 1.6rem; overflow-wrap: anywhere; }
.hh-content :is(iframe, video, embed) { max-width: 100%; }
.hh-content table, .hh-table { width: 100%; border-collapse: collapse; }
.hh-content :is(th, td), .hh-table :is(th, td) { border-bottom: 1px solid var(--hh-line); padding: .45rem; text-align: start; }
.hh-scroll { overflow-x: auto; }
.hh-content :is(h2, h3), .hh-race { scroll-margin-top: 1rem; }
.hh-race { border-block-start: 1px solid var(--hh-line); padding-block: .9rem; }
.hh-race h3 { margin: 0 0 .35rem; }
.hh-race p { margin-block: .35rem; }
.hh-number { font-variant-numeric: tabular-nums; }
.hh-summary { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; padding: .75rem 1rem; background: var(--hh-soft); }
.hh-summary dt { color: var(--hh-muted); font-size: .85rem; }
.hh-summary dd { margin: 0; font-size: 1.3rem; font-weight: 750; }
.hh-bars { display: grid; gap: .5rem; padding: 0; list-style: none; }
.hh-bars li { display: grid; grid-template-columns: 5.5rem minmax(3rem, 1fr) 5rem; align-items: center; gap: .65rem; }
.hh-bars meter { width: 100%; height: 1.15rem; accent-color: #19527b; }
.hh-note { padding: .75rem 1rem; border-inline-start: .25rem solid #57728b; background: var(--hh-soft); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .45rem; }
.page-numbers { padding: .3rem .55rem; }
.page-numbers.current { background: var(--hh-ink); color: white; }
@media (max-width: 720px) {
  .hh-layout { grid-template-columns: 1fr; gap: 1rem; }
  .hh-side { border-inline-start: 0; border-block-start: 1px solid var(--hh-line); padding-inline-start: 0; }
  .hh-ticker-inner { gap: .5rem; }
  .hh-headline .hh-nav { width: 100%; overflow-x: auto; scrollbar-width: thin; }
  .hh-headline .hh-nav ul { flex-wrap: nowrap; gap: 0 1.05rem; white-space: nowrap; }
  .hh-headline { gap: .2rem; padding-block: .55rem .25rem; }
  .hh-headline .hh-nav .hh-menu-contact { display: none; }
  .hh-ticker-list { gap: 0; scroll-snap-type: x mandatory; }
  .hh-ticker-list li { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
  .hh-ticker-list li + li { border: 0; padding: 0; }
  .hh-ticker-list a { min-width: 0; gap: .3rem; font-size: .75rem; }
  .hh-ticker-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .hh-ticker-amount { flex: none; }
  .hh-ticker-controls button { min-width: 28px; min-height: 44px; }
}
