/* ==========================================================================
   存在ログ - Windows 98 クラシックテーマ スタイルシート (style.css)
   ========================================================================== */

/* Google Fonts: DotGothic16 */
@import url('https://fonts.googleapis.com/css2?family=DotGothic16&display=swap');

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

html {
  font-size: 14px;
  overflow-y: scroll !important; /* ページ全体に常にスクロールバー領域を確保 */
}

/* --- Windows 98 クラシックスクロールバー (モダンブラウザ完全強制適用) --- */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background-color: #c0c0c0 !important;
  background-image: 
    linear-gradient(45deg, #dfdfdf 25%, transparent 25%),
    linear-gradient(-45deg, #dfdfdf 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dfdfdf 75%),
    linear-gradient(-45deg, transparent 75%, #dfdfdf 75%) !important;
  background-size: 4px 4px !important;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0px !important;
}

html::-webkit-scrollbar-track-piece,
body::-webkit-scrollbar-track-piece,
*::-webkit-scrollbar-track-piece {
  background-color: #c0c0c0 !important;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background-color: #c0c0c0 !important;
  border-top: 2px solid #ffffff !important;
  border-left: 2px solid #ffffff !important;
  border-right: 2px solid #000000 !important;
  border-bottom: 2px solid #000000 !important;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080 !important;
}

html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active,
*::-webkit-scrollbar-thumb:active {
  background-color: #b0b0b0 !important;
  border-top: 2px solid #000000 !important;
  border-left: 2px solid #000000 !important;
  border-right: 2px solid #ffffff !important;
  border-bottom: 2px solid #ffffff !important;
}

/* 上下・左右の矢印ボタン (Win98 ピクセル三角矢印) */
html::-webkit-scrollbar-button,
body::-webkit-scrollbar-button,
*::-webkit-scrollbar-button {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  background-color: #c0c0c0 !important;
  border-top: 2px solid #ffffff !important;
  border-left: 2px solid #ffffff !important;
  border-right: 2px solid #000000 !important;
  border-bottom: 2px solid #000000 !important;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080 !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

html::-webkit-scrollbar-button:active,
body::-webkit-scrollbar-button:active,
*::-webkit-scrollbar-button:active {
  border-top: 2px solid #000000 !important;
  border-left: 2px solid #000000 !important;
  border-right: 2px solid #ffffff !important;
  border-bottom: 2px solid #ffffff !important;
}

/* 上端のボタン：上向き矢印 ▲ のみ */
html::-webkit-scrollbar-button:vertical:start:decrement,
body::-webkit-scrollbar-button:vertical:start:decrement,
*::-webkit-scrollbar-button:vertical:start:decrement {
  display: block !important;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><polygon points="8,5 4,11 12,11" fill="%23000000"/></svg>') !important;
}

/* 下端のボタン：下向き矢印 ▼ のみ */
html::-webkit-scrollbar-button:vertical:end:increment,
body::-webkit-scrollbar-button:vertical:end:increment,
*::-webkit-scrollbar-button:vertical:end:increment {
  display: block !important;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><polygon points="4,5 12,5 8,11" fill="%23000000"/></svg>') !important;
}

/* 重複ボタンの非表示 */
html::-webkit-scrollbar-button:vertical:start:increment,
body::-webkit-scrollbar-button:vertical:start:increment,
*::-webkit-scrollbar-button:vertical:start:increment,
html::-webkit-scrollbar-button:vertical:end:decrement,
body::-webkit-scrollbar-button:vertical:end:decrement,
*::-webkit-scrollbar-button:vertical:end:decrement {
  display: none !important;
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  background-color: #c0c0c0 !important;
}

/* --- デスクトップ完全固定壁紙レイヤー（スクロールしても一切動かない） --- */
.desktop-wallpaper-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #557799;
  background-image: url('assets/clouds_wallpaper.jpg?v=1');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: -999;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

/* --- body スタイル --- */
body {
  background-color: transparent;
  font-family: "DotGothic16", "MS PGothic", "ＭＳ Ｐゴシック", monospace, sans-serif;
  color: #000000;
  line-height: 1.6;
  padding: 15px 10px 45px 10px;
  min-height: 100vh;
  box-sizing: border-box;
  overscroll-behavior: none; /* 上下の余計な画面バウンスを完全抑止 */
  display: flex;
  flex-direction: column;
}

/* デスクトップモード（ウィンドウ非表示時）：画面を完全固定しスクロールさせない */
body.desktop-mode {
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

/* --- リンクスタイル --- */
a:link {
  color: #0000ff;
  text-decoration: underline;
}

a:visited {
  color: #800080;
  text-decoration: underline;
}

a:hover {
  color: #0000cd;
  text-decoration: underline;
}

a:active {
  color: #000080;
}

/* --- ニコニコ大百科・Wikipedia風 単語オートリンク（サイト調和スタイル） --- */
.wiki-autolink {
  color: #0000ff !important;
  text-decoration: underline !important;
  font-weight: inherit;
  padding: 0;
  margin: 0;
  background: transparent !important;
  cursor: pointer;
  display: inline;
}

.wiki-autolink:hover {
  color: #0000cd !important;
  text-decoration: underline !important;
  background: transparent !important;
  box-shadow: none !important;
}

.wiki-autolink:visited {
  color: #800080 !important;
}

/* --- Windows 98 ウィンドウ (3D ベベル枠) --- */
.win98-window {
  position: relative;
  z-index: 10;
  max-width: 800px;
  width: 96%;
  margin: 10px auto;
  background-color: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080, 2px 2px 10px rgba(0, 0, 0, 0.5);
  padding: 3px;
}

/* --- タイトルバー (Windows 98 横グラデーション) --- */
.win98-title-bar {
  background: linear-gradient(to right, #000080, #1084d0);
  padding: 3px 4px 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  min-height: 24px;
  margin-bottom: 2px;
}

.win98-title-text {
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.win98-title-icon {
  font-size: 14px;
}

.win98-title-buttons {
  display: flex;
  gap: 2px;
  align-items: center;
}

/* 98特有のグレー正方形ボタン */
.win98-btn-ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 16px;
  background-color: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #000000;
  border-bottom: 1px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  font-family: "MS PGothic", Tahoma, sans-serif;
  font-size: 10px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  line-height: 1;
}

.win98-btn-ctrl:active {
  border-top: 1px solid #000000;
  border-left: 1px solid #000000;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  padding-top: 1px;
  padding-left: 1px;
}

/* --- メニューバー (トップ・自己紹介・制作物・お知らせ・日誌) --- */
.win98-menu-bar {
  background: #c0c0c0;
  padding: 3px 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 14px;
  color: #000000;
  border-bottom: 1px solid #808080;
  margin-bottom: 2px;
}

.win98-menu-item {
  cursor: pointer;
  padding: 2px 8px;
  color: #000000 !important;
  text-decoration: none;
  display: inline-block;
  user-select: none;
  font-size: 14px;
}

.win98-menu-item:hover {
  background: #000080;
  color: #ffffff !important;
}

.win98-menu-item.active {
  font-weight: bold;
}

/* --- メニューバー ドロップダウン (Win98 カスケードメニュー) --- */
.win98-menu-dropdown-parent {
  position: relative;
  display: inline-block;
}

.win98-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
  padding: 3px;
  z-index: 1000;
}

.win98-menu-dropdown-parent:hover .win98-dropdown-menu,
.win98-menu-dropdown-parent:focus-within .win98-dropdown-menu {
  display: block;
}

.win98-dropdown-item {
  display: block;
  padding: 4px 10px;
  color: #000000 !important;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.win98-dropdown-item:hover {
  background: #000080;
  color: #ffffff !important;
}

.win98-dropdown-divider {
  height: 1px;
  background: #808080;
  border-bottom: 1px solid #ffffff;
  margin: 3px 0;
}

/* --- アドレスバー --- */
.win98-address-bar {
  background: #c0c0c0;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  border-bottom: 1px solid #808080;
  margin-bottom: 4px;
}

.win98-address-label {
  color: #000000;
  white-space: nowrap;
}

.win98-address-input {
  flex: 1;
  background: #ffffff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 2px 5px;
  font-family: inherit;
  font-size: 12px;
  color: #000000;
}

.win98-go-btn {
  background-color: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  color: #000000;
  padding: 1px 8px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}

.win98-go-btn:active {
  border-top: 2px solid #000000;
  border-left: 2px solid #000000;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

/* --- ナビゲーションタブ (Windows 98 クラシックタブ) --- */
.win98-tab-container {
  display: flex;
  gap: 2px;
  padding: 4px 6px 0 6px;
  background: #c0c0c0;
  border-bottom: 2px solid #ffffff;
}

.win98-tab {
  padding: 4px 12px;
  background-color: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: none;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px 0 0 #808080;
  font-size: 13px;
  text-decoration: none !important;
  color: #000000 !important;
  display: inline-block;
  position: relative;
  top: 2px;
}

.win98-tab:hover {
  background-color: #d8d8d8;
}

.win98-tab.active {
  background-color: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #c0c0c0;
  font-weight: bold;
  padding-top: 5px;
  top: 2px;
  z-index: 2;
}

/* --- メインコンテンツ領域 --- */
.win98-content {
  background: #ffffff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 16px 18px;
  min-height: 440px;
  margin: 4px;
}

/* --- 98風 グループボックス --- */
.win98-groupbox {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 12px 14px;
  margin-bottom: 18px;
  position: relative;
  background: #fbfbfa;
}

.win98-groupbox-title {
  position: absolute;
  top: -10px;
  left: 10px;
  background: #fbfbfa;
  padding: 0 4px;
  font-size: 12px;
  color: #000080;
  font-weight: bold;
}

/* --- 98風 ボタン --- */
.win98-btn {
  background-color: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  color: #000000;
  padding: 3px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  display: inline-block;
  text-decoration: none !important;
}

.win98-btn:hover {
  background-color: #d0d0d0;
}

.win98-btn:active {
  border-top: 2px solid #000000;
  border-left: 2px solid #000000;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 4px 13px 2px 15px;
}

/* --- 上部お知らせバー (右から左へ流れる電光マーキー) --- */
.simple-notice-bar {
  background: #c0c0c0;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  color: #000080;
  font-size: 12.5px;
  font-weight: bold;
  padding: 4px 0;
  margin-bottom: 14px;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.simple-notice-marquee {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: noticeMarquee 28s linear infinite;
}

.simple-notice-bar:hover .simple-notice-marquee {
  animation-play-state: paused;
}

@keyframes noticeMarquee {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* --- メインヘッダー --- */
.site-header {
  text-align: center;
  padding: 10px 0 12px 0;
  border-bottom: 2px groove #ffffff;
  margin-bottom: 16px;
}

/* 90年代風 弾幕・星屑テキスト装飾 */
.stardust-decoration {
  font-family: "DotGothic16", monospace;
  font-size: 11px;
  color: #000080;
  letter-spacing: 2px;
  text-align: center;
  user-select: none;
  opacity: 0.65;
  margin: 3px 0;
  overflow: hidden;
  white-space: nowrap;
}

/* --- FIGlet アスキーアート サイトタイトル --- */
.main-title-wrap {
  margin: 6px auto;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-title-wrap::-webkit-scrollbar {
  display: none;
}

.figlet-title {
  font-family: "DotGothic16", "MS Gothic", "Courier New", monospace;
  font-size: 13.0px;
  line-height: 1.15;
  color: #000080;
  font-weight: bold;
  text-align: center;
  margin: 0 auto;
  padding: 4px 6px;
  white-space: pre;
  user-select: all;
  letter-spacing: 0px;
  text-shadow: none;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: never;
  text-rendering: geometricPrecision;
}

@media (max-width: 768px) {
  .figlet-title {
    font-size: 11.5px;
    line-height: 1.15;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: 6px 0 8px 0;
  }
  .main-title-wrap {
    margin: 4px auto;
    width: 100%;
  }
  .figlet-title {
    font-size: 10.2px;
    line-height: 1.15;
    padding: 2px 0;
  }
}

@media (max-width: 440px) {
  .figlet-title {
    font-size: 9.2px;
    line-height: 1.15;
  }
}

@media (max-width: 390px) {
  .figlet-title {
    font-size: 8.5px;
    line-height: 1.15;
  }
}

@media (max-width: 350px) {
  .figlet-title {
    font-size: 7.6px;
    line-height: 1.15;
  }
}

.site-title {
  font-size: 26px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #000000;
  margin: 4px 0;
  font-family: "DotGothic16", monospace, sans-serif;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-subtitle {
  font-size: 13px;
  color: #555555;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.site-meta {
  font-size: 12px;
  color: #777777;
}

/* --- アクセスカウンター (98風) --- */
.counter-box {
  text-align: center;
  background: #c0c0c0;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 6px 10px;
  margin: 12px auto;
  max-width: 260px;
}

.access-counter-title {
  font-size: 11.5px;
  font-weight: bold;
  color: #0000ff;
  letter-spacing: 1.5px;
  margin-bottom: 3px;
  display: block;
  animation: counterColorShift 1.4s infinite steps(1);
}

@keyframes counterColorShift {
  0%, 49% {
    color: #0000ff; /* 鮮やかな青 */
  }
  50%, 100% {
    color: #ffff00; /* 最も鮮やかな黄色 */
  }
}

.counter-digits {
  display: inline-block;
  background: #000000;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 2px 8px;
  font-family: "DotGothic16", monospace;
  font-size: 18px;
  color: #00ff00;
  letter-spacing: 4px;
  margin: 3px 0;
}

.counter-msg {
  font-size: 12px;
  color: #333333;
}

/* --- ニュース フィルターバー (タグ検索) --- */
.news-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
  padding: 4px 6px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  align-items: center;
}

.news-filter-label {
  font-size: 12px;
  font-weight: bold;
  margin-right: 4px;
  color: #000000;
}

.news-filter-btn {
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  padding: 2px 8px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  color: #000000;
}

.news-filter-btn:active,
.news-filter-btn.active {
  background: #dfdfdf;
  border-top: 2px solid #000000;
  border-left: 2px solid #000000;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  font-weight: bold;
  color: #000080;
}

/* --- ニューステーブル (ヘッダーなし・日付下タグ配置) --- */
.news-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0;
  font-size: 13px;
  background: #ffffff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

.news-table td {
  border-bottom: 1px solid #e0e0e0;
  padding: 8px 10px;
  vertical-align: top;
  color: #000000;
}

.news-table tr:hover {
  background: #f0f4ff;
}

.news-date-cell {
  width: 145px;
  min-width: 135px;
  max-width: 165px;
  border-right: 1px solid #e8e8e8;
  vertical-align: top;
  padding-right: 10px;
}

.news-date-text {
  font-weight: bold;
  font-size: 13px;
  color: #000000;
  white-space: nowrap;
}

.news-tags-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  margin-top: 4px;
}

.news-tag-text {
  font-size: 11px;
  color: #000080;
  font-weight: bold;
  display: inline-block;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.3;
}

.news-tag-text:hover {
  text-decoration: underline;
}

.news-content-cell {
  padding-left: 12px !important;
}

.news-content-cell a {
  font-size: 15px;
  font-weight: bold;
  color: #000000;
  text-decoration: none;
}

.news-item-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 6px;
  color: #000000;
  line-height: 1.4;
}

#index-latest-news .news-date-cell {
  width: 90px;
  min-width: 85px;
  max-width: 100px;
}

.news-item-body {
  font-size: 13px;
  line-height: 1.6;
  color: #222222;
}

.news-table tr:hover a {
  color: #000080;
  text-decoration: none;
}

/* --- トップページ用 小さな画像サムネイル (お知らせ) --- */
.top-news-thumb-wrap {
  flex: 0 0 54px;
  width: 54px;
  height: 42px;
  background: #ffffff;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-news-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- トップページ 最近の日誌 (専用カードスタイル) --- */
.top-diary-card {
  background: #ffffff;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  margin-bottom: 8px;
  padding: 0;
  overflow: hidden;
}

.top-diary-card-body {
  padding: 6px 8px 8px 8px;
}

.top-diary-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
  line-height: 1.3;
}

.top-diary-title a {
  color: #000000;
  text-decoration: none;
}

.top-diary-title a:hover {
  color: #000080;
  text-decoration: none;
}

.top-diary-content-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.top-diary-thumb-wrap {
  flex: 0 0 88px;
  width: 88px;
  height: 66px;
  background: #000000;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.top-diary-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s;
}

.top-diary-thumb:hover {
  opacity: 0.9;
}

.top-diary-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: #333333;
  flex: 1;
  word-break: break-all;
}

/* トップページ 日誌インライン全文展開 */
.top-diary-text .top-diary-expand-btn {
  float: right;
  font-size: 11px;
  padding: 0px 5px;
  height: 18px;
  line-height: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: "DotGothic16", monospace;
  background-color: #c0c0c0;
  user-select: none;
  margin-top: 2px;
  margin-left: 8px;
}

.top-diary-close-row .top-diary-expand-btn {
  font-size: 11.5px;
  padding: 2px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: "DotGothic16", monospace;
  background-color: #c0c0c0;
}

.top-diary-full-content {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dotted #a0a0a0;
}

.top-diary-full-content .diary-body {
  font-size: 13px;
  line-height: 1.8;
  color: #000000;
}

.top-diary-full-content .diary-body p {
  margin-bottom: 8px;
}

.top-diary-full-content .diary-img-wrap {
  margin: 10px 0;
  text-align: center;
}

.top-diary-full-content .diary-inline-img {
  max-width: 100%;
  height: auto;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

.news-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 4px;
  color: #ffffff;
  border: 1px solid #000000;
}

.tag-INFO { background: #000080; }
.tag-FILM { background: #800000; }
.tag-EVENT { background: #008000; }
.tag-RELEASE { background: #808000; }
.tag-AWARDS { background: #800080; }

/* --- 作品カード (98風 一覧) --- */
.film-card {
  display: flex;
  flex-direction: row;
  background: #ffffff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  margin-bottom: 18px;
  padding: 12px;
  gap: 15px;
  text-decoration: none !important;
  color: #000000 !important;
  transition: background 0.1s ease;
  cursor: pointer;
}

.film-card:hover {
  background: #f0f4ff;
  border-top: 2px solid #000080;
  border-left: 2px solid #000080;
}

@media (max-width: 650px) {
  .film-card {
    flex-direction: column;
    align-items: center;
  }
}

.film-poster-wrap {
  flex: 0 0 170px;
  text-align: center;
}

.film-poster-img {
  width: 100%;
  max-width: 170px;
  height: auto;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  display: block;
}

.film-info {
  flex: 1;
}

.film-title-header {
  border-bottom: 1px solid #808080;
  padding-bottom: 3px;
  margin-bottom: 6px;
}

.film-main-title {
  font-size: 16px;
  color: #000080;
  font-weight: bold;
}

.film-en-title {
  font-size: 12px;
  color: #555555;
  margin-left: 6px;
}

.film-meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 8px 0;
  background: #ffffff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

.film-meta-table td {
  border: 1px solid #dcdcdc;
  padding: 3px 6px;
  color: #000000;
}

.film-meta-table .meta-label {
  width: 85px;
  background: #c0c0c0;
  color: #000000;
  font-weight: bold;
}

.film-catchphrase {
  color: #333333;
  margin: 5px 0;
  font-size: 13px;
}

.film-comment-box {
  background: #f0f0ee;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  padding: 6px 8px;
  font-size: 12px;
  color: #222222;
  margin-top: 8px;
}

/* --- トップページ 最近の日誌 (Windows 98 リストボックス風 スクロール枠) --- */
#index-latest-diary {
  max-height: 260px;
  overflow-y: scroll;
  background: #ffffff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 8px 8px 0 8px;
}

#index-latest-diary .diary-entry {
  margin-bottom: 8px;
}

/* --- 日記エントリー --- */
.diary-entry {
  background: #ffffff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  margin-bottom: 16px;
  padding: 10px 12px;
}

.diary-entry-header {
  background: #000080;
  color: #ffffff;
  padding: 3px 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 8px;
}

.diary-date {
  color: #ffffff;
  font-weight: bold;
}

.diary-meta-info {
  color: #dfdfdf;
}

.diary-entry-title {
  font-size: 15px;
  color: #000000;
  font-weight: bold;
  margin-bottom: 6px;
}

.diary-body {
  font-size: 13px;
  line-height: 1.8;
  color: #111111;
  word-wrap: break-word;
  padding: 2px;
}

/* 日記内インライン画像 (note風) */
.diary-inline-img-wrap {
  margin: 12px auto;
  max-width: 520px;
  text-align: center;
  background: #f4f4f4;
  padding: 6px;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

.diary-inline-img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #222222;
}

.diary-img-caption {
  font-size: 11px;
  color: #555555;
  margin-top: 5px;
  line-height: 1.4;
  text-align: center;
}

/* --- プロフィール --- */
.profile-flex {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

@media (max-width: 640px) {
  .profile-flex {
    flex-direction: column;
    align-items: center;
  }
}

.profile-img-wrap {
  flex: 0 0 190px;
  text-align: center;
}

@media (max-width: 640px) {
  .profile-img-wrap {
    flex: auto;
    width: 100%;
    max-width: 220px;
  }
}

.photo-frame-win98 {
  background: #ffffff;
  padding: 4px;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}

.profile-photo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.profile-photo-caption {
  font-size: 12px;
  color: #333333;
  margin-top: 6px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.profile-details {
  flex: 1;
  width: 100%;
}

.profile-name-block {
  padding-bottom: 6px;
  border-bottom: 2px solid #000080;
}

.profile-name {
  font-size: 18px;
  font-weight: bold;
  color: #000000;
  margin: 0 0 3px 0;
  letter-spacing: 1px;
}

.profile-role {
  font-size: 13px;
  color: #000080;
  font-weight: bold;
}

.profile-table-win98 {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #ffffff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

.profile-table-win98 th {
  width: 130px;
  background: #e6e6e6;
  border: 1px solid #999999;
  padding: 7px 10px;
  text-align: left;
  color: #000080;
  font-weight: bold;
  vertical-align: middle;
}

.profile-table-win98 td {
  border: 1px solid #999999;
  padding: 7px 10px;
  color: #000000;
  vertical-align: middle;
}

.profile-en-name {
  font-size: 12px;
  color: #555555;
  font-weight: normal;
  margin-left: 4px;
}

.win98-inset-panel {
  background: #ffffff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 12px 14px;
}

.profile-section-heading {
  font-size: 13px;
  color: #000080;
  font-weight: bold;
  margin: 0 0 4px 0;
}

.profile-text {
  font-size: 13px;
  line-height: 1.85;
  color: #222222;
  margin: 0;
}

/* --- プロフィール内 レトロSNSリンク --- */
.profile-links-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.profile-link-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: #333333;
}

.profile-link-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: bold;
  color: #000080;
  min-width: 105px;
  text-align: left;
  flex-shrink: 0;
  box-sizing: border-box;
}

.profile-sns-link {
  color: #000080;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.1s, color 0.1s;
  padding: 1px 4px;
}

.profile-sns-link:hover {
  color: #ff0000;
  background: #ffff99;
  text-decoration: none;
}

/* --- トップページ 連絡先 (Contact) ボタン群 --- */
.top-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.top-contact-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: 1px 1px 0 #808080 inset, -1px -1px 0 #808080 inset;
  padding: 8px 12px;
  text-decoration: none;
  color: #000000;
  cursor: pointer;
  transition: background 0.1s, transform 0.05s;
  box-sizing: border-box;
}

.top-contact-btn:hover {
  background: #d4d0c8;
}

.top-contact-btn:active {
  border-top: 2px solid #000000;
  border-left: 2px solid #000000;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  box-shadow: 1px 1px 0 #000000 inset;
  transform: translate(1px, 1px);
}

.top-contact-icon {
  font-size: 20px;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #e0e0e0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
  overflow: hidden;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.top-contact-icon .pixel-icon-img {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0 auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  object-fit: contain;
}

.top-contact-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.top-contact-label {
  font-size: 11px;
  font-weight: bold;
  color: #000080;
  line-height: 1.2;
}

.top-contact-value {
  font-size: 12px;
  color: #222222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: underline;
}

.top-contact-btn:hover .top-contact-value {
  color: #0000ff;
}

.profile-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 6px;
}

/* 自己紹介ページ & 制作物・参加作品カードの下線を完全に排除 */
.profile-page a,
.profile-page a:hover,
.profile-page a:focus,
.profile-page a:active,
.profile-work-card,
.profile-work-card:hover,
.profile-work-card:focus,
.profile-work-card:active,
.profile-work-card *,
.profile-work-card:hover *,
.profile-works-grid a,
.profile-works-grid a:hover,
.profile-work-title,
.profile-work-title:hover {
  text-decoration: none !important;
}

.profile-work-card {
  position: relative;
  display: flex;
  gap: 10px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  padding: 8px;
  text-decoration: none !important;
  color: inherit;
  transition: background 0.15s;
}

/* ホバー時に出現するWindows98風黄色ツールチップ */
.win98-hover-tip {
  position: absolute;
  top: -10px;
  right: 6px;
  background: #ffffcc;
  border: 1px solid #000000;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
  color: #000000;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(3px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

.profile-work-card:hover .win98-hover-tip {
  opacity: 1;
  transform: translateY(0);
}

.profile-work-card:hover {
  background: #dfdfdf;
}

.profile-work-card:active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

.profile-work-thumb-wrap {
  width: 60px;
  height: 80px;
  flex-shrink: 0;
  overflow: hidden;
  background: #000000;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

.profile-work-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-work-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile-work-title {
  font-size: 13px;
  font-weight: bold;
  color: #000080;
  margin-bottom: 4px;
}

.profile-work-meta {
  font-size: 11px;
  color: #555555;
}

.qa-box {
  background: #ffffff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 10px 14px;
  margin-top: 6px;
  font-size: 13px;
}

.qa-item {
  margin-bottom: 10px;
  border-bottom: 1px dotted #a0a0a0;
  padding-bottom: 8px;
}

.qa-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.qa-q {
  color: #000080;
  font-weight: bold;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.qa-a {
  color: #222222;
  padding-left: 10px;
  border-left: 2px solid #000080;
  line-height: 1.7;
  font-size: 13px;
}

/* --- 管理・更新ツール (admin.html) --- */
.admin-form-group {
  margin-bottom: 10px;
}

.admin-form-group label {
  display: block;
  color: #000080;
  font-weight: bold;
  margin-bottom: 3px;
  font-size: 13px;
}

.admin-input, .admin-textarea, .admin-select {
  width: 100%;
  background: #ffffff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  color: #000000;
  font-family: inherit;
  font-size: 13px;
  padding: 4px 6px;
}

.admin-textarea {
  min-height: 110px;
  resize: vertical;
}

.code-output {
  width: 100%;
  min-height: 130px;
  background: #f0f0ee;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  color: #000000;
  font-family: "DotGothic16", monospace;
  font-size: 12px;
  padding: 6px;
  white-space: pre;
  overflow-x: auto;
}

/* --- ステータスバー (ウィンドウ下部) --- */
.win98-status-bar {
  background: #c0c0c0;
  border-top: 1px solid #808080;
  padding: 3px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #000000;
  overflow: hidden;
}

.win98-status-panel {
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  padding: 2px 6px;
  background: #c0c0c0;
  white-space: nowrap;
}

.win98-status-marquee {
  flex: 1;
  overflow: hidden;
  margin-right: 6px;
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
}

.win98-marquee-content {
  display: inline-block;
  white-space: nowrap;
  animation: win98Marquee 24s linear infinite;
  font-size: 12px;
  color: #000080;
}

@keyframes win98Marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* --- 90年代 レトロ点滅 (Blink) バッジ --- */
.retro-blink {
  animation: retroBlinkAnim 1s steps(2, start) infinite;
  display: inline-block;
  font-weight: bold;
  color: #ff0000;
}

@keyframes retroBlinkAnim {
  to { visibility: hidden; }
}

/* --- フッター --- */
.site-footer {
  text-align: center;
  font-size: 12px;
  color: #ffffff;
  padding: 10px 0;
  margin-top: auto;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8), 0 0 4px rgba(0, 0, 0, 0.8);
  user-select: none;
  z-index: 5;
}

/* デスクトップモード時は画面最下部にぴったり固定 */
body.desktop-mode .site-footer {
  position: fixed;
  bottom: 8px;
  left: 0;
  width: 100%;
  margin: 0;
}

.retro-hr {
  border: 0;
  border-top: 2px groove #ffffff;
  margin: 20px 0;
}

.back-to-top {
  text-align: center;
  margin: 12px 0 4px 0;
  font-size: 13px;
}

/* --- 映画作品 個別詳細ページ (Win98 映画情報ビューア) --- */
.film-detail-header-card {
  background: #ffffff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 14px;
  margin-bottom: 16px;
}

.film-detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 2px solid #000080;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.film-detail-title {
  font-size: 22px;
  font-weight: bold;
  color: #000080;
  margin: 0;
}

.film-detail-badge {
  font-size: 12px;
  background: #000080;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 2px;
}

.film-detail-catch {
  font-size: 15px;
  font-weight: bold;
  color: #222222;
  margin: 8px 0;
  padding: 6px 10px;
  background: #f4f6fc;
  border-left: 4px solid #000080;
}

.film-detail-grid {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 680px) {
  .film-detail-grid {
    flex-direction: column;
  }
}

.film-detail-poster-col {
  flex: 0 0 240px;
  max-width: 240px;
  text-align: center;
}

@media (max-width: 680px) {
  .film-detail-poster-col {
    flex: auto;
    max-width: 280px;
    margin: 0 auto;
  }
}

.film-detail-poster-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #222222;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.film-detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.film-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1c2230;
  color: #c0c8d8;
  padding: 16px;
  text-align: center;
  box-sizing: border-box;
}

.film-detail-info-col {
  flex: 1;
}

.film-section-box {
  background: #ffffff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.film-section-title {
  font-weight: bold;
  font-size: 14px;
  color: #000080;
  border-bottom: 1px solid #808080;
  padding-bottom: 4px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.film-trailer-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  background: #000000;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  overflow: hidden;
}

.film-trailer-wrap iframe,
.film-trailer-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.film-trailer-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #aaaaaa;
  font-size: 13px;
  background: #111111;
  text-align: center;
  padding: 10px;
}

/* --- スチル写真ギャラリー (Stills) --- */
.film-stills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 8px;
  align-items: start;
}

.film-still-card {
  background: #ffffff;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  padding: 3px;
  cursor: pointer;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
  transition: border-color 0.15s ease;
}

.film-still-card:hover {
  background: #eef2ff;
  border-top-color: #000080;
  border-left-color: #000080;
  border-right-color: #000080;
  border-bottom-color: #000080;
}

.film-still-img-wrap {
  width: 100%;
  background: #000000;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.film-still-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* --- スチル拡大モーダル & スライダー (Windows 98 写真ビューア) --- */
.win98-photo-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  user-select: none;
}

.win98-photo-modal-window {
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  max-width: 900px;
  width: 100%;
  box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
}

.win98-photo-modal-window .win98-title-bar {
  padding: 3px 4px 3px 6px;
  min-height: 24px;
}

.win98-photo-modal-window #win98-modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 16px;
  background-color: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #000000;
  border-bottom: 1px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  font-family: "MS PGothic", Tahoma, sans-serif;
  font-size: 10px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  margin: 0;
  outline: none;
}

.win98-photo-modal-window #win98-modal-close-btn:active {
  border-top: 1px solid #000000;
  border-left: 1px solid #000000;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  padding-top: 1px;
  padding-left: 1px;
}

.win98-photo-modal-stage {
  position: relative;
  background: #000000;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  margin: 6px;
  min-height: 240px;
  max-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.win98-photo-modal-img {
  max-width: 100%;
  max-height: 70vh;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
  cursor: pointer;
}

.win98-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(192, 192, 192, 0.85);
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  font-family: inherit;
  font-size: 16px;
  font-weight: bold;
  color: #000080;
  padding: 10px 14px;
  cursor: pointer;
  z-index: 10;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.win98-slider-arrow:hover {
  opacity: 1;
  background: #ffffff;
}

.win98-slider-prev {
  left: 8px;
}

.win98-slider-next {
  right: 8px;
}

.win98-modal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px 6px 8px;
  background: #c0c0c0;
}

.win98-modal-counter {
  font-size: 12px;
  font-weight: bold;
  color: #000080;
  background: #ffffff;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  padding: 2px 10px;
}

/* ==========================================================================
   90s レトロギミック (点滅バッジ / 工事中 / 88x31マイクロバナー)
   ========================================================================== */

/* 1. チカチカ点滅する「NEW!」バッジ */
.badge-new-retro {
  display: inline-block;
  background: #ff0000;
  color: #ffff00;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 4px;
  border: 1px solid #800000;
  margin-left: 5px;
  vertical-align: middle;
  letter-spacing: 0.5px;
  line-height: 1.1;
  text-shadow: 1px 1px 0 #000000;
  animation: blinkRetro 0.7s infinite steps(2, start);
  user-select: none;
}

@keyframes blinkRetro {
  0%, 100% {
    background: #ff0000;
    color: #ffff00;
    border-color: #800000;
  }
  50% {
    background: #ffff00;
    color: #ff0000;
    border-color: #ffcc00;
  }
}

/* 2. 工事中 (Under Construction) バナー */
.under-construction-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: repeating-linear-gradient(
    -45deg,
    #ffcc00,
    #ffcc00 12px,
    #111111 12px,
    #111111 24px
  );
  padding: 4px;
  margin: 14px 0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
}

.under-construction-inner {
  background: #000000;
  color: #ffff00;
  padding: 6px 14px;
  font-family: "DotGothic16", monospace;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ffcc00;
  text-shadow: 0 0 4px #ffcc00;
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

.construction-icon {
  font-size: 16px;
  display: inline-block;
  animation: constructionSwing 1.2s infinite ease-in-out;
}

@keyframes constructionSwing {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-20deg); }
}

/* 3. 200×40px バナー群 (見出しなし・中央配置) */
.retro-banners-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 16px auto 10px auto;
  padding: 4px 0;
}

