html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* ページ遷移用フルスクリーングリッチ */
body.glitch-container {
  background: #0b0b0b;
}

#page-glitch {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  background-color: var(--glitch-bg, #0b0b0b);
  will-change: transform, opacity;
}

#page-glitch::before,
#page-glitch::after,
#page-glitch .channel {
  position: absolute;
  inset: 0;
  content: "";
  background-color: var(--glitch-bg, #0b0b0b);
  background-size: cover;
}

#page-glitch::after {
  filter: hue-rotate(18deg) saturate(1.2);
}

#page-glitch::before {
  filter: hue-rotate(-14deg) saturate(1.1);
}

#page-glitch .channel {
  mix-blend-mode: screen;
}

#page-glitch .channel::before {
  content: "";
  position: absolute;
  inset: 0;
  mix-blend-mode: multiply;
}

#page-glitch .channel.r::before {
  background: #ff2b2b;
  transform: translate(2px, 1px);
}

#page-glitch .channel.g::before {
  background: #31ff4b;
  transform: translate(-1px, -1px);
}

#page-glitch .channel.b::before {
  background: #2b5bff;
}

/* ランダムノイズ */
#page-glitch::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.18'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.35;
}

body.glitch-transition #page-glitch::before {
  animation: glitch-full 0.6s linear infinite alternate, noise-jitter 0.12s steps(2, end) infinite;
}

@keyframes noise-jitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, -2px); }
  100% { transform: translate(1px, 2px); }
}

body.glitch-transition #page-glitch {
  opacity: 1;
  animation: glitch-opacity 0.6s forwards;
}

body.glitch-transition #page-glitch::before,
body.glitch-transition #page-glitch::after {
  animation: glitch-full 0.6s linear infinite alternate;
}

body.glitch-transition #page-glitch::after {
  opacity: 0.7;
  transform: translate(-2px, 1px) skewX(-1deg);
}

@keyframes glitch-full {
  0% {
    clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%);
    transform: translate(2px, -1px) skew(1deg);
  }
  33% {
    clip-path: polygon(0 55%, 100% 55%, 100% 62%, 0 62%);
    transform: translate(-1px, 2px) skew(-1deg);
  }
  66% {
    clip-path: polygon(0 20%, 100% 20%, 100% 36%, 0 36%);
    transform: translate(1px, -2px);
  }
  100% {
    clip-path: polygon(0 40%, 100% 40%, 100% 78%, 0 78%);
    transform: translate(-2px, 1px) skew(0.5deg);
  }
}

@keyframes glitch-opacity {
  to {
    opacity: 0;
  }
}

/* Figmaデザインボックス */
.figma-box-container {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 403px;
  height: 403px;
  cursor: move;
  z-index: 100;
}

.figma-box-container.dragging {
  cursor: grabbing;
}

.box-main {
  position: absolute;
  background-color: #101018;
  border: 1px solid #a4a4a4;
  left: 0;
  top: 0;
  width: 403px;
  height: 403px;
  box-sizing: border-box;
  padding: 36px 16px 16px;
  overflow: hidden;
}

.box-header {
  position: absolute;
  background-color: #101018;
  border: 1px solid #a4a4a4;
  left: 0;
  top: 0;
  width: 403px;
  height: 31px;
  box-sizing: border-box;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 5px;
  gap: 5px;
}

.box-btn {
  width: 20px;
  height: 20px;
  border: 1px solid #a4a4a4;
  background-color: #202028;
  color: #a4a4a4;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
}

.box-btn:hover {
  background-color: #303038;
  color: #ffffff;
  border-color: #ffffff;
}

.box-btn-close:hover {
  background-color: #ff4444;
  border-color: #ff4444;
}

.code-display {
  margin: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  color: #d0f0d0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  overflow: auto;
}

.code-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.code-editor label {
  font-size: 11px;
  color: #8aa38a;
  letter-spacing: 0.08em;
}

.code-editor textarea {
  width: 100%;
  min-height: 120px;
  flex: 1 1 auto;
  padding: 10px;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(160, 180, 160, 0.4);
  background: rgba(0, 0, 0, 0.45);
  color: #d0f0d0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
}

.detail-display {
  height: 100%;
  overflow: auto;
  color: #d0f0d0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  padding: 36px 16px 16px;
  box-sizing: border-box;
}

.detail-display h3 {
  margin: 0 0 12px 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #9fb89f;
}

.detail-display .detail-row {
  margin-bottom: 8px;
  word-break: break-word;
}

