:root {
  --color-primary: #2979d8;
  --color-primary-dark: #1769bd;
  --color-primary-light: #eaf4ff;
  --color-accent: #ed812f;
  --color-background: #f6f9fd;
  --color-surface: #fff;
  --color-text: #202631;
  --color-text-muted: #687386;
  --color-border: #dce5ef;
  --shadow-card: 0 2px 8px rgba(38, 69, 103, .07);
  --radius-card: 6px;
  --ymt-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--color-background); color: var(--color-text); font-family: var(--ymt-font); line-height: 1.65; }
body * { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-primary-dark); }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #ffb55d !important; outline-offset: 2px; }
.screen-reader-text { position: absolute !important; overflow: hidden; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.screen-reader-text:focus { position: fixed !important; top: 8px; left: 8px; z-index: 100000; width: auto; height: auto; margin: 0; padding: 10px 14px; clip: auto; clip-path: none; background: #fff; color: #111; }
.ymt-shell { width: min(1216px, calc(100% - 32px)); margin-inline: auto; }
.ymt-panel { border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); }
.ymt-skip-link { position: fixed; top: 8px; left: 8px; z-index: 99999; padding: 10px 16px; background: #111; color: #fff; transform: translateY(-160%); }
.ymt-skip-link:focus { transform: translateY(0); }
.ymt-category-label { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 4px; background: var(--category-color); color: #fff !important; font-size: 12px; font-weight: 700; line-height: 1.4; }
.ymt-new { padding: 2px 8px; border-radius: 99px; background: var(--color-primary); color: #fff; font-size: 11px; font-weight: 800; }
.ymt-section-heading { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 14px; border-bottom: 1px solid var(--color-border); }
.ymt-section-heading h2 { margin: 0; font-size: 18px; }
.ymt-section-heading h2 span { color: var(--color-primary); }
.ymt-section-heading > a { color: var(--color-primary-dark); font-size: 13px; font-weight: 700; }

/* Cocoon keeps document structure; the child theme owns visible chrome. */
.header-container, #navi, .footer-bottom, .footer { display: none !important; }
.container, .content-in, .main, .sidebar { max-width: none; }
.home #content { margin: 0; padding: 0; }
.home #content-in { display: block; width: 100%; }
.home #main { width: 100%; padding: 0; border: 0; background: transparent; }
.home #sidebar { display: none !important; }
body:not(.home) .content-in { width: min(1200px, calc(100% - 32px)); margin: 26px auto 60px; gap: 24px; }
body:not(.home) .main { border: 1px solid var(--color-border); border-radius: var(--radius-card); background: #fff; box-shadow: var(--shadow-card); }
body:not(.home):not(.no-sidebar) .content-in { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
body:not(.home):not(.no-sidebar) .main, body:not(.home):not(.no-sidebar) .sidebar { width: auto; min-width: 0; margin: 0; }

.ymt-site-footer { clear: both; margin-top: 10px; border-top: 1px solid var(--color-border); background: #fff; }
.ymt-footer-inner { display: grid; grid-template-columns: 230px minmax(0, 1fr) auto; align-items: center; gap: 24px; min-height: 62px; }
.ymt-footer-identity { display: grid; gap: 1px; }
.ymt-footer-brand { display: flex; align-items: center; gap: 7px; width: fit-content; font-size: 14px; line-height: 1.2; }
.ymt-footer-identity small { color: var(--color-text-muted); font-size: 11px; white-space: nowrap; }
.ymt-footer-nav { min-width: 0; }
.ymt-footer-menu { display: flex; justify-content: center; margin: 0; padding: 0; list-style: none; }
.ymt-footer-menu li { margin: 0; }
.ymt-footer-menu li + li { border-left: 1px solid var(--color-border); }
.ymt-footer-menu a { display: block; padding: 3px 14px; font-size: 12px; white-space: nowrap; }
.ymt-footer-actions { display: flex; align-items: center; }
.ymt-footer-top { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #cfd8e3; border-radius: 50%; color: var(--color-text-muted); font-size: 18px; line-height: 1; transition: border-color .18s ease, color .18s ease, transform .18s ease; }
.ymt-footer-top:hover { border-color: var(--color-primary); color: var(--color-primary); transform: translateY(-2px); }

/* The child footer replaces Cocoon's fixed mobile bar and scroll button. */
.mobile-footer-menu-buttons, #go-to-top { display: none !important; }
