/* 愛しの割り勘電卓 - 兄弟サイト（tax/pct）同一デザイン */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* ── 背景（兄弟サイト同様） ── */
body {
  margin: 0;
  padding: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1e293b;
  background: linear-gradient(160deg, #dbeafe 0%, #93c5fd 35%, #bfdbfe 65%, #eff6ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 28rem;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 1rem 1.5rem;
  display: flex;
  flex-direction: column;
}

/* ── ヘッダー・ロゴ（兄弟サイト同様コンパクト） ── */
header,
header.header-compact {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
header.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-tool-name {
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  font-size: 0.8125rem;
  color: rgba(59, 130, 246, 0.85);
  letter-spacing: 0.1em;
}
.site-logo,
.logo-text {
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  font-size: 0.8125rem;
  color: rgba(59, 130, 246, 0.85);
  text-decoration: none;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
}
header a.logo-text,
header a.logo-text:hover,
header a.logo-text:focus,
header a.logo-text:active {
  text-decoration: none;
}
h1.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;
}

/* ── 結果表示（display-card：兄弟サイト同様の暗色グラデーション） ── */
.display-card {
  background: linear-gradient(145deg, #0c1929 0%, #152d50 55%, #1e3a5f 100%);
  border: 1px solid rgba(96, 165, 250, 0.15);
  border-radius: 1.25rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow:
    0 10px 40px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(96, 165, 250, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.display-card .result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(96, 165, 250, 0.15);
}
.display-card .result-row:last-child {
  border-bottom: none;
}
.display-card .result-label {
  font-size: 0.8125rem;
  color: rgba(191, 219, 254, 0.7);
}
.display-card .result-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.05em;
}
.display-card .result-summary {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(96, 165, 250, 0.2);
}
.display-card .result-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  font-size: 0.8125rem;
}
.display-card .result-value-sm {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.display-card .result-guide {
  font-size: 0.75rem;
  color: rgba(147, 197, 253, 0.5);
  text-align: right;
  margin-top: 0.5rem;
}

/* ── エラー表示 ── */
.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0.5rem;
}
.error-message:empty {
  display: none;
}

/* ── 入力エリア（input-card） ── */
.input-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 1.25rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.input-card label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.375rem;
}
.warikan-input {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(203, 213, 225, 0.5);
  border-radius: 0.75rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: #1e293b;
  padding: 0.75rem 1rem;
  width: 100%;
  min-height: 48px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.warikan-input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.6);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}
.warikan-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}
.input-group {
  margin-bottom: 1rem;
}
.input-group:last-child {
  margin-bottom: 0;
}
.input-row {
  display: flex;
  gap: 0.5rem;
}
.input-row .input-group {
  flex: 1;
}

