@import url('https://fonts.googleapis.com/css2?family=Yomogi&display=swap');
  
/* -------------------------------------------------------- */
/* VARIABLES */
/* -------------------------------------------------------- */

/* Variables are used like this: var(--text-color) */
:root {
  /* Background Colors: */
  --link-color: #f5dde9;
  --content-background-color: #ffffff;
  --sidebar-background-color: #ffffff;
  --Transparent-background-color: #ffffff00;
  --background-color: #f8ebf0;

  /* Text Colors: */
  --text-color: #888888;
  --sidebar-text-color: #888888;
  --link-color: #f0b1d2;
  --link-color-hover: #f0dde6;

  /* Text: */
  --font: "Yomogi", cursive;
  --heading-font: "Yomogi", cursive;
  --font-size: 15px;

  /* Other Settings: */
  --margin: 10px;
  --padding: 20px;
  --border: none;
  --round-borders: 30px;
  --sidebar-width: 200px;
  --color1: #f0f0f0;
  --color2: #eecad8;
  --color3: #a3a3a3;
  --ffffff: #ffffff;

    /* Album */
  --album-columns: 4;
  --album-gap: 20px;
  --album-card-background: var(--ffffff);
  --album-modal-background: var(--ffffff);
  --album-photo-background: #fafafa;
  --album-modal-shadow: 0 8px 30px #88888833;
  --album-close-color: var(--color3);

  --sozai-race2: url("../img/sozai-race2.png");
  --sozai-race3-2: url(../img/sozai-race3-2.png);
  --sozai-race3-1: url(../img/sozai-race3-1.png);
}

/* -------------------------------------------------------- */
/* BASICS */
/* -------------------------------------------------------- */

* {
  box-sizing: border-box;
}

body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  font-size: var(--font-size);
  margin: 0;
  padding: var(--margin);
  color: var(--text-color);
  font-family: var(--font);
  line-height: 1.2;
  /* background: var(--background-color); */
  background-image: url("../img/background3.png");
}

::selection {
  /* (Text highlighted by the user) */
  background: rgba(0, 0, 0, 0.2);
}

mark {
  /* Text highlighted by using the <mark> element */
  text-shadow: 1px 1px 4px var(--link-color);
  background-color: inherit;
  color: var(--text-color);
}

/* Links: */
a {
  text-decoration: underline;
}

a,
a:visited {
  color: var(--color3);
}

a:hover,
a:focus {
  color: var(--color1);
  text-decoration: none;
}

h2 {
    margin: 0;
    font-size: 30px;
    color: var(--color3);
}

/* -------------------------------------------------------- */
/* LAYOUT */
/* -------------------------------------------------------- */

.race-box {
  border-image: var(--sozai-race3-2) 18 round;
  border-width: 30px;
  border-style: solid;
  border-image-outset: 0px;
  margin-top: 30px;
}

.layout {
  width: 800px;
  height: auto;
  grid-gap: var(--margin);
  grid-template: "header header header" auto "leftSidebar main rightSidebar" auto "footer footer footer" auto / var(--sidebar-width) auto var(--sidebar-width);
  /* Confused by the grid? Check out my tutorial: https://petrapixel.neocities.org/coding/positioning-tutorial#grid */
  background-color: var(--content-background-color);

}

main {
  grid-area: main;
  overflow-y: auto;
  padding: var(--padding);
  background: var(--content-background-color);
  border: var(--border);
  border-radius: var(--round-borders);
}

/* -------------------------------------------------------- */


/* カラム */
.container { 
    display: flex; flex-wrap: wrap; justify-content: space-between;
    padding: 40px;
}
  .column1 {width: 50%; border-right: 2px dashed var(--color1); text-align: center;}
  .column2 {width: 48%; 
    height: 400px; overflow-y: scroll;
  }
@media (max-width: 700px) {
    .container {padding: 20px;}
    .column1 {width: 100%; border-bottom: 2px dashed var(--color1); border-right: none;}
    .column2 {width: 100%; margin-top: 20px;
    height: auto; overflow-y: visible;
  }
}



/* -------------------------------------------------------- */
/* MOBILE RESPONSIVE */
/* -------------------------------------------------------- */

/* CSS Code for devices < 800px */
@media (max-width: 800px) {



  body {
    font-size: 15px;
  }

  .layout-home {
    width: 100%;
    grid-template: "header" auto  "leftSidebar" auto "main" auto "rightSidebar" auto "footer" auto / 1fr;
    /* Confused by the grid? Check out my tutorial: https://petrapixel.neocities.org/coding/positioning-tutorial#grid */
  }

  .layout {
    width: 100%;
    grid-template: "header" auto  "leftSidebar" auto "main" auto "rightSidebar" auto "footer" auto / 1fr;
    /* Confused by the grid? Check out my tutorial: https://petrapixel.neocities.org/coding/positioning-tutorial#grid */
    height:auto;}

  .left-sidebar{
    height: 200px;
    overflow-y: scroll;
  }

  .right-sidebar{
    height: 400px;
    overflow-y: scroll;
  }

  aside {
    border-bottom: 1px solid;
    font-size: 0.9em;
  }

  nav {
    padding: 0;
  }

  nav > ul {
    padding-top: 0.5em;
  }

  nav > ul li > a,
  nav > ul li > details summary,
  nav > ul li > strong {
    padding: 0.5em;
  }

  main {
    max-height: none;
    padding: 15px;
  }

  .images {
    flex-wrap: wrap;
  }

  .images img {
    width: 100%;
  }

  #skip-to-content-link {
    font-size: 1rem;
  }

  /* 追加　モバイル版 */
  .uiteru-box {display:none;}
  .race-box{margin-top: 30px; max-width: 100%;}

}

