:root {
  --swim-blue: #7fdbff;
  --swim-black: #050505;
}

/* 右下スタック: 上=カウンター / 下=時計+プライバシー */
.corner-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.corner-counter {
  display: block;
  width: auto;
  height: 50px;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  opacity: 0.92;
}

/* 時計 + プライバシー タブ */
.corner-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-family: "LINE Seed JP", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    Meiryo, sans-serif;
  font-size: 0.78rem;
  color: var(--swim-blue);
  background: rgba(6, 14, 18, 0.85);
  border: 1px solid rgba(127, 219, 255, 0.4);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.corner-tab .ct-privacy {
  padding: 0;
  border: none;
  background: none;
  color: var(--swim-blue);
  font: inherit;
  cursor: pointer;
}
.corner-tab .ct-privacy:hover {
  color: #ffffff;
}
.corner-tab .ct-sep {
  width: 1px;
  height: 14px;
  background: rgba(127, 219, 255, 0.3);
}
.corner-tab .ct-clock {
  color: #e6e6e6;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}
.corner-tab .ct-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 260px;
  padding: 14px 16px;
  background: rgba(6, 14, 18, 0.96);
  border: 1px solid rgba(127, 219, 255, 0.4);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  color: #cfd3d6;
  font-size: 0.78rem;
  line-height: 1.7;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.corner-tab .ct-popover[hidden] {
  display: none;
}
.corner-tab .ct-popover p {
  margin: 0 0 8px;
}
.corner-tab .ct-popover p:last-child {
  margin: 0;
}
.corner-tab .ct-popover b {
  color: #ffffff;
}
@media (max-width: 520px) {
  .corner-stack {
    right: 10px;
    bottom: 10px;
  }
  .corner-tab {
    font-size: 0.72rem;
    padding: 7px 12px;
  }
  .corner-tab .ct-popover {
    width: min(260px, 78vw);
  }
}

/* ===== ライセンス / クレジットページ ===== */
.note-page .lic-intro {
  margin: 0 0 32px;
  font-size: 0.98rem;
  line-height: 1.9;
  color: #c9d1d5;
}
.note-page .lic-intro b {
  color: #ffffff;
}
.note-page .lic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.note-page .lic-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(127, 219, 255, 0.18);
  border-radius: 14px;
  background: rgba(127, 219, 255, 0.03);
}
.note-page .lic-role {
  align-self: start;
  padding: 5px 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--swim-blue);
  text-align: center;
  background: rgba(127, 219, 255, 0.08);
  border: 1px solid rgba(127, 219, 255, 0.3);
  border-radius: 999px;
}
.note-page .lic-name {
  margin: 0 0 8px;
  padding: 0;
  border: none;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.4;
  color: #ffffff;
}
.note-page .lic-desc {
  margin: 0 0 10px;
  font-size: 0.9rem;
  line-height: 1.8;
  color: #aeb6bb;
}
.note-page .lic-desc:last-child {
  margin-bottom: 0;
}
.note-page .lic-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--swim-blue);
  text-decoration: none;
}
.note-page .lic-link:hover {
  color: #ffffff;
}
.note-page .lic-foot {
  margin: 30px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(127, 219, 255, 0.16);
  font-size: 0.75rem;
  color: #6c7c82;
  text-align: right;
}
@media (max-width: 520px) {
  .note-page .lic-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px;
  }
  .note-page .lic-role {
    justify-self: start;
    padding: 5px 14px;
  }
}

