/* ============================
 * カスタムフォント
 * ============================ */
@font-face {
  font-family: 'HakkouMincho';
  src: url('font/HakkouMincho.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'HangyakuMincho';
  src: url('font/Hangyaku-drwnR.ttf') format('truetype');
  font-display: swap;
}

/* ============================
 * リセット
 * ============================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  background: #0e1218;
  color: #fff;
  font-family: 'Noto Serif JP', serif;
  overflow-x: hidden;
}

/* 視覚的に隠すが、検索エンジン・スクリーンリーダーには見える（SEO用 h1 など） */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}


body {
  min-height: 220vh;
}


@media (max-width: 768px) {
  body {
    min-height: 100vh;
  }
}

/* ============================
 * 左上テキスト（年・緯度経度）
 * ============================ */
#top-left {
  position: fixed;
  top: 32px;
  left: 56px;
  z-index: 10;
  font-family: 'HakkouMincho', serif;
  color: #ffffff;
  line-height: 1;
  display:flex;
  flex-direction:column;
  gap:8px;
}

#year {
  font-size: 48px;
  letter-spacing: 0.04em;
}

#coords {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #ffffff;
}

@media (max-width: 768px) {
  #current-datetime {
    position:fixed;
    top: auto;
    left: 50%;
    bottom: 60px;
    transform: translateX(-50%);
    text-align: center;
  }
}

#current-date,
#current-time{
  font-family:'HangyakuMincho', serif;
  font-size:20px;
  color:#ffffff;
  display:inline-block;
}

#current-date{
  margin-right:6px;
}

/* ============================
 * リング表示エリア
 * ============================ */
#ring-container {
  position: fixed; 
  top: 0;
  left: 0;
  height: 100vh;
  width: calc(100vw - var(--p, 0) * 50vw);
  display: flex;
  align-items: center;
  justify-content: center;
}

#ring-svg {
  width: 100vh;
  height: 100vh;
  max-width: 100vw;
}

@media (min-width: 769px) {
  #ring-svg {
    width: 100%;
    height: 100%;
    max-width: none;
  }
}

/* ============================
 * スクロール誘導（下向きシェブロン）
 * ============================ */
#scroll-hint {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  opacity: 0;            
  pointer-events: none;  
}

#scroll-hint .label {
  font-family: 'HakkouMincho', serif;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-indent: 0.25em;
}

#scroll-hint .chevron {
  display: block;
  animation: scroll-bob 1.8s ease-in-out infinite;
}

@keyframes scroll-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}
@media (max-width: 768px) {
  #scroll-hint {
    bottom: 10px;
  }
}

/* ============================
 * 右カラム
 * ============================ */
#content-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 5;

  width: 48vw;
  height: 100vh;
  padding: 9vh 5vw 9vh 3vw;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.4em; 

  color: #ffffff;
  transform: translateX(calc((1 - var(--p, 0)) * 110%));
  opacity: var(--p, 0);
}

/* --- セクション共通 --- */

.content-heading {
  font-family: 'HakkouMincho', serif;
  font-size: 1.6rem; 
  font-weight: normal;
  letter-spacing: 0.04em;
  margin-bottom: 0.8em;
}

.content-body {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.95rem; 
  line-height: 1.9;
  color: #e8e8e8;
}

/* 補足 */
.content-note {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.85rem;
  line-height: 1.8;
  color: #b8b8b8;
  margin: 0.4em 0;
}

/* ショップリンク */
.shop-link {
  color: #cfd6e0;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  word-break: break-all;  
}
.shop-link:hover {
  color: #ffffff;
}

/* 世界の太陽高度 */
.mode-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  margin: 0.4em 0 0.9em;
}
.mode-btn {
  font-family: 'HakkouMincho', serif;
  font-size: 0.95rem;
  color: #e8e8e8;
  background: transparent;
  border: 1px solid #6a7280;
  border-radius: 2px;
  padding: 0.4em 1.1em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.mode-btn:hover {
  border-color: #cfd6e0;
  color: #ffffff;
}
.mode-btn.is-active {
  background: #ffffff;
  color: #0e1218;
  border-color: #ffffff;
}

/* ============================
 * タッチ誘導
 * ============================ */
#touch-hint {
  display: none; 
}

@media (max-width: 768px) {
  #touch-hint {
    display: block;
    position: fixed;
    left: 50%;
    top: 60%;
    transform: translate(-50%, -50%);
    z-index: 8;
    width: 64px; 
    height: 64px;
    color: #ffffff;
    pointer-events: none; 
    opacity: 0; 
  }

  /* touch円 */
  .touch-core {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    font-family: 'HakkouMincho', serif;
    font-size: 1rem;
    letter-spacing: 0.08em;
  }

  /* リップル */
  .touch-ripple {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    opacity: 0;
    animation: touch-ripple 2.4s ease-out infinite;
  }
  .touch-ripple:nth-of-type(2) {
    animation-delay: 1.2s;
  }
}

@keyframes touch-ripple {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .touch-ripple { animation: none; }
}

.content-block > * + * {
  margin-top: 0.6em;
}

/* ============================
 * モバイル
 * ============================ */
@media (max-width: 768px) {
  #ring-container {
    position: fixed;
    inset: 0 0 auto 0;  
    width: 100vw;
    height: calc(100vh - (100vh - var(--ring-band)) * var(--mp, 0));
    overflow: hidden;                  
    background: #0e1218;               
    z-index: 5;
    transform: none;                  
    --ring-band: 26vh;
  }


  #content-panel {
    display: block;
    position: static;
    width: 100%;
    height: auto;
    margin-top: 100vh;                 
    padding: 8vw 7vw 18vw;            
    transform: none;                   
    opacity: 1;
    gap: 0;
    z-index: 1;
  }


  .content-block {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    margin-bottom: 14vw;              
  }
  .content-block.in-view {
    opacity: 1;
    transform: none;
  }

  .content-heading { font-size: 1.3rem; }
  .content-body    { font-size: 0.95rem; }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .content-block {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #scroll-hint .chevron {
    animation: none;
  }
}
