:root {
  --green: #2e7d32;
  --gray: #777;
  --red: #c62828;
  --bg: #f5f7f5;
  --line: #ddd;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
  background: var(--bg);
  color: #222;
}
.app-header {
  background: var(--green);
  color: #fff;
  padding: 12px 16px;
  font-weight: bold;
  font-size: 16px;
}
#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.subhead {
  font-weight: bold;
  margin: 8px 0;
}
label {
  display: block;
  margin: 10px 0 4px;
  font-size: 14px;
}
input, select, textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 16px;
}
.btn {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  margin-top: 12px;
  cursor: pointer;
}
.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-sub {
  background: #eee;
  color: #333;
}
.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.url-box {
  background: #f0f0f0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  word-break: break-all;
}
.notice {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 6px;
  padding: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}
.hidden {
  display: none !important;
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
}
table.scorecard {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 10px;
}
table.scorecard th, table.scorecard td {
  border: 1px solid var(--line);
  padding: 4px 2px;
  text-align: center;
}
table.scorecard td:first-child, table.scorecard th:first-child {
  text-align: left;
  white-space: nowrap;
}
.hole-grid input {
  width: 36px;
  padding: 4px;
  text-align: center;
}
/* OCR確認の編集グリッド: OUT/IN 2段・ホール番号ラベル付き（スマホ幅対応） */
.hole-half {
  margin: 8px 0;
}
.hole-half-label {
  font-size: 12px;
  font-weight: bold;
  color: var(--gray);
  margin-bottom: 2px;
}
.hole-row {
  display: flex;
  gap: 2px;
}
.hole-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hole-num {
  font-size: 10px;
  color: var(--gray);
}
.hole-cell input {
  width: 100%;
  min-width: 0;
  padding: 6px 2px;
  text-align: center;
  font-size: 15px;
}
.rank-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.error-box {
  background: #ffebee;
  border: 1px solid #ef9a9a;
  border-radius: 8px;
  padding: 16px;
}