.detail-display .detail-label {
  opacity: 0.7;
}

.easter-display {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d0f0d0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 36px 16px 16px;
  box-sizing: border-box;
}

/* メインコンテンツ（キャンバス画面） */
#main-content {
  width: 100vw;
  min-height: 100dvh;
  height: 100dvh;
  position: relative;
  background: #dcdfe3;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
  padding-top: 120px;
  padding-bottom: 160px;
  box-sizing: border-box;
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(255, 255, 255, 0.1);
  transition: background 0.8s ease, box-shadow 0.8s ease;
}

/* ページコンテンツ（WORKS/ABOUT/CONTACT）用レイアウト */
.page-layout {
  align-items: flex-start;
  overflow: hidden;
}

/* テーマ1: CH1 - ダークブルー */
#main-content.theme-ch1 {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  box-shadow: 
    inset 0 0 30px rgba(0, 100, 200, 0.3),
    0 0 50px rgba(0, 150, 255, 0.2);
}

#main-content.theme-ch1::before {
  opacity: 2;
  filter: brightness(1.5) contrast(1.2);
}

/* テーマ2: CH2 - パープル */
#main-content.theme-ch2 {
  background: linear-gradient(135deg, #2d1b4e 0%, #4a1c6f 50%, #6b2d8f 100%);
  box-shadow: 
    inset 0 0 30px rgba(150, 0, 200, 0.4),
    0 0 50px rgba(200, 0, 255, 0.2);
}

#main-content.theme-ch2::before {
  opacity: 2.5;
  filter: hue-rotate(90deg) brightness(1.3);
}

/* テーマ3: CH3 - グリーン */
#main-content.theme-ch3 {
  background: linear-gradient(135deg, #1a3d2e 0%, #2d5f4a 50%, #408066 100%);
  box-shadow: 
    inset 0 0 30px rgba(0, 200, 100, 0.3),
    0 0 50px rgba(0, 255, 150, 0.2);
}

#main-content.theme-ch3::before {
  opacity: 2;
  filter: hue-rotate(-45deg) brightness(1.4);
}

/* テーマ4: CH4 - レッド */
#main-content.theme-ch4 {
  background: linear-gradient(135deg, #3d1a1a 0%, #5f2d2d 50%, #804040 100%);
  box-shadow: 
    inset 0 0 30px rgba(200, 0, 0, 0.4),
    0 0 50px rgba(255, 50, 50, 0.2);
}

#main-content.theme-ch4::before {
  opacity: 2.2;
  filter: hue-rotate(180deg) brightness(1.3);
}

/* 背景ノイズテクスチャ */
#main-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
  opacity: 1;
  transition: opacity 0.8s ease-out;
}

/* ノイズ強化クラス */
#main-content.noise-intense::before {
  animation: noiseIntensify 0.6s ease-in-out;
}

@keyframes noiseIntensify {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 4;
    filter: blur(3px) contrast(1.5);
  }
  100% {
    opacity: 1;
  }
}

/* ボタンパネル（画面下側に配置） */
.button-panel {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 16px 18px;
  background: #c8cdd1;
  border-radius: 18px;
  z-index: 10;
  max-width: min(900px, 92vw);
  box-shadow: 
    inset 4px 4px 8px rgba(0, 0, 0, 0.3),
    inset -4px -4px 8px rgba(255, 255, 255, 0.5),
    2px 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid #b0b5b9;
}

/* control: ボタン＋ランプのユニット */
.control {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ランプ（消灯状態） */
.lamp {
  width: 8px;
  height: 56px;
  border-radius: 4px;
  background: #2a2a2a;
  box-shadow:
    inset 0 0 2px rgba(0,0,0,0.8),
    0 0 1px rgba(0,0,0,0.8);
  transition: all 0.1s ease;
}

/* ランプ点灯（LED風） */
.lamp.on {
  background: #4cff4c;
  box-shadow:
    0 0 4px rgba(100,255,100,0.8),
    0 0 8px rgba(100,255,100,0.5),
    inset 0 0 2px rgba(255,255,255,0.6);
}

/* radio-group */
.radio-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
}

@media (max-width: 768px) {
  .button-panel {
    bottom: 16px;
    padding: 12px 14px;
    gap: 10px;
  }

  .lamp {
    height: 44px;
  }
}

/* キャンバス内オーバーレイコンテンツ */
.canvas-overlay {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  z-index: 5;
  color: white;
  padding: 40px;
  box-sizing: border-box;
}

