/* 原康浩 site — 画面の外へ続く、一枚の広い作業面。背景は写真の白壁になじむ無彩色。 */

:root {
  --bg: #efefef;
  --ink: #1b1b1b;
  --mute: #666;
  --line: #cfcfcf;
  --gut: 16px;
  --top: 44px;
  --bot: 44px;
  --sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", Meiryo, "Noto Sans JP", system-ui, sans-serif;
}

html { height: 100%; background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  height: 100%; margin: 0;
  background: var(--bg); color: var(--ink);
  font: 400 13px/1.8 var(--sans);
  letter-spacing: 0.02em;
}
html.js, html.js body { overflow: hidden; }

a { color: inherit; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
a:hover { color: var(--mute); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- 上下の細い帯：名前・移動／操作の案内 ---------- */

.bar {
  position: fixed; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px 20px;
  padding: 0 var(--gut);
  background: var(--bg);
  font-size: 12.5px;
}
.bar-top { top: 0; height: var(--top); }
.bar-bottom { bottom: 0; height: var(--bot); font-size: 12px; color: var(--mute); }
.name { text-decoration: none; white-space: nowrap; color: var(--ink); }
.name .sub { margin-left: 1em; color: var(--mute); font-size: 12px; }
.nav { display: flex; flex-wrap: wrap; gap: 0 1.5em; }
.nav a { text-decoration: none; padding: 6px 0; color: var(--ink); }
.nav a:hover, .nav a[aria-expanded="true"] { text-decoration: underline; }

.tools { display: flex; gap: 1.2em; flex: none; }
.tool {
  margin: 0; padding: 8px 0; border: 0; border-radius: 0; background: none;
  font: inherit; color: var(--ink); cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px;
  -webkit-tap-highlight-color: transparent;
}
.tool:hover { color: var(--mute); }
.tool[aria-disabled="true"] { color: #a8a8a8; cursor: default; text-decoration: none; }
.hint { margin: 0; flex: 1; text-align: right; }
.hint-touch { display: none; }
@media (hover: none), (pointer: coarse) { .hint-fine { display: none; } .hint-touch { display: inline; } }
.copy { flex: none; }

/* ---------- 面 ---------- */

.surface {
  position: fixed; top: var(--top); bottom: var(--bot); left: 0; right: 0;
  overflow: hidden; overflow: clip;
  contain: paint;
  cursor: grab;
  user-select: none; -webkit-user-select: none;
  overscroll-behavior: none;
  /* 1本指の移動は自前で処理し、ブラウザ標準の拡大（ピンチ）は妨げない */
  touch-action: pinch-zoom;
}
.is-dragging .surface { cursor: grabbing; }
.is-zoomed .surface { touch-action: auto; }   /* ブラウザで拡大中は、標準のスクロールに任せる */

.plane { position: absolute; left: 0; top: 0; width: 5400px; height: 3700px; transform-origin: 0 0; }

/* 写真：枠・影・回転なし。画像そのものだけを置く */
.ph { position: absolute; z-index: 2; cursor: pointer; outline-offset: calc(8px * var(--inv, 1)); }
.ph { background: rgba(0, 0, 0, 0.05); }   /* 読み込み前の場所取り（配置は動かない） */
.ph img { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.ph img:not([src]) { visibility: hidden; }
.ph:focus { outline: none; }
.ph:focus-visible { outline: calc(3px * var(--inv, 1)) solid var(--ink); }

/* 消し忘れた旧メニューの文字。画面上の位置に残る。写真より後ろ・余白だけ。クリックも読み上げも受け取らない */
.ghost-old {
  position: absolute; left: 0; top: 0; z-index: -1;
  margin: 0; padding: 0; border: 0; background: none;
  font-weight: 400; font-style: normal; line-height: normal; letter-spacing: normal; white-space: pre;
  color: #000;                                     /* 旧 new.html のメニューの文字色 */
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.ghost-old[hidden] { display: none; }

/* 旧サイトの実物。同じ面に置かれ、操作の邪魔をしない */
.past { position: absolute; pointer-events: none; }
.js .past { visibility: hidden; }
.js .past.is-placed { visibility: visible; }
.old-menu { z-index: 1; overflow: hidden; }   /* 写真の下（z-index 2）に残っている。高さは写真に合わせて js が決める */
.old-frag { z-index: 1; overflow: hidden; background: #5cbfff; }   /* 旧 new.html の body の背景色 */

/* ---------- 情報（メニューを押すと開く小さな面） ---------- */

.sheet {
  position: fixed; z-index: 30;
  left: var(--gut); bottom: calc(var(--bot) + 10px);
  width: min(430px, calc(100vw - var(--gut) * 2));
  max-height: calc(100vh - var(--top) - var(--bot) - 24px);
  max-height: calc(100svh - var(--top) - var(--bot) - 24px);
  background: var(--bg); border: 1px solid var(--line);
  display: none;
  flex-direction: column;          /* 上：言語切り替えと閉じる（常に見える）／下：内容（スクロール） */
}
.sheet.is-open { display: flex; }
.sheet-head {
  flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 8px 4px 20px;
  border-bottom: 1px solid var(--line);
  font: 12px/1 var(--sans);
}
.sheet-body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 16px 20px 8px;
}
.sheet-body:focus { outline: none; }
.sheet-body:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }

.js .block { display: none; }
.js .block.is-current { display: block; }

/* 日本語が初期表示。両言語を縦に並べず、切り替えて見せる */
.t-en { display: none; }
html[data-lang="en"] .t-ja { display: none; }
html[data-lang="en"] .t-en { display: block; }
/* 画面全体の日英（メニュー・操作・案内）。日本語が初期表示 */
.l-en { display: none; }
html[data-lang="en"] .l-ja { display: none; }
html[data-lang="en"] .l-en { display: inline; }

.lang { display: flex; align-items: center; }
.lang-btn {
  margin: 0; padding: 10px 6px; min-width: 32px; border: 0; border-radius: 0; background: none;
  font: 12px/1 var(--sans); letter-spacing: 0.06em; color: var(--mute); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lang-btn[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 0.35em; text-decoration-thickness: 1px; }
.lang-btn:hover { color: var(--ink); }
.lang-sep { color: var(--line); }

.sheet-close {
  margin: 0; padding: 10px 6px; border: 0; background: none;
  font: 12px/1 var(--sans); color: var(--mute); cursor: pointer; text-decoration: underline; text-underline-offset: 0.35em;
}
.sheet-close:hover { color: var(--ink); }
@media (pointer: coarse), (max-width: 640px) {          /* タッチ画面・スマホ幅では、押せる範囲を大きく */
  .block .mail a, .block .link a, .block .sns a { display: inline-block; padding: 12px 0; }
  .block p.sns { margin-top: -14px; }                                   /* 押せる範囲の余白ぶん、見た目の間隔は詰める */
  .block p.sns a { padding: 12px 10px; margin: 0 -10px; }              /* 見た目の間隔は変えず、押せる範囲を左右に広げる */
  .lang-btn, .sheet-close { min-height: 44px; min-width: 44px; }
  .sheet-head { padding-top: 0; padding-bottom: 0; }
}

.label { margin: 0 0 12px; font: 400 12px/1.8 var(--sans); color: var(--mute); }
.block p { margin: 0 0 1em; }
.block .who { font-size: 15px; line-height: 1.7; margin-bottom: 1.2em; }
.block .who span { font-size: 12px; color: var(--mute); }
.sub { margin: 1.6em 0 0.5em; font: 400 12px/1.8 var(--sans); color: var(--mute); }
.label + .sub { margin-top: 0; }
.note { margin: 0.9em 0 0; color: var(--mute); }
.mute { color: var(--mute); }
.block .link { margin-top: 1.4em; }
/* メールアドレス：文字で表示。選択・コピーできる（折り返しても切れない） */
.block .sns { display: flex; flex-wrap: wrap; gap: 0 1.6em; margin-top: 0.2em; }   /* 文字リンクだけ。折り返してよい */
.block .sns .ext { font-size: 0.85em; }
.block .mail { font-size: 14px; letter-spacing: 0.02em; -webkit-user-select: text; user-select: text; overflow-wrap: anywhere; }

/* 年 ｜ 会場 の一覧 */
.cv { list-style: none; margin: 0 0 0.4em; padding: 0; }
.cv li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 0 0.7em; margin: 0 0 0.35em; line-height: 1.75; }
.cv--wide li { grid-template-columns: 6.6em minmax(0, 1fr); }
.cv .y { font-variant-numeric: tabular-nums; color: var(--mute); white-space: nowrap; }
.cv li > span:last-child { overflow-wrap: anywhere; }

/* JS なし：写真を縦に並べ、情報を下にそのまま並べる */
html:not(.js) .surface { position: static; overflow: visible; contain: none; touch-action: auto; cursor: auto; }
html:not(.js) .plane { position: static; width: auto; height: auto; }
html:not(.js) .ph { position: static; width: auto !important; height: auto !important; margin: 0 var(--gut) 16px; }
html:not(.js) .ph img { height: auto; }
html:not(.js) .past { display: none; }
.noscript { margin: 0; padding: 24px var(--gut); }
html:not(.js) .bar { position: static; }
html:not(.js) .bar-bottom .tools, html:not(.js) .hint { display: none; }
html:not(.js) .sheet { position: static; display: block; width: auto; max-height: none; border: 0; padding: 24px var(--gut); }
html:not(.js) .block { margin-bottom: 2em; }
html:not(.js) .sheet-head { display: none; }
html:not(.js) .sheet { display: block; }
html:not(.js) .sheet-body { overflow: visible; }

/* ---------- スマートフォン ---------- */

@media (max-width: 640px) {
  :root { --top: 68px; --bot: 68px; }
  .bar-top { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; line-height: 1.4; }
  .nav { gap: 0 1.2em; }
  .nav a { padding: 3px 0; }          /* 英語のメニューが2行になっても、上の帯（高さ固定）に収まるように */
  .bar-bottom { flex-wrap: wrap; align-content: center; gap: 0 12px; }
  .hint { flex: 1 1 100%; order: 2; text-align: left; }
  .tools { order: 1; }
  .copy { order: 1; margin-left: auto; }
}
