:root {
  --bg: #0a0a0a;
  --bg-raise: #121212;
  --ink: rgba(255, 255, 255, 0.84);
  --ink-strong: #f5f5f5;
  --ink-dim: rgba(255, 255, 255, 0.55);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.72);
}

html {
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #fff;
  color: #0a0a0a;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image: none;
  font: 17px/1.65 "Helvetica Neue", Helvetica, Arial, "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans KR", "Noto Sans Thai", "Noto Sans SC", "Noto Sans TC", "Microsoft YaHei", "Microsoft JhengHei", "Yu Gothic UI", "Yu Gothic", "Malgun Gothic", "Leelawadee UI", "Thonburi", Tahoma, sans-serif;
  letter-spacing: 0;
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: break-word;
}

.bar,
main.panel,
footer {
  width: min(960px, calc(100% - 8vw));
  margin: 0 auto;
  box-sizing: border-box;
}

.bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  max-width: none;
  padding: 0.85rem 4vw;
  background: rgba(10, 10, 10, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  display: block;
  width: 28px;
  height: 28px;
}

.bar nav {
  display: flex;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 0.15rem 0.2rem;
}

.bar nav a {
  color: var(--ink-dim);
  text-decoration: none;
  padding: 0.35em 0.55em;
  border-radius: 0;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bar nav a:hover {
  color: #fff;
}

.bar a:focus:not(:focus-visible),
footer a:focus:not(:focus-visible) {
  outline: none;
}

.bar a:focus-visible,
footer a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.bar nav a[aria-current="page"] {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 -1px 0 #fff;
}

main.panel {
  background: transparent;
  padding: 2.75rem 0 2rem;
  border-radius: 0;
  color: var(--ink);
}

h1 {
  margin: 0 0 0.55rem;
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h2 {
  color: var(--ink-strong);
  font-weight: 500;
}

.note,
.meta,
.hint {
  max-width: 40em;
  margin: 0 0 8px;
  color: var(--ink-dim);
  font-size: 15px;
}

.note { margin-bottom: 22px; }

body.account .bar,
body.account footer {
  width: 100%;
  max-width: none;
}

html {
  scroll-padding-top: 72px;
}

body.account main.panel {
  width: min(380px, calc(100% - 32px));
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 40px 0 48px;
}

body.account main.panel > section {
  width: 100%;
}

body.account h1,
body.account .lead,
body.account .hint,
body.account .field-note,
body.account .choice,
body.account #reg-pics {
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: normal;
}

body.account h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 5.2vw, 2.15rem);
}

body.account .lead {
  margin: 0 0 28px;
}

body.account form > button[type="submit"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 20px 0 0;
  padding: 12px 16px;
}

body.account button.secondary {
  box-sizing: border-box;
  padding: 12px 16px;
}

.links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 0;
  font-size: 15px;
}

body.account .links a {
  color: var(--ink-dim);
  text-decoration: none;
}

body.account .links a:hover {
  color: #fff;
}

.code-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.code-row input { flex: 1; min-width: 0; }

.code-row button {
  margin: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.55em;
  margin: 18px 0 0;
  padding: 0;
  background: none;
  border: 0;
  font-size: 15px;
  line-height: 1.4;
}

.choice input {
  position: static;
  flex: none;
  width: 1em;
  height: 1em;
  margin: 0.2em 0 0;
  accent-color: #fff;
}

.choice span {
  white-space: normal;
}

.choice a { white-space: nowrap; }

label { display: block; margin: 18px 0 6px; color: var(--ink); font-size: 15px; }

body.account form > label:first-of-type {
  margin-top: 0;
}

input[type="email"],
input[type="password"],
input[type="text"],
textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  font: inherit;
  color: #fff;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: #fff;
}

