/* ===================================
   副業税金計算ツール v1.0
   hukugyo-guide.com
   =================================== */

#tax-calc-app {
  --txc-primary: #7c3aed;
  --txc-primary-dark: #6d28d9;
  --txc-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --txc-bg: #faf5ff;
  --txc-card: #ffffff;
  --txc-text: #1e293b;
  --txc-text-sub: #64748b;
  --txc-border: #e2e8f0;
  --txc-radius: 16px;
  --txc-radius-sm: 10px;
  --txc-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

#tax-calc-app {
  max-width: 560px;
  margin: 32px auto;
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--txc-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
#tax-calc-app *, #tax-calc-app *::before, #tax-calc-app *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
#tax-calc-app .txc-header {
  background: var(--txc-gradient);
  color: #fff;
  text-align: center;
  padding: 28px 20px 24px;
  border-radius: var(--txc-radius) var(--txc-radius) 0 0;
}
#tax-calc-app .txc-header-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 4px; }
#tax-calc-app .txc-header-sub { font-size: 0.85rem; opacity: 0.85; }
#tax-calc-app .txc-body {
  background: var(--txc-card);
  border-radius: 0 0 var(--txc-radius) var(--txc-radius);
  box-shadow: var(--txc-shadow);
  padding: 28px 24px 32px;
}

/* Form */
#tax-calc-app .txc-form-group { margin-bottom: 20px; }
#tax-calc-app .txc-label {
  display: block; font-size: 0.92rem; font-weight: 700;
  color: var(--txc-text); margin-bottom: 6px;
}
#tax-calc-app .txc-label-hint { font-size: 0.78rem; font-weight: 400; color: var(--txc-text-sub); }
#tax-calc-app .txc-input-wrap { position: relative; display: flex; align-items: center; }
#tax-calc-app .txc-input {
  width: 100%; padding: 12px 50px 12px 16px; font-size: 1.1rem; font-weight: 600;
  border: 2px solid var(--txc-border); border-radius: var(--txc-radius-sm);
  outline: none; transition: border-color 0.2s; color: var(--txc-text); font-family: inherit;
  -moz-appearance: textfield;
}
#tax-calc-app .txc-input::-webkit-outer-spin-button, #tax-calc-app .txc-input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
#tax-calc-app .txc-input:focus { border-color: var(--txc-primary); }
#tax-calc-app .txc-input-unit {
  position: absolute; right: 16px; font-size: 0.9rem; font-weight: 600; color: var(--txc-text-sub);
}

#tax-calc-app .txc-radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
#tax-calc-app .txc-radio-item { flex: 1; min-width: 80px; }
#tax-calc-app .txc-radio-item input { display: none; }
#tax-calc-app .txc-radio-label {
  display: block; text-align: center; padding: 10px 12px;
  border: 2px solid var(--txc-border); border-radius: var(--txc-radius-sm);
  font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: all 0.18s;
}
#tax-calc-app .txc-radio-item input:checked + .txc-radio-label {
  border-color: var(--txc-primary); background: var(--txc-bg); color: var(--txc-primary-dark);
}

#tax-calc-app .txc-submit-btn {
  display: block; width: 100%; background: var(--txc-gradient); color: #fff;
  font-size: 1.08rem; font-weight: 700; padding: 16px; border: none;
  border-radius: var(--txc-radius-sm); cursor: pointer; transition: opacity 0.2s;
  margin-top: 8px;
}
#tax-calc-app .txc-submit-btn:hover { opacity: 0.9; }

/* Result */
#tax-calc-app .txc-result { animation: txcFadeUp 0.5s ease; }
@keyframes txcFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

#tax-calc-app .txc-result-hero {
  background: var(--txc-gradient);
  border-radius: var(--txc-radius);
  padding: 24px 20px;
  text-align: center;
  color: #fff;
  margin-bottom: 20px;
}
#tax-calc-app .txc-result-hero-label { font-size: 0.82rem; opacity: 0.85; margin-bottom: 4px; }
#tax-calc-app .txc-result-hero-amount { font-size: 2rem; font-weight: 800; }
#tax-calc-app .txc-result-hero-sub { font-size: 0.85rem; opacity: 0.85; margin-top: 4px; }

/* Breakdown table */
#tax-calc-app .txc-breakdown {
  width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 20px;
}
#tax-calc-app .txc-breakdown th, #tax-calc-app .txc-breakdown td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--txc-border);
}
#tax-calc-app .txc-breakdown th {
  font-weight: 600; color: var(--txc-text-sub); width: 50%;
}
#tax-calc-app .txc-breakdown td { font-weight: 700; text-align: right; }
#tax-calc-app .txc-breakdown tr.highlight td {
  color: var(--txc-primary); font-size: 1.05rem;
}
#tax-calc-app .txc-breakdown tr.total { border-top: 2px solid var(--txc-text); }
#tax-calc-app .txc-breakdown tr.total th, #tax-calc-app .txc-breakdown tr.total td {
  font-weight: 800; padding-top: 14px; font-size: 1rem;
}

/* Tax rate bar */
#tax-calc-app .txc-rate-section { margin-bottom: 20px; }
#tax-calc-app .txc-rate-label {
  font-size: 0.85rem; font-weight: 700; color: var(--txc-text); margin-bottom: 8px;
}
#tax-calc-app .txc-rate-bar-wrap {
  width: 100%; height: 24px; background: #e2e8f0; border-radius: 12px; overflow: hidden;
  position: relative;
}
#tax-calc-app .txc-rate-bar-fill {
  height: 100%; background: var(--txc-gradient); border-radius: 12px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; align-items: center; justify-content: flex-end; padding-right: 8px;
  font-size: 0.75rem; font-weight: 800; color: #fff; min-width: 40px;
}

/* Tips */
#tax-calc-app .txc-tips {
  background: var(--txc-bg); border-radius: var(--txc-radius-sm);
  padding: 18px; margin-bottom: 16px;
}
#tax-calc-app .txc-tips-title {
  font-size: 0.88rem; font-weight: 700; color: var(--txc-primary-dark); margin-bottom: 10px;
}
#tax-calc-app .txc-tips-list {
  list-style: none; font-size: 0.85rem; line-height: 1.7;
}
#tax-calc-app .txc-tips-list li {
  padding-left: 20px; position: relative; margin-bottom: 5px;
}
#tax-calc-app .txc-tips-list li::before {
  content: '\1F4A1'; position: absolute; left: 0; font-size: 0.8rem;
}

#tax-calc-app .txc-disclaimer {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--txc-radius-sm);
  padding: 14px; font-size: 0.78rem; color: #92400e; line-height: 1.65; margin-bottom: 16px;
}
#tax-calc-app .txc-source {
  text-align: center; margin-top: 12px; font-size: 0.75rem; color: var(--txc-text-sub);
}
#tax-calc-app .txc-source a { color: var(--txc-primary); }

#tax-calc-app .txc-retry-btn {
  display: block; width: 100%; background: none; border: 2px solid var(--txc-border);
  color: var(--txc-text-sub); font-size: 0.92rem; font-weight: 600; padding: 12px;
  border-radius: var(--txc-radius-sm); cursor: pointer; transition: all 0.18s;
}
#tax-calc-app .txc-retry-btn:hover { border-color: var(--txc-primary); color: var(--txc-primary); }

@media (max-width: 600px) {
  #tax-calc-app { margin: 16px 8px; }
  #tax-calc-app .txc-body { padding: 20px 16px 24px; }
  #tax-calc-app .txc-radio-group { flex-direction: column; }
  #tax-calc-app .txc-result-hero-amount { font-size: 1.6rem; }
}
