/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --color-canvas: #f7f4ee;
  --color-surface: #fffdf8;
  --color-surface-muted: #f0ebe1;
  --color-border: #ded7ca;
  --color-text: #101410;
  --color-muted: #687067;
  --color-accent: #e89619;
  --color-accent-dark: #9d5d08;
  --color-success: #1f6f43;
  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow-card: 0 24px 80px rgba(45, 35, 20, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header {
  background: rgba(247, 244, 238, 0.88);
  border-bottom: 1px solid rgba(16, 20, 16, 0.08);
  backdrop-filter: blur(18px);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-brand {
  align-items: center;
  color: var(--color-text);
  display: inline-flex;
  font-size: 1rem;
  font-weight: 700;
  gap: 10px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-brand::before {
  background: url("/icon.svg") center / contain no-repeat;
  content: "";
  display: inline-block;
  height: 30px;
  width: 30px;
}

.site-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--color-muted);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.site-nav-link-stacked {
  align-items: center;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.site-nav-link-line-primary {
  font-size: inherit;
  font-weight: inherit;
}

.site-nav-link-line-secondary {
  color: rgba(104, 112, 103, 0.75);
  font-size: 0.74rem;
  font-weight: 700;
}

.site-nav-link-stacked:hover .site-nav-link-line-secondary {
  color: inherit;
}

.site-nav a:hover {
  color: var(--color-text);
}

.site-user {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.site-logout {
  background: transparent;
  border: 1px solid rgba(16, 20, 16, 0.16);
  border-radius: 999px;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  padding: 7px 14px;
}

.site-main {
  margin: 0 auto;
  max-width: 1120px;
  padding: 34px 24px 64px;
}

.flash {
  border-radius: 16px;
  margin-bottom: 18px;
  padding: 12px 16px;
}

.flash-notice {
  background: #eaf6ed;
  border: 1px solid #cae8d0;
  color: #155724;
}

.flash-alert {
  background: #fae8e6;
  border: 1px solid #f1c7c2;
  color: #721c24;
}

.flash-alert .auth-relogin-link,
.receipt-batch-failures .auth-relogin-link {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.home-shell {
  display: grid;
  gap: 28px;
}

.home-prelaunch-banner {
  background: #fff5e6;
  border: 1px solid rgba(232, 150, 25, 0.36);
  border-radius: 16px;
  padding: 14px 16px;
}

.home-prelaunch-title {
  color: #7a4b09;
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0;
}

.home-prelaunch-copy {
  color: #6d5b3f;
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 8px 0 0;
}

.home-hero {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.76fr);
  min-height: 560px;
}

.home-kicker {
  align-items: center;
  color: var(--color-accent-dark);
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 750;
  gap: 8px;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.home-kicker::before {
  background: var(--color-accent);
  border-radius: 999px;
  content: "";
  height: 8px;
  width: 8px;
}

.home-title {
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
  max-width: 780px;
  text-wrap: balance;
}

.home-lead {
  color: var(--color-muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.85;
  margin: 26px 0 0;
  max-width: 620px;
}

.home-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.home-button,
.home-button-secondary {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  text-decoration: none;
}

.home-button {
  background: var(--color-text);
  border: 1px solid var(--color-text);
  color: #fff;
}

.home-button-secondary {
  border: 1px solid rgba(16, 20, 16, 0.16);
  color: var(--color-text);
}

.home-login-button button {
  background: var(--color-text);
  border: 1px solid var(--color-text);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  min-height: 48px;
  padding: 0 22px;
}

.home-product-card {
  background:
    radial-gradient(circle at 24% 22%, rgba(232, 150, 25, 0.18), transparent 28%),
    var(--color-surface);
  border: 1px solid rgba(16, 20, 16, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  padding: 22px;
}

.home-product-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
}

.home-pill {
  background: rgba(232, 150, 25, 0.14);
  border-radius: 999px;
  color: var(--color-accent-dark);
  font-size: 0.78rem;
  font-weight: 750;
  padding: 8px 12px;
}

.home-status {
  color: var(--color-muted);
  font-size: 0.82rem;
}

.home-flow {
  display: grid;
  gap: 12px;
}

.home-flow-row,
.home-action-card,
.home-feature-card,
.home-mini-card {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(16, 20, 16, 0.08);
  border-radius: var(--radius-md);
}

.home-flow-row {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 44px 1fr auto;
  padding: 14px;
}

.home-flow-number {
  align-items: center;
  background: var(--color-text);
  border-radius: 14px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.home-flow-title,
.home-card-title {
  font-weight: 800;
}

.home-flow-copy,
.home-card-copy,
.home-mini-copy {
  color: var(--color-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-top: 4px;
}

.home-mini-note {
  color: var(--color-muted);
  font-size: 0.78rem;
  line-height: 1.55;
  margin-top: 8px;
}

.home-flow-meta {
  color: var(--color-success);
  font-size: 0.78rem;
  font-weight: 800;
}

.home-feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-feature-card {
  padding: 22px;
}

.home-feature-label {
  color: var(--color-accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
  text-transform: uppercase;
}

.home-dashboard-head {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 18px 0 26px;
}

.home-eyebrow {
  color: var(--color-muted);
  font-size: 0.92rem;
  font-weight: 650;
  margin: 0 0 10px;
}

.home-dashboard-title {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  letter-spacing: -0.065em;
  line-height: 0.95;
  margin: 0;
}

.home-action-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.home-action-card {
  color: var(--color-text);
  display: block;
  min-height: 260px;
  padding: 26px;
  position: relative;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease;
}

.home-action-card:hover {
  border-color: rgba(16, 20, 16, 0.22);
  transform: translateY(-2px);
}

.home-action-card-primary {
  background: var(--color-text);
  color: #fff;
}

.home-action-card-primary .home-card-copy,
.home-action-card-primary .home-card-meta {
  color: rgba(255, 255, 255, 0.72);
}

.home-card-title {
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  letter-spacing: -0.05em;
  line-height: 1;
  margin-top: 58px;
}

.home-card-title-small {
  font-size: 1.35rem;
  letter-spacing: -0.035em;
  margin-top: 0;
}

.home-card-meta {
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-card-arrow {
  bottom: 24px;
  font-size: 1.25rem;
  position: absolute;
  right: 26px;
}

.home-mini-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.home-mini-card {
  color: var(--color-text);
  padding: 18px;
  text-decoration: none;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-main {
    padding: 24px 16px 48px;
  }

  .home-hero,
  .home-action-grid,
  .home-feature-grid,
  .home-mini-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
  }

  .home-product-card {
    padding: 16px;
  }

  .home-flow-row {
    grid-template-columns: 40px 1fr;
  }

  .home-flow-meta {
    grid-column: 2;
  }

  .home-dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-howto-row,
  .home-howto-row-reverse {
    grid-template-columns: 1fr;
  }

  .home-howto-row-reverse {
    direction: ltr;
  }

  .home-howto-image {
    height: 160px;
  }

  .home-pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .home-cta-band {
    padding: 32px 20px;
  }

  .home-cta-title {
    font-size: 1.5rem;
  }
}

.site-header-cta-form {
  display: inline;
}

.site-header-cta-form button {
  background: var(--color-text);
  border: 1px solid var(--color-text);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 750;
  padding: 8px 18px;
}

.home-status-active {
  color: var(--color-success);
  font-weight: 600;
}

.home-section {
  padding: 20px 0 40px;
}

.home-section-title {
  font-size: 2rem;
  letter-spacing: -0.04em;
  margin: 0;
  text-align: center;
}

.home-section-sub {
  color: var(--color-muted);
  margin: 8px 0 32px;
  text-align: center;
}

.home-feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.home-howto-steps {
  display: grid;
  gap: 32px;
}

.home-howto-row {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1fr;
}

.home-howto-row-reverse {
  direction: rtl;
}

.home-howto-row-reverse > * {
  direction: ltr;
}

.home-howto-label {
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 800;
}

.home-howto-title {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  margin: 8px 0;
}

.home-howto-copy {
  color: var(--color-muted);
  line-height: 1.7;
  margin: 0;
}

.home-howto-image {
  align-items: center;
  background: var(--color-surface-muted);
  border-radius: 16px;
  color: var(--color-muted);
  display: flex;
  font-size: 0.9rem;
  height: 200px;
  justify-content: center;
}

.home-pricing-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  max-width: 900px;
}

.home-pricing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 28px;
  position: relative;
  text-align: center;
}

.home-pricing-card-featured {
  border: 2px solid var(--color-accent);
}

.home-pricing-badge {
  background: var(--color-accent);
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  left: 50%;
  padding: 4px 14px;
  position: absolute;
  top: -12px;
  transform: translateX(-50%);
}

.home-pricing-name {
  color: var(--color-accent-dark);
  font-size: 0.85rem;
  font-weight: 750;
  margin-bottom: 4px;
}

.home-pricing-price {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.home-pricing-includes {
  color: var(--color-muted);
  font-size: 0.88rem;
  margin: -8px auto 24px;
  max-width: 640px;
  text-align: center;
}

.home-pricing-unit {
  color: var(--color-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.home-pricing-cta {
  display: block;
  margin-top: 20px;
  width: 100%;
}

.home-pricing-cta button {
  background: transparent;
  border: 1px solid rgba(16, 20, 16, 0.16);
  border-radius: 999px;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  min-height: 44px;
  padding: 0 24px;
  width: 100%;
}

.home-pricing-cta-primary button {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #fff;
}

.home-pricing-cta-disabled {
  background: #f6f2ea;
  border: 1px solid rgba(16, 20, 16, 0.14);
  border-radius: 999px;
  color: var(--color-muted);
  cursor: not-allowed;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  margin-top: 20px;
  min-height: 44px;
  opacity: 0.9;
  padding: 0 24px;
  width: 100%;
}

.home-pricing-note {
  color: var(--color-muted);
  font-size: 0.82rem;
  margin-top: 16px;
  opacity: 0.7;
  text-align: center;
}

.home-faq-list {
  display: grid;
  gap: 16px;
  margin: 0 auto;
  max-width: 760px;
}

.home-faq-item {
  background: var(--color-surface);
  border: 1px solid rgba(16, 20, 16, 0.08);
  border-radius: var(--radius-md);
  padding: 20px;
}

.home-faq-q {
  font-weight: 750;
  margin-bottom: 8px;
}

.home-faq-a {
  color: var(--color-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.home-cta-band {
  background: var(--color-text);
  border-radius: var(--radius-lg);
  color: #fff;
  margin-top: 40px;
  padding: 48px;
  text-align: center;
}

.home-cta-title {
  font-size: 2rem;
  letter-spacing: -0.04em;
  margin: 0;
}

.home-cta-sub {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.05rem;
  margin-top: 12px;
}

.home-cta-button-form {
  display: block;
  margin-top: 24px;
}

.home-cta-button-form button {
  background: var(--color-accent);
  border: none;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 750;
  min-height: 48px;
  padding: 0 32px;
}

.site-footer {
  border-top: 1px solid rgba(16, 20, 16, 0.08);
  padding: 28px;
  text-align: center;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.site-footer-links a {
  color: var(--color-muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.site-footer-links a:hover {
  color: var(--color-text);
}

.site-footer-copy {
  color: var(--color-muted);
  font-size: 0.8rem;
  margin-top: 12px;
  opacity: 0.7;
}

/* Legal pages（利用規約 / プライバシーポリシー / 特定商取引法） */
.legal-page {
  background:
    radial-gradient(circle at 16% 4%, rgba(232, 150, 25, 0.12), transparent 24%),
    var(--color-surface);
  border: 1px solid rgba(16, 20, 16, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  line-height: 1.85;
  margin: 0 auto;
  max-width: 820px;
  padding: clamp(28px, 5vw, 56px);
}

.legal-page h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.06em;
  line-height: 1;
  margin: 0 0 14px;
}

.legal-page h2 {
  border-bottom: 1px solid rgba(16, 20, 16, 0.1);
  font-size: 1.08rem;
  margin: 34px 0 12px;
  padding-bottom: 8px;
}

.legal-page p,
.legal-page li,
.legal-table dd {
  color: var(--color-muted);
  font-size: 0.96rem;
}

.legal-page a {
  color: var(--color-accent-dark);
  font-weight: 700;
}

.legal-meta {
  color: var(--color-accent-dark);
  font-size: 0.84rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  margin: 0 0 28px;
}

.legal-footer {
  color: var(--color-muted);
  margin-top: 48px;
  text-align: right;
}

.legal-table {
  display: grid;
  gap: 0;
  grid-template-columns: 190px 1fr;
  margin: 28px 0 0;
}

.legal-table dt,
.legal-table dd {
  border-top: 1px solid rgba(16, 20, 16, 0.1);
  padding: 18px 0;
}

.legal-table dt {
  font-weight: 800;
}

.legal-table dd {
  margin: 0;
}

.legal-table ul {
  margin: 0 0 8px;
  padding-left: 1.2em;
}

.terms-accept {
  background:
    radial-gradient(circle at 80% 12%, rgba(232, 150, 25, 0.16), transparent 24%),
    var(--color-surface);
  border: 1px solid rgba(16, 20, 16, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin: 48px auto;
  max-width: 640px;
  padding: clamp(28px, 5vw, 44px);
}

.terms-accept h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.06em;
  line-height: 1;
  margin: 0 0 18px;
}

.terms-accept p {
  color: var(--color-muted);
  line-height: 1.85;
}

.terms-accept a {
  color: var(--color-accent-dark);
  font-weight: 750;
}

.credit-summary {
  background: var(--color-surface);
  border: 1px solid rgba(16, 20, 16, 0.1);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.credit-summary-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.credit-summary-total {
  background: #fff5e6;
  border: 1px solid rgba(232, 150, 25, 0.32);
  border-radius: 999px;
  color: #7a4b09;
  flex: 0 0 auto;
  font-size: 0.92rem;
  padding: 8px 12px;
}

.credit-summary-table {
  border-collapse: collapse;
  margin-top: 16px;
  width: 100%;
}

.credit-summary-table th,
.credit-summary-table td {
  border-top: 1px solid rgba(16, 20, 16, 0.1);
  padding: 12px 0;
  text-align: left;
}

.credit-summary-table th {
  color: var(--color-muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.credit-summary-table td {
  color: var(--color-text);
  font-size: 0.96rem;
  font-weight: 700;
}

.terms-accept-button {
  background: var(--color-text);
  border: 1px solid var(--color-text);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  margin-top: 12px;
  min-height: 48px;
  padding: 0 22px;
}

@media (max-width: 640px) {
  .legal-table {
    grid-template-columns: 1fr;
  }

  .legal-table dt {
    border-top: 1px solid rgba(16, 20, 16, 0.1);
    padding-bottom: 4px;
  }

  .legal-table dd {
    border-top: 0;
    padding-top: 0;
  }
}

.settings-page-title,
.journal-page-title {
  margin: 0 0 24px;
}

.settings-card,
.journal-card {
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 24px;
  padding: 24px;
}

.settings-card-title,
.journal-card-title {
  color: #333;
  font-size: 1rem;
  margin: 0 0 16px;
}

.settings-card-copy,
.journal-note {
  color: #888;
  font-size: 0.85rem;
}

.settings-card-copy {
  margin: 0 0 8px;
}

.settings-input {
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  padding: 8px 12px;
}

.settings-input-credit {
  max-width: 300px;
  width: 100%;
}

.settings-textarea {
  resize: vertical;
  width: 100%;
}

.settings-actions {
  display: flex;
  gap: 12px;
}

.settings-submit,
.settings-back {
  border-radius: 6px;
  font-size: 0.95rem;
  padding: 12px 24px;
}

.settings-submit {
  background: #1a1a2e;
  border: none;
  color: #fff;
  cursor: pointer;
}

.settings-back {
  align-items: center;
  border: 1px solid #ccc;
  color: #333;
  display: inline-flex;
  text-decoration: none;
}

.journal-year-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.journal-year-chip {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #333;
  font-weight: 400;
  padding: 8px 20px;
  text-decoration: none;
}

.journal-year-chip.is-active {
  background: #1a1a2e;
  border-color: #1a1a2e;
  color: #fff;
  font-weight: 700;
}

.journal-export-form {
  margin: 0;
}

.journal-export-submit {
  background: #2e6b2e;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 12px 24px;
}

.journal-note {
  margin: 0;
}

.journal-note-link {
  color: #1a1a2e;
}

@keyframes receipt-batch-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes receipt-batch-dots {
  0%,
  80%,
  100% {
    opacity: 0.22;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.receipt-batch-progress-root {
  padding: 40px 0;
  text-align: center;
}

.receipt-batch-progress-title {
  margin-bottom: 8px;
}

.receipt-batch-progress-copy {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 24px;
}

.receipt-batch-progress-count {
  color: #555;
  font-size: 1rem;
  margin-bottom: 12px;
}

.receipt-batch-current-step {
  background: #f6f3ec;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin: 0 auto 20px;
  max-width: 520px;
  padding: 18px 20px;
}

.receipt-batch-current-step-label {
  color: var(--color-muted);
  display: block;
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.receipt-batch-current-step strong {
  color: var(--color-text);
  font-size: 1.35rem;
}

.receipt-batch-current-step p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 8px 0 0;
}

.receipt-batch-step-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0 auto 24px;
  max-width: 680px;
  padding: 0;
}

.receipt-batch-step {
  align-items: center;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-muted);
  display: flex;
  gap: 8px;
  justify-content: center;
  min-height: 48px;
  padding: 8px 10px;
}

.receipt-batch-step-marker {
  align-items: center;
  background: #ede7dc;
  border-radius: 50%;
  color: #6b6255;
  display: inline-flex;
  flex: 0 0 24px;
  font-size: 0.82rem;
  font-weight: 700;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.receipt-batch-step-name {
  font-size: 0.88rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.receipt-batch-step-done {
  color: #2f5f40;
}

.receipt-batch-step-done .receipt-batch-step-marker,
.receipt-batch-step-current .receipt-batch-step-marker {
  background: #2f5f40;
  color: #fff;
}

.receipt-batch-step-current {
  border-color: #2f5f40;
  box-shadow: 0 0 0 3px rgba(47, 95, 64, 0.12);
  color: var(--color-text);
}

.receipt-batch-count-summary {
  margin: 0 auto;
  max-width: 400px;
}

.receipt-batch-progress-meter {
  appearance: none;
  background: rgba(222, 215, 202, 0.55);
  border: 0;
  border-radius: 8px;
  display: block;
  height: 16px;
  margin: 0 auto;
  max-width: 400px;
  overflow: hidden;
  width: 100%;
}

.receipt-batch-progress-meter::-webkit-progress-bar {
  background: rgba(222, 215, 202, 0.55);
  border-radius: 8px;
}

.receipt-batch-progress-meter::-webkit-progress-value {
  background-image: linear-gradient(
    90deg,
    #2a382c 20%,
    #4d6352 42%,
    #2a382c 60%
  );
  background-size: 200% 100%;
  border-radius: 8px;
}

.receipt-batch-progress-meter::-moz-progress-bar {
  background-image: linear-gradient(
    90deg,
    #2a382c 20%,
    #4d6352 42%,
    #2a382c 60%
  );
  background-size: 200% 100%;
  box-shadow: 0 0 12px rgba(42, 56, 44, 0.25);
  border-radius: 8px;
}

.receipt-batch-progress-meter::-webkit-progress-value,
.receipt-batch-progress-meter::-moz-progress-bar {
  animation: receipt-batch-shimmer 2.4s linear infinite;
}

.receipt-batch-status-line {
  color: var(--color-muted);
  font-size: 0.85rem;
  margin-top: 16px;
}

.receipt-batch-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 2px;
  vertical-align: baseline;
}

.receipt-batch-dots span {
  animation: receipt-batch-dots 1.2s ease-in-out infinite;
  font-weight: 700;
}

.receipt-batch-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.receipt-batch-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .receipt-batch-progress-meter::-webkit-progress-value,
  .receipt-batch-progress-meter::-moz-progress-bar {
    animation: none;
    background: var(--color-text);
    background-image: none;
  }

  .receipt-batch-dots span {
    animation: none;
    opacity: 0.5;
  }
}

@media (max-width: 640px) {
  .receipt-batch-step-list {
    grid-template-columns: 1fr;
  }

  .receipt-batch-step {
    justify-content: flex-start;
    text-align: left;
  }
}

.receipt-batch-result {
  padding: 40px 0;
  text-align: center;
}

.receipt-batch-result-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.receipt-batch-result-title {
  margin-bottom: 8px;
}

.receipt-batch-result-copy {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 24px;
}

.receipt-batch-result-subtitle {
  margin-bottom: 8px;
}

.receipt-batch-result-detail {
  color: #666;
  font-size: 0.95rem;
  margin: 0;
}

.receipt-batch-failures {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  color: #721c24;
  margin: 16px auto;
  max-width: 400px;
  padding: 12px 16px;
  text-align: left;
}

.receipt-batch-failure-list {
  margin: 8px 0 0;
  padding-left: 20px;
}

.receipt-batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.receipt-batch-button {
  border-radius: 6px;
  padding: 12px 32px;
  text-decoration: none;
}

.receipt-batch-button-primary {
  background: #1a1a2e;
  color: #fff;
}

.receipt-batch-button-secondary {
  border: 1px solid #ccc;
  color: #333;
}

.receipt-page-title {
  margin: 0 0 8px;
}

.receipt-page-copy {
  color: #666;
  margin: 0 0 24px;
}

.receipt-empty-credit {
  background: var(--color-surface);
  border: 1px solid rgba(16, 20, 16, 0.1);
  border-radius: 8px;
  padding: 28px;
}

.receipt-empty-credit h3 {
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.receipt-empty-credit p {
  color: var(--color-muted);
  line-height: 1.7;
  margin: 0 0 18px;
}

.receipt-empty-credit-button {
  background: var(--color-text);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 750;
  min-height: 44px;
  padding: 0 18px;
  align-items: center;
  text-decoration: none;
}

.receipt-dropzone {
  background: #fafafa;
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 8px;
}

.receipt-dropzone.is-dragover {
  background: #f0f0f8;
  border-color: #1a1a2e;
}

.receipt-dropzone-label {
  cursor: pointer;
  display: block;
  margin: 0;
  padding: 40px 24px;
  text-align: center;
}

.receipt-dropzone-icon {
  font-size: 3rem;
}

.receipt-dropzone-copy {
  color: #666;
  line-height: 1.6;
  margin-top: 8px;
}

.receipt-dropzone-meta {
  color: #aaa;
}

.receipt-preview-area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.receipt-thumb-item {
  display: inline-block;
  position: relative;
}

.receipt-thumb-image {
  border: 1px solid #ddd;
  border-radius: 4px;
  height: 80px;
  object-fit: cover;
  width: 80px;
}

.receipt-thumb-file {
  align-items: center;
  background: #f5f7fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
  display: flex;
  font-size: 18px;
  font-weight: 700;
  height: 80px;
  justify-content: center;
  width: 80px;
}

.receipt-thumb-remove {
  background: #e74c3c;
  border: none;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  height: 20px;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: -6px;
  top: -6px;
  width: 20px;
}

.receipt-counter-row {
  margin-top: 8px;
  text-align: right;
}

.receipt-file-counter {
  color: #888;
  font-size: 0.9rem;
}

.receipt-submit-row {
  margin-top: 24px;
}

.receipt-submit-button {
  background: #1a1a2e;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.5;
  padding: 14px 40px;
  width: 100%;
}

.receipt-submit-button:disabled {
  cursor: default;
}

.receipt-submit-button.is-ready {
  cursor: pointer;
  opacity: 1;
}

/* 画面には見せず、キーボード・スクリーンリーダー用に file input を残す */
.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
}

.home-trust-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-trust-item {
  background: rgba(255, 253, 248, 0.76);
  border: 1px solid rgba(16, 20, 16, 0.08);
  border-radius: 16px;
  padding: 16px;
}

.home-trust-item strong,
.home-trust-item span {
  display: block;
}

.home-trust-item strong {
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.45;
}

.home-trust-item span {
  color: var(--color-muted);
  font-size: 0.84rem;
  line-height: 1.65;
  margin-top: 6px;
}

.home-ui-shot {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 253, 248, 0.94)),
    var(--color-surface);
  border: 1px solid rgba(16, 20, 16, 0.1);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  min-height: 220px;
  overflow: hidden;
  padding: 16px;
}

.home-ui-window-bar {
  align-items: center;
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.home-ui-window-bar span {
  background: #d8cfc0;
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.home-ui-window-bar span:first-child {
  background: var(--color-accent);
}

.home-ui-shot-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.home-ui-drop-area {
  align-items: center;
  background: #f7f2e8;
  border: 2px dashed rgba(232, 150, 25, 0.42);
  border-radius: 14px;
  color: var(--color-muted);
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 110px;
  padding: 16px;
  text-align: center;
}

.home-ui-drop-area strong {
  color: var(--color-text);
}

.home-ui-drop-area small,
.home-ui-export-card small {
  color: var(--color-muted);
  font-size: 0.78rem;
}

.home-ui-drop-icon {
  align-items: center;
  background: var(--color-text);
  border-radius: 12px;
  color: #fff;
  display: inline-flex;
  font-size: 1.4rem;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.home-ui-thumb-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.home-ui-thumb-row span {
  background: #efe8dc;
  border-radius: 8px;
  height: 40px;
  width: 40px;
}

.home-ui-sheet-grid {
  display: grid;
  grid-template-columns: 0.7fr 1fr 0.8fr 1.15fr;
  overflow: hidden;
  border: 1px solid rgba(16, 20, 16, 0.08);
  border-radius: 12px;
}

.home-ui-sheet-grid strong,
.home-ui-sheet-grid span {
  border-bottom: 1px solid rgba(16, 20, 16, 0.06);
  border-right: 1px solid rgba(16, 20, 16, 0.06);
  font-size: 0.78rem;
  min-width: 0;
  padding: 10px 8px;
}

.home-ui-sheet-grid strong {
  background: #f3eadb;
  color: #7a4b09;
}

.home-ui-sheet-grid span {
  background: rgba(255, 255, 255, 0.72);
  color: var(--color-muted);
}

.home-ui-export-card {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(16, 20, 16, 0.08);
  border-radius: 14px;
  padding: 18px;
}

.home-ui-year-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.home-ui-year-list span,
.home-ui-year-list strong {
  border: 1px solid rgba(16, 20, 16, 0.12);
  border-radius: 999px;
  font-size: 0.86rem;
  padding: 8px 12px;
}

.home-ui-year-list strong {
  background: var(--color-text);
  color: #fff;
}

.home-ui-export-card button {
  background: var(--color-text);
  border: 0;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  min-height: 44px;
  padding: 0 18px;
  width: 100%;
}

.settings-page-title,
.journal-page-title,
.receipt-page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.settings-card,
.journal-card,
.receipt-dropzone,
.receipt-empty-credit {
  background: var(--color-surface);
  border: 1px solid rgba(16, 20, 16, 0.1);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

.settings-card-title,
.journal-card-title {
  color: var(--color-text);
  font-size: 1rem;
}

.settings-card-copy,
.journal-note,
.receipt-page-copy,
.receipt-dropzone-copy {
  color: var(--color-muted);
}

.settings-input {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
}

.settings-submit,
.settings-back,
.journal-export-submit,
.receipt-submit-button,
.receipt-batch-button,
.journal-year-chip {
  border-radius: 999px;
}

.settings-submit,
.journal-year-chip.is-active,
.journal-export-submit,
.receipt-submit-button.is-ready,
.receipt-batch-button-primary,
.home-mini-card form .site-logout {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #fff;
}

.settings-back,
.journal-year-chip,
.receipt-batch-button-secondary {
  border: 1px solid rgba(16, 20, 16, 0.14);
  color: var(--color-text);
}

.receipt-dropzone {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.86), rgba(255, 255, 255, 0.72)),
    var(--color-surface);
  border-style: dashed;
  border-width: 2px;
}

.receipt-dropzone.is-dragover {
  background: #fff5e6;
  border-color: var(--color-accent);
}

.receipt-submit-button {
  background: var(--color-text);
}

.home-mini-card form {
  margin-top: 16px;
}

.home-mini-card form .site-logout {
  min-height: 42px;
  padding: 0 18px;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-main {
    max-width: 100%;
    overflow: hidden;
    padding: 24px 16px 48px;
  }

  .home-shell,
  .home-shell > *,
  .home-hero > *,
  .home-product-card,
  .home-flow,
  .home-flow-row,
  .home-feature-card,
  .home-faq-item,
  .home-pricing-card {
    min-width: 0;
  }

  .home-hero,
  .home-action-grid,
  .home-feature-grid,
  .home-mini-grid,
  .home-pricing-grid,
  .home-trust-strip,
  .home-howto-row,
  .home-howto-row-reverse {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-hero {
    min-height: auto;
  }

  .home-kicker,
  .home-title,
  .home-lead,
  .home-prelaunch-title,
  .home-prelaunch-copy,
  .home-faq-a {
    overflow-wrap: anywhere;
  }

  .home-kicker {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .home-product-card {
    padding: 16px;
  }

  .home-product-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .home-flow-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .home-flow-meta {
    grid-column: 2;
  }

  .home-dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-howto-row-reverse {
    direction: ltr;
  }

  .home-ui-shot,
  .home-howto-image {
    min-height: 190px;
  }

  .home-pricing-grid {
    max-width: 400px;
    width: 100%;
  }

  .home-cta-band {
    padding: 32px 20px;
  }

  .home-cta-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .site-nav {
    gap: 10px 14px;
  }

  .site-header-cta-form,
  .site-header-cta-form button,
  .home-login-button,
  .home-login-button button,
  .home-button-secondary {
    width: 100%;
  }

  .home-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-title {
    font-size: 2.45rem;
  }

  .home-ui-sheet-grid {
    grid-template-columns: 0.65fr 1fr 0.8fr 1fr;
  }

  .home-ui-sheet-grid strong,
  .home-ui-sheet-grid span {
    font-size: 0.7rem;
    padding: 8px 6px;
  }
}
