:root {
  color-scheme: light;
  --ink: #20372e;
  --muted: #55645d;
  --green: #24664e;
  --green-hover: #194c39;
  --line: #d6dfd9;
  --paper: #fff;
  --wash: #f4f7f3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  word-break: keep-all;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
body.dialog-open {
  overflow: hidden;
}
button,
input {
  font: inherit;
}
a {
  color: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.7;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid #b46518;
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  padding: 12px;
  background: white;
  z-index: 5;
}
.skip-link:focus {
  top: 8px;
}
p {
  margin: 0;
}
h1,
h2 {
  margin: 0;
  line-height: 1.35;
}
.site-header {
  max-width: 1040px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  padding-top: max(8px, env(safe-area-inset-top));
  min-height: 54px;
}
.church-name {
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
}
.qr-shortcut {
  font-size: 14px;
  color: var(--green);
  padding: 12px 0 12px 12px;
  text-underline-offset: 4px;
}
main {
  max-width: 1000px;
  padding: 0 20px 24px;
  margin: auto;
}
.page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}
.page-nav a {
  padding: 11px 8px;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.page-nav a[aria-current] {
  color: var(--green);
  font-weight: 700;
  border-bottom: 2px solid var(--green);
}
.page-heading {
  margin: 20px 0 16px;
}
.page-heading h1 {
  font-size: 25px;
  letter-spacing: -0.03em;
}
.page-heading p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}
.page-layout {
  display: grid;
  gap: 28px;
}
.account-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 12px;
  padding: 17px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.receiving-bank {
  font-size: 14px;
  font-weight: 700;
}
.account-number {
  font-size: clamp(19px, 5.3vw, 24px);
  line-height: 1.4;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.account-owner {
  font-size: 13px;
  color: var(--muted);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  line-height: 1.4;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
}
.primary {
  background: var(--green);
  color: white;
}
.secondary {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
.compact-copy {
  font-size: 13px;
  padding: 10px;
  min-height: 44px;
  white-space: nowrap;
}
.copy-status {
  grid-column: 1/-1;
  font-size: 13px;
  color: var(--green);
}
.copy-status:not(:empty) {
  padding-top: 10px;
}
.manual-copy {
  grid-column: 1/-1;
  font-size: 14px;
  margin-top: 10px;
}
.manual-copy input {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 6px;
  font-size: 18px;
}
.bank-section {
  margin-top: 24px;
}
.bank-heading h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
}
.bank-heading p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 5px;
}
.bank-controls {
  margin-top: 16px;
}
.bank-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.bank-tabs button {
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 2px;
  min-height: 44px;
  font-size: 15px;
}
.bank-tabs button[aria-pressed="true"] {
  color: var(--green);
  font-weight: 700;
  border-bottom-color: var(--green);
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 12px 0 16px;
}
.search-wrap:focus-within {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}
.search-wrap input {
  min-width: 0;
  width: 100%;
  height: 46px;
  border: 0;
  background: none;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 16px;
  outline: none;
}
.search-wrap input::placeholder {
  color: #627168;
}
#clear-search {
  border: 0;
  background: none;
  color: var(--green);
  min-width: 48px;
  min-height: 44px;
  margin-right: 4px;
  padding: 8px;
  font-size: 13px;
}
.bank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 8px;
  margin-top: 16px;
}
.bank-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  min-height: 112px;
  padding: 14px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
