:root {
  color-scheme: dark;
  color: #faeced;
  background: #21131f;
  font: 16px system-ui, sans-serif;
  line-height: 1.6;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse at 80% 14%, #72374e 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, #47223e 0%, transparent 59%),
    #21131f;
}
main { width: min(100%, 440px); }
header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
header img { border-radius: 17px; }
.title-en { color: #f3b9cb; font-size: .73rem; letter-spacing: .19em; margin: 0; }
h1, h2 { margin: 0; line-height: 1.3; }
h1 { font-size: clamp(1.65rem, 7vw, 2.25rem); }
h2 { font-size: 1.2rem; }
.module { padding: 24px; border: 1px solid #94627c; border-radius: 18px; background: #311d30; }
#message { margin: 7px 0 0; color: #e5c8d7; font-size: .9rem; overflow-wrap: anywhere; }
progress { width: 100%; height: 10px; margin-top: 18px; accent-color: #f3a9c3; }
.actions, footer { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions { margin-top: 17px; }
.actions:empty { display: none; }
footer { margin-top: 9px; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px;
  font: inherit; font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.primary { color: #341424; background: #f7b6cd; }
.primary:hover { background: #ffd1e1; }
.flat { color: #f8d6e5; background: transparent; border-color: #94627c; }
footer .flat { border-color: transparent; }
.flat:hover { background: #61354d; }
:focus-visible { outline: 2px solid #ffd3db; outline-offset: 3px; }
:disabled { opacity: .6; cursor: default; }
dialog { max-width: min(90vw, 370px); padding: 24px; border: 1px solid #94627c; border-radius: 16px; background: #311d30; color: inherit; }
dialog::backdrop { background: #160b15bb; }
#access label { display: block; margin-bottom: 10px; font-weight: 600; }
#code { width: 100%; min-height: 44px; border: 1px solid #94627c; border-radius: 8px; padding: 0 12px; background: #21131f; color: inherit; font: inherit; }
#code-error { color: #ffb9bd; }
@media (max-width: 380px) { .module { padding: 18px; } }
