@charset "UTF-8";
:root {
  --ink: #203a34; --green: #176238; --muted: #536760; --line: #d7e1dc;
  --paper: #f4f7f6; --wash: #edf5f1; --amber: #765118; --red: #a23529;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 100%; line-height: 1.75; color: var(--ink); background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden]{display:none!important}
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
a { color: var(--green); text-underline-offset: .25em; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
:is(button,a,input,select,textarea,summary):focus-visible { outline: 3px solid #b87b06; outline-offset: 3px; }
h1,h2,h3,p { margin-top: 0; }
h1 { font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.5; margin-bottom: .5rem; }
h2 { font-size: 1.25rem; line-height: 1.6; margin-bottom: 1.25rem; }
h3 { font-size: 1.0625rem; line-height: 1.65; margin-bottom: .5rem; }
p { margin-bottom: 1rem; }
small,.small { font-size: .875rem; }
.muted { color: var(--muted); }
.skip { position: fixed; top: -100px; padding: 1rem; background: white; z-index: 20; }
.skip:focus { top: 0; }
.app-header { padding:1.1rem clamp(1rem,4vw,3rem); background:white; border-top:5px solid #07a33e; border-bottom:1px solid var(--line); }
.brand-header-inner { max-width:1240px; margin:auto; display:flex; align-items:center; justify-content:space-between; gap:2rem; }
.brand-logo-link { display:block; width:min(500px,52%); flex-shrink:0; }
.agefree-logo { display:block; width:100%; height:auto; }
.brand-meta { display:flex; flex-direction:column; align-items:flex-end; gap:.4rem; }
.benefit-label { font-size:.8125rem; color:var(--green); font-weight:650; }
.release-strip { background:#edf7ee; color:var(--muted); padding:.45rem clamp(1rem,4vw,3rem); text-align:center; font-size:.75rem; }
.release-strip time { color:var(--green); font-weight:650; }
.feedback-note { max-width:1040px; margin:0 auto 1.5rem; padding:1.4rem 1.6rem; border:1px solid #cce2cb; border-left:4px solid #07a33e; border-radius:12px; background:#f0f7eb; }
.feedback-note strong { color:var(--green); font-size:1rem; }
.feedback-note p { color:var(--muted); font-size:.9375rem; margin:.5rem 0 0; }
.app-header .brand-nav-link { padding:.3rem .8rem; border-radius:8px; background:#f0f7ee; color:var(--green); }
.app-header .brand-nav-link:hover { background:#dcefdc; }
.feedback-note { width:calc(100% - 2rem); }
@media(max-width:50rem) {
 .brand-header-inner { flex-direction:column; align-items:stretch; gap:.65rem; }
 .brand-logo-link { width:min(500px,100%); margin:0 auto; }
 .brand-meta { flex-direction:row; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.25rem .75rem; }
 .app-header .brand-meta nav { margin-left:0; gap:.5rem; }
 .benefit-label { font-size:.75rem; }
 .feedback-note { padding:1.15rem; }
}
.brand { display: flex; gap: .75rem; align-items: center; text-decoration: none; font-size: .875rem; line-height: 1.3; font-weight: 700; }
.brand img { flex-shrink: 0; }
.brand-pocket { display: block; font-size: 1.25rem; letter-spacing: .06em; }
.beta { font-size: .8125rem; color: var(--muted); white-space: nowrap; padding: .15rem .5rem; border: 1px solid var(--line); border-radius: 5px; }
.app-header nav { margin-left: auto; display: flex; gap: 1.5rem; align-items: center; }
.app-header nav a { text-decoration: none; font-size: .9375rem; font-weight: 650; min-height: 44px; display: inline-flex; align-items: center; }
.review-link { padding: .5rem .875rem; border: 1px solid #b7c9c0; border-radius: 8px; }
.app-layout { max-width: 1240px; margin: 0 auto; min-height: calc(100vh - 164px); }
.sidebar { display: none; }
main { min-width: 0; padding: 2.5rem 2.5rem 3rem; outline: none; }
body[data-page="home"] .app-layout { max-width: 1120px; }
body[data-page="review"] .app-layout,body[data-page="about"] .app-layout { max-width: 1080px; }
.intro { position:relative; overflow:hidden; margin-bottom:1.75rem; padding:clamp(1.25rem,3vw,2rem); border-radius:18px; border:1px solid #d2e8d3; background:linear-gradient(115deg,#e7f5e4 0%,#f7fbf3 60%,#fff 100%); }
.intro::after { content:''; position:absolute; width:170px; height:170px; border:22px solid rgba(7,163,62,.055); border-radius:50%; right:-65px; bottom:-65px; pointer-events:none; }
.intro > * { position:relative; z-index:1; }
.intro .eyebrow { color:var(--green); font-weight:700; letter-spacing:.04em; }
.intro p { color: var(--muted); margin: 0; }
.search-wrap { display:block; position: relative; margin-bottom: 1rem; }
.search-wrap svg { position: absolute; width: 22px; height: 22px; top: 18px; left: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; pointer-events: none; }
.search-wrap input { padding-left: 3.25rem; min-height: 58px; }
.filter-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.chip { padding: .5rem 1rem; min-height: 46px; font-size: .875rem; line-height: 1.5; color: var(--muted); border: 1px solid var(--line); background: #fff; border-radius: 8px; }
.chip.active { color: #fff; background: var(--green); border-color: var(--green); }
.list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: .875rem; margin-bottom: .75rem; color: var(--muted); }
.list-heading strong { font-size: 1rem; color: var(--ink); }
.tool-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: .875rem; }
.tool-card { display: grid; grid-template-columns: 46px minmax(0,1fr) 12px; align-items: center; gap: 1rem; background: white; border: 1px solid var(--line); border-top:3px solid #93cba0; border-radius: 12px; padding: 1.5rem; min-height: 124px; text-decoration: none; color: var(--ink); box-shadow:0 3px 12px rgba(30,80,42,.045); transition: border-color .15s,background .15s; }
.tool-card:hover { border-color: #7da491; background: #fcfefd; }
.card-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 11px; background: var(--wash); color: var(--green); }
.card-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tool-card[data-group="equipment"] .card-icon { background: #f7f1e6; color: #805f28; }
.tool-card[data-group="system"] .card-icon { background: #eaf0f7; color: #365d82; }
.card-content { min-width: 0; }
.tool-card h2 { font-size: 1.0625rem; line-height: 1.6; margin: 0 0 .375rem; }
.tool-card p { font-size: .9375rem; line-height: 1.65; color: var(--muted); margin: 0; }
.card-arrow { font-size: 1.625rem; color: #5c7669; }
.home-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin: 1.75rem 0; font-size: .8125rem; color: var(--muted); }
.review-invite { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; padding: 1.25rem 0; margin-top: 1.5rem; font-size: .875rem; color: var(--muted); }
.review-invite a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 650; }
.review-invite span { align-self: center; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; margin-bottom: .5rem; text-decoration: none; }
.tool-header { margin-bottom: 1.75rem; }
.tool-header p { color: var(--muted); margin-bottom: .5rem; }
.eyebrow { font-size: .875rem; color: var(--muted); margin-bottom: .375rem; }
.tool-meta { display: block; color: var(--muted); font-size: .8125rem; }
.workbench { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 1.75rem; margin-bottom: 1.25rem; min-width: 0; }
.fields { display: grid; grid-template-columns: minmax(0,1fr); gap: 1.5rem; margin-bottom: 1.5rem; }
.field { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.field > span,.field > label { font-size: 1rem; font-weight: 650; }
.field .hint { color: var(--muted); font-size: .875rem; font-weight: 400; }
.field.full { grid-column: 1/-1; }
input,select,textarea { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 52px; padding: .75rem .875rem; color: var(--ink); border: 1px solid #9db5a8; border-radius: 8px; background: white; font-size: 1rem; line-height: 1.5; }
input::placeholder,textarea::placeholder { color: #64766d; opacity: 1; }
select { padding-right: 2rem; text-overflow: ellipsis; }
input[type="date"] { min-inline-size: 0; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
textarea { min-height: 120px; resize: vertical; line-height: 1.75; }
input[type="checkbox"] { appearance: auto; display: inline-block; width: 22px; height: 22px; min-height: 0; padding: 0; flex-shrink: 0; accent-color: var(--green); }
.calculator-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 1.75rem; }
.input-pane,.output-pane { min-width: 0; }
.input-pane > .fields:last-child { margin-bottom: 0; }
.input-pane #fee-controls > .fields { margin-bottom: 0; }
.output-pane { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.output-pane > :first-child > :first-child { margin-top: 0; }
.output-pane .result:first-child { margin-top: 0; }
.result { border: 1px solid #cbded3; border-radius: 10px; padding: 1.5rem; margin: 1.25rem 0; background: #eff7f2; }
.result-label { font-size: 1rem; color: #345d48; margin-bottom: .75rem; line-height: 1.6; }
.result-value { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .5rem; font-size: clamp(2rem,3.5vw,2.75rem); line-height: 1.3; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result-value small { font-size: 1rem; font-weight: 500; white-space: nowrap; }
.result-caption { font-size: .875rem; line-height: 1.85; color: #3f5e4c; margin-top: .875rem; }
.result-text { font-size: 1.375rem; line-height: 1.65; font-weight: 700; }
.result.alert { background: #fff2ed; border-color: #e4c4b8; }
.result.alert .result-value { color: var(--red); }
.result.neutral { background: #f1f5f8; border-color: #d0dce5; }
.result.neutral .result-label,.result.neutral .result-caption { color: #3e5b6f; }
.result-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.25rem; font-size: .875rem; line-height: 1.7; }
.result-grid b { display: block; font-size: 1.125rem; margin-top: .375rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bar-track { height: 7px; border-radius: 5px; overflow: hidden; margin-top: 1.25rem; background: #d6e4dc; }
.bar-track span { display: block; height: 100%; background: var(--green); }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .625rem 1rem; font-size: .9375rem; line-height: 1.65; font-weight: 650; text-decoration: none; text-align: center; color: white; border: 1px solid var(--green); border-radius: 8px; background: var(--green); }
.button.secondary { color: var(--green); background: white; border-color: #aec3b8; }
.button.subtle { color: var(--muted); background: transparent; border-color: var(--line); }
.button.danger { color: var(--red); background: white; border-color: #d8b8b0; }
.note { padding: 1rem 1.125rem; background: #f3f6f5; border-left: 3px solid #bdcfc5; font-size: .9375rem; line-height: 1.9; margin: 1.25rem 0; border-radius: 0 7px 7px 0; }
.note.warn { color: var(--amber); background: #fdf7ea; border-color: #d3b264; }
.note p:last-child { margin-bottom: 0; }
.error { font-size: 1rem; line-height: 1.8; color: var(--red); background: #fff3ee; padding: 1rem; border-left: 3px solid var(--red); margin: 0; }
.inline-error { color: var(--red); font-size: .9375rem; margin: .75rem 0 0; }
.inline-error:empty { display: none; }
details { border: 1px solid var(--line); background: white; border-radius: 10px; margin: 1rem 0; min-width: 0; }
summary { display: list-item; padding: 1.125rem 1.25rem; margin-left: 1rem; cursor: pointer; font-size: 1rem; font-weight: 650; line-height: 1.7; }
summary::marker { color: var(--green); }
details[open] > summary { border-bottom: 1px solid var(--line); }
details > div { padding: 1.25rem; }
.workbench details { margin-bottom: 0; }
.reference-content > :first-child { margin-top: 0; }
.source-box { margin-top: 1.75rem; }
.source-box > div { font-size: .875rem; color: var(--muted); }
.source-entry { padding: 1rem 0; border-top: 1px solid var(--line); }
.source-entry a { display: inline-block; font-size: .9375rem; overflow-wrap: anywhere; }
.source-entry p { margin: .5rem 0 0; }
.table-scroll { width: 100%; min-width: 0; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 1rem; }
.data-table th { color: var(--muted); background: #f3f6f4; text-align: left; font-weight: 650; }
.data-table th,.data-table td { padding: .875rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.data-table td:last-child { font-variant-numeric: tabular-nums; }
.data-table .selected { background: var(--wash); font-weight: 650; }
.plain-list { padding-left: 1.4rem; margin-top: 1rem; font-size: 1rem; }
.plain-list li { padding: .375rem 0; }
.check-list { display: grid; }
.check { display: flex; gap: .875rem; align-items: flex-start; padding: 1.125rem 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 1rem; }
.check:last-child { border: 0; }
.check input { margin: .3rem 0 0; }
.item-list { display: grid; gap: .875rem; }
.item { border: 1px solid var(--line); background: white; border-radius: 9px; padding: 1.25rem; min-width: 0; }
.item h3 { display: flex; flex-wrap: wrap; gap: .5rem; font-size: 1.0625rem; margin-bottom: .5rem; }
.item p { color: var(--muted); font-size: 1rem; margin: .5rem 0 0; }
.item-meta { color: var(--green); font-size: .9375rem; margin-top: .375rem; }
.tag { display: inline-block; align-self: flex-start; font-size: .8125rem; color: var(--green); background: var(--wash); border-radius: 4px; padding: .15rem .5rem; white-space: nowrap; }
.disease-num { color: var(--muted); font-size: .875rem; line-height: 2; min-width: 1.5rem; }
.disease-switch { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.5rem; margin-bottom:1.25rem; }
.disease-switch .button { display:flex; flex-direction:column; white-space:normal; min-height:76px; padding:.75rem .3rem; text-align:center; }
.disease-switch .button span { font-size:.75rem; font-weight:400; }
.disease-switch [aria-pressed="true"] { background:var(--green); color:white; border-color:var(--green); }
.disease-entry { overflow-wrap:anywhere; }
.disease-entry .plain-list { margin-top:.75rem; }
.disease-entry .note { margin-top:1rem; }
.disease-examples { display:flex; flex-wrap:wrap; gap:.5rem; margin:1rem 0; }
.disease-examples .button { min-height:44px; padding:.6rem .85rem; }
.disease-search-summary { display:flex; flex-wrap:wrap; gap:.5rem 1rem; font-weight:600; }
.disease-browse-heading { font-size:1.125rem; margin-bottom:.75rem; }
.disease-result-group .tag { margin-bottom:.6rem; }
.disease-purpose { margin-bottom:1rem; }
.disease-reference { overflow-wrap:anywhere; margin-top:1.25rem; }
.side-category { color:var(--muted); font-size:.75rem; font-weight:700; padding:1rem .75rem .4rem; overflow-wrap:anywhere; }
.home-section { margin:1.75rem 0 2.5rem; }
.home-section-title { font-size:1.125rem; line-height:1.6; padding:.25rem 0 .75rem .85rem; border-left:4px solid #07a33e; border-bottom:1px solid var(--line); color:var(--green); margin-bottom:1rem; }
.tool-card .card-content h3 { font-size:1.125rem; font-weight:700; margin:0 0 .35rem; line-height:1.6; }
.tool-card[data-group="shop"] .card-icon { background:#eef5ea; }
.sidebar .side-category:first-child { padding-top:.3rem; }
#disease-results .item h3 { flex-wrap: nowrap; margin: 0; }
.section-space { margin-top: 1.75rem; }
.empty { padding: 2rem 1.25rem; border: 1px dashed #a7bdb1; color: var(--muted); background: white; grid-column: 1/-1; border-radius: 10px; font-size: 1rem; }
.disclaimer { color: var(--muted); font-size: .875rem; line-height: 1.9; }
.eval-stats { display: flex; align-items: center; gap: 1.25rem; margin: 1.5rem 0; }
.eval-stats b { color: var(--green); font-size: 1.75rem; white-space: nowrap; }
.eval-stats span { font-size: .9375rem; color: var(--muted); }
.rating-row { display: grid; grid-template-columns: minmax(0,1fr); gap: 1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.rating-name { font-size: 1.0625rem; font-weight: 650; }
.rating-name span { display: block; font-size: .875rem; font-weight: 400; margin-top: .25rem; }
.rating-row label { display: flex; flex-direction: column; gap: .5rem; color: var(--muted); font-size: .9375rem; }
.rating-row select { font-size: 1rem; }
.rank-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 1.5rem; }
.rank-number { color: var(--green); }
.rank-grid select { font-size: 1rem; }
.feedback-saved { color: var(--muted); font-size: .875rem; margin-top: 1rem; }
.review-tip { padding: 1rem 0; color: var(--muted); font-size: .9375rem; }
.source-group { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.source-group a { font-size: 1rem; overflow-wrap: anywhere; }
.source-group p { color: var(--muted); font-size: .875rem; margin: .5rem 0 0; }
.app-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; padding: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; background: white; }
#toast { display: none; position: fixed; bottom: max(1.5rem,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem); padding: .875rem 1.25rem; color: white; background: var(--ink); border-radius: 9px; z-index: 20; font-size: .9375rem; }
#toast.show { display: block; }
/* Q&A: one readable column; filters adapt without shrinking the text. */
.faq-page { max-width: 880px; margin-inline: auto; }
.faq-search-panel { display: grid; grid-template-columns: minmax(0,1fr); gap: .875rem; padding: 1.5rem; background: white; border: 1px solid var(--line); border-radius: 14px; }
.faq-search-panel p { margin: 0; }
.faq-examples { display: flex; flex-wrap: wrap; gap: .5rem; }
.faq-examples .chip { padding: .5rem .875rem; }
.faq-category-select { margin-top: .375rem; }
.faq-guidance { margin: 1.25rem 0 1.5rem; color: var(--muted); font-size: .9375rem; }
.faq-results { display: grid; gap: .75rem; }
.faq-card { margin: 0; overflow-wrap: anywhere; }
.faq-card > summary { display: flex; align-items: center; gap: 1rem; margin: 0; padding: 1.125rem 1.25rem; list-style: none; }
.faq-card > summary::-webkit-details-marker { display: none; }
.faq-card > summary::after { content: '+'; font-size: 1.5rem; line-height: 1; font-weight: 400; color: var(--green); margin-left: auto; flex-shrink: 0; }
.faq-card[open] > summary::after { content: '−'; }
.faq-card[open] > summary { background: var(--wash); border-radius: 9px 9px 0 0; }
.faq-question { display: grid; gap: .25rem; min-width: 0; }
.faq-category { font-size: .8125rem; color: var(--muted); font-weight: 400; }
.faq-answer { font-size: 1rem; line-height: 1.9; }
.faq-scope { font-size: .8125rem; color: var(--muted); margin-bottom: 1rem; }
.faq-conclusion { font-size: 1.0625rem; font-weight: 650; }
.faq-answer h2 { font-size: 1rem; margin: 1.5rem 0 .5rem; }
.faq-answer ul { margin: .5rem 0 1.25rem; padding-left: 1.25rem; }
.faq-answer li + li { margin-top: .625rem; }
.faq-next { padding: 1rem 1.125rem; border-radius: 8px; background: var(--wash); }
.faq-next strong { display: block; font-size: .875rem; color: var(--green); margin-bottom: .25rem; }
.faq-next p { margin: 0; }
.faq-sources { border-top: 1px solid var(--line); padding-top: 1.125rem; margin-top: 1.5rem; font-size: .875rem; }
.faq-sources > div { margin-top: .75rem; }
.faq-sources p { margin: .25rem 0 0; color: var(--muted); }
.faq-sources a { display: inline-block; padding-block: .25rem; }
.faq-reset-row { margin: 1rem 0; }
.faq-contact { padding: 1.5rem; margin-top: 2rem; border: 1px solid var(--line); border-radius: 12px; background: white; }
.faq-contact h2 { font-size: 1.0625rem; margin-bottom: .75rem; }
.faq-contact p { color: var(--muted); font-size: .9375rem; margin-bottom: 0; }
.faq-contact .button-row a { min-height: 44px; display: inline-flex; align-items: center; font-size: .9375rem; }
.faq-results .empty p { margin: .75rem 0 0; }
@media (min-width: 44rem) {
 .faq-search-panel { grid-template-columns: minmax(0,1fr) 14rem; align-items: end; }
 .faq-search-panel > .field:first-child { grid-column: 1; grid-row: 1; }
 .faq-category-select { grid-column: 2; grid-row: 1; margin: 0; }
 .faq-search-panel > p,.faq-examples { grid-column: 1/-1; }
 .faq-card > .faq-answer { padding: 1.5rem 1.75rem; }
}
@media (max-width: 43.99rem) {
 .faq-search-panel,.faq-contact { padding: 1.125rem; }
 .faq-card > summary { padding: 1rem; }
 .faq-card > .faq-answer { padding: 1.125rem; }
 .faq-answer .button-row { flex-direction: column; }
}
/* Tablets: two comfortable tool columns. Portrait forms stay stacked. */
@media (min-width: 44rem) {
  .tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rating-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .rating-name { grid-column: 1/-1; }
  .fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .input-pane .fields { grid-template-columns: minmax(0,1fr); }
}
/* Wide tablet / desktop: inputs and results can be read together. */
@media (min-width: 64rem) {
  .calculator-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 2rem; align-items: start; }
  .output-pane { border-top: 0; padding-top: 0; border-left: 1px solid var(--line); padding-left: 2rem; }
  .rating-row { grid-template-columns: minmax(0,1fr) 12.5rem 14rem; align-items: center; }
  .rating-name { grid-column: auto; }
  #equipment-results { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
/* Large desktop: retain tool switching without duplicating the home screen. */
@media (min-width: 90rem) {
  body[data-page="tool"] .app-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); max-width: 1480px; }
  body[data-page="tool"] .sidebar { display: block; padding: 2.5rem .875rem; border-right: 1px solid var(--line); }
  .side-heading { font-size: .875rem; color: var(--muted); margin: 0 .75rem 1rem; }
  .side-link { display: flex; gap: .625rem; color: var(--muted); text-decoration: none; padding: .75rem; font-size: .9375rem; border-radius: 8px; margin: .125rem 0; }
  .side-link span { font-size: .8125rem; margin-top: .15rem; }
  .side-link.active { color: var(--green); font-weight: 650; background: #e2eee7; }
  .side-link:hover { background: var(--wash); }
  .side-about { display: block; margin: 1.75rem .75rem; font-size: .875rem; }
}
@media (max-width: 43.999rem) {
  .app-header { gap: .5rem; padding: .75rem 1rem; min-height: 76px; flex-wrap: wrap; }
  .brand { gap: .5rem; font-size: .8125rem; }
  .brand img { width: 32px; height: 32px; }
  .brand-pocket { font-size: 1.125rem; }
  .beta { display: none; }
  .app-header nav { gap: .5rem; }
  .app-header nav a { font-size: .875rem; }
  .top-link { display: none!important; }
  .review-link { padding: .375rem .75rem; }
  main { padding: 1.5rem 1rem 2rem; }
  .intro { margin-bottom: 1.25rem; }
  .intro p { font-size: 1rem; }
  .filter-row { gap: .5rem; margin-bottom: 1.5rem; }
  .chip { padding: .5rem .75rem; }
  .tool-card { grid-template-columns: 42px minmax(0,1fr) 10px; gap: .875rem; padding: 1.125rem; min-height: 112px; }
  .card-icon { width: 42px; height: 42px; }
  .tool-card h2 { font-size: 1.0625rem; }
  .tool-card p { font-size: .9375rem; }
  .workbench { padding: 1.25rem; border-radius: 11px; }
  .tool-header { margin-bottom: 1.25rem; }
  .calculator-grid { gap: 1.5rem; }
  .result { padding: 1.125rem; }
  .result-text { font-size: 1.25rem; }
  .button-row > .button { flex: 1 1 100%; }
  .sample-row > .button { flex: 0 1 auto; }
  .data-table th,.data-table td { padding: .75rem .625rem; }
  .note { padding: .875rem 1rem; }
  summary { padding: 1rem .875rem; }
  details > div { padding: 1rem; }
  .eval-stats { gap: 1rem; }
  .eval-stats span { font-size: .875rem; }
  .data-table.stackable thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .data-table.stackable,.data-table.stackable tbody,.data-table.stackable tr,.data-table.stackable td { display: block; width: 100%; }
  .data-table.stackable tr { padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .data-table.stackable td { padding: .25rem 0; border: 0; }
  .data-table.stackable td:first-child { font-weight: 700; color: var(--green); }
  .data-table.stackable td:last-child { color: var(--muted); }
}
@media (max-width: 23rem) {
  .tool-card { padding: 1rem .875rem; gap: .625rem; grid-template-columns: 34px minmax(0,1fr) 9px; }
  .card-icon { width: 34px; height: 38px; }
  .card-icon svg { width: 22px; height: 22px; }
  .workbench { padding: 1rem; }
  .result-grid { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none!important; scroll-behavior: auto!important; } }
@media print {
  .app-header,.sidebar,.app-footer,.back-link,.button-row,.review-invite { display: none!important; }
  .app-layout,body[data-page="tool"] .app-layout { display: block; max-width: none; }
  main { padding: 0; } body { background: white; }
  .calculator-grid { display: block; } .output-pane { border: 0; padding: 0; }
  .workbench { break-inside: avoid; } a { color: black; }
}

/* Single-sheet age reference: the sheet keeps its geometry as the viewport changes. */
.heartpage-link { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1.1rem 1.25rem; margin-top:1.5rem; border:1px solid #a9c6b7; border-radius:12px; background:var(--wash); text-decoration:none; }
.heartpage-link strong,.heartpage-link small { display:block; }
.heartpage-link small { color:var(--muted); margin-top:.15rem; }
.heartpage-link:hover { background:#e0eee6; }
body[data-page="age"] .app-layout { max-width:1100px; }
.age-heading { margin-bottom:1.25rem; }
.age-toolbar { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:.75rem 1rem; margin-bottom:.75rem; }
.age-year-controls,.age-zoom-controls { display:flex; align-items:center; gap:.375rem; min-width:0; }
.age-toolbar button,.age-dialog button { min-height:44px; min-width:44px; padding:.4rem .65rem; background:white; border:1px solid #a9bcb3; border-radius:7px; color:var(--green); font-size:.875rem; font-weight:600; }
.age-toolbar button:hover:not(:disabled),.age-dialog button:hover { background:var(--wash); }
.age-toolbar select { min-width:0; width:auto; min-height:46px; padding:.4rem .6rem; background:white; font-size:1.125rem; font-weight:700; border:1px solid #a9bcb3; border-radius:7px; color:var(--green); }
.age-zoom-controls output { min-width:3.25rem; text-align:center; font-size:.875rem; font-variant-numeric:tabular-nums; }
.age-instruction,.age-footnote { font-size:.875rem; color:var(--muted); line-height:1.7; margin:.65rem 0 1rem; }
.age-viewport { width:100%; max-width:800px; margin-inline:auto; height:72vh; height:72svh; min-height:300px; max-height:1000px; overflow:auto; touch-action:none; overscroll-behavior:contain; background:#e4eae6; border:1px solid #b8c8bf; border-radius:10px; }
#age-stage { position:relative; overflow:hidden; }
.age-sheet { position:absolute; top:0; left:0; width:800px; padding:16px; transform-origin:0 0; background:#16704d; color:#213c30; user-select:none; -webkit-user-select:none; }
.age-sheet-title { display:flex; align-items:center; justify-content:space-between; gap:20px; color:white; padding:4px 14px 8px; }
.age-sheet-title div { min-width:112px; }
.age-sheet-title strong { display:block; font-size:27px; line-height:1.3; }
.age-sheet-title div span { font-size:17px; }
.age-sheet-title h2 { margin:0; padding:3px 28px; background:white; border-radius:40px; color:#16704d; font-size:32px; letter-spacing:3px; }
.age-sheet-brand { font-size:14px; line-height:1.5; }
.age-sheet-note { margin:0 0 12px; color:white; text-align:center; font-size:16px; }
.age-columns { display:grid; grid-template-columns:1fr 1fr; gap:16px; background:white; padding:12px; border-radius:5px; }
.age-block { min-width:0; }
.age-col-head,.age-row { display:grid; grid-template-columns:74px minmax(0,1fr) 58px 50px; align-items:center; text-align:center; gap:0; }
.age-col-head { background:#ede8d8; font-weight:700; min-height:36px; font-size:17px; }
.age-row { width:100%; min-height:44px; margin:0; padding:3px 0; border:0; border-radius:0; background:#fff; font-size:20px; color:#203a34; line-height:1.3; font-variant-numeric:tabular-nums; }
.age-row:nth-child(odd) { background:#e8ece9; }
.age-row:hover { background:#cee8d8; }
.age-row:focus-visible { outline:3px solid #9c6100; outline-offset:-3px; background:#fff1c7; }
.age-row strong { font-size:22px; }
.age-era { font-size:17px; line-height:1.25; }
.age-sheet-bottom { font-size:16px; color:white; text-align:center; padding:12px 0 0; }
.age-help { margin-top:1.25rem; }
.age-dialog { width:min(480px,calc(100% - 24px)); max-height:85vh; max-height:85svh; padding:1.25rem; color:var(--ink); background:white; border:0; border-radius:16px; overflow:auto; }
.age-dialog::backdrop { background:rgb(16 36 27 / .55); }
.age-dialog-top { display:flex; align-items:center; justify-content:space-between; gap:.5rem; margin-bottom:1.25rem; color:var(--muted); font-size:.875rem; }
.age-dialog h2 { font-size:1.75rem; margin-bottom:.25rem; }
.age-detail-era { color:var(--muted); }
.age-detail-number { padding:1rem; margin:1rem 0 1.5rem; background:var(--wash); border-radius:10px; text-align:center; }
.age-detail-number strong { display:block; font-size:3rem; line-height:1.25; color:var(--green); }
.age-detail-number small { font-size:1.25rem; margin-left:.25rem; }
.age-detail-number span { display:block; font-size:.875rem; margin-top:.5rem; }
.age-birthday-fields { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.age-birthday-fields label { display:flex; flex-direction:column; gap:.25rem; }
.age-birthday-result { margin:1rem 0; padding:1rem; border:1px solid var(--line); border-radius:8px; }
.age-birthday-result p:last-child { margin-bottom:0; }
.age-birthday-result strong { font-size:1.5rem; color:var(--green); }
@media (max-width:28rem) {
  .age-toolbar { display:block; }
  .age-year-controls { justify-content:space-between; }
  .age-zoom-controls { margin-top:.625rem; }
  .age-toolbar select { font-size:1rem; }
  .age-toolbar button { padding:.375rem .5rem; }
}
@media print {
  .age-toolbar,.age-instruction,.age-help,.age-dialog { display:none!important; }
  .age-viewport { height:auto; max-height:none; overflow:visible; border:0; }
  #age-stage { width:100%!important; height:auto!important; overflow:visible; }
  .age-sheet { position:static; transform:none!important; width:100%; padding:8px; }
  .age-row { min-height:24px; font-size:13px; }
  .age-row strong { font-size:14px; }
  .age-era { font-size:12px; }
  .age-col-head,.age-row { grid-template-columns:50px minmax(0,1fr) 35px 30px; }
  .age-sheet-title h2 { font-size:24px; }
  .age-sheet-title strong { font-size:22px; }
  .age-sheet-brand { display:none; }
}

.account-panel{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;padding:12px;background:#e8f5ee;color:#184d44}.account-panel button,.account-actions button{border:0;border-radius:8px;padding:10px 16px;background:#176d4b;color:white;cursor:pointer}#account-dialog{border:0;border-radius:16px;box-shadow:0 12px 50px #0004;width:min(440px,95vw);padding:26px}#account-dialog::backdrop{background:#0008}#account-dialog label{display:block;margin:12px 0}#account-dialog input{display:block;width:100%;padding:12px;margin-top:5px;border:1px solid #aaa;border-radius:8px}.account-actions{display:flex;gap:8px;flex-wrap:wrap}.account-close{float:right;background:transparent;border:0;font-size:26px;cursor:pointer}