.micro-banner-link {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
  cursor: pointer;
}

.micro-banner-link:hover img,
.micro-banner-link:active img {
  filter: brightness(0.95);
  transform: translate(1px, 1px);
  border-top: 1px solid #000000;
  border-left: 1px solid #000000;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

.micro-banner-img {
  width: 200px;
  height: 40px;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #000000;
  border-bottom: 1px solid #000000;
  box-sizing: border-box;
  transition: transform 0.08s, filter 0.08s;
}

/* 4. 88×31px クラシックマイクロバナー (SUNYA & IE & Netscape 横並び) */
.classic-micro-banners-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px auto 14px auto;
}

.classic-micro-banner-img {
  width: 88px;
  height: 31px;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #000000;
  border-bottom: 1px solid #000000;
  box-sizing: border-box;
  transition: transform 0.08s, filter 0.08s;
}

.classic-micro-banners-wrap a:hover .classic-micro-banner-img,
.classic-micro-banners-wrap a:active .classic-micro-banner-img {
  filter: brightness(0.95);
  transform: translate(1px, 1px);
  border-top: 1px solid #000000;
  border-left: 1px solid #000000;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

/* ==========================================================================
   モバイル・レスポンシブ調整 (スマホ画面でメニューバーを美しい1列に)
   ========================================================================== */
@media (max-width: 600px) {
  .win98-menu-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 2px !important;
    padding: 2px 3px !important;
    scrollbar-width: none;
  }
  .win98-menu-bar::-webkit-scrollbar {
    display: none !important;
  }
  .win98-menu-item {
    font-size: 11.5px !important;
    padding: 2px 4px !important;
    white-space: nowrap !important;
    letter-spacing: -0.3px;
    flex-shrink: 0;
  }
  .win98-menu-dropdown-parent {
    flex-shrink: 0;
  }

  /* トップページ連絡先：スマホ（画面幅600px以下）では「はじめに」と「最新のお知らせ」のちょうど真ん中に配置 */
  .win98-groupbox:has(+ .top-contact-section),
  .win98-content > .win98-groupbox:first-of-type {
    margin-bottom: 0px !important;
  }

  .top-contact-section {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 16px auto 18px auto !important;
    box-shadow: none !important;
  }

  .top-contact-section .win98-groupbox-title {
    display: none !important;
  }

  .top-contact-grid {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 16px !important;
    margin: 0 auto !important;
  }

  .top-contact-btn {
    padding: 0 !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    line-height: 0 !important;
    box-shadow: none !important;
  }

  .top-contact-info {
    display: none !important;
  }

  .top-contact-icon {
    width: 28px !important;
    height: 28px !important;
    border: none !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .top-contact-icon .pixel-icon-img {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: contain !important;
  }
}

/* ==========================================================================
   トップページ統合：足跡帳 (和紙スタンプ台・シークバー・魚拓スタンプ)
   ========================================================================== */
.stamp-stage-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 4px auto 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 外側のはみ出し滲みレイヤー（ベベル枠の上＋外側全体をカバーし、紙の内側だけをくり抜き） */
.stamp-outer-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  pointer-events: none;
  z-index: 10; /* 和紙スタンプ台・ベベル枠の最前面 */
  overflow: visible;
  /* 和紙の紙の内側（2px内側）だけをくり抜き、ベベル枠の上と外側に足跡を描画 */
  clip-path: polygon(evenodd, -600px -600px, calc(100% + 600px) -600px, calc(100% + 600px) calc(100% + 600px), -600px calc(100% + 600px), -600px -600px, 2px 2px, calc(100% - 2px) 2px, calc(100% - 2px) calc(100% - 2px), 2px calc(100% - 2px), 2px 2px);
}

