/**
 * main.css - DeepTri-Drill図面アプリケーション用スタイルシート
 */

/* リセットとベーススタイル */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif; /* 規定フォント優先 */
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}

/* 規定フォント一括適用 */
body, h1, h2, h3, .header, .span, .footer {
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

/* ヘッダー */
header {
  position: relative;
  background-color: #f5f5f5;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#page-title {
  font-size: 24px;
  color: #2c3e50;
  margin-bottom: 5px;
}

#page-description {
  font-size: 14px;
  color: #7f8c8d;
}

/* 言語切り替え（ヘッダー外・上部に配置） */
.language-switcher {
  position: static; /* フロー内配置 */
  display: flex;
  gap: 6px;
  justify-content: flex-end; /* 右寄せ */
  margin-bottom: 10px; /* タイトル枠との間隔 */
}

.lang-btn {
  padding: 5px 10px;
  font-size: 0.9em;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  background-color: #e0e0e0;
}

.lang-btn.active {
  background-color: #4CAF50;
  color: white;
  font-weight: bold;
  border-color: #3e8e41;
}

/* メインコンテンツレイアウト */
.main-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.input-section {
  flex: 1;
  min-width: 300px;
  background-color: white;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.output-section {
  flex: 2;
  min-width: 450px;
  background-color: white;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 見出し */
h2 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #2c3e50;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

h3 {
  font-size: 18px;
  margin: 15px 0 10px;
  color: #2c3e50;
}

/* フォーム要素 */
.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #444;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

/* ドライバー選択: 横並びレイアウト */
.driver-selector-group .driver-select-row {
  display: grid;
  grid-template-columns: 280px 1fr; /* 左: 狭幅 / 右: プレビュー */
  gap: 16px;
  align-items: start;
}

.driver-select-panel label {
  margin-bottom: 6px;
}

/* カスタムドライバーリスト */
.driver-list {
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: 260px;
  overflow: auto;
  background: #fff;
}
.driver-list-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.2;
}
.driver-list-item:hover,
.driver-list-item[aria-selected="true"] {
  background: #f0f6ff;
}
.driver-list-item .code {
  font-weight: 600;
  margin-right: 6px;
}
.driver-list-item .range {
  color: #666;
  font-size: 12px;
}

/* プレビュー側 */
.driver-preview-panel {
  border: 1px dashed #ddd;
  border-radius: 4px;
  min-height: 220px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}
.driver-preview-panel img#driver-preview-image {
  max-width: 100%;
  width: 50%; /* 画像を現在の半分の大きさで表示（枠幅は維持） */
  height: auto;
  object-fit: contain;
}
.driver-preview-panel .driver-info {
  margin-top: 6px;
  color: #333;
  font-size: 14px;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: #4CAF50;
  outline: none;
  box-shadow: 0 0 3px rgba(76, 175, 80, 0.3);
}

.radio-group {
  display: flex;
  gap: 15px;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.radio-label input {
  margin-right: 5px;
}

/* ボタン */
.actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

button {
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#calculate-btn {
  background-color: #4CAF50;
  color: white;
}

#calculate-btn:hover {
  background-color: #3e8e41;
}

#reset-btn {
  background-color: #f44336;
  color: white;
}

#reset-btn:hover {
  background-color: #d32f2f;
}

/* セクションコンテナ - 統一版 */
.section-container {
  margin-bottom: 25px;
  padding: 15px;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
}

.section-title {
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 1.1em;
  font-weight: 600;
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #3498db;
}

/* 図面プレビュー関連 */
.drawing-section {
  margin-top: 30px;
}

#drawing-canvas {
  border: 1px solid #ccc;
  background-color: #f8f8f8;
  max-width: 100%;
  height: auto;
}

.drawing-info {
  margin-top: 15px;
}

/* 寸法データと注記表示 */
#dimensions-data,
#notes-container,
#parts-list-container {
  margin-bottom: 20px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #eee;
}

/* テーブル */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

th, td {
  padding: 8px;
  border: 1px solid #ddd;
  text-align: left;
}

th {
  background-color: #f5f5f5;
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* ローダー */
.loader {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-radius: 50%;
  border-top: 3px solid #3498db;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* エラー表示関連のスタイル */
.has-error {
  border-color: #f44336 !important;
  background-color: #fff8f8;
}

.has-error:focus {
  box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.25);
  outline: none;
}

.field-error-message {
  color: #d32f2f;
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 8px;
  animation: fadeIn 0.3s ease;
}

.error-display {
  padding: 10px 15px;
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
  border-radius: 4px;
  margin: 10px 0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 計算中インジケーター (例: body全体を少し暗くしてスピナー表示) */
body.calculating::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7); /* 半透明の白 */
  z-index: 10000; /* 他の要素より手前に */
  display: flex;
  justify-content: center;
  align-items: center;
  /* スピナーアニメーション (簡単な例) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 50 50'%3E%3Cpath fill='%23007bff' d='M25,5 A20,20 0 0,1 45,25 A20,20 0 0,1 25,45 A20,20 0 0,1 5,25 A20,20 0 0,1 25,5 M25,1 A24,24 0 0,0 1,25 A24,24 0 0,0 25,49 A24,24 0 0,0 49,25 A24,24 0 0,0 25,1 Z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* 計算中はフォーム操作を禁止 (任意) */
body.calculating #input-form {
  pointer-events: none;
  opacity: 0.8;
}

