@charset "UTF-8";

/* ==========================================================================
   日本獣医エキゾチック動物学会 症例検討会 発表者用サイト
   全ページ共通スタイル

   色・文字サイズ・余白はすべて :root にまとめてあります。
   年度や配色を変えるときは、まずここを見てください。
   ========================================================================== */

:root {
  /* --- 配色 --- */
  --c-navy:        #073763;   /* 学会カラー */
  --c-navy-deep:   #04223e;
  --c-accent:      #0e7c86;   /* リンク・ボタン */
  --c-accent-dark: #0a5c64;
  --c-alert:       #b3261e;   /* 注意喚起 */
  --c-alert-bg:    #fdf3f2;
  --c-warn:        #8a5a00;   /* 期限・締切 */
  --c-warn-bg:     #fdf8ec;

  --c-text:        #1f2933;
  --c-text-muted:  #5a6672;
  --c-line:        #d9dee3;
  --c-bg:          #ffffff;
  --c-bg-subtle:   #f5f7f9;

  /* --- 文字 --- */
  --font-base: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
               "Yu Gothic Medium", "Yu Gothic", Meiryo, sans-serif;
  --font-mono: "SF Mono", "SFMono-Regular", Consolas, "Osaka-Mono", monospace;

  /* 流体タイポ：画面幅に応じて滑らかに変化 */
  --fs-hero-sub:   clamp(0.85rem, 0.5vw + 0.75rem, 1rem);
  --fs-hero-title: clamp(1.5rem, 3.2vw + 0.5rem, 2.75rem);
  --fs-hero-lead:  clamp(1.1rem, 1.6vw + 0.7rem, 1.6rem);
  --fs-page-title: clamp(1.4rem, 2.2vw + 0.7rem, 2.15rem);
  --fs-h2:         clamp(1.25rem, 1.2vw + 0.9rem, 1.6rem);
  --fs-h3:         clamp(1.05rem, 0.6vw + 0.9rem, 1.25rem);
  --fs-body:       clamp(0.95rem, 0.35vw + 0.85rem, 1.0625rem);

  /* --- 余白・幅 --- */
  --measure:  min(100% - 2.5rem, 60rem);
  --measure-wide: min(100% - 2.5rem, 72rem);
  --gap-section: clamp(2.5rem, 6vw, 4.5rem);
  --radius: 6px;
}

/* --- リセット（最小限） ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, p, figure, figcaption, ul, ol, dl, dd, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--font-base);
  font-size: var(--fs-body);
  line-height: 1.9;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-text-size-adjust: 100%;
}

.wrap { width: var(--measure); margin-inline: auto; }
.wrap--wide { width: var(--measure-wide); margin-inline: auto; }

.skip-link { position: absolute; left: -9999px; background: var(--c-navy); color: #fff; padding: .75em 1.25em; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }

:where(a):focus-visible, :where(button):focus-visible {
  outline: 3px solid var(--c-accent); outline-offset: 3px;
}

/* ==========================================================================
   サイトヘッダー（下層ページ用）
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-navy-deep);
  color: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,.18);
}
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem;
  padding-block: .7rem;
}
.site-header__home {
  color: #fff; text-decoration: none; font-weight: 700; font-size: .9375rem;
  white-space: nowrap; letter-spacing: .02em;
}
.site-header__home:hover { color: #9fd7de; }
.site-header__home::before { content: "←"; margin-right: .4em; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .25rem .35rem; }
.site-nav a {
  display: block; padding: .35em .85em;
  color: #c9d4de; text-decoration: none; font-size: .875rem;
  border-radius: 999px; white-space: nowrap;
  transition: background-color .18s ease, color .18s ease;
}
.site-nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.site-nav a[aria-current="page"] { background: var(--c-accent); color: #fff; font-weight: 700; }

/* ==========================================================================
   ヒーロー（トップページ）
   ========================================================================== */