/* 和紙スタンプ台本体 */
.stamp-stage {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  background-color: #f7f3eb;
  background-image: url('assets/washi_paper.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.15);
  overflow: hidden; /* 和紙内部のクッキリ足跡を和紙枠線ピッタリでクリップ */
  cursor: crosshair;
  user-select: none;
  touch-action: manipulation;
  box-sizing: border-box;
  z-index: 2;
  transition: filter 0.3s ease;
}

/* 未調整時は台紙を少し暗く・落ち着いたトーンにして未準備であることを表現 */
.stamp-stage.unready {
  cursor: default;
  filter: brightness(0.85) contrast(95%);
}

/* 調整後は通常の明るい和紙の見た目に戻る */
.stamp-stage.ready {
  cursor: crosshair;
  filter: none;
}

.stamp-stage-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12.5px;
  font-weight: bold;
  pointer-events: none;
  text-align: center;
  width: 90%;
  z-index: 6;
  letter-spacing: 0.5px;
  animation: guideFloat 2.0s infinite ease-in-out;
  transition: color 0.25s ease, opacity 0.25s ease;
}

/* 調整前：枠やカッコなしですっきり表示 */
.stamp-stage-guide.unready {
  color: #554433;
}

/* 調整後：前の上品で馴染む落ち着いた色合い */
.stamp-stage-guide.ready {
  color: #7d7260;
}

