:root {
  --ink: #101823;
  --blue: #0a6f9d;
  --blue-dark: #075272;
  --blue-soft: #e9f6fb;
  --aqua: #49b9ce;
  --orange: #ee7d4f;
  --bg: #f3f7f9;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 0 16px 56px;
  background:
    linear-gradient(180deg, #fffffff0 0, #f3f7f9f5 340px),
    repeating-linear-gradient(135deg, #0a6f9d06 0 1px, transparent 1px 10px);
}
.ambient {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.ambient-one {
  width: 280px;
  height: 280px;
  right: -150px;
  top: 80px;
  border: 60px solid #49b9ce14;
}
.ambient-two {
  width: 190px;
  height: 190px;
  left: -130px;
  top: 570px;
  background: #0a6f9d0b;
}
.app-container {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  margin: auto;
}
.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 30px;
  transform: skew(-9deg);
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font: 900 14px Arial;
}
.brand-name {
  font: 800 13px Arial;
  letter-spacing: 0.12em;
}
.tool-badge {
  color: var(--blue);
  font: 800 9px Arial;
  letter-spacing: 0.15em;
}
.intro {
  padding: 16px 4px 14px;
}
.intro h1 {
  margin: 0;
  font-size: clamp(23px, 6vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.045em;
}
.intro h1:after {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--orange);
  content: "";
}
.calculator-card,
.result-card {
  border: 1px solid #122f4117;
  border-radius: 22px;
  background: #fffffff0;
  box-shadow: 0 16px 44px #1c3b4b14;
}
.calculator-card {
  padding: 20px;
}
.mode-fieldset {
  min-width: 0;
  margin: 0 0 15px;
  padding: 0;
  border: 0;
}
.mode-fieldset legend {
  margin-bottom: 9px;
  color: #78858e;
  font-size: 11px;
  font-weight: 700;
}
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mode-switch button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid #d7e1e6;
  border-radius: 11px;
  background: #f7fafb;
  color: #687680;
  text-align: left;
}
.mode-switch button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-dark);
}
.notation-switch button.active {
  border-color: #d86135;
  background: #fff4ef;
  color: #93401f;
}
.mode-switch button > span:last-child {
  min-width: 0;
  font-size: 9px;
  line-height: 1.45;
}
.mode-switch strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}
.mode-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #fff;
  color: var(--orange);
  font: 900 14px Arial;
  box-shadow: 0 2px 7px #1f3a4a14;
}
.water-icon {
  color: var(--blue);
  font-size: 18px;
}
.ratio-icon {
  font-size: 12px;
}
.notation-example {
  margin: 9px 2px 0;
  color: #7a655d;
  font-size: 10px;
  font-weight: 700;
}
.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}
.field-heading label {
  font-size: 15px;
  font-weight: 800;
}
.field-heading span {
  color: #a6b0b7;
  font: 800 10px Arial;
  letter-spacing: 0.12em;
}
.amount-control,
.ratio-control {
  display: flex;
  align-items: center;
  height: 56px;
  border: 1.5px solid #cfdbe1;
  border-radius: 13px;
  background: #fbfdfe;
}
.amount-control:focus-within,
.ratio-control:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px #0a6f9d17;
}
.amount-control input,
.ratio-control input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 750 27px Arial;
}
.amount-control input {
  flex: 1;
  padding: 0 14px;
}
.ratio-control input {
  width: 100%;
  padding: 0 18px;
}
input::placeholder {
  color: #b8c0c6;
}
.unit-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 110px;
  margin-right: 6px;
  padding: 3px;
  border-radius: 10px;
  background: #e9eef1;
}
.unit-switch button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #71808a;
  font: 800 14px Arial;
}
.unit-switch button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 2px 8px #1f3a4a1f;
}
.field-help {
  margin: 8px 2px 0;
  color: #83909a;
  font-size: 11px;
}
.field-divider {
  height: 0;
  margin: 15px 0;
}
.ratio-suffix {
  margin-right: 18px;
  color: #586975;
  font-weight: 800;
}
.ratio-prefix {
  flex: 0 0 auto;
  margin-left: 18px;
  color: var(--orange);
  font: 900 18px Arial;
}
.preset-section {
  margin-top: 15px;
}
.preset-section > p {
  margin: 0 0 9px 2px;
  color: #78858e;
  font-size: 11px;
  font-weight: 700;
}
.preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.preset-grid button {
  min-height: 42px;
  padding: 7px 3px;
  border: 1px solid #d7e1e6;
  border-radius: 9px;
  background: #f7fafb;
  color: #43525c;
  font: 800 12px Arial;
}
.preset-grid button.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-dark);
}
.error-message {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 11px 13px;
  border: 1px solid #f1c9ba;
  border-radius: 10px;
  background: #fff5f1;
  color: #a43f1b;
  font-size: 12px;
}
.error-message span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font: 900 11px Arial;
}
.dilution-guide-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  margin-top: 16px;
  padding: 8px 12px;
  border: 1px solid #d6e4e9;
  border-radius: 10px;
  background: #f7fbfc;
  color: #3f5864;
  text-decoration: none;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}
