:root {
  color-scheme: dark;
  font-family: Inter, "Noto Sans JP", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", sans-serif;
  background: #020817;
  color: #f5f9ff;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #020817;
}

body.qr-v258-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 15%, rgba(31, 105, 230, .30), transparent 30rem),
    radial-gradient(circle at 88% 72%, rgba(28, 196, 211, .18), transparent 34rem),
    linear-gradient(145deg, #020817 0%, #061936 58%, #0a3151 100%);
  color: #f5f9ff;
}

button,
input,
a {
  font: inherit;
}

a {
  color: inherit;
}

.qr-v258-header {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.qr-v258-back,
.qr-v258-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  text-decoration: none;
}

.qr-v258-back {
  padding: 10px 15px;
  border: 1px solid rgba(132, 206, 255, .42);
  border-radius: 14px;
  background: #08234a;
  font-size: 14px;
  font-weight: 800;
}

.qr-v258-back:hover,
.qr-v258-back:focus-visible {
  border-color: #75dcff;
  background: #0d3267;
  outline: 3px solid rgba(91, 220, 255, .23);
  outline-offset: 2px;
}

.qr-v258-brand img {
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(0, 4, 20, .36);
}

.qr-v258-brand > span {
  display: grid;
  gap: 2px;
}

.qr-v258-brand strong {
  font-size: 16px;
  letter-spacing: .02em;
}

.qr-v258-brand small {
  color: #9adff5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.qr-v258-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 14px auto 0;
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(420px, 1.22fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: center;
}

.qr-v258-intro {
  padding: clamp(14px, 2vw, 28px);
}

.qr-v258-kicker {
  display: inline-flex;
  padding: 7px 11px;
  border: 1px solid rgba(94, 224, 255, .46);
  border-radius: 999px;
  background: rgba(8, 44, 91, .78);
  color: #84e7ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
}

.qr-v258-intro h1 {
  margin: 18px 0 14px;
  color: #ffffff;
  font-size: clamp(34px, 4.8vw, 66px);
  line-height: 1.12;
  letter-spacing: -.045em;
}

.qr-v258-intro > p {
  max-width: 36em;
  margin: 0;
  color: #c9dcf4;
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 650;
  line-height: 1.9;
}

.qr-v258-intro ol {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.qr-v258-intro li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  color: #e8f4ff;
}

.qr-v258-intro li span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(99, 222, 255, .54);
  border-radius: 12px;
  background: #0c3a76;
  color: #a9efff;
  font-weight: 900;
}

.qr-v258-card {
  padding: clamp(16px, 2.6vw, 28px);
  border: 1px solid rgba(112, 202, 255, .38);
  border-radius: 28px;
  background: #071b3b;
  box-shadow: 0 28px 80px rgba(0, 4, 23, .48), inset 0 1px 0 rgba(255, 255, 255, .07);
}

.qr-v258-viewfinder {
  position: relative;
  width: 100%;
  min-height: 280px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(115, 214, 255, .50);
  border-radius: 22px;
  background: #010713;
}

.qr-v258-viewfinder video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #010713;
}

.qr-v258-viewfinder video[hidden] {
  display: none;
}

.qr-v258-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(35, 135, 255, .25), transparent 10rem),
    linear-gradient(145deg, #031027, #092d58);
}

.qr-v258-placeholder strong {
  color: #f7fbff;
  font-size: 17px;
}

.qr-v258-placeholder small {
  color: #b8d2ef;
  font-weight: 700;
}

.qr-v258-qrmark {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(119, 227, 255, .58);
  border-radius: 22px;
  background: #0c4388;
  color: #d9f7ff;
  font-size: 43px;
  line-height: 1;
}