/* タブナビゲーションボタン */
.tab-nav-btn {
  display: block;
  margin: 10px 0;
  padding: 10px 15px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  width: 100%;
  text-align: center;
}

.tab-nav-btn:hover {
  background-color: #45a049;
}

/* BOM表のスタイル強化 - 既存のものは保持したまま追加 */
.bom-section .bom-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.9em;
}

.bom-section .bom-table th,
.bom-section .bom-table td {
  padding: 8px;
  border: 1px solid #ddd;
  text-align: left;
}

.bom-section .bom-table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

/* 偶数行の背景色 */
.bom-section .bom-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* ホバー効果 */
.bom-section .bom-table tr:hover {
  background-color: #f1f1f1;
}

/* 図面タブ内のセクション間の間隔を改善 */
#drawing-tab .output-section,
#drawing-tab .dimensions-section,
label .range-hint {
  color: #666;
  font-size: 0.9em;
  margin-left: 4px;
}

#drawing-tab .driver-section,
#drawing-tab .notes-section,
#drawing-tab .bom-section {
  margin-bottom: 25px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

/* 開発用結果タブを簡単に非表示にするためのフラグクラス */
.hide-dev-results #dev-results-panel { display: none !important; }
.hide-dev-results .tab-buttons { display: none !important; }

/* セクションタイトル（■付き見出し）のスタイル改善 */
#drawing-tab h4 {
  margin-top: 10px;
  margin-bottom: 15px;
  padding: 5px;
  background-color: #f8f9fa;
  border-left: 4px solid #007bff;
}

/* テーブルのスタイル改善 */
#drawing-tab table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
}

#drawing-tab table th,
#drawing-tab table td {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
}

#drawing-tab table th {
  background-color: #f8f9fa;
  text-align: left;
  width: 30%;
}

/* BOMテーブル特有のスタイル */
#drawing-tab .bom-table th {
  background-color: #e9ecef;
}

/* 注記リストのスタイル */
#drawing-tab .notes-list {
  padding-left: 20px;
}

#drawing-tab .notes-list li {
  margin-bottom: 8px;
}

/* 図面プレビュー関連のスタイル強化 - 既存のスタイルを置き換え */
.drawing-preview-container {
  position: relative;
  z-index: 2;
  background-color: white;
  padding: 15px;
  margin: 0 0 30px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 100%;
  display: block !important; /* 強制的に表示 */
}

#drawingCanvas {
  border: 3px solid #333; /* 太めの枠線 */
  background-color: #ffffff;
  max-width: 100%;
  height: auto;
  display: block !important;
  margin: 0 auto;
  position: relative;
  z-index: 3;
  /* アスペクト比を確実に保持 */
  aspect-ratio: 900 / 636;
  object-fit: contain;
  /* レスポンシブ対応 */
  width: auto;
  max-height: 70vh;
}

/* ドリル図面表示の最適化 */
.drawing-output {
  margin-top: 20px;
  text-align: center;
}

.drawing-output img {
  max-width: 90%;
  height: auto;
  border: 1px solid #ddd;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin: 0 auto;
}

/* BOMテーブルの周りの余白を調整 */
#drawing-tab .bom-section {
  margin-top: 30px;
}

/* ドライバープレビュー表示エリアのスタイル */
.driver-preview-container {
  margin: 15px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  text-align: center;
  min-height: 150px;
  position: relative;
  overflow: visible; /* はみ出る部分も表示 */
}

#driver-preview {
  position: relative;
  z-index: 1;
}

/* ドライバー画像のホバーエフェクト強化 - 拡大率3倍に増加 */
#driver-preview-image {
  cursor: zoom-in;
  transition: all 0.4s ease; /* トランジション時間を長めに */
  max-width: 200px;
  display: block;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  transform-origin: center center; /* 中央から拡大 */
}

/* ホバー時の拡大効果を3倍に - !important で確実に適用 */
#driver-preview-image:hover {
  transform: scale(3.0) !important; /* 3倍に拡大 */
  box-shadow: 0 0 25px rgba(0, 123, 255, 0.8) !important;
  z-index: 100 !important; /* 他の要素より前面に */
}