.dilution-guide-link:hover {
  border-color: #a8cedd;
  background: var(--blue-soft);
}
.dilution-guide-link:focus-visible {
  outline: 3px solid #0a6f9d47;
  outline-offset: 2px;
}
.guide-link-label {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}
.guide-link-label small {
  display: block;
  margin-bottom: 1px;
  color: #819098;
  font-size: 8px;
  font-weight: 700;
}
.external-arrow {
  flex: 0 0 auto;
  color: var(--blue);
  font: 800 15px Arial;
}
.calculate-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  min-height: 58px;
  margin-top: 10px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  box-shadow: 0 10px 24px #07527238;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}
.result-card {
  position: relative;
  margin-top: 18px;
  padding: 20px;
  overflow: hidden;
}
.result-card:before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--aqua));
  content: "";
}
.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.result-heading h2 {
  margin: 0;
  font-size: 18px;
}
.result-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.result-ratio {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font: 900 10px Arial;
}
.copy-button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #cbd9e0;
  border-radius: 9px;
  background: #fff;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 800;
}
.copy-button:disabled {
  opacity: 0.45;
}
.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: center;
  margin-top: 14px;
}
.result-item {
  min-width: 0;
  padding: 17px 14px;
  border-radius: 13px;
}
.concentrate {
  background: #fff2ec;
}
.water {
  background: #edf8fb;
}
.result-label {
  color: #53616b;
  font-size: 12px;
  font-weight: 800;
}
.concentrate .result-label {
  color: #9f4c2c;
}
.water .result-label {
  color: var(--blue);
}
.result-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 8px;
  white-space: nowrap;
}
.result-value strong {
  min-width: 0;
  overflow: hidden;
  font: 850 clamp(20px, 6.5vw, 29px) Arial;
  letter-spacing: -0.05em;
  text-overflow: ellipsis;
}
.result-value span {
  color: #6c7982;
  font: 800 11px Arial;
}
.result-item p {
  min-height: 16px;
  margin: 6px 0 0;
  color: #86929b;
  font-size: 10px;
  line-height: 1.5;
}
.plus-sign {
  color: #8c989f;
  font-size: 17px;
  text-align: center;
}
.formula-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f5f8f9;
  color: #697780;
  font-size: 10px;
  line-height: 1.5;
}
.formula-note span {
  padding-right: 8px;
  border-right: 1px solid #d5dee2;
  color: #43515b;
  font-weight: 800;
}
.formula-note b {
  font-weight: 400;
}
.cost-details {
  margin-top: 13px;
  border: 1px solid #d8e2e7;
  border-radius: 11px;
  background: #fbfdfe;
  overflow: hidden;
}
.cost-details summary {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 9px 12px;
  color: #465660;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}
.cost-details summary span {
  flex: 1;
}
.cost-details summary small {
  margin-right: 9px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf2f4;
  color: #78858e;
  font-size: 9px;
}
.cost-details[open] summary b {
  transform: rotate(180deg);
}
.cost-body {
  padding: 0 12px 12px;
  border-top: 1px solid #e3eaee;
}
.cost-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding-top: 12px;
}
.cost-field > span {
  display: block;
  margin: 0 0 6px 2px;
  color: #6f7c85;
  font-size: 10px;
  font-weight: 700;
}
.cost-control {
  display: flex;
  align-items: center;
  height: 46px;
  border: 1px solid #d4dfe4;
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}
.cost-control input {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 9px;
  border: 0;
  outline: 0;
  font: 750 16px Arial;
}
.cost-control > span {
  margin-right: 10px;
  color: #6f7c85;
  font-size: 11px;
  font-weight: 800;
}
.cost-control select {
  align-self: stretch;
  width: 54px;
  border: 0;
  border-left: 1px solid #e1e8eb;
  background: #f3f7f9;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 800;
}
.cost-result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 9px;
  background: #eef8f5;
  color: #3f5d55;
}
.cost-result > span {
  font-size: 11px;
  font-weight: 800;
}
.cost-result strong {
  color: #0b7258;
  font: 850 18px Arial;
}
.cost-result small {
  grid-column: 1/-1;
  color: #789087;
  font-size: 9px;
}
.cost-result.error {
  background: #fff5f1;
  color: #a43f1b;
}
.cost-result.error strong,
.cost-result.error small {
  color: #a43f1b;
}
.reset-button {
  display: block;
  min-height: 44px;
  margin: 17px auto 0;
  border: 0;
  border-bottom: 1px solid #aeb9bf;
  background: transparent;
  color: #697780;
  font-size: 12px;
  font-weight: 700;
}
.recommend-section {
  margin-top: 12px;
  padding: 17px;
  border: 1px solid #122f4117;
  border-radius: 16px;
  background: #ffffffd6;
}
.recommend-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.recommend-heading h2 {
  margin: 0;
  font-size: 14px;
}
.recommend-heading > span {
  color: #9aa5ac;
  font: 800 8px Arial;
  letter-spacing: 0.12em;
}
.recommend-links {
  display: grid;
  gap: 7px;
}
.recommend-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 49px;
  padding: 8px 12px;
  border: 1px solid #d6e0e5;
  border-radius: 10px;
  background: #fff;
  color: #344650;
  text-decoration: none;
}
.plus-link {
  border-color: #b9d4df;
  background: #f1f9fc;
  color: var(--blue-dark);
}
.ad-badge {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  background: #fff1e9;
  color: #a44b27;
  font-size: 8px;
  font-weight: 800;
}
.link-label {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}
.link-label small {
  display: block;
  color: #85929a;
  font-size: 8px;
}
.affiliate-disclosure {
  margin: 9px 2px 0;
  color: #909ca3;
  font-size: 8px;
  line-height: 1.6;
}
.faq-section {
  margin-top: 12px;
  padding: 17px;
  border: 1px solid #122f4117;
  border-radius: 16px;
  background: #ffffffd6;
}
.faq-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.faq-heading h2 {
  margin: 0;
  font-size: 14px;
}
.faq-heading span {
  color: #9aa5ac;
  font: 800 8px Arial;
  letter-spacing: 0.12em;
}
.faq-list {
  display: grid;
  gap: 7px;
}
.faq-list details {
  border: 1px solid #d6e0e5;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  color: #344650;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary:hover {
  background: #f7fbfc;
}
.faq-list summary:focus-visible {
  outline: 3px solid #0a6f9d47;
  outline-offset: -3px;
}
.faq-list summary span {
  flex: 0 0 auto;
  color: var(--blue);
  font: 800 17px Arial;
  transition: transform 0.14s ease;
}
.faq-list details[open] summary span {
  transform: rotate(45deg);
}
.faq-list details p {
  margin: 0;
  padding: 0 12px 13px;
  color: #697780;
  font-size: 11px;
  line-height: 1.8;
}
footer {
  padding: 30px 7px 0;
  color: #849098;
  text-align: center;
}
footer p {
  margin: 0;
  font-size: 10px;
  line-height: 1.8;
}
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin-top: 15px;
  padding: 8px 13px;
  border: 1px solid #cfdbe1;
  border-radius: 10px;
  background: #ffffffb8;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}