button,
body.download a.button {
  display: inline-block;
  margin: 12px 8px 0 0;
  padding: 10px 16px;
  font: inherit;
  font-weight: 500;
  color: #0a0a0a;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
body.download a.button:hover {
  background: #e6e6e6;
}

button:active,
body.download a.button:active {
  background: #d4d4d4;
}

button.secondary,
body.download a.button.secondary {
  color: #fff;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

button.secondary:hover,
body.download a.button.secondary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

button.danger {
  color: #fff;
  background: #8f2d2d;
}

button.danger:hover {
  background: #7a2222;
}

button.danger:active {
  background: #691c1c;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

.field-note {
  margin: 4px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
}

body.account form > button[type="submit"] + .field-note {
  margin-top: 14px;
}

[hidden] { display: none !important; }

textarea { min-height: 96px; }

.message { min-height: 0; margin: 0; color: #e6966e; }
.message.ok { color: #9ad1a0; }

body.account .message:not(:empty) {
  margin-top: 12px;
}

main a { color: #fff; }

footer {
  width: 100%;
  max-width: none;
  padding: 5rem 4vw 2.75rem;
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 15px;
  text-align: center;
}

footer p {
  margin: 0.35rem 0;
}

footer .policy {
  color: var(--ink-dim);
  font-size: 13px;
}

footer a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  transition: border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

footer a:hover { border-bottom-color: #fff; }

body.doc main.panel {
  width: min(42em, calc(100% - 8vw));
}

body.download main.panel {
  width: min(36em, calc(100% - 8vw));
  padding-top: 4.75rem;
  text-align: center;
}

body.download h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
}

body.download .lead {
  max-width: none;
  margin: 0.4rem 0 0;
  color: var(--ink);
  font-size: 1.05rem;
}

body.download .card {
  margin: 3.25rem auto 0;
  padding: 2rem 1.35rem 1.6rem;
  max-width: 28em;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
}

body.download .card h2 {
  margin: 0;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 500;
}

body.download .ver {
  margin: 0.7rem 0 0;
  color: var(--ink-dim);
  font-size: 15px;
}

body.download .card .actions {
  justify-content: center;
  margin-top: 1.15rem;
}

body.download .card .actions a.button {
  margin: 0;
}

body.download .fine,
body.download .soon {
  max-width: 34em;
  margin: 1.15rem auto 0;
  color: var(--ink-dim);
  font-size: 14px;
}

body.download .soon {
  margin-top: 0.2rem;
}

body.download .fine + .soon {
  margin-top: 2.75rem;
}

.release {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.release h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
}

.release dl {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 8px 16px;
  margin: 12px 0 0;
}

.release dt {
  margin: 0;
  color: var(--ink-dim);
  font-size: 13px;
}

.release dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.release .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.later {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 1.5rem;
}

.later article {
  margin: 0;
  padding: 14px 16px 16px;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 0;
}

.later h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 500;
}

.later p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 15px;
}

.legal h2 {
  margin: 1.7em 0 0.45em;
  font-size: 1.25rem;
}

.legal p,
.legal li { margin: 8px 0; }

.legal ul { padding-left: 1.25em; }

.bullets {
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: 1.05rem;
}

.bullets li {
  margin: 0;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}

.bullets li:last-child {
  border-bottom: 1px solid var(--line);
}

.secret-row {
  position: relative;
}

.secret-row input {
  padding-right: 3.4em;
}

.secret-toggle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  margin: 0;
  padding: 0 12px;
  color: var(--ink-dim);
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 13px;
  font-weight: 400;
}

.secret-toggle:hover,
.secret-toggle:active {
  color: #fff;
  background: transparent;
}

input:read-only {
  cursor: default;
}

.avatar-fold {
  margin: 10px 0 0;
}

.avatar-fold > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--ink-dim);
  font-size: 15px;
  list-style: none;
}

.avatar-fold > summary::-webkit-details-marker,
.avatar-fold > summary::marker {
  display: none;
  content: "";
}

.avatar-current-face {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-raise);
  box-shadow: inset 0 0 0 2px #fff;
  object-fit: cover;
}


.avatar-upload {
  display: inline-flex;
  align-items: center;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-strong, #f5f5f5);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.avatar-upload:hover {
  text-decoration: underline;
}

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 10px 0 0;
  padding: 4px 2px 2px;
  max-height: 220px;
  overflow: auto;
  scroll-margin-top: 80px;
}

.avatar-option {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 3px;
  color: inherit;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
}

.avatar-option img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bg-raise);
  object-fit: cover;
  pointer-events: none;
}

.avatar-option:hover {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

.avatar-option[aria-selected="true"] {
  background: transparent;
  border-color: #fff;
  box-shadow: none;
}

.avatar-option[aria-selected="true"] img {
  opacity: 1;
  visibility: visible;
}

.field-error {
  margin: 6px 0 0;
  min-height: 0;
  color: #e6966e;
  font-size: 13px;
}

.field-error:empty {
  display: none;
}

input[aria-invalid="true"],
.choice[data-invalid="true"] input {
  border-color: #e6966e;
}

@media (max-width: 640px) {
  .bar {
    padding: 0.75rem 5vw;
    gap: 10px;
  }

  body.account main.panel { padding: 28px 0 40px; }

  .release dl,
  .later { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .code-row button {
    padding-left: 10px;
    padding-right: 10px;
  }

  .avatar-picker {
    grid-template-columns: repeat(5, 1fr);
    max-height: 180px;
  }
}

body.account input,
body.account textarea,
body.account .field-error,
body.account .choice,
body.account .message {
  scroll-margin-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  .bar nav a,
  footer a {
    transition-duration: 0.01ms !important;
  }
}

body.account .google-sign-in {
  width: 100%;
  margin: 12px 0 0;
}

body.account .google-gis-button {
  width: 100%;
  min-height: 40px;
}

body.account .google-gis-button > div,
body.account .google-gis-button iframe {
  width: 100% !important;
  max-width: 100%;
}

body.account button.google-sign-in-continue {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 12px 0 0;
  padding: 12px 16px;
}
