/* ================================================
   MyTheme - Windows 2000 Authentic Style
   ================================================ */

:root {
  /* ── Win2000 本物カラー ── */
  --w-desktop:     #5A7BA0;   /* デスクトップ青グレー */
  --w-gray:        #D4D0C8;   /* ウィンドウ/ボタン本体グレー */
  --w-gray-lt:     #F0EFE8;   /* ハイライト面 */
  --w-gray-dk:     #A8A898;   /* シャドウ面 */
  --w-gray-dk2:    #6E6E60;   /* 濃いシャドウ */
  --w-white:       #FFFFFF;
  --w-black:       #000000;
  --w-text:        #000000;
  --w-text-inv:    #FFFFFF;
  --w-text-muted:  #444444;

  /* タイトルバー */
  --w-title-from:  #0A246A;
  --w-title-to:    #A6CAF0;

  /* 選択・ハイライト */
  --w-select-bg:   #0A246A;
  --w-select-text: #FFFFFF;

  /* リンク */
  --w-link:        #0000EE;
  --w-link-vis:    #551A8B;

  /* フォーム入力 */
  --w-input-bg:    #FFFFFF;

  /* Win2000 ボックスシャドウ */
  --win-raised:
    inset -1px -1px 0 var(--w-gray-dk2),
    inset  1px  1px 0 var(--w-white),
    inset -2px -2px 0 var(--w-gray-dk),
    inset  2px  2px 0 var(--w-gray-lt);
  --win-inset:
    inset  1px  1px 0 var(--w-gray-dk2),
    inset -1px -1px 0 var(--w-white),
    inset  2px  2px 0 var(--w-gray-dk),
    inset -2px -2px 0 var(--w-gray-lt);
  --win-field:
    inset  1px  1px 0 var(--w-gray-dk2),
    inset -1px -1px 0 var(--w-gray-lt),
    inset  2px  2px 0 var(--w-gray-dk);

  /* フォント */
  --font-pixel: 'DotGothic16', 'MS Gothic', 'ＭＳ ゴシック', monospace;
  --font-press: 'Press Start 2P', monospace;
  --font-ui:    'DotGothic16', 'MS Sans Serif', 'MS Gothic', sans-serif;

  /* レイアウト */
  --center-w:   430px;
  --footer-h:   36px;
  --header-h:   28px;
  --titlebar-h: 20px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  background: var(--w-desktop);
  color: var(--w-text);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: var(--w-link); text-decoration: underline; }
a:visited { color: var(--w-link-vis); }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ================================================
   LOADING SCREEN
   ================================================ */
#loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--w-black);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.25s, visibility 0.25s;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loading-window {
  width: min(300px, 88vw);
  background: var(--w-gray);
  box-shadow: var(--win-raised);
  opacity: 0; transform: scale(0.92);
  animation: winPop 0.3s 0.1s ease forwards;
}
@keyframes winPop { to { opacity:1; transform:scale(1); } }

.loading-titlebar {
  height: var(--titlebar-h);
  background: linear-gradient(90deg, var(--w-title-from) 0%, var(--w-title-to) 100%);
  display: flex; align-items: center;
  padding: 0 4px; gap: 4px;
}
.loading-titlebar-icon { font-size: 11px; }
.loading-titlebar-text { flex:1; font-size: 11px; color: var(--w-text-inv); font-family: var(--font-ui); }
.loading-titlebar-btn {
  width: 14px; height: 12px;
  background: var(--w-gray); box-shadow: var(--win-raised);
  display:flex; align-items:center; justify-content:center;
  font-size:8px; color:var(--w-black); line-height:1;
}