/* 左下: Gallery / License への小さなリンク（時計くらいの控えめさ） */
.corner-left {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 50;
  display: flex;
  gap: 8px;
}
.corner-link {
  font-family: "LINE Seed JP", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    Meiryo, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  color: rgba(127, 219, 255, 0.75);
  text-decoration: none;
  padding: 6px 12px;
  background: rgba(6, 14, 18, 0.7);
  border: 1px solid rgba(127, 219, 255, 0.28);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0.8;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.corner-link:hover {
  opacity: 1;
  color: #ffffff;
}
@media (max-width: 520px) {
  .corner-left {
    left: 10px;
    bottom: 10px;
    gap: 6px;
  }
  .corner-link {
    font-size: 0.68rem;
    padding: 5px 10px;
  }
}

/* ギャラリーページ: サムネ画像のグリッド */
.note-page .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.note-page .gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(127, 219, 255, 0.22);
  background: #000;
}
.note-page .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  border: none;
  border-radius: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.note-page .gallery-item:hover img {
  transform: scale(1.06);
}
.note-page .gallery-item .gi-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 12px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  background: linear-gradient(
    to top,
    rgba(3, 10, 14, 0.9),
    rgba(3, 10, 14, 0)
  );
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-page .gallery-item:hover .gi-title {
  opacity: 1;
}
.note-page .gallery-empty {
  color: #8a9298;
  font-size: 0.95rem;
}

/* ページ間（index ⇄ blog）を Apple 風にフェード＋ズームで遷移 */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: apple-out 480ms cubic-bezier(0.4, 0, 0.2, 1) both;
  }
  ::view-transition-new(root) {
    animation: apple-in 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

/* 抜けるページ: わずかに奥へ引きながらフェード */
@keyframes apple-out {
  to {
    opacity: 0;
    transform: scale(1.03);
  }
}

/* 入るページ: 少し大きい状態からスッと定位置に settle */
@keyframes apple-in {
  from {
    opacity: 0;
    transform: scale(1.06);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background-image: url("/background");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #e6e6e6;
  font-family: "LINE Seed JP", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    Meiryo, sans-serif;
}

.card {
  width: 100%;
  max-width: 640px;
  background-color: rgba(6, 14, 18, 0.88);
  border: 1px solid rgba(127, 219, 255, 0.6);
  border-radius: 18px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.5), 0 0 2px rgba(127, 219, 255, 0.5);
  padding: 32px 40px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--swim-blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-shadow: 0 0 8px rgba(127, 219, 255, 0.6);
}

h1 {
  margin: 0 0 20px;
  font-size: 2.4rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  border-bottom: 1px dashed rgba(127, 219, 255, 0.4);
  padding-bottom: 16px;
}

h1 .dot {
  color: var(--swim-blue);
  text-shadow: 0 0 10px rgba(127, 219, 255, 0.8);
}

p {
  line-height: 1.8;
  margin: 0 0 16px;
  color: #b8b8b8;
}

ul {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

li a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--swim-blue);
  color: var(--swim-blue);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

li a:hover {
  background-color: var(--swim-blue);
  color: #000000;
  box-shadow: 0 0 16px rgba(127, 219, 255, 0.7);
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: #888888;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.back-link:hover {
  color: var(--swim-blue);
}

.post {
  padding-top: 16px;
  border-top: 1px dashed rgba(127, 219, 255, 0.3);
}

.post + .post {
  margin-top: 24px;
}

.post h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  color: #ffffff;
  border-bottom: none;
  padding-bottom: 0;
}

.post time {
  display: block;
  font-size: 0.8rem;
  color: var(--swim-blue);
  margin-bottom: 10px;
}

.post img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px 0 0;
  border: 1px solid rgba(127, 219, 255, 0.4);
}

