/* iPhone向け最適化CSS */

/* フォント最適化 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  background: #f7f7f7;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.5;
}

/* タップ領域を広く */
input, select, textarea, button {
  width: 100%;
  padding: 14px;
  margin: 8px 0;
  border-radius: 12px;
  border: 1px solid #ccc;
  font-size: 17px;
  -webkit-appearance: none;
}

/* ボタン */
button {
  background: #2456c5;
  color: #fff;
  border: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
}

button:active {
  opacity: 0.7;
}

/* カードUI */
.box {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* 見出し */
h1 {
  font-size: 22px;
  margin-bottom: 16px;
  font-weight: 700;
}

h2 {
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 600;
}

/* ナビゲーション */
nav a {
  display: block;
  padding: 16px;
  background: #fff;
  margin-bottom: 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* iPhoneのズーム誤爆防止 */
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  font-size: 16px;
}

/* スクロール最適化 */
html, body {
  -webkit-overflow-scrolling: touch;
}

/* PWA時の余白調整 */
@supports(padding: max(0px)) {
  body {
    padding-top: max(env(safe-area-inset-top), 16px);
    padding-bottom: max(env(safe-area-inset-bottom), 16px);
  }
}

/* ===== 共通ヘッダー ===== */

.app-header {
  background: #fff;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  /* position: sticky;
  top: 0;
  z-index: 10;*/
}

.app-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* iPhone で押しやすい縦ナビ */
.app-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-nav a {
  display: block;
  padding: 14px;              /* ← 44px 以上のタップ領域 */
  background: #f2f4ff;
  border-radius: 8px;
  text-decoration: none;
  color: #2456c5;
  font-size: 16px;
  text-align: center;
}

/* 押したときのフィードバック */
.app-nav a:active {
  background: #dfe4ff;
}

footer {
  text-align: center;
  padding: 32px 0;
  font-size: 0.85rem;
  color: #777;
}