.hero {
  position: relative; display: grid; place-items: center;
  min-height: clamp(24rem, 62vh, 34rem);
  padding: clamp(3rem, 8vw, 5rem) 1.25rem;
  text-align: center; color: #fff; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("../assets/hero.jpg") center 38% / cover no-repeat;
  filter: saturate(.85);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4,34,62,.55) 0%, rgba(4,34,62,.35) 40%, rgba(4,34,62,.75) 100%);
}
.hero__inner { position: relative; z-index: 1; max-width: 46rem; }
.hero__org { font-size: var(--fs-hero-sub); letter-spacing: .28em; margin-bottom: .9em; opacity: .95; }
.hero__title {
  font-size: var(--fs-hero-title); font-weight: 700; line-height: 1.45;
  letter-spacing: .02em; text-wrap: balance; text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.hero__lead {
  margin-top: .85em; font-size: var(--fs-hero-lead); font-weight: 500;
  line-height: 1.6; text-shadow: 0 2px 14px rgba(0,0,0,.45);
}
.hero__lead .day { display: block; }
.hero__logo { width: min(24rem, 72%); margin: clamp(1.75rem, 4vw, 2.75rem) auto 0; opacity: .92; }

/* ==========================================================================
   ページヘッダー（下層ページ）
   ========================================================================== */
.page-head {
  background: var(--c-navy);
  color: #fff;
  padding-block: clamp(2rem, 5vw, 3.25rem);
}
.page-head__eyebrow {
  font-size: .8125rem; letter-spacing: .22em; opacity: .8; margin-bottom: .6em;
}
.page-head__title {
  font-size: var(--fs-page-title); font-weight: 700; line-height: 1.45; text-wrap: balance;
}
.page-head__lead { margin-top: .9em; opacity: .92; max-width: 46rem; }

/* ==========================================================================
   セクション・本文
   ========================================================================== */
.section { padding-block: var(--gap-section); }
.section + .section { border-top: 1px solid var(--c-line); }
.section--subtle { background: var(--c-bg-subtle); }

.section__title {
  font-size: var(--fs-h2); font-weight: 700; color: var(--c-navy);
  line-height: 1.5; padding-bottom: .5em; margin-bottom: 1.4em;
  border-bottom: 3px solid var(--c-navy);
}
.subhead {
  font-size: var(--fs-h3); font-weight: 700; color: var(--c-navy);
  margin-block: 2.2em .7em; line-height: 1.6;
}
.subhead:first-child { margin-top: 0; }
.subhead--rule {
  padding-left: .7em; border-left: 5px solid var(--c-accent);
}

.prose > p + p { margin-top: 1.4em; }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }

/* 番号なし・番号つきリスト */
.list, .list-num { margin-block: 1.2em; display: grid; gap: .55em; }
.list > li { padding-left: 1.35em; position: relative; }
.list > li::before {
  content: ""; position: absolute; left: .3em; top: .8em;
  width: .4em; height: .4em; border-radius: 50%; background: var(--c-accent);
}
.list-num { counter-reset: n; }
.list-num > li { padding-left: 2.1em; position: relative; counter-increment: n; }
.list-num > li::before {
  content: counter(n) "."; position: absolute; left: 0; top: 0;
  font-weight: 700; color: var(--c-navy); font-variant-numeric: tabular-nums;
}

/* 定義リスト（用語＋説明） */
.deflist { display: grid; gap: 1.1em; margin-block: 1.4em; }
.deflist dt { font-weight: 700; color: var(--c-navy); }
.deflist dd { margin: .2em 0 0; }

/* ==========================================================================
   囲み枠
   ========================================================================== */
.callout {
  border: 1px solid var(--c-line);
  border-left: 5px solid var(--c-navy);
  background: var(--c-bg-subtle);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 2.5vw, 1.6rem) clamp(1.1rem, 3vw, 1.8rem);
  margin-block: 1.8em;
}
.callout > :first-child { margin-top: 0; }
.callout__title { font-weight: 700; color: var(--c-navy); margin-bottom: .5em; }
.callout dl { display: grid; gap: .9em; }
.callout dt { font-weight: 700; }
.callout dd { margin: .15em 0 0; }

.callout--alert {
  border-color: #f0cfcc; border-left-color: var(--c-alert);
  background: var(--c-alert-bg); color: var(--c-alert); font-weight: 500;
}
.callout--alert .callout__title { color: var(--c-alert); }

.callout--deadline {
  border-color: #ecdcb4; border-left-color: var(--c-warn);
  background: var(--c-warn-bg); color: var(--c-warn);
}
.callout--deadline .callout__title { color: var(--c-warn); }

.callout--example { border-left-color: var(--c-accent); color: var(--c-navy); font-size: .95em; }

