/* Shared public header: 2026-10-22. Presentation only. */
header.ay-unified-header{position:relative;top:auto;width:100%;margin:0;padding:0;border:0;border-bottom:1px solid #b9944b;background:linear-gradient(90deg,#04121ef2,#04121ea8),url("visuals/background-home.webp") right center/cover;color:#edf3fc;box-shadow:0 4px 20px #0004;z-index:20}
header.ay-unified-header::after{content:none}
header.ay-unified-header .ay-header-inner{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:20px;max-width:1600px;width:calc(100% - 40px);min-height:120px;margin:0 auto;padding:8px 0;box-sizing:border-box}
header.ay-unified-header .wordmark{display:block;flex:0 0 210px;width:210px;min-width:0;margin:0;padding:0;line-height:1}
header.ay-unified-header .brand-logo{display:block;width:210px;max-width:100%;height:auto;max-height:90px;object-fit:contain;margin:0}
header.ay-unified-header nav.brand-top-nav{display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:16px;margin:0 0 0 auto;padding:0;width:auto;min-width:0;border:0;background:none}
header.ay-unified-header .brand-top-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:72px;min-height:98px;width:auto;margin:0;padding:4px 0;color:#edf3fc;font:700 14px/1.4 "Yu Gothic UI",Meiryo,sans-serif;text-align:center;text-decoration:none;white-space:nowrap;border:0;border-bottom:2px solid transparent;background:none;box-shadow:none;box-sizing:border-box}
header.ay-unified-header .brand-top-nav a::before{content:"";display:block;width:72px;height:64px;flex:none;margin:0;background-position:center;background-size:contain;background-repeat:no-repeat}
header.ay-unified-header .brand-top-nav a[href^="index"]::before{background-image:url("buttons/top.webp")}
header.ay-unified-header .brand-top-nav a[href*="sport=boat"]::before{background-image:url("buttons/boat-nav.webp")}
header.ay-unified-header .brand-top-nav a[href*="sport=keirin"]::before{background-image:url("buttons/keirin-nav.webp")}
header.ay-unified-header .brand-top-nav a[href^="analysis"]::before{background-image:url("buttons/analysis.webp")}
header.ay-unified-header .brand-top-nav a[href^="schedule"]::before{background-image:url("header-calendar-20261022.svg")}
header.ay-unified-header .brand-top-nav a[href^="guide"]::before{background-image:url("buttons/guide.webp")}
header.ay-unified-header .brand-top-nav a[aria-current="page"]{color:#ffe292;border-bottom-color:#efc15b}
header.ay-unified-header .brand-top-nav a:hover{color:#ffe292;filter:brightness(1.12)}
header.ay-unified-header a:focus-visible{outline:3px solid #91d7ff;outline-offset:2px}
header.ay-unified-header .account-actions{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:0 0 120px;gap:0;margin:0;padding:0;width:120px}
header.ay-unified-header .account-actions a{display:flex;align-items:center;justify-content:center;min-height:44px;width:120px;height:44px;padding:0;border:0;font-size:0;background:url("buttons/login.webp") center/contain no-repeat;box-shadow:none}
header.ay-unified-header .account-actions a[href*="register"]{background-image:url("buttons/register.webp")}
header.ay-unified-header .account-actions a.login-state[data-state="in"]{background-image:url("buttons/logged-in.webp")}
header.ay-unified-header .account-actions a[aria-label="会員・メール配信設定"]{font-size:20px;width:44px;background:#102a3b;border:1px solid #849aa7;border-radius:6px}
@media(min-width:801px) and (max-width:1099px){header.ay-unified-header .ay-header-inner{gap:12px;min-height:104px}header.ay-unified-header .wordmark{flex-basis:170px;width:170px}header.ay-unified-header .brand-logo{width:170px}header.ay-unified-header nav.brand-top-nav{gap:9px}header.ay-unified-header .brand-top-nav a{min-width:60px;min-height:84px;font-size:12px}header.ay-unified-header .brand-top-nav a::before{width:54px;height:48px}header.ay-unified-header .account-actions{flex-basis:100px;width:100px}header.ay-unified-header .account-actions a{width:100px}}
@media(max-width:800px){header.ay-unified-header .ay-header-inner{width:calc(100% - 20px);gap:4px 8px;flex-wrap:wrap;min-height:0;padding:8px 0}header.ay-unified-header .wordmark{flex:0 1 145px;width:145px}header.ay-unified-header .brand-logo{width:145px;max-height:60px}header.ay-unified-header nav.brand-top-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));order:3;flex:0 0 100%;width:100%;gap:2px;margin:3px 0 0}header.ay-unified-header .brand-top-nav a{white-space:normal;min-width:0;min-height:67px;padding:3px 1px;font-size:11px;line-height:1.35;gap:3px}header.ay-unified-header .brand-top-nav a::before{width:36px;height:32px}header.ay-unified-header .account-actions{flex:0 0 auto;flex-direction:row;margin-left:auto;width:auto;gap:2px}header.ay-unified-header .account-actions a{width:78px;height:44px;min-height:44px}header.ay-unified-header .account-actions a[aria-label="会員・メール配信設定"]{width:34px}header.ay-unified-header .account-actions:has(a[data-state="in"]){flex-wrap:nowrap}}

/* User-provided materials restored, 2026-10-22. Corners fixed with nine-slice. */
body header.ay-unified-header{margin-bottom:18px}
body header.ay-unified-header::after{content:"";display:block;position:absolute;left:0;bottom:-20px;width:100%;height:48px;background:url("decorations/ornament-1.webp") center/100% auto no-repeat;pointer-events:none;z-index:1}
body :is(.analysis-card,.forecast,.hit-hero,.public-article,.guide-section,.venue-card,.purpose-card),body.ap-site article.ap-article,body:has(.ay-unified-header) main>section.card,body:has(.ay-unified-header) main>.grid>article.card{box-sizing:border-box;border:22px solid transparent;border-image:url("decorations/ornament-6.webp") 170 stretch;background-color:#0a1e30;background-image:none;border-radius:0;padding:20px;box-shadow:none}
body.has-sidebar .page-layout nav.site-sidebar{box-sizing:border-box;border:22px solid transparent;border-image:url("decorations/ornament-4.webp") 180 stretch;background:#0a1e30;border-radius:0;padding:16px 10px;box-shadow:none}
body.calendarPublic .schedulePage :is(.calendarScroll,.scDayPanel){box-sizing:border-box;border:18px solid transparent;border-image:url("decorations/ornament-6.webp") 170 stretch;background-color:#0a1e30;border-radius:0}
body.calendarPublic .schedulePage .calendarScroll{padding:2px}
body:has(.ay-unified-header) :is(footer.footer,footer.ap-footer,footer:not([class])){position:relative;box-sizing:border-box;padding-top:20px;padding-bottom:24px;background-color:#081b2b;border-top:0;border-radius:0;color:#dce8f4}
body:has(.ay-unified-header) :is(footer.footer,footer.ap-footer,footer:not([class]))::before{content:"";display:block;position:static;inset:auto;flex:0 0 100%;order:-1;align-self:stretch;width:100%;height:clamp(24px,4vw,52px);margin:0 0 14px;background:url("decorations/ornament-3.webp") center/100% auto no-repeat;pointer-events:none}
@media(max-width:800px){body header.ay-unified-header{margin-bottom:10px}body header.ay-unified-header::after{height:26px;bottom:-12px}body :is(.analysis-card,.forecast,.hit-hero,.public-article,.guide-section,.venue-card,.purpose-card),body.ap-site article.ap-article,body:has(.ay-unified-header) main>section.card,body:has(.ay-unified-header) main>.grid>article.card{border-width:12px;padding:14px}body.has-sidebar .page-layout nav.site-sidebar{border-width:14px;padding:12px 7px}body.calendarPublic .schedulePage :is(.calendarScroll,.scDayPanel){border-width:12px}body:has(.ay-unified-header) :is(footer.footer,footer.ap-footer,footer:not([class])){padding-top:16px;padding-bottom:20px}body:has(.ay-unified-header) :is(footer.footer,footer.ap-footer,footer:not([class]))::before{height:28px}}

/* Preserve venue artwork while giving primary cards the transparent frame. */
body.has-sidebar .page-layout main :is(.analysis-card,.forecast,.hit-hero,.venue-card){border-image:url("decorations/ornament-6.webp") 170 stretch;border-width:22px;border-radius:0}
body:has(.ay-unified-header) footer.footer:has(.brand-logo)~footer.footer{padding-top:20px}
body:has(.ay-unified-header) footer.footer:has(.brand-logo)~footer.footer::before{content:none}
@media(max-width:800px){body.has-sidebar .page-layout main :is(.analysis-card,.forecast,.hit-hero,.venue-card){border-width:12px}}
/* Footer content stays in normal flow, including contact footers added by account.js. */
html body:has(header.ay-unified-header) footer{height:auto;min-height:0;max-height:none;overflow:visible;isolation:isolate}
html body:has(header.ay-unified-header) footer::before{position:static;inset:auto;pointer-events:none;flex-basis:100%;order:-1}
html body:has(header.ay-unified-header):has(footer.footer) > footer:not([class])::before{content:none}
html body:has(header.ay-unified-header) footer :is(a,p,nav){position:relative;z-index:1;overflow-wrap:anywhere}
/* Every public page receives the same primary content frame; controls/table cells stay functional. */
html body:has(header.ay-unified-header) main{box-sizing:border-box;min-width:0;border:20px solid transparent;border-image:url("decorations/ornament-6.webp") 170 stretch;border-radius:0;padding:20px;background-color:#0a1e30}
html body.has-sidebar .page-layout main :is(.purpose-card,.analysis-card,.forecast,.hit-hero,.public-article,.guide-section,.venue-card,.player-card){box-sizing:border-box;border:20px solid transparent;border-image:url("decorations/ornament-6.webp") 170 stretch;border-radius:0}
html body.has-sidebar .page-layout nav.site-sidebar,html body.has-sidebar .home-sidebar :is(.site-sidebar,.home-notice){box-sizing:border-box;border:20px solid transparent;border-image:url("decorations/ornament-4.webp") 180 stretch;border-radius:0}
html body:has(header.ay-unified-header) .ap-shell main article.ap-article,html body:has(header.ay-unified-header) main>section.card,html body:has(header.ay-unified-header) main>.grid>article.card{border:20px solid transparent;border-image:url("decorations/ornament-6.webp") 170 stretch;border-radius:0}
@media(max-width:800px){html body:has(header.ay-unified-header) main{border-width:12px;padding:12px}html body.has-sidebar .page-layout main :is(.purpose-card,.analysis-card,.forecast,.hit-hero,.public-article,.guide-section,.venue-card,.player-card),html body:has(header.ay-unified-header) .ap-shell main article.ap-article,html body:has(header.ay-unified-header) main>section.card,html body:has(header.ay-unified-header) main>.grid>article.card{border-width:12px}html body.has-sidebar .page-layout nav.site-sidebar,html body.has-sidebar .home-sidebar :is(.site-sidebar,.home-notice){border-width:14px}}

/* Non-data pages have a later plain-border rule; match that real structure explicitly. */
html body:has(header.ay-unified-header):not([data-view]) main:not(.clarity-home):not(:has(.clarity-home)){border:20px solid transparent;border-image:url("decorations/ornament-6.webp") 170 stretch;border-radius:0}
@media(max-width:800px){html body:has(header.ay-unified-header):not([data-view]) main:not(.clarity-home):not(:has(.clarity-home)){border-width:12px}}