/* sunaba_style.css */
html, body {
  width: 100vw; height: 100vh; margin: 0; padding: 0;
  overflow: hidden; background-color: #f4f4f4;
  font-family: sans-serif;
}

/* ヘッダー */
.playground-header {
  width: 100%; height: 50px; background-color: #282a36;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 20px; box-sizing: border-box; color: #f8f8f2; z-index: 100;
}
.logo-area { font-size: 22px; font-weight: bold; display: flex; align-items: baseline; gap: 10px; color: #e6db74; }
.sub-logo { font-size: 12px; color: #8be9fd; font-weight: normal; margin-left: 5px; }
.sample-selector { background-color: #44475a; color: #f8f8f2; border: 1px solid #6272a4; padding: 5px 10px; border-radius: 4px; font-size: 14px; margin-left: 20px; outline: none; }
.info-btn { background-color: #44475a; color: #f8f8f2; border: 1px solid #6272a4; padding: 6px 15px; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: bold; transition: 0.2s; }
.info-btn:hover { background-color: #6272a4; }

/* 全体レイアウト */
.container { display: flex; width: 100vw; height: calc(100vh - 50px); }
.sidebar { width: 60px; height: 100%; background: #333; display: flex; flex-direction: column; align-items: center; padding-top: 15px; box-sizing: border-box;}
.menuButton { background: none; border: none; cursor: pointer; margin-bottom: 20px; padding: 5px; transition: 0.2s; }
.menuButton:hover { background-color: #555; border-radius: 8px; }
.menuIcon { width: 32px; height: 32px; filter: invert(1); }

/* エディタ＆コンソール領域 */
.code { flex-grow: 1; width: calc(100vw - 60px); height: 100%; display: flex; flex-direction: column; }
.codeContainer { width: 100%; height: 100%; display: flex; flex-direction: column; }
.editor_wrap { height: 60%; width: 100%; display: flex; flex-direction: column; border: none; }
.codeDivider { height: 8px; min-height: 8px; background: #666; cursor: ns-resize; width: 100%; z-index: 50; }
.codeDivider:hover { background: #888; }
.compiler { height: 40%; width: 100%; border: none; border-top: 1px solid #ccc; flex-grow: 0; background: #fff; display: flex; flex-direction: column; overflow: hidden; }

/* エディタ本体 (new_editor.css から抽出) */
.editor_main { width: 100%; height: 100%; display: flex; }
.editor_lines { width: 50px; height: 100%; float: left; text-align: center; overflow: hidden; box-sizing: border-box; padding: 0 0 50px 0; white-space: pre; background-color: #f0f0f0; color: #999; }
.editor_partition_line_vertical { width: 1px; height: 100%; background-color: #ccc; }
.editor_overlap { width: calc(100% - 51px); height: 100%; position: relative; overflow: auto; }

.editor_common { font-family: monospace; font-size: 16px; tab-size: 4; line-height: 1.5; }
.new_editor_plain { z-index: 10; position: absolute; top: 0; left: 0; width: max-content; min-width: 100%; height: max-content; min-height: 100%; background-color: transparent; color: transparent; caret-color: black; outline: none; border: none; overflow: visible; white-space: pre; margin: 0; box-sizing: border-box; padding: 0 50px 50px 5px; }
.editor_rich { position: absolute; top: 0; left: 0; width: max-content; min-width: 100%; height: max-content; min-height: 100%; background-color: transparent; outline: none; border: none; overflow: visible; white-space: pre; margin: 0; box-sizing: border-box; padding: 0 50px 50px 5px; pointer-events: none; }

/* シンタックスハイライトの色 */
.s { color: #009933; } .c { color: #999999; } .n { color: #ff0000; }
.k { color: #ff8000; font-weight: bold; } .v { color: #000000; } 
.p { color: #9933cc; } .f { color: #3333cc; } .o { color: #663333; }

/* コンソール (compiler.css から抽出) */
.compiler-container { width: 100%; height: 100%; display: flex; flex-direction: column; font-family: monospace; }
.compiler-output { height: calc(100% - 40px); padding: 10px; overflow-y: auto; white-space: pre-wrap; font-size: 14px; background: #f7f7f7; color: #333; margin: 0; }
.compiler-input-area { display: flex; align-items: center; padding: 5px 10px; gap: 8px; background-color: #e0e0e0; height: 40px; border-top: 1px solid #ccc; flex-shrink: 0; }
.compiler-input-box { flex-grow: 1; height: 28px; padding: 0 8px; font-size: 14px; border: 1px solid #ccc; border-radius: 4px; }
.compiler-input-send { height: 28px; padding: 0 16px; font-size: 14px; border: none; background-color: #4CAF50; color: white; border-radius: 4px; cursor: pointer; }
.compiler-input-send:disabled { background-color: #a5d6a7; cursor: not-allowed; }

/* オーバーレイ・モーダル (dialog.css から抽出) */
.tech-info-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); z-index: 9999; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.3s ease; }
.tech-info-overlay.show { opacity: 1; pointer-events: auto; }
.tech-info-modal { background: #fff; width: 90%; max-width: 650px; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); transform: translateY(-20px); transition: 0.3s ease; display: flex; flex-direction: column; max-height: 90vh; }
.tech-info-overlay.show .tech-info-modal { transform: translateY(0); }
.tech-info-header { background: #f8f9fa; padding: 15px 20px; border-bottom: 1px solid #e9ecef; display: flex; justify-content: space-between; align-items: center; }
.tech-info-header h2 { margin: 0; font-size: 18px; color: #333; }
.tech-info-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #666; }
.tech-info-body { padding: 20px; font-size: 14px; line-height: 1.6; overflow-y: auto; }
.tech-info-body h3 { font-size: 15px; border-bottom: 2px solid #eee; padding-bottom: 5px; margin: 20px 0 10px; }
.tech-info-body h3:first-child { margin-top: 0; }
.contact-box { background: #f8f9fa; border: 1px solid #ddd; padding: 15px; border-radius: 6px; font-family: monospace; text-align: center; }

/* キャンバス用ポップアップ */
.canvas-popup-wrapper { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0,0,0,0.8); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10000; }
.canvas-popup-content { background-color: #fff; padding: 10px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; max-width: 90%; max-height: 90%; }
.canvas-popup-canvas { border: 1px solid #ccc; max-width: 100%; max-height: calc(100vh - 120px); cursor: grab; }
.canvas-popup-buttons { margin-top: 10px; display: flex; gap: 10px; }
.canvas-popup-button, .canvas-popup-close, .canvas-popup-download { padding: 6px 12px; border: none; border-radius: 4px; cursor: pointer; color: white; background: #607D8B; }
.canvas-popup-close { background-color: #f44336; }
.canvas-popup-download { background-color: #2196F3; }