.canvas-overlay.active {
  opacity: 1;
  visibility: visible;
}

.page-panel {
  position: relative;
  z-index: 2;
  width: min(900px, 90vw);
  min-height: min(520px, 70vh);
  border-radius: 30px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  box-sizing: border-box;
  color: #fff;
  text-align: center;
  overflow: hidden;
}

/* page-panelにノイズ/スキャンライン */
.page-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: 
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.18),
      rgba(0, 0, 0, 0.18) 1px,
      transparent 1px,
      transparent 2px
    );
  pointer-events: none;
  z-index: 3;
  opacity: 0.6;
}

.page-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
  z-index: 3;
  opacity: 0.5;
}

.page-panel > * {
  position: relative;
  z-index: 1;
}

.page-layout .page-panel {
  margin: 20px auto;
}

.page-panel-compact {
  max-height: min(440px, 65vh);
  height: min(440px, 65vh);
  min-height: 0;
  justify-content: flex-start;
  align-items: stretch;
  scroll-padding-top: 24px;
}

.page-panel .panel-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 40px;
  box-sizing: border-box;
}

.overlay-title {
  font-size: 72px;
  font-weight: bold;
  margin: 0 0 20px 0;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
  font-family: 'IBM Plex Mono', monospace;
}

.page-panel .subtitle {
  font-size: 18px;
  margin: 0 0 24px 0;
  opacity: 0.8;
}

.page-panel .section {
  width: 100%;
  text-align: left;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.work-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
}

.work-thumb {
  width: 100%;
  height: 110px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: block;
  object-fit: contain;
}

.work-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.work-title {
  font-size: 18px;
  margin: 0;
}

.work-desc {
  font-size: 14px;
  margin: 0;
  opacity: 0.75;
}

.about-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: start;
}

.about-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
}

.about-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  line-height: 1.7;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-input,
.contact-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
}

.contact-textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-button {
  align-self: flex-start;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.contact-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.2);
}

.contact-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-status {
  margin: 0;
  font-size: 12px;
  opacity: 0.8;
}

@media (max-width: 820px) {
  .overlay-title {
    font-size: 48px;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .about-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .about-text {
    align-items: center;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .figma-box-container {
    display: none;
  }
  #main-content {
    height: 100dvh;
  }

  .figma-box-container {
    width: min(92vw, 360px);
    height: min(92vw, 360px);
    left: 50%;
    top: auto;
    bottom: 160px;
    transform: translateX(-50%);
  }
  #main-content {
    padding: 32px 12px;
    padding-top: 90px;
    padding-bottom: 140px;
    overflow-x: hidden;
  }

  .header h1 {
    font-size: 14px;
    letter-spacing: 0.04em;
  }

  .button-panel {
    width: min(90vw, 440px);
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    overflow: hidden;
    padding: 10px 10px;
  }

  .radio-group {
    flex-wrap: wrap;
    justify-content: center;
  }

  .control {
    gap: 8px;
  }

  .lamp {
    height: 36px;
  }

  .key {
    width: 60px;
    height: 36px;
    font-size: 9px;
  }

  .page-panel {
    width: min(94vw, 520px);
    border-radius: 22px;
    padding: 28px;
  }

  .page-panel .panel-scroll {
    padding: 28px;
  }

  .page-panel-compact {
    max-height: min(72vh, 520px);
    height: min(72vh, 520px);
  }

  .overlay-title {
    font-size: 40px;
  }

  .work-card {
    padding: 14px;
  }

  .work-thumb {
    height: 96px;
  }

  .about-avatar {
    width: 120px;
    height: 120px;
  }

  .canvas-container {
    padding: 10px;
    border-radius: 24px;
    max-width: calc(100vw - 24px);
    width: calc(100vw - 24px);
    margin-left: auto;
    margin-right: auto;
  }

  .canvas-container::before,
  .canvas-container::after {
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 18px;
  }
}

@media (max-width: 420px) {
  .figma-box-container {
    width: min(92vw, 320px);
    height: min(92vw, 320px);
    bottom: 150px;
  }
  #main-content {
    padding: 24px 12px;
    padding-top: 80px;
    padding-bottom: 130px;
    overflow-x: hidden;
  }

  .header h1 {
    font-size: 12px;
  }

  .button-panel {
    width: min(88vw, 400px);
    padding: 8px 8px;
    gap: 6px;
  }

  .page-panel {
    padding: 22px;
  }

  .page-panel .panel-scroll {
    padding: 22px;
  }

  .overlay-title {
    font-size: 34px;
  }

  .work-thumb {
    height: 84px;
  }

  .key {
    width: 52px;
    height: 32px;
    font-size: 8px;
  }
}

