/* 履歴・レポートとiPhone入力 */
button:disabled { cursor: default; opacity: .48; }
button, input, select, summary { -webkit-tap-highlight-color: transparent; }
input, select { max-width: 100%; }
input[type="date"], input[type="month"], input[type="text"], #report-year, select { width: 100%; min-height: 48px; border: 1px solid #d3dcd1; border-radius: 10px; padding: 12px; font: inherit; font-size: 16px; background: #fbfcf9; color: #203a31; }
input[type="file"] { width: 100%; font-size: 12px; margin: 5px 0 14px; min-height: 44px; }
input[type="file"]::file-selector-button { border: 1px solid #b6c7b9; border-radius: 8px; background: #fff; padding: 10px; color: #184c3b; margin-right: 8px; }
.tabs { display: flex; gap: 5px; padding: 5px; background: #e8ebdf; border-radius: 14px; margin-bottom: 26px; }
.tabs button { flex: 1; border: 0; border-radius: 10px; background: transparent; font-weight: 650; font-size: 14px; color: #566857; padding: 12px 6px; }
.tabs button[aria-pressed="true"] { background: #184c3b; color: white; box-shadow: 0 3px 8px #184c3b18; }
.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.method { border: 0; padding: 0; margin: 0 0 24px; display: flex; gap: 8px; }
.method legend { font-size: 12px; margin-bottom: 8px; color: #657263; }
.method label { display: flex; align-items: center; gap: 5px; flex: 1; min-height: 48px; font-size: 13px; background: #f3f5ed; padding: 9px; border-radius: 8px; margin: 0; cursor: pointer; }
.method input, .check-label input { width: 18px; height: 18px; flex-shrink: 0; accent-color: #184c3b; }
.optional { color: #68756b; font-size: 10px; margin-left: 7px; }
.check-label { display: flex; gap: 10px; align-items: center; font-size: 12px; line-height: 1.8; padding: 12px; border-radius: 9px; background: #f3f1dd; margin-bottom: 18px; }
.photo-panel { border-bottom: 1px solid #ddd; padding-bottom: 20px; margin-bottom: 22px; }
.photo-panel label { font-size: 12px; }
.photo-caution { font-size: 12px; line-height: 1.8; background: #f3edd9; color: #6c5b2f; padding: 12px; border-radius: 8px; }
.photo-preview { max-width: 100%; max-height: 260px; display: block; object-fit: contain; margin: 0 auto 20px; border-radius: 8px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 180px; overflow: auto; font-size: 11px; background: #f4f4ee; padding: 10px; }
summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-size: 13px; }
.outline { border: 1px solid #adc0ad; background: transparent; color: #184c3b; padding: 11px 16px; border-radius: 10px; font-size: 13px; }
.light-button { margin-top: 30px; padding: 15px; border: 0; border-radius: 10px; background: #e4efc2; color: #184c3b; font-size: 14px; font-weight: 700; }
.rating { background: #ffffff13; padding: 10px 12px; border-radius: 8px; color: #e5efc8; font-size: 12px; margin: 16px 0 22px; }
.notice { background: #e2efdc; border: 1px solid #bed3b7; padding: 14px; border-radius: 10px; font-size: 13px; line-height: 1.7; }
.notice.error { background: #fff0ed; border-color: #e9bcb5; }
.history-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.history-card { background: white; border: 1px solid #e0e4d8; padding: 22px; border-radius: 16px; }
.history-top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 5px 10px; background: #ecece5; border-radius: 20px; }
.badge.good { color: #28512d; background: #e5efc8; }
.history-value { font-size: 34px; font-weight: 700; margin-top: 12px; font-variant-numeric: tabular-nums; }
.history-value small { font-size: 14px; font-weight: 500; }
.history-detail { font-size: 12px; line-height: 1.9; color: #5f6c62; }
.memo { font-size: 13px; line-height: 1.8; padding: 10px; background: #f5f5ee; border-radius: 6px; overflow-wrap: anywhere; }
.source { font-size: 10px; color: #6d766d; }
.record-actions { display: flex; justify-content: flex-end; gap: 12px; border-top: 1px solid #e8eadd; margin-top: 14px; }
.record-actions button { border: none; background: transparent; color: #315e49; font-size: 12px; min-width: 50px; }
.record-actions button[data-action="delete"] { color: #946447; }
.trash, .backup { margin-top: 20px; }
.trash { padding-top: 10px; padding-bottom: 10px; }
#trash-list .history-card { margin-bottom: 12px; }
h3 { font-size: 15px; margin: 0 0 12px; }
.import-label { margin-top: 22px; font-size: 12px; }
.report-controls { display: flex; gap: 14px; align-items: flex-end; margin: 20px 0 12px; }
.report-controls label { flex: 1; min-width: 0; font-size: 12px; }
.report-controls input, .report-controls select { margin-top: 8px; }
.report-hero { color: white; background: #184c3b; padding: 28px; border-radius: 20px; }
.report-hero p { color: #dde9d5; font-size: 12px; margin: 0 0 10px; }
.report-hero .badge { margin-left: 10px; }
.report-hero strong { font-size: 64px; letter-spacing: -.04em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.report-hero strong small { font-size: 18px; margin-left: 10px; font-weight: 400; }
.report-hero p:last-child { margin: 10px 0 0; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 14px 0 22px; }
.metric { padding: 22px; border-radius: 14px; background: white; border: 1px solid #e0e4d8; }
.metric > span { display: block; font-size: 11px; color: #5e715f; margin-bottom: 10px; }
.metric strong { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric small { font-size: 11px; font-weight: 400; margin-left: 5px; }
.insights { padding: 23px; background: #eaece1; border-radius: 14px; margin: 20px 0; }
.insights p { font-size: 13px; line-height: 1.9; margin: 12px 0; overflow-wrap: anywhere; }
.insights .helper { font-size: 11px; margin-bottom: 0; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart { background: #fff; border: 1px solid #e0e4d8; border-radius: 14px; padding: 20px 14px 12px; min-width: 0; }
.chart h3 { padding: 0 5px; font-size: 13px; }
.chart small { font-size: 10px; font-weight: 400; color: #5f705d; }
.chart svg { width: 100%; display: block; }
.chart text { font-size: 9px; fill: #647260; }
.table-scroll { overflow-x: auto; border-radius: 12px; background: white; padding: 12px; border: 1px solid #e0e4d8; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: 8px; font-weight: 600; }
th, td { text-align: right; padding: 12px 9px; border-bottom: 1px solid #e6e9df; }
th:first-child { text-align: left; }
thead th { color: #687863; font-size: 10px; font-weight: 500; }
.footnote { margin-top: 20px; }
.empty { padding: 35px 25px; background: #fff; border: 1px dashed #b8c4b3; border-radius: 14px; line-height: 1.9; font-size: 14px; }
@media (max-width: 640px) {
  .intro { padding: 26px 0 22px; }
  .description { font-size: 12px; }
  .tabs { position: sticky; top: 8px; z-index: 5; box-shadow: 0 3px 14px #203a3112; }
  .history-list, .charts { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .metric { padding: 18px 14px; }
  .metric strong { font-size: 22px; }
  .result-card { padding-top: 24px; }
  .report-hero strong { font-size: 58px; }
  .shell { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .shell { padding-left: 12px; padding-right: 12px; }
  .card { padding: 20px; }
  .method label { font-size: 12px; }
}
* { box-sizing: border-box; }
:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; color: #203a31; background: #f5f4ee; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; min-height: 46px; }
button:focus-visible, input:focus-visible { outline: 3px solid #c97835; outline-offset: 4px; }
.shell { width: min(960px, 100%); margin: auto; padding: 32px 28px 24px; }
.project { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 650; padding-bottom: 25px; border-bottom: 1px solid #dcded3; }
.project-mark { background: #184c3b; color: #fff; border-radius: 8px; padding: 8px 6px; font-size: 12px; }
.edition { margin-left: auto; color: #626d63; font-size: 12px; white-space: nowrap; }
.intro { padding: 35px 0 30px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; color: #546f60; font-weight: 700; margin: 0 0 15px; }
h1 { font-size: clamp(30px, 4.6vw, 43px); letter-spacing: -.035em; line-height: 1.45; margin: 0; font-weight: 750; }
.description { color: #647268; font-size: 14px; line-height: 1.9; margin: 13px 0 0; }
.workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.card { border-radius: 22px; padding: 28px; }
.input-card { background: #fff; border: 1px solid #e2e5dc; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 24px; }
h2 { font-size: 17px; margin: 0; font-weight: 650; }
.tag { font-size: 11px; background: #edf2e9; padding: 6px 9px; border-radius: 20px; color: #526b56; white-space: nowrap; }
.field { margin-bottom: 18px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.input-wrap { display: flex; align-items: center; border: 1px solid #d3dcd1; border-radius: 10px; background: #fbfcf9; }
.input-wrap:focus-within { border-color: #184c3b; }
.input-wrap input { width: 100%; min-width: 0; border: 0; border-radius: 10px; color: #203a31; background: transparent; padding: 13px 14px; font-size: 19px; font-variant-numeric: tabular-nums; }
input::placeholder { color: #87918a; font-size: 16px; }
.input-wrap > span { padding: 0 14px 0 6px; color: #647268; font-size: 13px; }
.helper { font-size: 11px; line-height: 1.7; color: #68756b; margin: 0 0 18px; }
.primary { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; border-radius: 10px; padding: 14px 18px; color: white; background: #184c3b; font-size: 14px; font-weight: 600; }
.primary:hover { background: #103b2d; }
.primary span { font-size: 20px; }
.secondary-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.secondary-actions button { background: transparent; border: 0; color: #315e49; padding: 5px 3px; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.secondary-actions .reset { color: #68756b; }
.result-card { background: #184c3b; color: #fff; display: flex; flex-direction: column; }
.result-dot { width: 8px; height: 8px; background: #d3e6a4; border-radius: 50%; }
.result-status { font-size: 12px; color: #d4e2d6; line-height: 1.8; min-height: 44px; margin: 0; }
.hero-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 19px 0 0; }
.hero-number { font-size: clamp(50px, 7vw, 76px); font-weight: 600; letter-spacing: -.04em; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; max-width: 100%; }
.hero-unit { color: #e0ebd6; font-size: 18px; }
.result-caption { font-size: 12px; color: #d4e2d6; margin: 10px 0 34px; }
.detail-result { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 23px 0; border-top: 1px solid #47705c; font-size: 12px; }
.detail-result > div { max-width: 100%; overflow-wrap: anywhere; }
.detail-result strong { font-size: 25px; font-weight: 550; font-variant-numeric: tabular-nums; }
.unit { font-size: 12px; color: #d4e2d6; padding-left: 6px; }
.result-note { font-size: 11px; color: #d3e6a4; margin: auto 0 0; padding-top: 25px; }
.error { color: #a32c22; background: #fff0ed; padding: 12px; border-radius: 8px; font-size: 13px; line-height: 1.6; }
.tip { display: flex; align-items: baseline; gap: 18px; background: #eaece1; padding: 18px 22px; margin-top: 22px; border-radius: 12px; }
.tip-label { white-space: nowrap; font-size: 12px; font-weight: 650; }
.tip p { font-size: 12px; line-height: 1.9; color: #52624f; margin: 0; }
footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: 10px; color: #68756b; }
[hidden] { display: none !important; }
@media (max-width: 640px) {
  .shell { padding: 20px 18px; }
  .project { font-size: 11px; gap: 8px; padding-bottom: 18px; }
  .edition { font-size: 10px; }
  .intro { padding: 28px 0 24px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .card { padding: 24px; border-radius: 18px; }
  .hero-number { font-size: 64px; }
  .hero-result { margin-top: 8px; }
  .result-caption { margin-bottom: 28px; }
  .tip { display: block; padding: 18px; margin-top: 16px; }
  .tip p { margin-top: 7px; }
  footer { flex-direction: column; gap: 8px; }
}