/* ドライバープレビューコンテナの調整 - オーバーフローを許可 */
.driver-preview-container {
  margin: 15px 0;
  padding: 20px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  text-align: center;
  min-height: 180px; /* 少し高さを増加 */
  position: relative;
  overflow: visible !important; /* 拡大された画像がはみ出るよう設定 */
}

/* プレビュー要素の位置調整 - 拡大スペースを確保 */
#driver-preview {
  position: relative;
  z-index: 1;
  margin: 30px 0; /* 上下のマージンを増やして拡大スペースを確保 */
}

/* 旧 driver-info 削除: 新しい右上オーバーレイ */

/* オーバーレイ情報 */
#driver-preview .driver-overlay-info {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  backdrop-filter: blur(2px);
  max-width: 46%;
  line-height: 1.25;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
}

#driver-preview .driver-overlay-info .driver-code-line {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

#driver-preview .driver-overlay-info .driver-range-line {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  opacity: .95;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

#driver-preview-image:hover ~ .driver-overlay-info {
  transform: scale(1.06);
  opacity: 1;
}

/* ===== モバイル最適化 (幅 <= 640px) ===== */
@media (max-width: 640px) {
  /* オーバーレイを下部中央へ移動し、横幅を広げて折返し */
  #driver-preview .driver-overlay-info {
    top: auto;
    bottom: 4px;
    right: 50%;
    transform: translateX(50%);
    max-width: 88%;
    font-size: 14px; /* ベースやや縮小 */
    padding: 6px 10px;
    line-height: 1.3;
    text-align: center;
  }
  #driver-preview .driver-overlay-info .driver-code-line {
    font-size: 14px;
    margin-bottom: 2px;
  }
  #driver-preview .driver-overlay-info .driver-range-line {
    font-size: 12px;
  }
  /* モバイルでは過度な拡大を抑制 */
  #driver-preview-image:hover {
    transform: scale(2.1) !important; /* 3.0 -> 2.1 */
  }
  #driver-preview-image:hover ~ .driver-overlay-info {
    transform: translateX(50%) scale(1.0); /* 強調スケールを抑制 */
  }
}

/* ドライバー詳細ツールチップのスタイル（簡素化バージョン） */
.driver-tooltip {
  position: absolute;
  background-color: rgba(50, 50, 50, 0.95);
  color: white;
  padding: 10px 15px;
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  width: auto;
  min-width: 180px;
  z-index: 1000;
  font-size: 13px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
  pointer-events: none;
  text-align: center;
}

.driver-tooltip.active {
  opacity: 1;
  visibility: visible;
}

.driver-tooltip h4 {
  margin-top: 0;
  margin-bottom: 6px;
  color: #4dabf7;
  font-size: 15px;
  text-align: center;
}

.diameter-range-info {
  margin: 0;
}

.diameter-range-info strong {
  color: #fff;
  font-weight: normal;
  margin-right: 5px;
}

/* ホバー対象であることを示すスタイル */
#driver-preview-image {
  cursor: pointer;
  transition: all 0.2s ease;
}

#driver-preview-image:hover {
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

/* ドライバー画像拡大モーダルのスタイル */
.driver-image-modal {
  display: none;
  position: fixed;
  z-index: 1100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.driver-image-modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.modal-content {
  position: relative;
  background-color: #fefefe;
  margin: auto;
  padding: 0;
  border: 1px solid #888;
  border-radius: 6px;
  width: 80%;
  max-width: 800px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.driver-image-modal.show .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 15px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  border-radius: 6px 6px 0 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #343a40;
}

.modal-body {
  padding: 20px;
  text-align: center;
}

.modal-driver-info {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
  text-align: left;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover,
.modal-close:focus {
  color: #cc0000;
  text-decoration: none;
}

#modal-driver-image {
  max-width: 100%;
  max-height: 400px;
  border: 1px solid #dee2e6;
  padding: 5px;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* クリック可能なドライバー画像を示すスタイル強化 */
#driver-preview-image {
  cursor: zoom-in;
  transition: all 0.2s ease;
}

#driver-preview-image:hover {
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.6);
  transform: scale(1.05);
}

/* モバイル向けレイアウト調整 */
@media (max-width: 768px) {
  /* ヘッダー内で言語切替がタイトルに重ならないようフロー内配置に */
  .language-switcher {
    position: static;
    top: auto;
    right: auto;
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
  }

  .app-header h1 {
    font-size: 20px;
    line-height: 1.3;
  }

  .app-header .app-description {
    font-size: 13px;
  }

  /* ドライバー選択とプレビューを縦積みに */
  .driver-selector-group .driver-select-row {
    display: block;
  }

  .driver-preview-panel {
    margin-top: 12px;
  }

  /* ドライバー画像の拡大が画面外に溢れすぎないよう控えめに */
  #driver-preview-image:hover {
    transform: scale(2.0) !important;
  }
}