.bank-choice img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
}
.bank-choice strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.bank-choice span {
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}
.bank-choice:active {
  background: #e8f0e8;
  border-color: var(--green);
}
.empty-state {
  text-align: center;
  padding: 32px 0;
  color: var(--muted);
}
.text-link,
.text-button {
  color: var(--green);
  font-size: 14px;
  text-underline-offset: 4px;
}
.text-button {
  border: 0;
  background: none;
  padding: 12px 6px;
  min-height: 44px;
  text-decoration: underline;
}
.legacy-toggle {
  display: block;
  margin: 16px auto 0;
}
.help-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  margin-top: 24px;
  font-size: 14px;
}
.help-section summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.help-section summary::after {
  content: "+";
  margin-left: auto;
  font-size: 20px;
}
.help-section[open] summary::after {
  content: "−";
}
.help-section p {
  margin-top: 12px;
  color: var(--muted);
}
.qr-section {
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 16px;
}
.qr-section summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  min-height: 48px;
}
.qr-content {
  text-align: center;
  padding: 12px 0 24px;
}
.qr-content > p {
  color: var(--muted);
  font-size: 14px;
}
.qr-image {
  display: block;
  width: 232px;
  max-width: 100%;
  height: auto;
  background: white;
  margin: 18px auto 12px;
}
.qr-content .qr-caption {
  color: var(--ink);
  font-weight: 700;
}
.qr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 320px;
  margin: 16px auto 8px;
}
.print-file {
  display: inline-block;
  padding: 12px 6px;
  min-height: 44px;
}
.qr-content .page-url {
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-all;
  margin-top: 8px;
}
#share-status:empty {
  display: none;
}
footer {
  display: flex;
  justify-content: space-between;
  max-width: 960px;
  margin: auto;
  padding: 8px 20px max(24px, env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--muted);
}
footer a {
  text-underline-offset: 4px;
}
dialog {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 18px 18px 0 0;
  background: white;
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: rgb(16 29 23 / 0.5);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 12px;
}
.dialog-head h2 {
  font-size: 21px;
}
.close-button {
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  color: var(--muted);
  background: none;
  border: 0;
  font-size: 14px;
}
.dialog-content {
  padding: 0 20px 8px;
}
#launch-description {
  color: var(--muted);
  font-size: 15px;
}
.dialog-account {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 18px 0 12px;
  padding: 16px;
  background: var(--wash);
  border-radius: 10px;
}
.dialog-account span {
  font-size: 14px;
}
.dialog-account strong {
  font-size: clamp(22px, 6vw, 28px);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
#dialog-copy-status {
  color: var(--green);
  font-size: 14px;
  min-height: 21px;
}
.transfer-instruction {
  font-size: 15px;
  margin-top: 12px;
}
#launch-status,
#app-help {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
}
#launch-status:empty {
  display: none;
}
.dialog-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
}
.dialog-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.dialog-actions {
  position: sticky;
  bottom: 0;
  padding: 12px 20px max(16px, env(safe-area-inset-bottom));
  background: white;
  border-top: 1px solid var(--line);
}
.dialog-actions .button {
  width: 100%;
  min-height: 54px;
  font-size: 17px;
}
.no-script {
  margin-top: 16px;
}
@media (hover: hover) {
  .primary:hover {
    background: var(--green-hover);
  }
  .secondary:hover,
  .bank-choice:hover {
    background: #edf3ee;
    border-color: var(--green);
  }
}
@media (min-width: 760px) {
  .site-header {
    padding: 20px 40px;
    min-height: 82px;
  }
  .church-name {
    font-size: 21px;
  }
  main {
    padding: 0 40px 36px;
  }
  .page-nav {
    max-width: 360px;
  }
  .page-heading {
    margin: 32px 0 24px;
  }
  .page-heading h1 {
    font-size: 34px;
  }
  .page-heading p {
    font-size: 16px;
  }
  .page-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 40px;
    align-items: start;
  }
  .account-panel {
    padding: 20px;
  }
  .account-number {
    font-size: 27px;
  }
  .qr-section {
    border-bottom: 0;
    position: sticky;
    top: 24px;
  }
  .qr-section summary {
    text-align: center;
    list-style: none;
  }
  .qr-section summary::-webkit-details-marker {
    display: none;
  }
  .bank-choice {
    min-height: 122px;
  }
  dialog {
    inset: 0;
    width: min(480px, calc(100% - 40px));
    max-height: calc(100dvh - 48px);
    margin: auto;
    border-radius: 16px;
  }
  footer {
    padding: 24px 20px 36px;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 359px) {
  main {
    padding-left: 14px;
    padding-right: 14px;
  }
  .site-header {
    padding-left: 14px;
    padding-right: 14px;
  }
  .account-panel {
    padding: 14px 12px;
    gap: 0 8px;
  }
  .account-number {
    font-size: 19px;
  }
  .compact-copy {
    padding: 8px;
    font-size: 12px;
  }
  .bank-choice strong {
    font-size: 14px;
  }
  .bank-choice span {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  dialog[open] {
    animation: sheet-enter 160ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes sheet-enter {
    from {
      transform: translateY(24px);
    }
    to {
      transform: translateY(0);
    }
  }
}
@media print {
  @page {
    size: A4;
    margin: 24mm;
  }
  body {
    background: white;
    color: black;
    padding: 0;
  }
  .site-header,
  .page-nav,
  .bank-section,
  .help-section,
  footer,
  .qr-actions,
  .text-button,
  .print-file,
  .copy-status,
  .manual-copy,
  .compact-copy,
  .skip-link,
  #share-status,
  dialog {
    display: none !important;
  }
  main {
    padding: 0;
    max-width: none;
  }
  .page-heading {
    text-align: center;
    margin-bottom: 28px;
  }
  .page-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .transfer-column {
    width: 100%;
  }
  .account-panel {
    display: block;
    padding: 0;
    text-align: center;
    border: 0;
  }
  .qr-section {
    position: static;
    border: 0;
    padding: 0;
    break-inside: avoid;
  }
  .qr-section summary {
    display: none;
  }
  .qr-image {
    width: 75mm;
    height: 75mm;
    margin: 12px auto;
  }
  .qr-content {
    padding: 0;
  }
  a {
    text-decoration: none;
  }
}