.loading-body {
  padding: 16px 14px 12px;
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}
.loading-logo {
  font-family: var(--font-press);
  font-size: clamp(0.5rem, 3vw, 0.75rem);
  color: var(--w-title-from);
  text-align: center; line-height: 1.9;
  text-shadow: 1px 1px 0 var(--w-gray-lt);
}
.loading-bar-label {
  font-size: 11px; color: var(--w-text-muted);
  align-self: flex-start;
}
.loading-bar-wrap {
  width: 100%; height: 14px;
  background: var(--w-white);
  box-shadow: var(--win-field);
  overflow: hidden;
}
.loading-bar {
  height: 100%; width: 0;
  background: repeating-linear-gradient(
    90deg,
    var(--w-title-from) 0px, var(--w-title-from) 9px,
    var(--w-title-to)   9px, var(--w-title-to)  11px
  );
  animation: loadBar 1.5s 0.4s ease-out forwards;
}
@keyframes loadBar { to { width:100%; } }

/* ================================================
   3-COLUMN LAYOUT
   ================================================ */
.side-col { display: none; }

.center-col {
  width: 100%;
  min-height: 100vh;
  background: var(--w-desktop);
  display: flex;
  flex-direction: column;
}

@media (min-width: 900px) {
  html, body { height: 100%; overflow: hidden; }

  .side-col {
    display: block;
    position: fixed; top:0; bottom:0;
    width: calc((100vw - var(--center-w)) / 2);
    background: var(--w-desktop);
    overflow: hidden; z-index: 0;
  }
  .side-col--left  { left:0; }
  .side-col--right { right:0; }

  /* Win2000デスクトップ風グリッド：くすんだ水色地に少し濃い青格子 */
  .side-col::before {
    content: '';
    position: absolute; inset: 0;
    background:
      repeating-linear-gradient(0deg,  transparent, transparent 31px, rgba(0,20,60,0.18) 32px),
      repeating-linear-gradient(90deg, transparent, transparent 31px, rgba(0,20,60,0.18) 32px);
  }

  .side-col-inner {
    height: 100%;
    display: flex; align-items: center; justify-content: center;
    writing-mode: vertical-rl;
    font-family: var(--font-ui);
    font-size: 11px; letter-spacing: 0.2em;
    color: rgba(255,255,255,0.55);
  }

  .center-col {
    position: fixed; top:0; bottom:0;
    left:50%; transform:translateX(-50%);
    width: var(--center-w);
    overflow-y: auto; overflow-x: hidden;
    border-left:  2px solid var(--w-gray-dk2);
    border-right: 2px solid var(--w-gray-dk2);
    z-index: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--w-gray) var(--w-gray-dk);
  }
}

/* センター背景もデスクトップ色 */
.center-col {
  background-color: var(--w-desktop);
  background-image:
    repeating-linear-gradient(0deg,  transparent, transparent 31px, rgba(0,20,60,0.12) 32px),
    repeating-linear-gradient(90deg, transparent, transparent 31px, rgba(0,20,60,0.12) 32px);
}

/* ================================================
   HEADER（タイトルバー）
   ================================================ */
.site-header {
  position: sticky; top:0; z-index:100;
  height: var(--header-h);
  background: linear-gradient(90deg, var(--w-title-from) 0%, var(--w-title-to) 65%, var(--w-title-from) 100%);
  display: flex; align-items: center;
  padding: 0 6px; gap: 6px;
  box-shadow: 0 2px 0 var(--w-gray-dk2);
}
.header-icon { font-size: 14px; line-height:1; }
.site-title {
  flex:1;
  font-family: var(--font-ui);
  font-size: 12px; font-weight: bold;
  color: var(--w-text-inv);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}
.site-title a { color:inherit; text-decoration:none; }
.site-title a:hover { opacity:0.85; }

