@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f7fafc;
    color: #2d3748;
}

/* レスポンシブ対応：スマホ横向きで両端に広げる */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ボタンの共通スタイル */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.btn:active {
    transform: translateY(0);
}

.btn-primary { background-color: #4299e1; }
.btn-primary:hover { background-color: #3182ce; }
.btn-secondary { background-color: #a0aec0; }
.btn-secondary:hover { background-color: #718096; }
.btn-success { background-color: #48bb78; }
.btn-success:hover { background-color: #38a169; }
.btn-danger { background-color: #f56565; }
.btn-danger:hover { background-color: #e53e3e; }
.btn-warning { background-color: #ed8936; }
.btn-warning:hover { background-color: #dd6b20; }
.btn-info { background-color: #4fd1c5; }
.btn-info:hover { background-color: #38b2ac; }
.btn-twitter { background-color: #1DA1F2; }
.btn-twitter:hover { background-color: #0c85d0; }
.btn-line { background-color: #06C755; }
.btn-line:hover { background-color: #05a546; }

/* テーブルのスタイル */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* iOSでのスムーズスクロール */
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background-color: #edf2f7;
    font-weight: bold;
    text-align: left;
}

th, td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* スライダーのつまみスタイル */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #4299e1;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -6px;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #4299e1;
  border-radius: 50%;
  cursor: pointer;
}

input[type="range"]::-ms-thumb {
  width: 20px;
  height: 20px;
  background: #4299e1;
  border-radius: 50%;
  cursor: pointer;
}

/* スライダーのトラック（溝）のスタイル */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 5px;
  outline: none;
}

/* カラーピッカーのスタイル調整 */
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}
input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

/* フォーカス可視化（キーボード操作に配慮） */
:focus {
  outline: none;
}
:focus-visible, .btn:focus {
  outline: 3px solid rgba(66,153,225,0.35);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(66,153,225,0.12);
}

/* アニメーション抑制を尊重 */
@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, .btn:active {
    transition: none;
  }
}

/* モバイルでテーブル行を見やすくする */
table td, table th {
  word-break: break-word;
  white-space: normal;
  line-height: 1.4;
}

/* range の進捗色（Chrome/Safari 用）*/
input[type="range"] {
  background: linear-gradient(90deg, #4299e1 var(--range-percent, 50%), #e2e8f0 0%);
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 5px;
}

/* print: 不要な操作部を非表示にして表を見やすく */
@media print {
  .btn, #actions, textarea, .sr-only { display: none !important; }
  body { background: #fff; color: #000; }
  table { width: 100%; font-size: 12pt; }
}

/* 高コントラスト補助（OS設定検出） */
@media (prefers-contrast: more) {
  body { color: #0f172a; background-color: #fff; }
  th { background-color: #e6eef7; }
}

/* カラーピッカー周りのフォーカス */
input[type="color"]:focus-visible {
  outline: 3px solid rgba(0,0,0,0.12);
  outline-offset: 2px;
  border-radius: 50%;
}