/* 演題申込状況（js/entry-status.js） */
.entry-status__row {
  display: grid; grid-template-columns: 9em 4.5em 1fr; gap: .3em 1em; align-items: center;
  padding-block: .45em;
}
.entry-status__label { font-weight: 700; color: var(--c-navy); }
.entry-status__pct { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.entry-status__bar { height: .7em; border-radius: 999px; background: var(--c-line); overflow: hidden; }
.entry-status__bar > span { display: block; height: 100%; background: var(--c-accent); }
.entry-status__msg { grid-column: 1 / -1; font-weight: 700; }
.entry-status__row.is-near .entry-status__bar > span { background: var(--c-warn); }
.entry-status__row.is-near .entry-status__msg { color: var(--c-warn); }
.entry-status__row.is-over .entry-status__bar > span,
.entry-status__row.is-full .entry-status__bar > span { background: var(--c-alert); }
.entry-status__row.is-over .entry-status__msg,
.entry-status__row.is-full .entry-status__msg { color: var(--c-alert); }
.entry-status__note { margin: .4em 0 0; font-size: .85em; color: var(--c-text-muted); }
@media (width < 34rem) {
  .entry-status__row { grid-template-columns: 1fr auto; }
  .entry-status__bar { grid-column: 1 / -1; }
}

/* 検査略号など、等幅で読ませたい塊 */
.code-block {
  font-family: var(--font-mono);
  font-size: .875rem; line-height: 2;
  background: var(--c-bg-subtle);
  border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 1.1em 1.3em; margin-block: 1.4em;
  overflow-x: auto; word-break: break-word;
}

/* ==========================================================================
   ボタン・リンク
   ========================================================================== */
.btn {
  display: inline-block; max-width: 100%;
  padding: .95em 2em; border: 0; border-radius: 999px;
  font: inherit; font-weight: 700; line-height: 1.5;
  color: #fff; background: var(--c-accent); cursor: pointer;
  text-decoration: none; text-align: center;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 2px 10px rgba(14,124,134,.28);
}
.btn:hover { background: var(--c-accent-dark); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(14,124,134,.32); }
.btn:active { transform: translateY(0); }
.btn--navy { background: var(--c-navy); box-shadow: 0 2px 10px rgba(7,55,99,.28); }
.btn--navy:hover { background: var(--c-navy-deep); box-shadow: 0 6px 18px rgba(7,55,99,.32); }
.btn-row { text-align: center; margin-top: 1.6em; }

/* ファイルダウンロード */
.download {
  display: inline-flex; align-items: center; gap: .8em;
  padding: .85em 1.4em;
  border: 1px solid var(--c-line); border-radius: var(--radius);
  background: #fff; text-decoration: none; color: var(--c-navy);
  font-weight: 700; line-height: 1.5;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.download:hover { border-color: var(--c-accent); box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); }
.download__icon {
  flex: none; width: 2.1rem; height: 2.1rem; border-radius: 4px;
  display: grid; place-items: center;
  font-size: .625rem; font-weight: 700; letter-spacing: .02em;
  color: #fff; background: var(--c-accent);
}
.download__icon--doc { background: #2b579a; }   /* Word */
.download__icon--pdf { background: #b3261e; }   /* PDF */
.download__meta { display: block; font-size: .8125rem; font-weight: 400; color: var(--c-text-muted); }
.download-row { display: flex; flex-wrap: wrap; gap: .9em; margin-block: 1.4em; }

/* 本文中リンク */
.prose a:not(.btn):not(.download):not(.to-top) {
  color: var(--c-accent-dark);
  text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.prose a:not(.btn):not(.download):not(.to-top):hover { color: var(--c-accent); }

/* 外部リンクの印 */
a[target="_blank"]:not(.btn):not(.download)::after {
  content: "↗"; font-size: .8em; margin-left: .25em; vertical-align: .1em;
}

/* ==========================================================================
   図版（書式例のスクリーンショットなど）
   ========================================================================== */
.figure {
  margin-block: 1.8em;
  border: 1px solid var(--c-line); border-radius: var(--radius);
  background: var(--c-bg-subtle); overflow: hidden;
}
.figure__link { display: block; position: relative; background: #fff; }
.figure__link img { width: 100%; }
.figure__link::after {
  content: "クリックで拡大";
  position: absolute; right: .6rem; bottom: .6rem;
  background: rgba(4,34,62,.82); color: #fff;
  font-size: .75rem; padding: .3em .8em; border-radius: 999px;
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.figure__link:hover::after, .figure__link:focus-visible::after { opacity: 1; }
.figure figcaption {
  padding: .8em 1.1em; font-size: .875rem; line-height: 1.8;
  color: var(--c-text-muted); border-top: 1px solid var(--c-line);
}

/* タッチ端末では常時表示（hoverがないため） */
@media (hover: none) {
  .figure__link::after { opacity: 1; }
}

/* ==========================================================================
   ステップ（発表の流れ）
   ========================================================================== */
.steps { counter-reset: step; display: grid; gap: 1.1rem; margin-block: 1.5em; }
.step {
  counter-increment: step;
  display: grid; grid-template-columns: auto 1fr; gap: 0 1.3rem;
  padding: clamp(1.2rem, 3vw, 1.7rem);
  border: 1px solid var(--c-line); border-radius: var(--radius);
  background: #fff;
}
.step::before {
  content: counter(step);
  grid-row: 1 / span 3;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-navy); color: #fff;
  font-weight: 700; font-size: 1.05rem; line-height: 1;
}
.step__title { font-size: var(--fs-h3); font-weight: 700; color: var(--c-navy); line-height: 1.5; }
.step__body { margin-top: .5em; }
.step__deadline {
  display: inline-block; margin-top: .7em;
  padding: .25em .9em; border-radius: 999px;
  background: var(--c-warn-bg); color: var(--c-warn);
  border: 1px solid #ecdcb4;
  font-size: .875rem; font-weight: 700;
}
.step__link { margin-top: .9em; }

@media (width < 34rem) {
  .step { grid-template-columns: 1fr; gap: .8rem; }
  .step::before { grid-row: auto; }
}

/* ==========================================================================
   スケジュール
   ========================================================================== */
.schedule { display: grid; margin-top: .5em; }
.schedule__item {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: 0 1.5rem;
  align-items: baseline; padding: 1em .25em;
  border-bottom: 1px solid var(--c-line);
}
.schedule__item:first-child { border-top: 1px solid var(--c-line); }
.schedule__date { font-weight: 700; color: var(--c-navy); font-variant-numeric: tabular-nums; }
.schedule__item--done .schedule__date,
.schedule__item--done .schedule__what { color: var(--c-text-muted); }
.schedule__item--main { background: var(--c-bg-subtle); }
.schedule__item--main .schedule__what { font-weight: 700; }

@media (width < 34rem) {
  .schedule__item { grid-template-columns: 1fr; gap: .2em; }
}

/* 発表プログラム（時刻＋演者＋演題） */
.program { display: grid; margin-block: 1.2em; }
.program__item {
  display: grid; grid-template-columns: 4.5rem 7rem 1fr; gap: 0 1.2rem;
  padding: .85em .25em; border-bottom: 1px solid var(--c-line);
  align-items: baseline;
}
.program__item:first-child { border-top: 1px solid var(--c-line); }
.program__time { font-weight: 700; color: var(--c-navy); font-variant-numeric: tabular-nums; }
.program__who { font-weight: 700; }
.program__what { font-size: .9375rem; line-height: 1.8; }
@media (width < 44rem) {
  .program__item { grid-template-columns: 4.5rem 1fr; }
  .program__what { grid-column: 1 / -1; margin-top: .2em; }
}

/* ==========================================================================
   フォーム埋め込み
   ========================================================================== */
.form-frame {
  margin-block: 2em;
  border: 1px solid var(--c-line); border-radius: var(--radius);
  overflow: hidden; background: #fff;
}
.form-frame iframe { display: block; width: 100%; height: 640px; border: 0; }
.form-frame--tall iframe { height: 900px; }
/* Googleフォームは自動で高さが変わらないため、全項目が収まる高さを固定 */
.form-frame--gform iframe { height: 3400px; }
.form-frame__alt { margin-top: -1.2em; font-size: .9em; text-align: right; }
@media (width < 48rem) {
  .form-frame iframe { height: 820px; }
  .form-frame--tall iframe { height: 1100px; }
  .form-frame--gform iframe { height: 3900px; }
}

/* アンケートなど、フォームだけのページ */
.form-only { padding-block: var(--gap-section); }

/* ==========================================================================
   フッター
   ========================================================================== */
.footer {
  background: var(--c-navy-deep); color: #c9d4de;
  padding-block: clamp(2.5rem, 6vw, 3.5rem) 1.5rem;
  font-size: .9375rem; line-height: 1.85;
}
.footer__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 2.5rem; align-items: start;
}
@media (width < 44rem) { .footer__grid { grid-template-columns: 1fr; } }

.footer__logo { width: min(22rem, 100%); opacity: .85; margin-bottom: 1.5rem; }
.footer address { font-style: normal; }
.footer a { color: #9fd7de; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.footer a:hover { color: #fff; }

.to-top {
  display: inline-block; padding: .6em 1.4em;
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  color: #c9d4de; text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.to-top:hover { background: rgba(255,255,255,.12); color: #fff; }

.copyright {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.14);
  text-align: center; font-size: .8125rem; color: #8c9bab;
}

/* ==========================================================================
   印刷（規定ページを紙で読む人が多いため、読みやすさを優先）
   ========================================================================== */
@media print {
  .site-header, .site-nav, .btn, .to-top, .form-frame, .skip-link { display: none; }
  .hero { min-height: auto; color: var(--c-text); }
  .hero::before, .hero::after { display: none; }
  .hero__title, .hero__lead { text-shadow: none; color: var(--c-navy); }
  .page-head { background: none; color: var(--c-navy); border-bottom: 3px solid var(--c-navy); }
  .page-head__eyebrow, .page-head__lead { color: var(--c-text); }
  .footer { background: none; color: var(--c-text); border-top: 1px solid #ccc; }
  .footer a { color: var(--c-text); }
  .section + .section { border-top: 1px solid #ccc; }
  .figure, .callout, .step { break-inside: avoid; }
  .figure__link::after { display: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .75em; word-break: break-all; }
}
