:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  color: #243746;
  background: #f4f7f8;
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; }
.container { max-width: 960px; margin: 0 auto; padding: 48px 24px 24px; }
.page-header { margin-bottom: 32px; }
.eyebrow { color: #28766b; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
h1 { font-size: clamp(24px, 4vw, 32px); margin: 8px 0; letter-spacing: -.025em; }
.page-header p { color: #647581; margin: 0; }
h2 { margin: 0; font-size: 20px; }
.panel { padding: 28px; background: white; border: 1px solid #dde5e9; border-radius: 16px; box-shadow: 0 4px 18px #24374605; }
.panel h2 { margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.field { min-width: 0; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
label span { color: #697a84; background: #f1f4f5; font-size: 10px; padding: 2px 5px; border-radius: 4px; margin-left: 5px; }
input { width: 100%; min-width: 0; min-height: 46px; border: 1px solid #cbd6dc; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 16px; color: inherit; background: #fff; }
input::placeholder { color: #8a979f; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #7ec6b9; outline-offset: 3px; }
small { display: block; color: #697a84; font-size: 12px; margin-top: 6px; }
.form-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 28px; padding-top: 22px; border-top: 1px solid #edf0f2; }
.form-footer p { font-size: 12px; color: #697a84; margin: 0; }
button { border: 0; background: #227969; color: white; font: inherit; font-weight: 600; padding: 12px 24px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
button:hover { background: #196252; }
#status { margin: 18px 0 0; font-size: 14px; color: #227969; }
#status.error { color: #ae3535; }
.listing-section { margin-top: 36px; }
.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.count { font-size: 12px; padding: 2px 10px; border-radius: 20px; background: #e4edeb; color: #36685e; }
.empty-state { padding: 40px 20px; text-align: center; border: 1px dashed #cbd6dc; border-radius: 12px; color: #697a84; }
.empty-state p { font-weight: 600; margin: 0 0 6px; }
.empty-state span { font-size: 13px; }
.property-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.property-card { background: white; border: 1px solid #dde5e9; border-radius: 12px; padding: 22px 24px; display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; align-items: center; }
.property-card h3 { font-size: 17px; margin: 0 0 8px; overflow-wrap: anywhere; }
.record-date { font-size: 12px; color: #697a84; margin: 0; }
.price { font-size: 25px; font-weight: 700; margin: 0; color: #227969; overflow-wrap: anywhere; }
.price span { font-size: 13px; margin-left: 4px; font-weight: 500; }
.suumo-link { font-size: 13px; color: #227969; text-underline-offset: 4px; grid-column: 1 / -1; justify-self: start; }
.page-footer { text-align: center; color: #82909a; font-size: 11px; padding-top: 36px; }
[hidden] { display: none !important; }
@media (max-width: 600px) {
  .container { padding: 28px 16px 20px; }
  .panel { padding: 22px 18px; }
  .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .form-footer { flex-direction: column; align-items: stretch; gap: 14px; }
  .form-footer p { text-align: center; }
  .property-card { grid-template-columns: 1fr; padding: 20px; gap: 10px; }
  .suumo-link { grid-column: auto; }
}

.price .current-label { display: block; color: #697a84; font-size: 12px; margin: 0; }
.price-metrics { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 4px 0 0; padding: 18px 0; border-block: 1px solid #edf0f2; }
.price-metrics dt { color: #697a84; font-size: 12px; }
.price-metrics dd { margin: 4px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.history-note { grid-column: 1 / -1; margin: 0; color: #697a84; font-size: 12px; }
.record-button { grid-column: 1 / -1; justify-self: start; }
.record-form, .history-details { grid-column: 1 / -1; min-width: 0; }
.record-form { border-radius: 8px; padding: 18px; background: #f4f7f8; }
.record-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.secondary-button { background: #e4edeb; color: #36685e; }
.secondary-button:hover { background: #d4e3df; }
.record-message { color: #ae3535; font-size: 14px; margin: 12px 0 0; }
.record-message:empty { display: none; }
.history-details { border-top: 1px solid #edf0f2; padding-top: 14px; }
.history-details summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.history-details summary:focus-visible { outline: 3px solid #7ec6b9; outline-offset: 3px; }
.history-list { list-style: none; padding: 0; margin: 12px 0 0; }
.history-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #edf0f2; font-size: 14px; }
.history-list li span { font-weight: 600; overflow-wrap: anywhere; }
.history-list time { flex-shrink: 0; color: #697a84; }
@media (max-width: 600px) {
  .price-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-actions { flex-direction: column; }
}

.price-chart { grid-column: 1 / -1; min-width: 0; margin: 8px 0 0; border-top: 1px solid #edf0f2; padding-top: 18px; }
.price-chart figcaption { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.chart-scroll { overflow-x: auto; border-radius: 8px; background: #fafcfc; }
.chart-scroll:focus-visible { outline: 3px solid #7ec6b9; outline-offset: 3px; }
.chart-scroll svg { display: block; width: 100%; min-width: 540px; height: auto; }
.chart-grid { stroke: #e2e9ec; stroke-width: 1; }
.chart-axis { stroke: #a5b4bc; stroke-width: 1; }
.chart-tick, .chart-axis-label { fill: #647581; font-size: 12px; }
.chart-line { fill: none; stroke: #227969; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-point { fill: #227969; stroke: white; stroke-width: 2; }
.chart-note { font-size: 12px; color: #697a84; margin: 10px 0; overflow-wrap: anywhere; }
.chart-records { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.chart-records li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; background: #f4f7f8; padding: 8px 10px; border-radius: 6px; font-size: 12px; }
.chart-records time { color: #647581; }
.chart-records strong { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .chart-records { grid-template-columns: 1fr; }
}
