:root {
  font:
    15px/1.6 "DM Sans",
    "PingFang SC",
    system-ui,
    sans-serif;
  color: #1c3553;
  background: #edf5ff;
  --ink: #1c385b;
  --accent: #235fa5;
  --muted: #526e79;
  --line: #d5e2e7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
header,
footer {
  padding: 16px clamp(18px, 5vw, 80px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  min-height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand i {
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font: 28px Georgia;
}
.brand span {
  font-size: 23px;
  font-weight: 750;
  letter-spacing: 0.08em;
}
.brand small {
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 12px;
}
.brand small,
small,
footer,
.muted {
  color: var(--muted);
}
main {
  margin: auto;
  width: min(1140px, 100%);
  padding: 38px 24px;
  flex: 1;
}
footer {
  font-size: 12px;
  border-top: 1px solid var(--line);
}
h1,
h2,
h3,
p {
  margin: 0 0 12px;
}
h1 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.25;
  letter-spacing: -0.045em;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 16px;
}
.auth {
  margin: 4vh auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  max-width: 964px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 52px #1538480c;
}
.intro {
  position: relative;
  background: #244f89;
  color: #f4f8ff;
  padding: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 480px;
}
.intro p {
  color: #dceafe;
  max-width: 29em;
}
.art {
  position: relative;
  min-height: 205px;
  display: grid;
  place-items: center;
  background: repeating-radial-gradient(
    ellipse at 52% 35%,
    transparent 0 28px,
    #c6e3ff2b 29px 30px,
    transparent 31px 48px
  );
}
.tagart {
  position: relative;
  transform: rotate(-13deg);
  background: linear-gradient(130deg, #e5f2ff, #9ec4ef);
  border: 4px solid #d7eaff;
  box-shadow: 8px 13px 0 #143b6b66;
  width: 118px;
  height: 154px;
  border-radius: 48px 48px 36px 36px;
  display: grid;
  place-content: center;
  text-align: center;
  color: #1c4a82;
  font: 52px/1 Georgia;
}
.tagart:before {
  content: "";
  position: absolute;
  top: -32px;
  left: 45px;
  width: 24px;
  height: 49px;
  border: 5px solid #cadcf0;
  border-radius: 50%;
  transform: rotate(13deg);
}
.tagart small {
  font: 10px system-ui;
  letter-spacing: 4px;
  margin: 10px 0;
  color: #315480;
}
.login {
  padding: clamp(24px, 4vw, 48px);
  align-self: center;
}
.card,
dialog {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 5px 20px #143e4805;
}
.card {
  margin: 14px 0;
}
.bar,
.row,
.actions,
nav,
#account {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bar {
  justify-content: space-between;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}
.grid .card {
  margin: 0;
}
label {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  color: #3b5661;
  font-weight: 550;
}
input,
textarea,
select,
button,
a.btn {
  font: inherit;
}
input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #b9ced5;
  border-radius: 9px;
  background: #fcfefe;
  color: var(--ink);
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}
label.check {
  display: flex;
  gap: 8px;
}
button,
a.btn {
  border-radius: 9px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: white;
  cursor: pointer;
  text-decoration: none;
}
button:hover,
a.btn:hover {
  border-color: var(--accent);
}
button.primary,
a.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.login .primary {
  width: 100%;
  margin: 8px 0 15px;
}
.link {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 4px 0;
}
.danger {
  color: #9e3434;
}
nav {
  margin: 22px 0;
  border-bottom: 1px solid var(--line);
}
nav button {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 12px 16px;
}
nav .selected {
  color: var(--accent);
  box-shadow: inset 0 -3px var(--accent);
  font-weight: 700;
}
.badge {
  display: inline-block;
  background: #e0edff;
  color: #285c99;
  font-size: 12px;
  border-radius: 30px;
  padding: 3px 10px;
}
.amber {
  background: #fff0d3;
  color: #80581b;
}
.mono,
code {
  font:
    600 15px/1.6 ui-monospace,
    monospace;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}
dialog {
  width: min(510px, 94vw);
  max-height: 89svh;
  color: inherit;
}
dialog::backdrop {
  background: #173c4880;
}
.empty {
  padding: 25px 0;
  color: var(--muted);
}
.listitem {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.listitem:last-child {
  border: 0;
}
.stats {
  font-size: 30px;
  font-weight: 700;
}
.narrow {
  max-width: 700px;
  margin: auto;
}
.photo {
  max-width: 180px;
  border-radius: 12px;
}
#notice {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #233f68;
  color: #fff;
  border-radius: 9px;
  padding: 10px 18px;
  z-index: 8;
  max-width: 90vw;
}
#notice:empty {
  display: none;
}
.err {
  color: #a02b2b;
}
.actions {
  margin-top: 14px;
}
.timeline {
  border-inline-start: 2px solid #b5d4f5;
  padding-inline-start: 16px;
  margin: 15px 0;
}
.timeline p {
  white-space: pre-wrap;
}
.finderhead {
  background: #244e80;
  color: white;
  padding: 28px;
  border-radius: 18px;
}
.finderhead small {
  color: #d7e8fd;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #d0a452;
  outline-offset: 2px;
}
@media (max-width: 700px) {
  main {
    padding: 20px 15px;
  }
  .auth {
    margin: 0;
    grid-template-columns: 1fr;
  }
  .intro {
    min-height: 160px;
    padding: 23px;
    padding-inline-end: 92px;
  }
  .art {
    position: absolute;
    inset-inline-end: -15px;
    top: 13px;
    min-height: 140px;
    width: 110px;
  }
  .tagart {
    scale: 0.58;
  }
  .intro h1 {
    font-size: 25px;
  }
  .login,
  .card {
    padding: 20px;
  }
  header,
  footer {
    padding: 12px 16px;
  }
  .brand small {
    display: none;
  }
  nav {
    gap: 0;
  }
  nav button {
    padding: 10px;
  }
  .bar {
    align-items: flex-start;
  }
  footer span {
    font-size: 11px;
  }
}
canvas {
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.header-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header-tools select {
  width: auto;
  max-width: 9rem;
  padding: 6px 9px;
}
html:not([lang^="zh"]) .intro h1 {
  font-size: clamp(24px, 3.2vw, 40px);
}
@media (max-width: 700px) {
  header {
    flex-wrap: wrap;
  }
  .header-tools {
    gap: 6px;
  }
}
dialog select[data-language]{width:auto;padding:4px 8px;font-size:13px}

[dir="rtl"] :is(.mono,code,input[type="url"],input[type="password"],input[name="public_id"],input[name="activation_code"]){direction:ltr;unicode-bidi:isolate} [translate="no"]{unicode-bidi:isolate}
.profile-editor{max-width:780px}.profile-editor section[hidden]{display:none}.profile-editor section>small{font-variant-numeric:tabular-nums;color:var(--muted)}.profile-editor h2{margin-block:4px 18px}.profile-fields,.privacy-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));column-gap:22px}.privacy-options,.profile-fields>.muted{grid-column:1/-1}.profile-editor .check{align-items:center;margin:6px 0}

/* The registered owner/admin workspace has thumb-accessible tabs; public tag pages do not. */
@media(max-width:700px) {
  main:has(.workspace-tabs){padding-bottom:calc(94px + env(safe-area-inset-bottom,0px))}
  .workspace-tabs{position:fixed;inset:auto 0 0;z-index:9;display:flex;align-items:stretch;justify-content:space-around;gap:0;background:#fafcff;border-top:1px solid #d9e5f4;padding:3px 6px calc(3px + env(safe-area-inset-bottom,0px));margin:0}
  .workspace-tabs button{flex:1 1 0;min-width:0;min-height:48px;padding:5px 2px;line-height:1.2;overflow-wrap:anywhere}
}
.preview{grid-column:1/-1;margin-block:1rem 0;padding:1rem;border:1px solid var(--line);border-radius:12px;background:#f3f8ff}.preview .finderhead{padding:16px}.preview h1{font-size:1.4rem}.preview .card{margin:8px 0;padding:14px}.preview p{overflow-wrap:anywhere}[data-draft-state]:empty{display:none}.actions{overflow-wrap:anywhere}
