/* ==========================================================================
   /assets/site/sky.css — 空の移り変わり（昼・夕・夜）の試作  2026-09-28
   html[data-sky="day|dusk|night"] で色の組を切り替える。
   背景の空の色（--sky-top / --sky-bot）は sky.js が少しずつ動かす。
   文字と背景のコントラストは、どの時間帯でも4.5:1以上になる色だけを使う。
   ========================================================================== */

/* ---------- 空（ページ全体のいちばん後ろ） ---------- */
html { background: var(--sky-bot, #fff); }
body { background: transparent; transition: color 1.2s ease; }
.sky-back {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(180deg, var(--sky-top, #f4f7ff) 0%, var(--sky-bot, #ffffff) 70%);
}
/* 点と星座はページの頭の1画面分だけ。下へ行くほど薄れる */
canvas.sky-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100vh; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
/* 太陽と月：画面の奥を弧を描いて横切る */
.sky-orb {
  position: fixed; left: 0; top: 0; width: var(--orb-size, 120px); height: var(--orb-size, 120px); z-index: -1; pointer-events: none;
  border-radius: 50%; transform: translate(var(--orb-x, -200px), var(--orb-y, -200px)); opacity: var(--orb-o, 0);
  transition: opacity 1.2s ease;
}
.sky-orb.sun { background: radial-gradient(circle, #fff7d6 0%, #ffd66b 38%, rgba(255, 170, 60, .45) 58%, rgba(255, 170, 60, 0) 72%); }
.sky-orb.moon { background: radial-gradient(circle at 42% 40%, #fffdf4 0%, #f3edd8 44%, rgba(220, 225, 255, .35) 60%, rgba(220, 225, 255, 0) 72%); }

/* 空が見えるように、ページの頭の白い下地を外す */
html[data-sky] .page-hero { background: transparent; }
html[data-sky] .section.tint { background: transparent; }

/* ---------- 夕方：暖かい紙の色。文字は昼と同じ濃さ ---------- */
html[data-sky="dusk"] {
  --panel: #fbf3ec; --line: #eedfd2; --line-2: #e3cdbb;
  --ink-2: #3d3a44; --ink-3: #5b5360;
}
html[data-sky="dusk"] .card, html[data-sky="dusk"] .aura-border > .inner, html[data-sky="dusk"] .btn.ghost,
html[data-sky="dusk"] .eyebrow, html[data-sky="dusk"] footer.site, html[data-sky="dusk"] .g-q { background: #fffaf5; }
html[data-sky="dusk"] .topbar { background: rgba(255, 246, 238, .82); }
html[data-sky="dusk"] .aurora-bg .blob { opacity: .22; }

/* ---------- 夜：濃紺の空。文字は明るく、アクセントは淡い色に ---------- */
html[data-sky="night"] {
  color-scheme: dark;
  --bg: #0b1022; --panel: #141b33; --ink: #eef1fb; --ink-2: #c9cfe3; --ink-3: #a9b0c8;
  --line: #262f4d; --line-2: #34406a;
  --acc: #7ea0ff; --acc-ink: #a9c0ff; --acc-soft: #1a2448;
  --ink-gradient: linear-gradient(95deg, #9db7ff 0%, #c7adff 38%, #ffa8d4 72%, #ffc08a 100%);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 16px 48px rgba(0, 0, 0, .35);
}
html[data-sky="night"] body { color: var(--ink); }
html[data-sky="night"] .t-blue   { --acc: #7ea0ff; --acc-ink: #a9c0ff; --acc-soft: #1a2448; }
html[data-sky="night"] .t-violet { --acc: #b28bff; --acc-ink: #cdb4ff; --acc-soft: #241d45; }
html[data-sky="night"] .t-pink   { --acc: #ff7ab8; --acc-ink: #ffa9d1; --acc-soft: #3a1a33; }
html[data-sky="night"] .t-orange { --acc: #ff9f5a; --acc-ink: #ffbf8a; --acc-soft: #3a2418; }
html[data-sky="night"] .t-green  { --acc: #3fd6a0; --acc-ink: #86e8c2; --acc-soft: #12302a; }
html[data-sky="night"] .card, html[data-sky="night"] .aura-border > .inner, html[data-sky="night"] .g-q,
html[data-sky="night"] .glance-list a, html[data-sky="night"] .faq details, html[data-sky="night"] details.more,
html[data-sky="night"] .table-wrap, html[data-sky="night"] .drawer-panel, html[data-sky="night"] .pal-in { background: rgba(20, 27, 51, .88); }
html[data-sky="night"] .eyebrow, html[data-sky="night"] .btn.ghost, html[data-sky="night"] .search-btn, html[data-sky="night"] .icon-btn {
  background: rgba(20, 27, 51, .9); color: var(--ink); border-color: var(--line-2);
}
html[data-sky="night"] .btn.acc { --b: #3a5bd9; }
html[data-sky="night"] .t-violet .btn.acc, html[data-sky="night"] .btn.acc.t-violet { --b: #6b45d6; }
html[data-sky="night"] .t-pink .btn.acc { --b: #b3246b; }
html[data-sky="night"] .t-orange .btn.acc, html[data-sky="night"] body.t-orange .btn.acc { --b: #b44f14; }
html[data-sky="night"] .t-green .btn.acc { --b: #0e7a55; }
html[data-sky="night"] .topbar { background: rgba(11, 16, 34, .78); }
html[data-sky="night"] footer.site { background: rgba(11, 16, 34, .92); }
html[data-sky="night"] .grid-bg { opacity: .35; filter: invert(1); }
html[data-sky="night"] .aurora-bg .blob { opacity: .14; }
html[data-sky="night"] .aura-border { box-shadow: 0 20px 60px -30px rgba(126, 160, 255, .45); }
html[data-sky="night"] .ai-av::after, html[data-sky="night"] .step .num { background: var(--bg); }
html[data-sky="night"] ::selection { background: #3a4a8a; }

/* 色の変わり目はゆっくり */
.card, .aura-border > .inner, .topbar, .eyebrow, .btn.ghost, footer.site, .g-q, .dest { transition: background-color 1.2s ease, border-color 1.2s ease, color 1.2s ease; }

/* ---------- 時間帯の切り替え（左下の小さなつまみ） ---------- */
.sky-switch {
  position: fixed; left: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 2px; padding: 4px;
  border-radius: 999px; background: rgba(255, 255, 255, .86); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: .8rem; font-weight: 700;
}
html[data-sky="night"] .sky-switch { background: rgba(20, 27, 51, .9); }
.sky-switch button { border: 0; background: transparent; color: var(--ink-2); padding: 7px 11px; border-radius: 999px; min-height: 34px; white-space: nowrap; }
.sky-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.sky-switch .sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 2px; }
.sky-switch .clock { padding: 0 8px 0 4px; color: var(--ink-3); font-family: var(--f-en); font-size: .74rem; min-width: 3.4em; }
@media (max-width: 560px) {
  .sky-switch { left: 8px; right: 8px; bottom: 8px; justify-content: space-between; }
  .sky-switch button { padding: 7px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .sky-orb, body, .card { transition: none !important; }
}

/* ---------- 全ページ点検（2026-09-28）で見つかった、夜・夕方に読みにくくなる所 ---------- */
html[data-sky="night"] .skip { background: #0b1022; color: #fff; border: 1px solid var(--line-2); }
html[data-sky="night"] table th { background-color: rgba(20, 27, 51, .95); color: var(--ink); }
html[data-sky="night"] .fchip { background: rgba(20, 27, 51, .9); color: var(--ink-2); border-color: var(--line-2); }
html[data-sky="night"] .fchip[aria-pressed="true"] { background: var(--acc-ink); border-color: var(--acc-ink); color: #0b1022; }
/* つくったもの（/works/）の状態の札 */
html[data-sky="night"] .work .st { background: #232c4a; color: var(--ink-2); }
html[data-sky="night"] .work .st.open { background: #12302a; color: #86e8c2; }
html[data-sky="night"] .work .st.sale { background: #3a1a22; color: #ffb3aa; }
html[data-sky="night"] .hero-shot { background: #141b33; }
html[data-sky="night"] .walk-item .shot { background: #141b33; }
/* 夕方は背景が暖かいので、橙の文字を少し濃く */
html[data-sky="dusk"] .t-orange, html[data-sky="dusk"] body.t-orange { --acc-ink: #a93a06; }