.overlay-description {
  font-size: 28px;
  margin: 0;
  opacity: 0.9;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

/* Canvasコンテナ（CRT効果用） */
.canvas-container {
  position: relative;
  display: inline-block;
  vertical-align: top;
  border-radius: 50px;
  padding: 20px;
  background: #dcdfe3;
  box-sizing: border-box;
  overflow: hidden;
}

/* CRTスキャンライン */
.canvas-container::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  border-radius: 30px;
  background: 
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px,
      transparent 2px
    );
  pointer-events: none;
  z-index: 3;
  animation: scanline 8s linear infinite;
}

/* グロー効果とちらつき */
.canvas-container::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  border-radius: 30px;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
  pointer-events: none;
  z-index: 3;
  animation: flicker 0.15s infinite;
}

@keyframes scanline {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(10px);
  }
}

@keyframes flicker {
  0% {
    opacity: 0.95;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.95;
  }
}

canvas {
  background: #dcdfe3;
  display: block;
  position: relative;
  border-radius: 30px;
  box-shadow: 
    inset 0 0 50px rgba(0, 255, 0, 0.1);
  border: none;
  box-sizing: border-box;
  filter: contrast(1.1) brightness(1.1);
  max-width: 800px;
  max-height: 600px;
  width: 100%;
  height: auto;
}

.ibm-plex-mono-thin {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 100;
  font-style: normal;
}

.ibm-plex-mono-extralight {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 200;
  font-style: normal;
}

.ibm-plex-mono-light {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 300;
  font-style: normal;
}

.ibm-plex-mono-regular {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  font-style: normal;
}

.ibm-plex-mono-medium {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-style: normal;
}

.ibm-plex-mono-semibold {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-style: normal;
}

.ibm-plex-mono-bold {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-style: normal;
}

.ibm-plex-mono-thin-italic {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 100;
  font-style: italic;
}

.ibm-plex-mono-extralight-italic {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 200;
  font-style: italic;
}

.ibm-plex-mono-light-italic {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 300;
  font-style: italic;
}

.ibm-plex-mono-regular-italic {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  font-style: italic;
}

.ibm-plex-mono-medium-italic {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-style: italic;
}

.ibm-plex-mono-semibold-italic {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-style: italic;
}

.ibm-plex-mono-bold-italic {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-style: italic;
}

.header {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  width: 100%;
  text-align: center;
  z-index: 10;
  color: #b0b0b0;
}
/* アナログスイッチボタン */
.analog-switch-container {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.analog-switch {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  width: 80px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.1s ease;
}

.analog-switch:hover {
  transform: scale(1.05);
}

.analog-switch:active .switch-button {
  transform: translateY(4px);
}

.analog-switch:active .button-top {
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.3),
    inset 0 -1px 3px rgba(0, 0, 0, 0.2);
}

/* スイッチのベース */
.switch-base {
  width: 80px;
  height: 80px;
  background: linear-gradient(145deg, #2a2a2f, #1f1f24);
  border-radius: 50%;
  position: relative;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 -2px 4px rgba(255, 255, 255, 0.05),
    0 4px 8px rgba(0, 0, 0, 0.4);
}

.switch-base::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: #1a1a1f;
  border-radius: 50%;
  box-shadow: 
    inset 0 2px 6px rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(255, 255, 255, 0.03);
}

/* ボタン部分 */
.switch-button {
  position: absolute;
  top: 12px;
  width: 56px;
  height: 56px;
  transition: transform 0.1s ease;
}

.button-top {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #3d3d45, #32323a);
  border-radius: 50%;
  position: relative;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.05);
}

/* ボタン上部のハイライト */
.button-top::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 20px;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.08) 0%, 
    transparent 100%);
  border-radius: 50% 50% 0 0;
  filter: blur(1px);
}

/* ボタン中央のディテール */
.button-top::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 35px;
  height: 35px;
  background: linear-gradient(145deg, #3a3a42, #2f2f37);
  border-radius: 50%;
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.4),
    inset 0 -1px 2px rgba(255, 255, 255, 0.03);
}

/* スイッチラベル */
.switch-label {
  position: absolute;
  bottom: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  color: #6a6a70;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ホバー時の発光効果 */
.analog-switch:hover .switch-base::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, 
    rgba(100, 255, 100, 0.03) 0%, 
    transparent 70%);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}
