:root{
  --bg: #000;          /* 背景：ほぼ黒 */
  --panel: #0b120b;       /* ウィンドウ本体 */
  --panel2: #0e1a0e;      /* サブパネル */
  --line: #1f3b1f;        /* 枠線（深緑） */

  --title2: #0f3d1f;      /* タイトルバー緑 */
  --txt: #9dff9d;         /* メイン文字（蛍光寄り緑） */
  --link: #66ff66;        /* リンク */
}

html,body{height:100%;}
body{
  margin:0;
  background: var(--bg);
  color: var(--txt);
  font-family: "MS PGothic", "MS Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  image-rendering: pixelated;
}

/* ===== moving green scanlines (overlay div) ===== */
.scan-overlay{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999999; /* 最前面 */

  background-image:
    repeating-linear-gradient(
      to bottom,
      rgba(0,255,0,0.12) 0px,
      rgba(0,255,0,0.30) 3px,
      rgba(0,0,0,0) 3px,
      rgba(0,0,0,0) 80px
    );

  background-size: 100% 6px;
  animation: scanline-move 4s linear infinite;
  opacity: 0.35;
}

@keyframes scanline-move{
  from{ background-position: 0 0; }
  to  { background-position: 0 600px; }
}
.wrap{
  max-width: 980px;
  margin: 28px auto;
  padding: 0 14px;
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items:start;
}

.win{
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.35) inset,
    2px 2px 0 rgba(0,0,0,0.25);
}

.titlebar{
  background: linear-gradient(#0a2b14, #0f3d1f);
  color:#baffba;
  font-weight:700;
  font-size: 13px;
  letter-spacing:.2px;
  padding: 5px 8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid rgba(0,0,0,0.55);
  text-shadow: 0 0 4px rgba(120,255,120,0.3);
  user-select:none;
}

.titlebar .btns{
  display:flex;
  gap:6px;
  align-items:center;
}

.tb-btn{
  width: 14px; height: 14px;
  border:1px solid rgba(0,0,0,0.65);
  background: #cfcfcf;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset;
}

.content{
  padding: 10px;
  font-size: 12px;
  line-height: 1.55;
}

.sysinfo .content{ background: var(--panel2); }
.sysinfo .content p{ margin:0 0 8px; }

.note{
  border: 1px dashed rgba(0,0,0,0.4);
  background: rgba(255,255,255,0.35);
  padding: 8px;
  margin-top: 10px;
}

.mt10{ margin-top:10px; }

a{ color:var(--link); }

.stage{
  min-height: 520px;
  display:flex;
  flex-direction:column;
  gap: 14px;
}

.character{
  min-height: 320px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.18), rgba(0,0,0,0.02) 60%);
  border:1px solid rgba(0,0,0,0.35);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.25) inset;
  overflow:hidden;
}

.character img{
  max-width: 420px;
  width: 100%;
  height:auto;
  image-rendering: pixelated;
  filter: contrast(1.05);
  opacity: .95;
}

.placeholder{
  font-size: 12px;
  opacity: .85;
  padding: 10px;
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(0,0,0,0.25);
}

.chat .content{
  background: #020402;
  padding: 8px;
}

.log{
  height: 165px;
  overflow:auto;
  background:#020402;
color:#9dff9d;
  border:1px solid #1f3b1f;
  box-shadow: inset 0 0 8px rgba(0,255,0,0.15);
  padding: 8px;
  font-family: "MS PGothic","MS Gothic", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.row{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
  align-items:center;
}

input[type="text"]{
  width:100%;
  padding: 6px 8px;
  border:1px solid rgba(0,0,0,0.65);
  background:#020402;
color:#9dff9d;
border:1px solid #1f3b1f;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset;
  font-family: "MS PGothic","MS Gothic", monospace;
  font-size: 12px;
  outline:none;
}
input[type="text"]:focus{
color:#4f8f4f;
  outline: 1px dotted rgba(0,0,0,0.7);
  outline-offset: 1px;
}

button{
  padding: 6px 10px;
  border:1px solid #1f3b1f;
  background:#0b120b;
color:#9dff9d;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset;
  font-family: inherit;
  font-size: 12px;
  cursor:pointer;
}
button:active{ transform: translate(1px,1px); }

.hint{
  margin-top: 6px;
  font-size: 11px;
  opacity:.85;
}

.tag-you{ color:#66ff66; font-weight:700; } /* YOU */
.tag-bot{ color:#baffba; font-weight:700; } /* EDEN */

@media (max-width: 880px){
  .wrap{ grid-template-columns: 1fr; }
  .character{ min-height: 240px; }
}
.char-switch{
  display:flex;
  gap:6px;
}
.char-switch button.active{
  outline: 1px dotted #000;
  background:#cfcfcf;
}
/* ===== log scrollbar (WebKit) ===== */
.log::-webkit-scrollbar{
  width: 10px;
}

.log::-webkit-scrollbar-track{
  background: #020402;          /* ほぼ黒 */
  border-left: 1px solid #1f3b1f;
}

.log::-webkit-scrollbar-thumb{
  background: #0f3d1f;          /* 深緑 */
  border: 1px solid #2a6b2a;
  box-shadow: inset 0 0 4px rgba(120,255,120,0.35);
}

.log::-webkit-scrollbar-thumb:hover{
  background: #146b32;          /* 少し明るい緑 */
}
/* ===== log scrollbar (Firefox) ===== */
.log{
  scrollbar-width: thin;
  scrollbar-color: #0f3d1f #020402;
}