@keyframes guideFloat {
  0%, 100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-50%, calc(-50% - 5px));
  }
}

/* 未調整時にスライダーをピクピク注目させるアニメーション */
.prompt-attention {
  animation: promptWiggle 0.45s ease-in-out 2;
}

@keyframes promptWiggle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* 1. 和紙内部の足跡：漆黒の濃い墨 ＋ 和紙の繊維がリアルに浮き出る質感！ */
.bon-footprint-inner {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  mix-blend-mode: multiply; /* 和紙のテクスチャと墨が乗算合成 */
  opacity: 0.98; /* 漆黒の力強い黒さをしっかり保持 */
  filter: contrast(180%) brightness(0.92); /* 黒を深く沈めつつ、和紙の繊維・かすれとの明暗差をガツンと際立たせる */
  z-index: 5;
  display: block;
}

/* 2. 和紙外側のはみ出し足跡：押されたあと約3.6秒かけてジワジワ〜ッと徐々に時間をかけて滲み広がる！ */
.bon-footprint-outer {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  z-index: 10;
  display: block;
  /* 押した瞬間はクッキリ ➡ 約3.6秒かけてジワジワ〜ッと自然に滲み広がる */
  animation: bleedOuter 3.6s cubic-bezier(0.16, 0.9, 0.3, 1) forwards;
}

