input, select, textarea, .form-control {
  font-size: 16px;
}

.btn-touch {
  min-height: 44px;
}

.content-wrapper {
  overflow-x: hidden;
}

.test-wrap {
  max-width: 440px;
  margin: 1.5rem auto 2rem;
}

.test-card {
  background: #fff;
  border-radius: 20px;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.test-card h1 {
  font-size: 1.45rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
}

.test-card > p {
  color: #64748b;
  margin-bottom: 1.25rem;
}

.key-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 132px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  cursor: pointer;
  margin: 0;
}

.key-drop input {
  display: none;
}

.key-drop-title {
  font-weight: 650;
}

.key-drop-hint {
  color: #64748b;
  font-size: 0.92rem;
}

.test-or {
  text-align: center;
  color: #94a3b8;
  margin: 0.9rem 0;
  font-size: 0.85rem;
}

.test-paste {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem 0.9rem;
  resize: vertical;
  min-height: 120px;
  background: #fff;
}

.test-submit {
  width: 100%;
  margin-top: 0.9rem;
  border: 0;
  border-radius: 14px;
  min-height: 48px;
  background: #0f172a;
  color: #fff;
  font-weight: 650;
}

.test-submit:disabled {
  opacity: 0.55;
  cursor: default;
}

.checkout-spin {
  width: 28px;
  height: 28px;
  margin: 0 auto 1rem;
  border: 3px solid #e7e5e4;
  border-top-color: #1c1917;
  border-radius: 50%;
  animation: checkout-spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .checkout-spin { animation: none; }
}

@keyframes checkout-spin {
  to { transform: rotate(360deg); }
}

.test-error {
  margin-top: 0.75rem;
  color: #b91c1c;
  font-size: 0.92rem;
}

.test-result {
  margin-top: 1.1rem;
  border-radius: 16px;
  padding: 1rem 1rem 0.4rem;
}

