* { margin: 0; padding: 0; box-sizing: border-box; }
button { touch-action: manipulation; }
.hidden { display: none !important; }

body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ─── Header ─── */
header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 0;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.logo {
  font-size: 1.2rem;
  font-weight: bold;
  color: #1a73e8;
  text-decoration: none;
}

/* ─── Main ─── */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* ─── Hero ─── */
.hero { text-align: center; margin-bottom: 1.5rem; }
.hero-icon { font-size: 2.8rem; margin-bottom: .4rem; }
h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: .5rem; }
.description { color: #555; font-size: .95rem; line-height: 1.7; }
.description strong { color: #1a73e8; }

/* ━━━ ヒーローバッジ ━━━ */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.badge {
  display: inline-block;
  padding: 5px 13px;
  background: #dbeafe;
  color: #1e3a8a;
  border: 1.5px solid #93c5fd;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ─── Input Card ─── */
.input-card {
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid #e0e0e0;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

/* ─── 2-Column ─── */
.compare-cols {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0 1.5rem;
  margin-bottom: 1.25rem;
}
.col-divider {
  background: #e8edf5;
  border-radius: 2px;
  align-self: stretch;
}
.col-title {
  font-size: .95rem;
  font-weight: 800;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid;
}
.rent-col .col-title { color: #16a34a; border-color: #16a34a; }
.buy-col  .col-title { color: #1a73e8; border-color: #1a73e8; }

/* ─── Params ─── */
.param-item { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .95rem; }
.param-item:last-child { margin-bottom: 0; }

.param-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
}
.param-label { font-size: .82rem; font-weight: 600; color: #555; }

.param-val-wrap { display: flex; align-items: baseline; gap: .25rem; }
.param-numbox {
  width: 100px;
  text-align: right;
  border: none;
  border-bottom: 2px solid #e0e0e0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #1a73e8;
  background: transparent;
  outline: none;
  padding: 0 2px 1px;
  transition: border-color .15s;
  -moz-appearance: textfield;
}
.param-numbox::-webkit-inner-spin-button,
.param-numbox::-webkit-outer-spin-button { -webkit-appearance: none; }
.param-numbox:focus { border-bottom-color: #1a73e8; }
.param-numbox-sm { width: 64px; font-size: 1rem; }

.rent-col .param-numbox { color: #16a34a; }
.rent-col .param-numbox:focus { border-bottom-color: #16a34a; }

.param-unit { font-size: .8rem; color: #777; font-weight: 600; white-space: nowrap; }

.param-slider {
  width: 100%;
  cursor: pointer;
  height: 4px;
}
.rent-slider { accent-color: #16a34a; }
.buy-slider  { accent-color: #1a73e8; }
.common-slider { accent-color: #f59e0b; }

.param-hint { font-size: .7rem; color: #aaa; }

/* ─── Common Param ─── */
.common-param {
  border-top: 1px solid #f0f0f0;
  padding-top: 1rem;
}
.common-param .param-numbox { color: #f59e0b; }
.common-param .param-numbox:focus { border-bottom-color: #f59e0b; }
.common-param .param-label { font-size: .9rem; }

/* ─── Summary Cards ─── */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.summary-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.2rem 1.25rem;
  border: 1.5px solid #e0e0e0;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.rent-card { border-color: #bbf7d0; background: linear-gradient(135deg,#f0fdf4,#fff); }
.buy-card  { border-color: #bfdbfe; background: linear-gradient(135deg,#eff6ff,#fff); }
.diff-card { border-color: #fde68a; background: linear-gradient(135deg,#fffbeb,#fff); }

.sc-label {
  font-size: .75rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .3rem;
}
.sc-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .2rem;
}
.rent-card .sc-value { color: #16a34a; }
.buy-card  .sc-value { color: #1a73e8; }
.diff-card .sc-value { color: #d97706; }
.sc-value.win { color: #16a34a; }
.sc-value.lose { color: #dc2626; }
.sc-sub { font-size: .76rem; color: #999; line-height: 1.5; }

/* ─── Break-even Banner ─── */
.breakeven-banner {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #fff;
  border: 1.5px solid #1a73e8;
  border-radius: 10px;
  padding: .85rem 1.25rem;
  margin-bottom: 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: #1a73e8;
  box-shadow: 0 2px 8px rgba(26,115,232,.1);
}
.breakeven-icon { font-size: 1.3rem; flex-shrink: 0; }
.breakeven-banner.no-win {
  border-color: #dc2626;
  color: #dc2626;
  box-shadow: 0 2px 8px rgba(220,38,38,.1);
}
.breakeven-banner.rent-win {
  border-color: #16a34a;
  color: #16a34a;
  box-shadow: 0 2px 8px rgba(22,163,74,.1);
}

/* ─── Chart Card ─── */
.chart-card {
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #e0e0e0;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}
.chart-title { font-size: .88rem; font-weight: 700; color: #555; }
.chart-legend-inline {
  display: flex;
  align-items: center;
  font-size: .78rem;
  color: #666;
  gap: .4rem;
}
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chart-wrap { position: relative; width: 100%; }
.chart-note { font-size: .72rem; color: #aaa; margin-top: .65rem; text-align: right; }

/* ─── Monthly Compare ─── */
.monthly-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #e0e0e0;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  text-align: center;
}
.monthly-item { flex: 1; min-width: 120px; }
.monthly-label { font-size: .75rem; color: #888; margin-bottom: .2rem; }
.monthly-value { font-size: 1.35rem; font-weight: 800; }
.monthly-divider { font-size: 1.1rem; font-weight: 800; color: #ccc; }
.rent-color { color: #16a34a; }
.buy-color  { color: #1a73e8; }

/* ─── Toggle Button ─── */
.btn-toggle {
  display: block;
  width: 100%;
  padding: .65rem 1rem;
  text-align: left;
  background: #fafafa;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: background .15s;
  margin-bottom: .5rem;
}
.btn-toggle:hover { background: #f0f4ff; }

.table-wrap-outer { overflow-x: auto; margin-bottom: 1.5rem; }
.table-scroll {
  overflow-y: auto;
  max-height: 420px;
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
}

/* ─── Detail Table ─── */
.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  min-width: 600px;
}
.detail-table th {
  background: #1a73e8;
  color: #fff;
  padding: .5rem .7rem;
  text-align: right;
  font-weight: 600;
  font-size: .76rem;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.detail-table th:first-child { text-align: center; }
.detail-table td {
  padding: .42rem .7rem;
  border-bottom: 1px solid #f0f0f0;
  text-align: right;
  color: #444;
}
.detail-table td:first-child { text-align: center; color: #888; font-weight: 600; }
.detail-table tr:nth-child(even) td { background: #fafcff; }
.detail-table tr:hover td { background: #eff6ff; }
.detail-table .win-row td { background: #f0fdf4 !important; }
.detail-table .win-row td:last-child { color: #16a34a; font-weight: 700; }
.detail-table .lose-row td:last-child { color: #dc2626; }

/* ─── Disclaimer ─── */
.disclaimer {
  font-size: .78rem;
  color: #aaa;
  line-height: 1.7;
  padding: .85rem 1rem;
  background: #f5f5f4;
  border-radius: 8px;
  margin: 1rem 0;
}

/* ─── Card (info sections) ─── */
.card {
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #e0e0e0;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.card h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: .75rem; color: #333; }

/* ─── Tips ─── */
.tips-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.tip-item { display: flex; gap: .65rem; }
.tip-icon { font-size: 1.4rem; flex-shrink: 0; }
.tip-text strong { display: block; font-weight: 700; margin-bottom: .15rem; font-size: .88rem; }
.tip-text p { font-size: .8rem; color: #666; line-height: 1.55; }

/* ─── Quick Table ─── */
.table-wrap { overflow-x: auto; }
.table-note-top { font-size: .8rem; color: #aaa; margin-bottom: .75rem; }
.table-note     { font-size: .74rem; color: #bbb; margin-top: .5rem; }
.quick-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  min-width: 480px;
}
.quick-table th {
  background: #1a73e8;
  color: #fff;
  padding: .55rem .75rem;
  text-align: center;
  font-weight: 700;
  font-size: .77rem;
  white-space: nowrap;
}
.quick-table td {
  padding: .5rem .75rem;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
  font-size: .83rem;
}
.quick-table tr:nth-child(even) td { background: #fafcff; }
.quick-table tr:hover td { background: #eff6ff; }
.hl-row td { background: #eff6ff !important; font-weight: 600; }
.be-val { color: #555; }
.be-good { color: #16a34a; font-weight: 700; }
.quick-table td:first-child { text-align: left; color: #444; font-weight: 600; }

/* ─── Amazon ─── */
.amazon-card h2 { margin-bottom: .25rem; }
.amazon-note { font-size: .82rem; color: #999; margin-bottom: 1rem; }
.amazon-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.amazon-item {
  display: block;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: .9rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, box-shadow .2s, transform .1s;
}
.amazon-item:hover {
  border-color: #FF9900;
  box-shadow: 0 2px 8px rgba(255,153,0,.15);
  transform: translateY(-1px);
}
.amazon-item-icon { font-size: 1.7rem; margin-bottom: .35rem; }
.amazon-item-name { font-size: .88rem; font-weight: bold; margin-bottom: .2rem; }
.amazon-item-desc { font-size: .76rem; color: #888; line-height: 1.5; margin-bottom: .45rem; }
.amazon-item-link { font-size: .78rem; color: #FF9900; font-weight: bold; }

/* ─── Related Tools ─── */
.related-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.related-tool-item {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .85rem 1rem;
  border: 1.5px solid #e8edf5;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.related-tool-item:hover { border-color: #1a73e8; box-shadow: 0 2px 8px rgba(26,115,232,.1); }
.related-tool-icon { font-size: 1.6rem; flex-shrink: 0; }
.related-tool-item strong { display: block; font-size: .88rem; font-weight: 700; color: #1a73e8; margin-bottom: .2rem; }
.related-tool-item p { font-size: .76rem; color: #888; line-height: 1.5; margin: 0; }

/* ━━━ 活用シーン ━━━ */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
}
.scene-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem 1rem;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
}
.scene-icon { font-size: 1.7rem; flex-shrink: 0; }
.scene-body strong { display: block; font-size: .88rem; font-weight: 700; color: #1e3a8a; margin-bottom: .2rem; }
.scene-body p { font-size: .78rem; color: #4b5563; line-height: 1.55; margin: 0; }

/* ─── FAQ ─── */
.faq-list { display: flex; flex-direction: column; }
.faq-item { padding: .9rem 0; border-bottom: 1px solid #f0f0f0; }
.faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-q { font-size: .9rem; font-weight: 700; color: #1a73e8; margin-bottom: .35rem; }
.faq-a { font-size: .85rem; color: #555; line-height: 1.75; }

/* ─── Footer ─── */
footer {
  text-align: center;
  padding: 2rem;
  color: #999;
  font-size: .875rem;
}
footer a { color: #999; text-decoration: none; margin: 0 .5rem; }
footer a:hover { color: #1a73e8; }
footer p { margin-bottom: .3rem; }
.amazon-notice { font-size: .72rem; color: #bbb; margin-top: .2rem; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  h1 { font-size: 1.4rem; }
  .compare-cols { grid-template-columns: 1fr; }
  .col-divider { display: none; }
  .summary-cards { grid-template-columns: 1fr; }
  .sc-value { font-size: 1.3rem; }
  .amazon-grid { grid-template-columns: 1fr; }
  .monthly-compare { gap: .5rem; }
  .monthly-value { font-size: 1.15rem; }
  .scene-grid { grid-template-columns: 1fr; }
}