/* ── 丸め設定 ── */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.radio-option {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  min-height: 48px;
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid rgba(203, 213, 225, 0.5);
  border-radius: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.radio-option input {
  margin-right: 0.5rem;
}
.radio-option:has(input:checked) {
  background: rgba(219, 234, 254, 0.8);
  border-color: rgba(96, 165, 250, 0.5);
  color: #1e40af;
}

/* ── アクションボタン（兄弟サイト同様） ── */
.action-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  margin-bottom: 1rem;
}
.action-btn {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.12s ease;
  padding: 0 1.25rem;
  font-family: inherit;
}
.action-btn:active {
  transform: scale(0.95);
}
.btn-calc {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #3b82f6 100%);
  color: #fff;
  box-shadow:
    0 4px 18px rgba(37, 99, 235, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.25);
}
.btn-reset,
.btn-clear {
  background: rgba(191, 219, 254, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #1e40af;
  box-shadow:
    0 2px 10px rgba(37, 99, 235, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(147, 197, 253, 0.4);
}
.btn-reset:active,
.btn-clear:active {
  background: rgba(147, 197, 253, 0.6);
}

/* ── 広告エリア ── */
.ad-card {
  background: rgba(255, 255, 255, 0.28);
  border: 2px dashed rgba(147, 197, 253, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 1.25rem;
  padding: 1rem;
  text-align: center;
  margin-bottom: 1rem;
}
.ad-card .ad-placeholder {
  font-size: 0.75rem;
  color: rgba(59, 130, 246, 0.5);
  margin: 0;
}

/* ── コンテンツエリア（SEO・LLMO） ── */
main.content-main,
main.content {
  flex: 1;
  padding-top: 1rem;
}
.content-main section,
.content section {
  margin-top: 2rem;
}
.content-heading,
.content h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
  margin: 0 0 0.75rem 0;
}
.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.calc-table th,
.calc-table td {
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.calc-table th {
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}
.usage-list {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0;
}
.usage-list li {
  padding: 0.35rem 0;
  color: #475569;
}
.mt-3 { margin-top: 0.75rem; }
.content-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  border-radius: 1.25rem;
  padding: 1.25rem;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.7;
}
.content-card p {
  margin: 0 0 0.75rem 0;
}
.content-card p:last-child {
  margin-bottom: 0;
}
.formula-box {
  background: rgba(241, 245, 249, 0.7);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 0.8125rem;
  color: #64748b;
}
.formula-box strong {
  color: #1e293b;
}
.mt-3 { margin-top: 0.75rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.text-xs { font-size: 0.75rem; }
.text-gray-500 { color: #6b7280; }
.font-semibold { font-weight: 600; }
.text-slate-700 { color: #334155; }
.p-3 { padding: 0.75rem; }
.p-5 { padding: 1.25rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-8 { margin-top: 2rem; }
.pt-2 { padding-top: 0.5rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pt-4 { padding-top: 1rem; }
.pb-4 { padding-bottom: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.pb-8 { padding-bottom: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.content-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #334155;
  margin: 1rem 0 0.5rem 0;
}
.content-card h3:first-child {
  margin-top: 0;
}

/* テーブル */
.content-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.content-card th,
.content-card td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.content-card th {
  font-weight: 600;
  color: #334155;
}
.content-card tr:last-child td {
  border-bottom: none;
}

/* FAQ */
.content-card details {
  margin: 0.5rem 0;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}
.content-card details:last-of-type {
  border-bottom: none;
}
.content-card details summary {
  cursor: pointer;
  font-weight: 600;
  color: #334155;
  list-style: none;
  padding-right: 1.5rem;
  position: relative;
}
.content-card details summary::-webkit-details-marker {
  display: none;
}
.content-card details summary::after {
  content: '+';
  position: absolute;
  right: 0;
  font-weight: 700;
  color: #60a5fa;
  font-size: 1.125rem;
}
.content-card details[open] summary::after {
  content: '−';
}
.content-card details .faq-answer {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  color: #64748b;
}

/* 特徴リスト */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}
.feature-list li:last-child {
  border-bottom: none;
}

/* 関連リンク */
.related-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.related-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 1rem;
  color: #2563eb;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
}
.related-link:hover,
.related-link:active {
  background: rgba(219, 234, 254, 0.7);
}

/* ── フッター（兄弟サイト同様） ── */
.footer-border {
  border-top: 1px solid rgba(147, 197, 253, 0.3);
}
footer.site-footer,
footer.footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid rgba(147, 197, 253, 0.3);
}
.footer-section {
  margin-bottom: 1.5rem;
}
.footer-section:last-of-type {
  margin-bottom: 0;
}
.footer-heading {
  font-size: 0.875rem;
  font-weight: 700;
  color: #475569;
  margin: 0 0 0.75rem 0;
}
.footer-dl {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
}
.footer-dl > div {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}
.footer-dl dt {
  font-weight: 600;
  color: #475569;
  min-width: 5rem;
}
.footer-dl dd {
  margin: 0;
}
.footer-dl a {
  color: #2563eb;
  text-decoration: underline;
}
.footer-share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(147, 197, 253, 0.35);
  border-radius: 9999px;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}
.social-pill:hover {
  background: rgba(219, 234, 254, 0.65);
}
.social-pill svg {
  width: 14px;
  height: 14px;
}
.social-pill button,
button.social-pill {
  border: none;
  font-size: 0.75rem;
  font-weight: 400;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.social-pill-x { color: #334155; }
.social-pill-fb { color: #1d4ed8; }
.social-pill-line { color: #16a34a; }
.social-pill-hatena { color: #2563eb; }
.social-pill-pocket { color: #ef4056; }
.social-pill-linkedin { color: #0a66c2; }
.social-pill-threads { color: #334155; }
.social-pill-pinterest { color: #e60023; }
.social-pill-copy { color: #475569; }
.footer-text {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 0.5rem 0;
}
.footer-text:last-child {
  margin-bottom: 0;
}
.footer-text a {
  color: #2563eb;
  text-decoration: underline;
}
.footer-copyright,
.footer-copy {
  text-align: center;
  padding-top: 1rem;
  font-size: 10px;
  color: #94a3b8;
}
.footer-copyright a,
.footer-copy a {
  color: #2563eb;
  text-decoration: underline;
}