.home-link:hover {
  border-color: #9dc9d9;
  background: var(--blue-soft);
}
.home-link:focus-visible {
  outline: 3px solid #0a6f9d47;
  outline-offset: 2px;
}
footer div {
  width: 36px;
  height: 1px;
  margin: 22px auto 12px;
  background: #c9d2d7;
}
footer > span {
  font: 700 8px Arial;
  letter-spacing: 0.16em;
}
[hidden] {
  display: none !important;
}
@media (max-width: 390px) {
  .app-shell {
    padding-inline: 12px;
  }
  .tool-badge {
    display: none;
  }
  .preset-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .result-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .plus-sign {
    height: 14px;
    line-height: 14px;
  }
  .result-value strong {
    font-size: 28px;
  }
  .cost-input-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.channel-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  margin-top: 24px;
  padding: 9px 14px;
  border: 1px solid #e2d7d7;
  border-radius: 13px;
  background: #ffffffd6;
  color: #344650;
  text-decoration: none;
  transition:
    border-color 0.14s ease,
    background-color 0.14s ease,
    transform 0.14s ease;
}

.channel-link:hover {
  border-color: #e2a4a4;
  background: #fff8f8;
  transform: translateY(-1px);
}

.channel-link:focus-visible {
  outline: 3px solid #dc1e1e33;
  outline-offset: 2px;
}

.youtube-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 23px;
  border-radius: 7px;
  background: #f03;
  box-shadow: 0 3px 10px #ff003329;
}

.youtube-mark > span {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #fff;
}

.channel-label {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.channel-label small {
  display: block;
  margin-bottom: 1px;
  color: #8c969c;
  font-size: 8px;
  font-weight: 700;
}

.external-arrow {
  flex: 0 0 auto;
  color: var(--blue);
  font: 800 15px Arial;
}

footer {
  padding-top: 24px;
}