.qr-v258-frame {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(64%, 310px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
}

.qr-v258-frame i {
  position: absolute;
  width: 44px;
  height: 44px;
  border-color: #6ee8ff;
  border-style: solid;
}

.qr-v258-frame i:nth-child(1) {
  top: 0;
  left: 0;
  border-width: 4px 0 0 4px;
  border-radius: 14px 0 0;
}

.qr-v258-frame i:nth-child(2) {
  top: 0;
  right: 0;
  border-width: 4px 4px 0 0;
  border-radius: 0 14px 0 0;
}

.qr-v258-frame i:nth-child(3) {
  right: 0;
  bottom: 0;
  border-width: 0 4px 4px 0;
  border-radius: 0 0 14px;
}

.qr-v258-frame i:nth-child(4) {
  bottom: 0;
  left: 0;
  border-width: 0 0 4px 4px;
  border-radius: 0 0 0 14px;
}

.qr-v258-frame span {
  position: absolute;
  bottom: -38px;
  left: 50%;
  width: max-content;
  max-width: 90vw;
  transform: translateX(-50%);
  padding: 7px 11px;
  border-radius: 999px;
  background: #04152f;
  color: #e9fbff;
  font-size: 12px;
  font-weight: 900;
}

.qr-v258-shell[data-state="requesting"] .qr-v258-placeholder,
.qr-v258-shell[data-state="scanning"] .qr-v258-placeholder,
.qr-v258-shell[data-state="processing"] .qr-v258-placeholder {
  display: none;
}

.qr-v258-shell[data-state="requesting"] .qr-v258-frame,
.qr-v258-shell[data-state="scanning"] .qr-v258-frame {
  opacity: 1;
}

.qr-v258-status {
  min-height: 50px;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(105, 177, 232, .34);
  border-radius: 14px;
  background: #0a2a55;
  color: #e7f2ff;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.65;
}

.qr-v258-status[data-tone="success"] {
  border-color: rgba(77, 228, 190, .52);
  background: #073c3d;
  color: #d9fff4;
}

.qr-v258-status[data-tone="error"] {
  border-color: rgba(255, 154, 143, .56);
  background: #521d2a;
  color: #fff0ee;
}

.qr-v258-error {
  margin: 0 0 14px;
  padding: 13px 14px;
  border: 1px solid #e47d89;
  border-radius: 14px;
  background: #451825;
  color: #fff5f4;
}

.qr-v258-error[hidden] {
  display: none;
}

.qr-v258-error strong {
  display: block;
  margin-bottom: 4px;
}

.qr-v258-error p {
  margin: 0;
  line-height: 1.6;
}

.qr-v258-primary-actions,
.qr-v258-secondary-actions {
  display: grid;
  gap: 10px;
}

.qr-v258-primary-actions {
  grid-template-columns: 1fr;
}

.qr-v258-secondary-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.qr-v258-button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 15px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}

.qr-v258-button[hidden] {
  display: none;
}

.qr-v258-button:focus-visible {
  outline: 3px solid rgba(100, 228, 255, .34);
  outline-offset: 3px;
}

.qr-v258-button:disabled {
  cursor: wait;
  opacity: .62;
}

.qr-v258-button.is-primary {
  border-color: #6bcff8;
  background: linear-gradient(135deg, #226bff, #0ba7c7);
  color: #ffffff;
  box-shadow: 0 13px 28px rgba(12, 103, 209, .28);
}

.qr-v258-button.is-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #3478ff, #13b5d4);
}

.qr-v258-button.is-stop {
  border-color: #d5e5f5;
  background: #eaf4ff;
  color: #092a51;
}

.qr-v258-button.is-secondary {
  border-color: rgba(126, 200, 245, .42);
  background: #0b315f;
  color: #eef9ff;
}

.qr-v258-button.is-secondary:hover {
  border-color: #79dcff;
  background: #10447f;
}

.qr-v258-image {
  position: relative;
  overflow: hidden;
}

.qr-v258-image input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.qr-v258-privacy,
.qr-v258-noscript {
  display: flex;
  gap: 9px;
  margin: 14px 0 0;
  color: #b9d0e8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.65;
}

.qr-v258-privacy > span:first-child {
  color: #64e4be;
  font-size: 16px;
}

.qr-v258-noscript {
  padding: 12px;
  border: 1px solid #e47d89;
  border-radius: 12px;
  background: #451825;
  color: #fff5f4;
}

.qr-v258-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 20px auto 0;
  padding: 12px 0 max(28px, env(safe-area-inset-bottom));
  text-align: center;
}

.qr-v258-footer a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 10px 14px;
  color: #c9e3f7;
  font-weight: 800;
}

@media (max-width: 820px) {
  .qr-v258-shell {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 0;
  }

  .qr-v258-intro {
    padding-inline: 4px;
  }

  .qr-v258-intro h1 {
    margin-block: 12px 10px;
    font-size: clamp(32px, 9vw, 48px);
  }

  .qr-v258-intro ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 18px;
  }

  .qr-v258-intro li {
    min-width: 0;
    flex-direction: column;
    gap: 6px;
    text-align: center;
    font-size: 12px;
  }

  .qr-v258-card {
    border-radius: 22px;
  }
}

@media (max-width: 560px) {
  .qr-v258-header,
  .qr-v258-shell,
  .qr-v258-footer {
    width: min(100% - 22px, 1120px);
  }

  .qr-v258-brand small {
    display: none;
  }

  .qr-v258-back > span:last-child {
    display: none;
  }

  .qr-v258-back {
    width: 48px;
    padding: 0;
    justify-content: center;
  }

  .qr-v258-viewfinder {
    min-height: 240px;
  }

  .qr-v258-secondary-actions {
    grid-template-columns: 1fr;
  }
}

@media (forced-colors: active) {
  .qr-v258-card,
  .qr-v258-viewfinder,
  .qr-v258-button,
  .qr-v258-status,
  .qr-v258-back {
    border: 2px solid ButtonText;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qr-v258-page *,
  .qr-v258-page *::before,
  .qr-v258-page *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