.menu-toggle {
  width:20px; height:18px;
  background: var(--w-gray); box-shadow: var(--win-raised);
  border:none; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  padding:2px;
}
.menu-toggle span { display:block; width:12px; height:1px; background:var(--w-black); transition:transform 0.12s,opacity 0.12s; }
.menu-toggle:active { box-shadow: var(--win-inset); }
.menu-toggle.open span:nth-child(1) { transform:translateY(4px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity:0; }
.menu-toggle.open span:nth-child(3) { transform:translateY(-4px) rotate(-45deg); }

/* ================================================
   DRAWER
   ================================================ */
.nav-drawer {
  position: fixed;
  top: var(--header-h); left:50%; transform:translateX(-50%);
  width:100vw; max-width:var(--center-w);
  height: calc(100vh - var(--header-h) - var(--footer-h));
  background: var(--w-gray);
  z-index:99;
  display:flex; flex-direction:column;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.18s ease;
  box-shadow: inset 0 1px 0 var(--w-gray-lt);
}
.nav-drawer.open { clip-path: inset(0 0 0% 0); }

.nav-drawer-titlebar {
  height: var(--titlebar-h);
  background: linear-gradient(90deg, var(--w-title-from), var(--w-title-to));
  display:flex; align-items:center; padding:0 6px; gap:4px; flex-shrink:0;
}
.nav-drawer-titlebar span { flex:1; font-size:11px; color:#fff; font-family:var(--font-ui); }

.nav-drawer-items {
  flex:1; padding:10px 10px; display:flex; flex-direction:column; gap:3px; overflow-y:auto;
}
.nav-drawer a {
  display:flex; align-items:center; gap:8px;
  padding:6px 9px;
  background:var(--w-gray); box-shadow:var(--win-raised);
  font-family:var(--font-ui); font-size:13px; color:var(--w-black);
  text-decoration:none;
}
.nav-drawer a:hover { background:var(--w-select-bg); color:#fff; box-shadow:var(--win-inset); }
.nav-drawer a:hover .nav-item-arrow { color:#aac8ff; }
.nav-item-icon { font-size:16px; width:22px; text-align:center; flex-shrink:0; }
.nav-item-text { flex:1; }
.nav-item-arrow { font-size:9px; color:var(--w-text-muted); }

/* ================================================
   MAIN
   ================================================ */
.site-main { flex:1; padding-bottom:calc(var(--footer-h) + 4px); }

/* ウィンドウ枠 */
.page-content {
  margin: 8px 6px;
  background: var(--w-gray);
  box-shadow: var(--win-raised);
  animation: pageIn 0.12s ease both;
}
@keyframes pageIn { from{opacity:0;transform:translateY(3px)} to{opacity:1;transform:translateY(0)} }

.win-titlebar {
  height: var(--titlebar-h);
  background: linear-gradient(90deg, var(--w-title-from) 0%, var(--w-title-to) 100%);
  display:flex; align-items:center; padding:0 6px; gap:4px;
}
.win-titlebar-icon { font-size:11px; }
.win-titlebar-text { flex:1; font-family:var(--font-ui); font-size:11px; color:#fff; font-weight:bold; }
.win-titlebar-btns { display:flex; gap:2px; }
.win-btn {
  width:14px; height:12px; background:var(--w-gray); box-shadow:var(--win-raised);
  display:flex; align-items:center; justify-content:center;
  font-size:8px; color:var(--w-black); cursor:default; line-height:1;
}
.win-btn:active { box-shadow:var(--win-inset); }

.win-body { padding:12px 10px; }

/* ページタイトル（アドレスバー風） */
.page-title-bar {
  display:flex; align-items:center; gap:6px;
  padding:3px 6px;
  background:var(--w-gray);
  border-bottom:1px solid var(--w-gray-dk);
  margin-bottom:10px;
}
.page-title {
  font-family: var(--font-ui);
  font-size: 13px; font-weight: bold;
  color: var(--w-black);
}
.page-title-sub {
  font-size:11px; color:var(--w-text-muted);
  display:block; margin-bottom:10px;
}
.section-divider {
  height:2px;
  background:var(--w-gray-dk);
  box-shadow:0 1px 0 var(--w-gray-lt);
  margin-bottom:12px;
}

/* ================================================
   TOP リンク集
   ================================================ */
.link-card {
  display:flex; align-items:center; gap:8px;
  padding:5px 8px; margin-bottom:3px;
  background:var(--w-gray); box-shadow:var(--win-raised);
  cursor:pointer; text-decoration:none; color:var(--w-black);
}
.link-card:hover { background:var(--w-select-bg); color:#fff; box-shadow:var(--win-inset); }
.link-card:hover .link-card-url { color:#aac8ff; }
.link-card:hover .link-card-arrow { color:#fff; }
.link-card-icon {
  width:28px; height:28px; background:var(--w-white);
  box-shadow:var(--win-field);
  display:flex; align-items:center; justify-content:center;
  font-size:0.95rem; flex-shrink:0;
}
.link-card-body { flex:1; min-width:0; }
.link-card-title { font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.link-card-url { font-size:10px; color:var(--w-text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.link-card-arrow { font-size:10px; color:var(--w-text-muted); flex-shrink:0; }

/* ================================================
   ABOUT
   ================================================ */
.about-avatar {
  width:64px; height:64px;
  background:var(--w-white); box-shadow:var(--win-field);
  margin-bottom:10px; overflow:hidden;
}
.about-name { font-family:var(--font-press); font-size:0.55rem; color:var(--w-title-from); margin-bottom:3px; line-height:2; }
.about-name-sub { font-size:11px; color:var(--w-text-muted); margin-bottom:10px; }
.about-text { font-size:12px; line-height:1.85; margin-bottom:12px; }
.about-tags { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:12px; }
.about-tag {
  font-size:11px; padding:2px 6px;
  background:var(--w-gray); box-shadow:var(--win-raised); cursor:default;
  color:var(--w-black);
}
.about-tag:hover { background:var(--w-select-bg); color:#fff; box-shadow:var(--win-inset); }

/* ================================================
   GALLERY
   ================================================ */
.gallery-grid {
  display:grid; grid-template-columns:repeat(3,1fr);
  gap:3px; padding:3px;
  background:var(--w-gray);
}
.gallery-item {
  aspect-ratio:2/3; background:var(--w-white);
  box-shadow:var(--win-field);
  overflow:hidden; cursor:pointer; position:relative;
}
.gallery-item img { width:100%; height:100%; object-fit:cover; transition:transform 0.2s; }
.gallery-item:hover img { transform:scale(1.04); }
.gallery-item-overlay {
  position:absolute; inset:0;
  background:rgba(10,36,106,0.45);
  opacity:0; transition:opacity 0.18s;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:1.2rem;
}
.gallery-item:hover .gallery-item-overlay { opacity:1; }
.gallery-placeholder {
  width:100%; height:100%; background:#eee;
  display:flex; align-items:center; justify-content:center;
  color:var(--w-text-muted); font-size:1.3rem;
}

/* Lightbox */
.lightbox {
  position:fixed; inset:0; z-index:200;
  background:rgba(0,0,0,0.7);
  display:flex; align-items:center; justify-content:center;
  opacity:0; visibility:hidden;
  transition:opacity 0.18s,visibility 0.18s;
}
.lightbox.open { opacity:1; visibility:visible; }
.lightbox-inner { background:var(--w-gray); box-shadow:var(--win-raised); max-width:90vw; }
.lightbox-titlebar {
  height:var(--titlebar-h);
  background:linear-gradient(90deg,var(--w-title-from),var(--w-title-to));
  display:flex; align-items:center; padding:0 5px; gap:4px;
}
.lightbox-titlebar-text { flex:1; font-size:11px; color:#fff; font-family:var(--font-ui); font-weight:bold; }
.lightbox-close {
  width:14px; height:12px; background:var(--w-gray); box-shadow:var(--win-raised);
  border:none; cursor:pointer; font-size:9px; color:var(--w-black);
  display:flex; align-items:center; justify-content:center;
}
.lightbox-close:active { box-shadow:var(--win-inset); }
.lightbox img { display:block; max-width:100%; max-height:72vh; object-fit:contain; }

/* ================================================
   CONTACT
   ================================================ */
.contact-intro { font-size:12px; color:var(--w-text-muted); margin-bottom:12px; line-height:1.85; }
.form-group { margin-bottom:10px; }
.form-label { display:block; font-size:12px; margin-bottom:3px; color:var(--w-black); }
.form-label .required { color:#cc0000; margin-left:3px; }
.form-input, .form-textarea {
  width:100%; background:var(--w-input-bg);
  box-shadow:var(--win-field); border:none;
  color:var(--w-black); font-family:var(--font-ui); font-size:12px;
  padding:4px 6px; outline:none; -webkit-appearance:none;
}
.form-input:focus, .form-textarea:focus {
  outline:2px solid var(--w-select-bg); outline-offset:-2px;
}
.form-textarea { resize:vertical; min-height:90px; }
.form-submit {
  display:flex; align-items:center; justify-content:center; gap:6px;
  width:100%; background:var(--w-gray); box-shadow:var(--win-raised);
  border:none; font-family:var(--font-ui); font-size:12px; color:var(--w-black);
  padding:5px 12px; cursor:pointer; margin-top:6px;
}
.form-submit:hover { background:var(--w-gray-lt); }
.form-submit:active { box-shadow:var(--win-inset); }

/* ================================================
   FOOTER — Win2000タスクバー（横いっぱい）
   ================================================ */
.site-footer {
  position:fixed; bottom:0; left:0; right:0;
  height:var(--footer-h);
  background:var(--w-gray);
  box-shadow:0 -2px 0 var(--w-gray-lt), 0 -3px 0 var(--w-gray-dk2);
  z-index:200;
  display:flex; align-items:center;
  padding:2px 4px; gap:3px;
}

/* スタートボタン */
.footer-start {
  display:flex; align-items:center; gap:5px;
  padding:2px 10px; height:26px;
  background:var(--w-gray); box-shadow:var(--win-raised);
  font-family:var(--font-ui); font-size:12px; font-weight:bold;
  color:var(--w-black); cursor:pointer; white-space:nowrap;
  flex-shrink:0; text-decoration:none;
}
.footer-start:hover { background:var(--w-gray-lt); }
.footer-start:active { box-shadow:var(--win-inset); }
.footer-start-icon { font-size:14px; }

.footer-sep {
  width:2px; height:24px;
  border-left:1px solid var(--w-gray-dk);
  border-right:1px solid var(--w-gray-lt);
  flex-shrink:0;
}

/* ナビボタン群 */
.footer-nav { display:flex; align-items:center; gap:2px; flex:1; overflow:hidden; }
.footer-nav-item {
  display:flex; align-items:center; gap:4px;
  padding:2px 7px; height:26px;
  background:var(--w-gray); box-shadow:var(--win-raised);
  font-family:var(--font-ui); font-size:11px; color:var(--w-black);
  cursor:pointer; white-space:nowrap;
  flex:1; max-width:96px; overflow:hidden; text-decoration:none;
}
.footer-nav-item:hover { background:var(--w-gray-lt); }
.footer-nav-item.active { box-shadow:var(--win-inset); }
.footer-nav-icon { font-size:13px; flex-shrink:0; }
.footer-nav-label { overflow:hidden; text-overflow:ellipsis; }

/* 通知エリア（時計） */
.footer-clock {
  display:flex; align-items:center; gap:4px;
  padding:2px 8px; height:26px;
  box-shadow:var(--win-field);
  font-family:var(--font-ui); font-size:11px; color:var(--w-black);
  white-space:nowrap; flex-shrink:0;
}

/* ================================================
   SCROLLBAR（Win2000風）
   ================================================ */
::-webkit-scrollbar { width:16px; }
::-webkit-scrollbar-track { background:var(--w-gray); box-shadow:var(--win-field); }
::-webkit-scrollbar-thumb { background:var(--w-gray); box-shadow:var(--win-raised); min-height:20px; }
::-webkit-scrollbar-button { background:var(--w-gray); box-shadow:var(--win-raised); height:16px; display:block; }

/* CF7 */
.wpcf7-form-control-wrap { display:block; width:100%; }
.wpcf7-not-valid-tip { font-size:11px; color:#cc0000; margin-top:3px; }
.wpcf7-response-output { font-size:11px; margin-top:8px; padding:5px 8px; box-shadow:var(--win-field); }