.test-result.is-ok { background: #ecfdf3; }
.test-result.is-bad { background: #fef2f2; }

.test-result-status {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.test-result.is-ok .test-result-status { color: #15803d; }
.test-result.is-bad .test-result-status { color: #b91c1c; }

.test-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.test-line span { color: #64748b; }
.test-line strong { font-weight: 650; word-break: break-all; text-align: right; }

.toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1080;
  width: min(380px, calc(100vw - 2rem));
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast-note {
  pointer-events: auto;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  animation: toast-in 0.35s ease, toast-out 0.45s ease 4.6s forwards;
}

.toast-note.is-ok { background: #ecfdf3; color: #14532d; }
.toast-note.is-bad { background: #fef2f2; color: #7f1d1d; }

.fade-in {
  animation: toast-in 0.35s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(-6px); visibility: hidden; }
}

.page-wrap {
  max-width: 640px;
  margin: 0.5rem auto 2rem;
}

.page-kicker {
  color: #64748b;
  margin-bottom: 1.25rem;
}

.field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  margin-left: 0.35rem;
  padding: 0;
  border: 1px solid #1c1917;
  border-radius: 999px;
  background: transparent;
  color: #1c1917;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
}

.help-copy p {
  margin-bottom: 0.75rem;
}

.help-copy h6 {
  margin: 1rem 0 0.5rem;
  font-weight: 700;
}

.usb-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.usb-step {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-radius: 16px;
  padding: 0.75rem 0.75rem 0.75rem 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.usb-step:hover {
  border-color: #0f172a;
  color: inherit;
  text-decoration: none;
}

.usb-step-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}

.usb-step-copy {
  flex: 1;
  min-width: 0;
}

.usb-step-copy strong {
  display: block;
  font-weight: 700;
}

.usb-step-copy span {
  display: block;
  color: #64748b;
  font-size: 0.88rem;
  margin-top: 0.1rem;
}

.usb-step-action {
  flex: none;
  background: #0f172a;
  color: #fff;
  border-radius: 12px;
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  font-weight: 650;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
}

.usb-verify {
  display: inline-block;
  margin-top: 0.75rem;
  color: #64748b;
  font-size: 0.92rem;
}

.history-page {
  margin: 0 0 2rem;
}

.history-intro {
  margin: 0 0 0.75rem;
}

.history-intro h1 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.history-intro p {
  color: #64748b;
  font-size: 0.92rem;
  margin: 0.15rem 0 0;
}

.history-item {
  background: #fff;
  border-radius: 20px;
  padding: 1.2rem 1.2rem 1rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  margin-bottom: 0.9rem;
}

.history-item h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.depot-use ol {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
}

.depot-use li {
  margin: 0.4rem 0;
}

.depot-use h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0.4rem 0 0.6rem;
}

.depot-use a {
  color: inherit;
}

.depot-messages {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.depot-messages th,
.depot-messages td {
  border-top: 1px solid #e7e5e4;
  padding: 0.5rem 0.45rem;
  vertical-align: top;
  text-align: left;
}

.depot-messages code {
  word-break: break-word;
}

.history-meta {
  color: #64748b;
  margin: 0.2rem 0 0.2rem;
}

.request-list {
  margin-top: 1.25rem;
}

.request-list h2 {
  font-size: 1rem;
  margin: 0 0 0.6rem;
}

.request-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-top: 1px solid #e2e8f0;
}

.request-row span { color: #64748b; }

.checklist li {
  padding: 0.6rem 0;
  border-bottom: 1px solid #eee;
}

body.panel-corp {
  background: #f4f1ea;
  color: #1c1917;
}

body.panel-corp .content-wrapper,
body.panel-corp .main-header,
body.panel-corp .main-footer {
  background: #f4f1ea;
}

body.panel-corp .main-header {
  border-bottom: 1px solid #e7e5e4;
  box-shadow: none;
}

body.panel-corp .main-sidebar,
body.panel-corp .main-sidebar .brand-link {
  background: #1c1917 !important;
  border-right: 0;
}

body.panel-corp .brand-link {
  border-bottom: 1px solid #292524;
}

body.panel-corp .brand-text {
  font-family: system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 500;
  color: #f5f0e8;
}

body.panel-corp .nav-sidebar .nav-link {
  border-radius: 10px;
  margin: 0.12rem 0.65rem;
}

body.panel-corp .sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active,
body.panel-corp .sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link:hover {
  background: #292524;
  color: #f5f0e8;
}

body.panel-corp .main-header .nav-link,
body.panel-corp .main-header .btn-link {
  color: #1c1917;
}

body.panel-corp .badge-primary,
body.panel-corp .btn-primary,
body.panel-corp .test-submit,
body.panel-corp .usb-step-icon,
body.panel-corp .usb-step-action {
  background: #1c1917;
  border-color: #1c1917;
}

body.panel-corp .badge-primary {
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

body.panel-corp .test-card,
body.panel-corp .history-item {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 16px;
  box-shadow: none;
}

body.panel-corp .test-card h1,
body.panel-corp .history-intro h1,
body.panel-corp .history-item h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

body.panel-corp .form-control,
body.panel-corp .test-paste {
  border: 1px solid #d6d3d1;
  border-radius: 10px;
}

body.panel-corp .form-control:focus,
body.panel-corp .test-paste:focus {
  border-color: #1c1917;
  box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.08);
}

body.panel-corp .page-kicker,
body.panel-corp .history-intro p,
body.panel-corp .history-meta,
body.panel-corp .test-card > p {
  color: #57534e;
}

.auth-corp {
  margin: 0;
  min-height: 100vh;
  background: #f4f1ea;
  color: #1c1917;
  font-family: Georgia, "Times New Roman", serif;
}

.auth-split {
  display: grid;
  grid-template-columns: minmax(280px, 42%) 1fr;
  min-height: 100vh;
}

.auth-brand {
  background: #1c1917;
  color: #f5f0e8;
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.auth-mark {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  margin: 0 0 1rem;
}

.auth-brand h1 {
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.auth-brand p { margin: 0; color: #d6d3d1; max-width: 28rem; }

.auth-panel {
  padding: 2rem 8vw 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: system-ui, sans-serif;
}

.auth-panel-top { display: flex; justify-content: flex-end; margin-bottom: 2rem; }
.auth-panel-top form { display: flex; align-items: center; gap: 0.4rem; }
.auth-panel .btn {
  border: 1px solid #d6d3d1;
  background: transparent;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  cursor: pointer;
}
.auth-panel .btn-primary { background: #1c1917; color: #fff; border-color: #1c1917; }

.auth-panel h2 { font-family: Georgia, serif; font-weight: 500; margin: 0 0 0.75rem; }
.auth-note { color: #57534e; margin: 0 0 1.25rem; }
.auth-form { display: flex; flex-direction: column; gap: 0.35rem; max-width: 26rem; }
.auth-form label { font-size: 0.82rem; margin-top: 0.55rem; }
.auth-form .cf-turnstile { margin-top: 1rem; }
.auth-form input {
  border: 1px solid #d6d3d1;
  border-radius: 10px;
  padding: 0.75rem 0.8rem;
  font-size: 1rem;
  background: #fff;
}
.auth-panel .btn-dark,
body.panel-corp .btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  border: 0;
  border-radius: 10px;
  min-height: 46px;
  background: #1c1917;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 0 1.2rem;
}

.auth-form button, .auth-panel .linkish {
  margin-top: 1rem;
  border: 0;
  border-radius: 10px;
  min-height: 46px;
  background: #1c1917;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.auth-links { margin: 0.8rem 0 0; }
.auth-links a, .auth-panel .linkish {
  background: none;
  color: #1c1917;
  min-height: 0;
  padding: 0;
  font-weight: 500;
  text-decoration: underline;
}
.auth-note a { color: #1c1917; }

.choice-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(17, 17, 17, 0.46);
}

.choice-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 1.4rem 1.3rem 1.2rem;
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.2);
}

.choice-card p {
  margin: 0 0 1.1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.45;
  color: #111;
}

.choice-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.choice-actions button {
  min-width: 5.5rem;
  min-height: 40px;
  border-radius: 7px;
  border: 0;
  font-weight: 650;
}

.choice-actions [data-no] {
  background: #fff;
  color: #111;
  border: 1px solid #d6d3d1;
}

.choice-actions [data-yes] {
  background: #c8102e;
  color: #fff;
}

.member-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #d6d3d1;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  color: #1c1917;
  background: #fff;
}

.member-chip.is-on {
  background: #1c1917;
  border-color: #1c1917;
  color: #fff;
}

.member-chip strong {
  font-weight: 650;
}

.purchase-wait {
  margin-bottom: 0.85rem;
}

.purchase-cancel {
  width: 100%;
  border: 1px solid #b91c1c;
  border-radius: 14px;
  min-height: 44px;
  background: transparent;
  color: #b91c1c;
  font-weight: 650;
}

@media (max-width: 800px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { min-height: 28vh; padding: 2rem 1.5rem; }
  .auth-panel { padding: 1.5rem; }
}

@media (max-width: 576px) {
  .btn-mobile-block {
    display: block;
    width: 100%;
  }

  .content-header h1 {
    font-size: 1.4rem;
  }
}