/* ===== note風（ダーク / ネオンブルー） ===== */
.note-page {
  display: block;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  background-image: url("/background");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #e6e6e6;
  font-family: "LINE Seed JP", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.note-header {
  max-width: 680px;
  margin: 0 auto 16px;
  padding: 4px 8px;
}

.note-back {
  color: var(--swim-blue);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(127, 219, 255, 0.6);
}

.note-back:hover {
  opacity: 0.7;
}

.note-back:focus-visible {
  outline: 2px solid var(--swim-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

.note-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 52px 80px;
  background-color: rgba(6, 14, 18, 0.88);
  border: 1px solid rgba(127, 219, 255, 0.6);
  border-radius: 18px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.5), 0 0 2px rgba(127, 219, 255, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.note-title {
  margin: 0 0 40px;
  padding: 0 0 20px;
  border: none;
  border-bottom: 1px solid rgba(127, 219, 255, 0.25);
  font-size: 1.9rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.note-page .post {
  margin: 0;
  padding: 44px 0;
  border-top: 1px solid rgba(127, 219, 255, 0.16);
}

.note-page .post:first-of-type {
  border-top: none;
  padding-top: 0;
}

.note-page .post + .post {
  margin: 0;
}

.note-page .post h2 {
  margin: 0 0 14px;
  padding: 0;
  border: none;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.55;
  color: #ffffff;
}

.note-page .post time {
  display: block;
  margin: 0 0 28px;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  color: var(--swim-blue);
}

.note-page .post p {
  margin: 0 0 1.5em;
  font-size: 1.08rem;
  line-height: 1.95;
  color: #e3e7ea;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note-page .post img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px 0;
  border: 1px solid rgba(127, 219, 255, 0.4);
  border-radius: 8px;
}

/* 本文中の埋め込み（動画 / iframe / リンク） */
.note-page .post video {
  display: block;
  width: 100%;
  height: auto;
  margin: 24px 0;
  border: 1px solid rgba(127, 219, 255, 0.4);
  border-radius: 8px;
  background: #000;
}
.note-page .post .embed {
  position: relative;
  margin: 24px 0;
  padding-top: 56.25%;
  overflow: hidden;
  border: 1px solid rgba(127, 219, 255, 0.4);
  border-radius: 8px;
  background: #000;
}
.note-page .post .embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.note-page .post a {
  color: var(--swim-blue);
  overflow-wrap: anywhere;
}

/* 画像記事: 画像の中央にタイトル帯を重ね、帯の上下に画像を見せる */
.note-page .post .hero {
  position: relative;
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid rgba(127, 219, 255, 0.4);
  border-radius: 18px;
}
.note-page .post .hero img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border: none;
  border-radius: 0;
}
.note-page .post .hero h2 {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 18px 24px;
  text-align: center;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.5;
  color: #ffffff;
  background: rgba(5, 15, 20, 0.72);
  border-top: 1px solid rgba(127, 219, 255, 0.5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.note-page .loading {
  color: #8a9298;
  font-size: 0.95rem;
}

/* ===== 記事一覧（カード） ===== */
.note-page .post-card {
  display: flex;
  gap: 20px;
  align-items: stretch;
  padding: 18px;
  margin: 0 0 16px;
  border: 1px solid rgba(127, 219, 255, 0.22);
  border-radius: 14px;
  background: rgba(127, 219, 255, 0.03);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.15s ease;
}
.note-page .post-card:hover {
  border-color: var(--swim-blue);
  box-shadow: 0 0 20px rgba(127, 219, 255, 0.22);
  transform: translateY(-2px);
}
.note-page .post-card:focus-visible {
  outline: 2px solid var(--swim-blue);
  outline-offset: 3px;
}
.note-page .card-thumb {
  flex: 0 0 140px;
  width: 140px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.note-page .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  border: none;
  border-radius: 0;
}
.note-page .card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.note-page .card-title {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.45;
  color: #ffffff;
  margin-bottom: 6px;
}
.note-page .card-date {
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: var(--swim-blue);
  margin-bottom: 10px;
}
.note-page .card-excerpt {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #aeb6bb;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 記事詳細の「一覧に戻る」 */
.note-page .back-to-list {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--swim-blue);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}
.note-page .back-to-list:hover {
  opacity: 0.7;
}

/* 記事詳細を開いている間は上部の「Blog」見出しを隠す */
body.viewing-post .note-title {
  display: none;
}

@media (max-width: 520px) {
  .note-page .post-card {
    flex-direction: column;
  }
  .note-page .card-thumb {
    flex-basis: auto;
    width: 100%;
    height: 170px;
  }
}

@media (max-width: 600px) {
  .note-page {
    padding: 14px;
  }
  .note-main {
    padding: 32px 22px 56px;
    border-radius: 14px;
  }
  .note-title {
    font-size: 1.6rem;
  }
  .note-page .post {
    padding: 32px 0;
  }
  .note-page .post h2 {
    font-size: 1.35rem;
  }
  .note-page .post p {
    font-size: 1.04rem;
  }
  .note-page .post .hero h2 {
    font-size: 1.35rem;
    padding: 14px 18px;
  }
}