/* ==============================
   Tungaloy Global Header/Footer
   ============================== */
.tungaloy-global-header {
  width: 100%;
  background: #2b2b2b;
  color: #fff;
  border-bottom: 3px solid #900; /* brand accent */
  font-family: 'Helvetica Neue', Arial, sans-serif;
}
.tg-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.tg-brand-block { display:flex; align-items:center; gap:18px; }
.tg-logo { width:120px; height:auto; display:block; }
.tg-app-meta { line-height:1.2; }
.tg-app-title { font-size:20px; margin:0; font-weight:600; color:#fff; }
.tg-app-sub { font-size:12px; margin:2px 0 0; color:#ddd; }

.tg-utility { margin-left:auto; display:flex; align-items:center; gap:16px; }
.tg-lang-switch { display:inline-flex; border:1px solid #555; border-radius:6px; overflow:hidden; }
.tg-lang-btn { background:#2b2b2b; color:#ccc; padding:6px 12px; font-size:12px; border:none; cursor:pointer; letter-spacing:0.5px; }
.tg-lang-btn.active, .tg-lang-btn[aria-pressed="true"] { background:#900; color:#fff; font-weight:600; }
.tg-lang-btn:hover { background:#444; color:#fff; }
.tg-version { font-size:11px; color:#bbb; background:#444; padding:4px 8px; border-radius:4px; }

/* Footer */
.tungaloy-global-footer { background:#2b2b2b; color:#fff; margin-top:60px; font-size:13px; }
.tg-footer-inner { max-width:1280px; margin:0 auto; padding:24px 24px 40px; }
.tg-footer-top { display:flex; flex-wrap:wrap; align-items:center; gap:24px; border-bottom:1px solid #444; padding-bottom:12px; margin-bottom:16px; }
.tg-footer-links { display:flex; gap:28px; flex-wrap:wrap; }
.tg-footer-links a { color:#fff; text-decoration:none; position:relative; padding:4px 0; }
.tg-footer-links a:after { content:''; position:absolute; left:0; bottom:0; height:2px; width:0; background:#900; transition:width .25s ease; }
.tg-footer-links a:hover:after { width:100%; }
.tg-footer-links a:hover { color:#ffefe6; }
.tg-footer-version { font-size:12px; color:#ccc; background:#444; padding:4px 8px; border-radius:4px; }
.tg-footer-bottom { line-height:1.4; }
.tg-copy { margin:0 0 6px; font-weight:600; letter-spacing:0.5px; }
.tg-disclaimer { margin:2px 0; font-size:11px; color:#ccc; }

/* Simplified footer variant */
.footer-simple .tg-footer-inner.simple { padding:40px 24px 34px; text-align:center; }
.footer-simple .tg-footer-links.simple { justify-content:center; gap:140px; font-size:11px; letter-spacing:0.5px; font-family: 'Roboto','Helvetica Neue',Arial,sans-serif; }
.footer-simple .tg-footer-links.simple a { font-weight:500; color:#efefef; text-transform:uppercase; }
.footer-simple .tg-footer-links.simple a:after { display:none; }
.footer-simple .tg-footer-links.simple a:hover { color:#fff; }
.footer-simple .tg-copy.minimal { margin-top:22px; font-size:10px; letter-spacing:0.8px; color:#b5b5b5; text-transform:uppercase; }
.footer-simple .tg-footer-inner.simple nav { margin-bottom:4px; }

/* Optional: hide disclaimers globally when present */
.tg-disclaimers-hidden .tg-disclaimer { display:none !important; }

@media (max-width: 900px) {
  .footer-simple .tg-footer-links.simple { gap:60px; }
}
@media (max-width: 640px) {
  .footer-simple .tg-footer-links.simple { gap:28px; }
}
@media (max-width: 480px) {
  .footer-simple .tg-footer-links.simple { flex-direction:column; gap:10px; }
  .footer-simple .tg-copy.minimal { margin-top:14px; }
}

/* Layout helpers when embedding header/footer */
body.with-global-header { padding-top:10px; }
body.with-global-footer { padding-bottom:160px; }

@media (max-width: 860px) {
  .tg-app-title { font-size:17px; }
  .tg-header-inner { flex-wrap:wrap; gap:16px; }
  .tg-utility { width:100%; justify-content:flex-end; }
  .tg-footer-links { gap:16px; }
}

@media (max-width: 520px) {
  .tg-logo { width:95px; }
  .tg-app-title { font-size:16px; }
  .tg-app-sub { font-size:11px; }
  .tg-lang-btn { padding:5px 10px; }
  .tg-footer-inner { padding:20px 16px 32px; }
  .tg-footer-top { flex-direction:column; align-items:flex-start; gap:12px; }
  .tg-footer-links { flex-direction:column; gap:8px; }
}