@keyframes bleedOuter {
  0% {
    filter: blur(0px) contrast(100%) drop-shadow(0 0 0 rgba(0,0,0,0));
    opacity: 1;
  }
  30% {
    filter: blur(0.4px) contrast(110%) drop-shadow(0 0.3px 0.5px rgba(0,0,0,0.15));
    opacity: 0.96;
  }
  70% {
    filter: blur(0.9px) contrast(125%) drop-shadow(0 0.7px 1.0px rgba(0,0,0,0.35));
    opacity: 0.91;
  }
  100% {
    filter: blur(1.3px) contrast(135%) drop-shadow(0 1px 1.5px rgba(0,0,0,0.45));
    opacity: 0.88;
  }
}

.shake-screen {
  animation: screenQuake 0.15s ease-out;
}

@keyframes screenQuake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-4px, 4px); }
  50% { transform: translate(4px, -3px); }
  75% { transform: translate(-2px, 2px); }
  100% { transform: translate(0, 0); }
}

/* 足サイズ シークバー (Windows 98 トラックバー) */
.fp-size-badge-display {
  font-size: 11.5px;
  font-weight: bold;
  color: #800000;
  background: #fdf5e6;
  padding: 1px 6px;
  border: 1px solid #b58900;
  border-radius: 2px;
}

