@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..800;1,9..40,300..800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: #FBFBF9;
  color: #080616;
  min-height: 100vh;
}
.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}
h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.subtitle { font-size: 14px; color: #666; margin-bottom: 24px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.btn:active { opacity: 0.85; transform: scale(0.98); }
.btn-primary { background: #088395; color: #fff; width: 100%; }
.btn-secondary { background: #fff; color: #088395; border: 2px solid #088395; width: 100%; }
.btn-ghost { background: rgba(255,255,255,0.18); color: #fff; }

/* Cards */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 12px;
}

/* Notice */
.notice {
  background: #f0f5ff;
  border: 1px solid #c5d5ff;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Footer */
footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  text-align: center;
  padding: 14px;
  background: #FBFBF9;
  border-top: 1px solid #C5DFE3;
  font-size: 13px;
  color: #7AA8A8;
}
footer a { color: #088395; text-decoration: none; }

/* Viewer */
.bank-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.bank-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.bank-btn:active { background: #f5f5f5; }
.bank-icon { font-size: 24px; line-height: 1; }
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,30,0.92);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal.active { display: flex; }
.modal-canvas { border-radius: 12px; max-width: min(300px, 90vw); }
.modal-actions { display: flex; gap: 12px; margin-top: 24px; width: 100%; max-width: 300px; }
.error-state { text-align: center; padding: 64px 24px; }
.error-state .error-icon { font-size: 48px; margin-bottom: 16px; }
.error-state h2 { margin-bottom: 8px; }
.error-state p { color: #666; font-size: 15px; }

/* Generator */
.saved-card { background: #f0f5ff; border: 1px solid #c5d5ff; margin-bottom: 24px; }
.saved-label, .link-label {
  font-size: 11px;
  color: #0057ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.saved-url, .generated-url {
  font-size: 12px;
  color: #444;
  word-break: break-all;
  margin-bottom: 14px;
  font-family: 'Courier New', monospace;
  line-height: 1.5;
}
.qr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  margin-bottom: 8px;
}
.qr-item-info { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.btn-remove {
  background: none;
  border: none;
  font-size: 16px;
  color: #bbb;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.btn-remove:active { background: #f0f0f0; color: #888; }
.error-msg { color: #d32f2f; font-size: 14px; margin: 8px 0 12px; }
.link-card { margin-top: 20px; }
.ios-tooltip {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #1a1a2e;
  color: #fff;
  padding: 24px 20px 36px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
  z-index: 200;
  line-height: 1.6;
}
.tooltip-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}
.ios-steps { margin-top: 14px; font-size: 15px; }
.ios-steps strong { color: #fff; }
.add-btn-wrap { margin: 4px 0 0; }

/* Bottom sheet */
.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(28,41,60,0.6);
  z-index: 300;
  align-items: flex-end;
}
.sheet {
  background: #FBFBF9;
  border-radius: 0;
  border-top: 3px solid #1C293C;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 16px 20px 52px;
  -webkit-overflow-scrolling: touch;
}
.sheet-handle {
  width: 36px; height: 4px;
  background: #1C293C; border-radius: 2px;
  opacity: 0.2;
  margin: 0 auto 20px;
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #1C293C;
}
.sheet-title {
  font-size: 17px; font-weight: 900;
  color: #1C293C; letter-spacing: -0.02em;
  margin: 0; font-family: 'Inter', sans-serif;
}
.sheet-close {
  background: #FDC800;
  border: 2px solid #1C293C;
  font-size: 14px; color: #1C293C;
  cursor: pointer; padding: 4px 8px;
  line-height: 1; border-radius: 4px;
  box-shadow: 2px 2px 0 #1C293C;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s, box-shadow 0.08s;
}
.sheet-close:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 #1C293C; }
.sheet-section { margin-bottom: 20px; }
.sheet-section:last-child { margin-bottom: 0; }
.sheet-h3 {
  font-size: 11px; font-weight: 700;
  color: #1C293C; text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
}
.sheet-p {
  font-size: 14px; color: #1C293C; opacity: 0.65; line-height: 1.65;
}

/* Footer about button */
.footer-about-btn {
  background: none; border: none;
  color: #088395; font-size: 12px;
  cursor: pointer; padding: 0;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* About */
.about-page h1 { margin-bottom: 24px; }
.about-page section { margin-bottom: 28px; }
.about-page h2 { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: #088395; text-transform: uppercase; letter-spacing: 0.4px; }
.about-page p { font-size: 15px; line-height: 1.65; color: #3A6B6B; }
.about-back { margin-top: 32px; display: block; text-align: center; }