/* -------------------------------------------------------- */
/* 追加 */
/* -------------------------------------------------------- */

/* 画面フィルター追加 */
html::before {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(0,0,0,0) 50%, rgba(0, 0, 0, 0.1) 50%);
  background-size: auto;
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
  z-index: 999999999;
}

.profile{
    padding: 40px;
    margin: 0 auto;
}

.mini-button{
  /* background:url(img/background3.png); */
  background-color: var(--ffffff);
  padding: 6px 10px;
  border: 2px solid var(--ffffff);
  outline: 1px solid var(--color3);
  border-radius: 15px;
  margin: 0 auto;
  font-size: 14px;
  background: linear-gradient(var(--ffffff), var(--ffffff), var(--ffffff), var(--ffffff), var(--color1));
  text-decoration: none;
}

h1{
  text-align: center !important; /* 他のtext-alignを強制上書き */
  margin-left: auto !important;   /* 幅が指定されている場合に中央寄せ */
  margin-right: auto !important;
  display: block !important;     /* flexなどの影響をリセット */
  margin-bottom: 20px 0;
}
h2{
    font-family: var(--font);
    font-size: 20px;
}
.text{
    line-height: 1.5;
    word-break: break-word;
    text-align: left;
    font-size: var(--font-size);
}
.text img{
    max-width: 100%;
    margin-top: 10px;
    border-radius: 20px;
    display: flex;
    padding: 5px;
    background: #fff;
    border: 1px solid var(--color1);
    border-radius: 12px;
}
.diary-box{
    border-bottom: 1px solid var(--color1);
    padding: 20px;
}







/* -------------------------------------------------------- */
/* PHOTO ALBUM */
/* -------------------------------------------------------- */

.photo-album {
  display: grid;
  grid-template-columns: repeat(var(--album-columns), minmax(0, 1fr));
  gap: var(--album-gap);
  width: 100%;
  box-sizing: border-box;
  margin-top: 20px;
  margin-bottom: 50px;
}


/* -------------------------------------------------------- */
/* 写真カード */
/* -------------------------------------------------------- */

.album-item {
  position: relative;

  /* カードを正方形にする */
  aspect-ratio: 1 / 1;

  min-width: 0;
  padding: 7px;

  border-width: 7px;
  border-style: solid;
  border-image: var(--sozai-race2) 6 fill round;

  background-color: var(--album-card-background);

  box-sizing: border-box;

  cursor: pointer;

  transition:transform 0.2s ease,filter 0.2s ease;
}

.album-item img {
  position: relative;
  z-index: 1;

  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  /* 指定がない写真は中央 */
  object-position: center;

  background-color: var(--album-photo-background);

  border-radius: 15px;
}

/* レース素材の透過部分に白い下地を入れる */
.album-item::before {
  content: "";

  position: absolute;
  inset: 0;

  background: var(--album-card-background);

  z-index: 0;
  pointer-events: none;
}


/* -------------------------------------------------------- */
/* 写真 */
/* -------------------------------------------------------- */

/* 正方形のカードの中に写真を入れる */
/* .album-item img {
  position: relative;
  z-index: 1;

  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;

  object-position: center;

  background-color: var(--album-photo-background);
} */

/* 正方形のまま、画像の長い部分を切る */
.album-item img {

  position: relative;
  z-index: 1;
  display: block;

  width: 100%;
  height: 100%;

  /* 正方形に合わせて、はみ出した部分を切り取る */
  object-fit: cover;
  object-position: center;

  background-color: var(--album-photo-background);

  border-radius: 15px;
}


/* ホバー */
.album-item:hover {
  transform: translateY(-3px);
  filter: brightness(1.03);
}


/* -------------------------------------------------------- */
/* MODAL */
/* -------------------------------------------------------- */

.album-modal {
  position: fixed;
  inset: 0;

  display: none;

  align-items: center;
  justify-content: center;

  padding: 30px;

  box-sizing: border-box;

  background: #88888855;

  z-index: 9999;
}

/* モーダル表示 */
.album-modal.is-open {
  display: flex;
}


/* -------------------------------------------------------- */
/* モーダルの白いボックス */
/* -------------------------------------------------------- */

