/* ==================================================
   ＜普通地の指数計算＞ CSS
   ================================================== */

/* --- ログインUI用デザイン --- */
.compact-auth-bar {
  width: 100% !important;
  max-width: 1250px !important;
  margin: 0 auto 25px !important;
  box-sizing: border-box !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  flex-wrap: wrap;
  gap: 15px;
}
.auth-left { font-size: 15px; color: #64748b; font-weight: bold; }
.auth-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.compact-input { padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; width: 160px; outline: none;
}
.compact-input:focus { border-color: #4facfe; }
.compact-btn { padding: 8px 16px; border-radius: 6px; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block;
text-align: center; transition: all 0.2s; }
.btn-white { background-color: #ffffff; border: 1px solid #cbd5e1; color: #444; }
.btn-white:hover { background-color: #f8fafc;
}
.btn-blue { background-color: #4ea8ff; border: 1px solid #4ea8ff; color: #ffffff; font-weight: bold; }
.btn-blue:hover { background-color: #3b9aee; }
#auth-error-msg { color: #e74c3c;
font-size: 13px; font-weight: bold; width: 100%; text-align: right; margin-top: -10px;
}

/* --- 指数計算アプリ用デザイン --- */
/* コントロールボタン周り */
.controls {
  width: 100%;
  max-width: 1250px; /* 問題エリアと同じ最大幅に設定 */
  margin: 0 auto 25px auto; /* 中央寄せにしつつ、下に25pxの余白 */
  box-sizing: border-box; /* paddingを含めて幅を計算させる（はみ出し防止） */
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  gap: 15px;
}
.btn-primary, .btn-secondary, .btn-submit {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  color: white;
  border: none;
  border-radius: 5px;
  transition: background 0.2s;
}
.btn-primary { background-color: #2c3e50; }
.btn-primary:hover { background-color: #1a252f;
}
.btn-secondary { background-color: #7f8c8d; }
.btn-secondary:hover { background-color: #636e72; }
.btn-submit { background-color: #e67e22; margin-left: 10px; }
.btn-submit:hover { background-color: #d35400;
}

/* ダッシュボード（左右配置） */
.main-dashboard {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 1250px;
  margin: 0 auto;
}

svg {
  background-color: white;
  border: 1px solid #ccc;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

/* プルダウンツールエリア */
.eval-tool-container {
  flex: 1;
  min-width: 400px;
  background: #ffffff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border: 1px solid #e1e8ed;
}

.eval-tool-title {
  text-align: center;
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 25px;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 15px;
  font-size: 18px;
  font-weight: bold;
}

.eval-form-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed #ecf0f1;
}
.eval-form-group:last-child {
  border-bottom: none;
}

/* 項目名 */
.eval-form-label {
  flex: 1;
  font-weight: bold;
  color: #000000;
  font-size: 16px;
  padding-right: 10px;
}

.eval-form-control {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: flex-end;
}

/* プルダウンメニュー */
.eval-select {
  padding: 8px 12px;
  border: 1px solid #bdc3c7;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 500;
  min-width: 180px;
  background-color: #f8f9fa;
  cursor: pointer;
  color: #000000;
  outline: none;
  transition: border-color 0.3s;
}
.eval-select:focus {
  border-color: #3498db;
  background-color: #fff;
}

.eval-result-box {
  width: 70px;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
}

.eval-result-val {
  font-size: 18px;
  font-weight: bold;
  color: #e67e22;
  font-family: monospace;
}

.eval-unit {
  font-size: 13px;
  color: #7f8c8d;
}

@media (max-width: 1100px) {
  .eval-tool-container { min-width: 100%;
  }
}
@media (max-width: 600px) {
  .eval-form-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .eval-form-control {
    width: 100%;
    justify-content: space-between;
  }
  .eval-select {
    flex: 1;
    min-width: auto;
  }
}

/* 計算パネル */
.calc-panel {
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 25px;
  width: 100%;
  max-width: 1250px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin: 30px auto 0;
}
.calc-panel h3 {
  margin-top: 0;
  border-bottom: 2px solid #2c3e50;
  padding-bottom: 5px;
  color: #2c3e50;
}

#quiz-area {
  margin-bottom: 15px;
  padding: 15px;
  background-color: #e8f6f3;
  border-radius: 8px;
  border: 1px solid #1abc9c;
}
#quiz-area input {
  font-size: 16px;
  padding: 8px;
  width: 120px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.calc-step {
  margin-bottom: 20px;
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 5px;
  font-size: 15px;
  line-height: 1.8;
  border-left: 4px solid #3498db;
}
.calc-step strong { color: #c0392b; }
.calc-formula {
  background-color: #ecf0f1;
  padding: 8px 12px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 15.5px;
  margin: 5px 0 15px 0;
}
.final-result {
  font-size: 20px;
  font-weight: bold;
  color: #c0392b;
  text-align: center;
  margin-top: 15px;
  background-color: #fdebd0;
  padding: 15px;
  border-radius: 5px;
}

/* SVG内テキスト */
.dimension-text {
  font-family: sans-serif;
  font-size: 19px;
  font-weight: bold;
  fill: #222;
}
.rosenka-text {
  font-family: sans-serif;
  font-size: 24px; 
  font-weight: bold;
  fill: #222; 
  letter-spacing: 2px;
}
.title-text {
  font-family: sans-serif;
  font-size: 20px;
  font-weight: bold;
}
rect, line, text, polygon, path { transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); }