.fp-size-val {
  font-size: 12.5px;
  color: #000080;
  margin-right: 2px;
}

.fp-size-title {
  color: #8b0000;
}

.fp-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.fp-slider-min,
.fp-slider-max {
  font-size: 10.5px;
  color: #666666;
  font-weight: bold;
  flex-shrink: 0;
}

.win98-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #c0c0c0;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  outline: none;
  cursor: pointer;
  margin: 4px 0;
}

.win98-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 20px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  cursor: ew-resize;
}

.win98-range::-moz-range-thumb {
  width: 14px;
  height: 20px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  cursor: ew-resize;
}

/* ==========================================================================
   Windows 98 架空デスクトップOS体験システム
   ========================================================================== */

/* ウィンドウのアニメーションと状態 */
.win98-window {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
  transform-origin: center center;
}

.win98-window.window-closing {
  transform: scale(0.8) translateY(20px);
  opacity: 0;
  pointer-events: none;
}

.win98-window.window-opening {
  animation: windowOpenAnim 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes windowOpenAnim {
  0% {
    transform: scale(0.85) translateY(15px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.win98-window.window-hidden {
  display: none !important;
}

/* 最大化状態 */
.win98-window.win98-window-maximized {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  min-height: calc(100vh - 36px) !important;
  border-radius: 0 !important;
}

/* デスクトップショートカットアイコン（ウィンドウの真後ろに常駐・縦2列） */
.desktop-shortcuts-layer {
  position: fixed;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: repeat(2, 110px);
  gap: 20px 28px;
  z-index: 1;
  user-select: none;
  pointer-events: auto;
  justify-content: center;
  align-items: center;
}

.desktop-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100px;
  padding: 6px 4px;
  cursor: pointer;
  text-align: center;
  border: 1px dotted transparent;
  border-radius: 2px;
  transition: transform 0.12s ease;
  text-decoration: none;
  color: #ffffff;
}

.desktop-icon-item:hover,
.desktop-icon-item.active {
  background-color: rgba(0, 0, 128, 0.5);
  border-color: rgba(255, 255, 255, 0.7);
  transform: scale(1.04);
}

.desktop-icon-item:active {
  background-color: rgba(0, 0, 128, 0.8);
  transform: scale(0.98);
}

.desktop-icon-symbol {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.85));
}

.desktop-icon-symbol svg {
  width: 34px;
  height: 34px;
  display: block;
}

.desktop-icon-label {
  font-size: 11.5px;
  color: #ffffff;
  font-family: inherit;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000000, 0 0 4px #000000;
  line-height: 1.25;
  word-break: break-all;
  padding: 1px 4px;
  border-radius: 2px;
}

.desktop-icon-item:hover .desktop-icon-label,
.desktop-icon-item.active .desktop-icon-label {
  background-color: #000080;
}

/* 最下部固定 Windows 98 タスクバー */
.win98-os-taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background-color: #c0c0c0;
  border-top: 2px solid #ffffff;
  box-shadow: inset 0 1px 0 #dfdfdf, 0 -2px 5px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
  box-sizing: border-box;
  z-index: 99999;
  user-select: none;
  font-family: "DotGothic16", monospace, sans-serif;
}

.taskbar-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 2px 8px;
  background-color: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
  color: #000000;
}

.taskbar-start-btn:active,
.taskbar-start-btn.active {
  border-top: 2px solid #000000;
  border-left: 2px solid #000000;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  box-shadow: inset 1px 1px 0 #808080;
  padding-top: 3px;
  padding-left: 9px;
}

.taskbar-tasks-area {
  flex: 1;
  display: flex;
  gap: 4px;
  margin: 0 6px;
  overflow: hidden;
}

.taskbar-window-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 170px;
  height: 22px;
  padding: 2px 8px;
  background-color: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  font-size: 11.5px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #000000;
}

.taskbar-window-tab.active {
  background-color: #e0e0e0;
  background-image: radial-gradient(rgba(0,0,0,0.15) 1px, transparent 1px);
  background-size: 2px 2px;
  border-top: 2px solid #000000;
  border-left: 2px solid #000000;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  box-shadow: inset 1px 1px 0 #808080;
  padding-top: 3px;
  padding-left: 9px;
}

.taskbar-tray {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  padding: 2px 8px;
  background-color: #c0c0c0;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  font-size: 11.5px;
  color: #000000;
}