.album-modal-box {
  position: relative;

  width: min(700px, 90vw);
  max-height: 90vh;

  padding: 14px;

  border-width: 7px;
  border-style: solid;
  border-image: var(--sozai-race3-1) 12 fill round;

  background: var(--album-modal-background);

  box-shadow: var(--album-modal-shadow);

  box-sizing: border-box;

  overflow-y: auto;

  border-radius: 15px;
}


/* レース素材の透過対策 */
.album-modal-box::before {
  content: "";

  position: absolute;
  inset: 0;

  background: var(--album-modal-background);

  z-index: 0;
  pointer-events: none;
}


/* モーダルの中身 */
.album-modal-content {
  position: relative;
  z-index: 1;

  text-align: center;
}


/* -------------------------------------------------------- */
/* 拡大写真 */
/* -------------------------------------------------------- */

.album-modal-image {
  display: block;

  /*
    ★ 元の写真の比率を維持
  */
  width: auto;
  height: auto;

  /*
    ボックスからはみ出さない
  */
  max-width: 100%;
  max-height: 60vh;

  margin: 0 auto 18px;

  object-fit: contain;
}


/* -------------------------------------------------------- */
/* 日付 */
/* -------------------------------------------------------- */

.album-modal-date {
  margin: 5px 0;

  color: var(--color3);

  font-size: 13px;
}


/* -------------------------------------------------------- */
/* 説明 */
/* -------------------------------------------------------- */

.album-modal-description {
  margin: 10px auto 18px;

  color: var(--text-color);

  font-size: var(--font-size);

  line-height: 1.8;
}


/* -------------------------------------------------------- */
/* ×ボタン */
/* -------------------------------------------------------- */

.album-modal-close {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;

  margin: 0 auto;

  border: none;
  border-radius: 50%;

  background: var(--color1);

  color: var(--album-close-color);

  font-family: sans-serif;

  font-size: 18px;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}


.album-modal-close:hover {
  background: var(--color2);

  color: var(--ffffff);
}


/* -------------------------------------------------------- */
/* TABLET */
/* -------------------------------------------------------- */

@media (max-width: 900px) {

  .photo-album {
    --album-columns: 3;
  }

}


/* -------------------------------------------------------- */
/* MOBILE */
/* -------------------------------------------------------- */

@media (max-width: 600px) {

  .photo-album {
    --album-columns: 2;
    --album-gap: 12px;
  }


  .album-modal {
    padding: 15px;
  }


  .album-modal-box {
    width: 95vw;
    padding: 10px;
  }


  .album-modal-image {
    max-height: 55vh;
  }

}
/* -------------------------------------------------------- */
/* -------------------------------------------------------- */

/* メニュー全体の横並び・レスポンシブ配置設定 */
.nav-menu {
  display: flex;
  justify-content: safe center; /* ★ここが最大のポイント！ */
  align-items: center;
  gap: 8px; /* ボタン同士の間隔 */
  list-style: none;
  padding: 8px 12px;
  margin: 0 auto;
  width: 100%;
  
  /* スマホ等で収まらない時は横スクロール */
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

/* スクロールバー非表示（すっきり見せる用） */
.nav-menu::-webkit-scrollbar {
  display: none;
}

/* 各メニュー項目 */
.nav-menu li {
  flex: 0 0 auto; /* 横幅を勝手に広げずボタン本来の幅にする */
}

/* ボタン本体のデザイン */
.nav-menu a {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  
  background-color: var(--ffffff);
  color: var(--text-color);
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
  border-radius: 20px;
  
  /* ピンクの二重線 */
  border: 1.5px solid var(--link-color-hover);
  outline: 1.5px dashed var(--link-color-hover);
  outline-offset: -4px;
  
  transition: opacity 0.2s ease;
}

.nav-menu a:hover {
  opacity: 0.8;
  transform: translateY(-3px);
  filter: brightness(1.03);
}


/* -------------------------------------------------------- */
/* -------------------------------------------------------- */
/* 写真の表示位置 メモ */
/* -------------------------------------------------------- */
/* -------------------------------------------------------- */

/*
  写真は正方形にトリミングして表示します。
  画像が正方形でない場合、object-fit: cover によって
  はみ出した部分が切り取られます。
  
  基本設定は中央。
  ↓
  特定の写真だけ位置を変えたい場合は、
  img に以下の class を追加してください。


  【例】

  <img src="../img/photo01.jpg"
       alt="写真01"
       class="position-left">


  【使用できる位置】

  class="position-left"
    → 左寄り

  class="position-right"
    → 右寄り

  class="position-top"
    → 上寄り

  class="position-bottom"
    → 下寄り


  何も指定しなければ自動的に中央になります。


  【さらに細かく調整したい場合】

  例：
  class="position-custom"

  CSSで

  .album-item img.position-custom {
    object-position: 30% 40%;
  }

  のように指定できます。

  横方向：
    0%   → 左
    50%  → 中央
    100% → 右

  縦方向：
    0%   → 上
    50%  → 中央
    100% → 下
*/