:root {
  --paper: #f7f5f0;
  --surface: #fffefa;
  --ink: #263035;
  --muted: #5d6868;
  --line: #d6d9d1;
  --teal: #234c4b;
  --gold: #b79b64;
  --red: #8a322f;
  --dark: #213033;
  --font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
    "Noto Sans TC", sans-serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body:has(dialog[open]) {
  overflow: hidden;
}
a {
  color: var(--teal);
  text-underline-offset: 0.23em;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #b18240;
  outline-offset: 3px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.53;
}
button,
.primary,
.secondary {
  font-weight: 600;
}
.primary,
.secondary,
.danger {
  border-radius: 6px;
  min-height: 43px;
  padding: 8px 17px;
  transition: background 0.12s ease;
}
.primary {
  border: 1px solid var(--teal);
  color: white;
  background: var(--teal);
}
.primary:hover:enabled {
  background: #153b3a;
}
.secondary {
  border: 1px solid #aab8ae;
  background: #fafbf6;
  color: var(--teal);
}
.secondary:hover:enabled {
  background: #e9eee6;
}
.danger {
  color: var(--red);
  border: 1px solid #d0a29d;
  background: #fff7f5;
}
.danger:hover {
  background: #feeae7;
}
button.wide {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 15px;
}
.masthead {
  background: var(--dark);
  color: #fffaf2;
}
.bar {
  width: min(1152px, calc(100% - 72px));
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.masthead .bar {
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: #fffdf7;
  font:
    500 24px/1.1 Georgia,
    "Times New Roman",
    serif;
}
.brand small {
  font: 500 12px/1 var(--font);
  letter-spacing: 0.06em;
  margin-left: 9px;
  color: #d9dcd6;
  border-left: 1px solid #637171;
  padding-left: 12px;
}
.brand-mark {
  color: #e9d193;
  display: grid;
  place-items: center;
  width: 33px;
  height: 39px;
  border: 1px solid #b09862;
  border-radius: 5px;
  font:
    31px/1 Georgia,
    serif;
}
#admin-nav {
  display: flex;
  gap: 6px;
}
.text-button {
  font-size: 14px;
  color: #f1f2e9;
  background: none;
  border: 0;
  border-radius: 4px;
  padding: 8px;
}
.text-button:hover {
  background: #364448;
}
main {
  flex: 1;
  width: min(1152px, calc(100% - 72px));
  margin: 0 auto;
}
.boot {
  padding: 6rem 0;
  text-align: center;
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.24;
  letter-spacing: 0.035em;
  font-weight: 680;
}
h2 {
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  font-weight: 660;
}
h3 {
  font-size: 17px;
  line-height: 1.5;
}
.overline {
  font-size: 12px;
  letter-spacing: 0.13em;
  color: var(--teal);
  font-weight: 650;
  margin-bottom: 12px;
}
.intro,
.support,
.hint,
.muted {
  color: var(--muted);
}
.intro {
  margin: 14px 0 34px;
}
.support {
  font-size: 15px;
  line-height: 1.75;
  margin: 10px 0 20px;
}
.hint {
  font-size: 13px;
  margin-top: 10px;
}
.login-wrap {
  display: grid;
  grid-template-columns: minmax(350px, 1.08fr) minmax(290px, 1fr);
  border: 1px solid #d5d9d1;
  border-radius: 12px;
  overflow: hidden;
  max-width: 996px;
  margin: clamp(46px, 9vh, 106px) auto;
  background: var(--surface);
}
.login-form {
  padding: clamp(35px, 5vw, 76px) clamp(30px, 5vw, 72px);
}
.card-art {
  position: relative;
  background: radial-gradient(
    ellipse at 22% 25%,
    #3b6062 0%,
    #293f43 44%,
    #172b30 100%
  );
  overflow: hidden;
  min-height: 368px;
  display: grid;
  place-items: center;
}
.deck {
  position: relative;
  height: 260px;
  width: 238px;
}
.arcana {
  position: absolute;
  height: 240px;
  width: 138px;
  object-fit: cover;
  border: 5px solid #e6dfc7;
  border-radius: 6px;
  box-shadow: 3px 12px 19px #121b2185;
}
.arcana.back {
  transform: rotate(-15deg);
  left: 12px;
  top: 0;
}
.arcana.front {
  transform: rotate(12deg);
  left: 90px;
  top: 22px;
}
.orbit {
  position: absolute;
  width: calc(100% + 140px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #c9b17c55;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.orbit-two {
  width: calc(100% - 66px);
  border-color: #c9b17c44;
}
.orbit-one:before,
.orbit-two:before {
  content: "✧";
  color: #d8c793;
  font:
    22px/1 Georgia,
    serif;
  position: absolute;
  top: 12%;
  left: 15%;
}
label,
.field-label {
  display: block;
  font-size: 14px;
  font-weight: 640;
  margin: 12px 0 6px;
}
input:not([type="password"]),
select,
textarea {
  min-width: 0;
}
input[type="text"]:not(.pass-input),
input[type="search"],
input:not([type]):not(.pass-input),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  background: #fffefa;
  border: 1px solid #adb8ad;
  border-radius: 6px;
  color: var(--ink);
  padding: 9px 12px;
}
textarea {
  resize: vertical;
}
.inline,
.actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.inline button {
  white-space: nowrap;
}
.pass-group {
  margin-top: 9px;
}
.pass-line {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pass-boxes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  flex: 1;
  max-width: 300px;
}
.pass-boxes span {
  display: grid;
  place-items: center;
  background: var(--surface);
  height: 44px;
  border: 1px solid #b8bfb5;
  border-radius: 5px;
  font:
    600 20px/1 ui-monospace,
    monospace;
}
.pass-boxes:focus-within .next {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px #47756b50;
}
.pass-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  z-index: 2;
  border-radius: 3px;
  color: transparent;
  background: transparent;
  font-size: 16px;
  cursor: text;
}
.pass-count {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
}
.icon-button:hover {
  background: #e8ede6;
}
.eye-icon {
  display: block;
  width: 20px;
  height: 14px;
  border: 1.8px solid currentColor;
  border-radius: 70% 25%;
  transform: rotate(35deg);
  position: relative;
}
.eye-icon:before {
  content: "";
  position: absolute;
  inset: 3px 5px;
  border-radius: 50%;
  background: currentColor;
}
[aria-pressed="true"] .eye-icon:after {
  content: "";
  position: absolute;
  width: 24px;
  height: 2px;
  background: currentColor;
  transform: rotate(-70deg);
  left: -3px;
  top: 5px;
}
.error {
  color: var(--red);
  font-size: 14px;
}
.error:not(:empty) {
  padding: 8px 0;
}
.login-form .wide {
  margin-top: 18px;
}
.notice,
.inline-note {
  border: 1px solid #abc3b6;
  border-left: 3px solid var(--teal);
  background: #edf3ed;
  color: #23423b;
  border-radius: 6px;
  padding: 10px 15px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.notice {
  width: min(1152px, calc(100% - 72px));
  margin: 18px auto 0;
}
.notice.bad {
  border-color: #d3b4ad;
  border-left-color: var(--red);
  background: #fff2ed;
  color: #78302f;
}
.inline-note {
  margin: 16px 0;
}
.inline-note code {
  display: block;
  user-select: all;
  overflow-wrap: anywhere;
}
.workspace {
  padding: 44px 0 66px;
}
.workspace-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.workspace-heading h1 {
  font-size: clamp(30px, 3.5vw, 42px);
}
.workspace-heading .overline {
  margin-bottom: 8px;
}
.account-picker label {
  margin-top: 0;
}
.account-picker select {
  min-width: 160px;
}
.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin: 29px 0 22px;
  overflow-x: auto;
}
.tab {
  border: 0;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  padding: 10px 3px;
  background: none;
  color: var(--muted);
  font-size: 15px;
}
.tab.active {
  border-color: var(--teal);
  color: var(--teal);
}
.tab-panel {
  display: grid;
  gap: 18px;
}
.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.panel,
.empty-account,
.legal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(17px, 2.55vw, 30px);
  min-width: 0;
}
.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.section-title .support {
  margin: 5px 0 14px;
}
.pill {
  display: inline-block;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: #edf0e8;
  color: #52615a;
  padding: 4px 10px;
}
.pill.live {
  color: #245947;
  background: #dceee0;
}
.pill.warn {
  background: #fae8d5;
  color: #77471b;
}
.pill.bad {
  background: #f7e5df;
  color: #863d36;
}
.panel form > .primary {
  margin-top: 16px;
}
.empty-account {
  text-align: center;
  padding: 45px 20px;
  margin-top: 28px;
}
.empty-account p,
.empty p {
  color: var(--muted);
  font-size: 15px;
  margin: 8px 0 18px;
}
.empty-icon,
.mini-card {
  font:
    40px/1 Georgia,
    serif;
  color: var(--gold);
  margin: 0 auto 15px;
}
.mention-drawing {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #677977;
  width: max-content;
  margin: 30px 0;
  font:
    26px/1 Georgia,
    serif;
}
.mention-drawing i {
  height: 1px;
  width: 45px;
  background: #9eb0a9;
}
.mini-card {
  display: grid;
  place-items: center;
  margin: 0;
  width: 29px;
  height: 41px;
  font-size: 23px;
  border: 1px solid var(--gold);
  border-radius: 3px;
  transform: rotate(8deg);
}
.filters {
  display: flex;
  gap: 5px;
  margin: 9px 0 15px;
  flex-wrap: wrap;
}
.filters button {
  background: transparent;
  color: #53635d;
  border: 1px solid transparent;
  border-radius: 99px;
  padding: 5px 13px;
  font-size: 14px;
}
.filters [aria-pressed="true"] {
  background: #e7ede2;
  border-color: #c4cebf;
  color: #264c41;
}
.empty {
  color: var(--muted);
  padding: 20px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.detail-row,
.activity,
.post-result {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.detail-row summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.detail-row summary::-webkit-details-marker {
  display: none;
}
.detail-row summary:before {
  content: "›";
  font:
    23px/1 Georgia,
    serif;
  color: #61726c;
  margin-right: 1px;
}
.detail-row[open] summary:before {
  transform: rotate(90deg);
}
.record-date {
  font-size: 13px;
  color: var(--muted);
  margin-left: auto;
}
.detail-body {
  margin: 14px 0 0;
  padding-left: 15px;
  border-left: 2px solid #b6c5b5;
  font-size: 14px;
}
.card-result {
  display: flex;
  gap: 10px;
  align-items: center;
}
.thumb {
  width: 32px;
  height: 53px;
  object-fit: cover;
  border-radius: 3px;
}
.post-copy,
.excerpt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 7px 0;
  line-height: 1.65;
}
.meta,
.caption {
  color: var(--muted);
  font-size: 13px;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 6px;
}
.links a,
.post-result a {
  font-size: 14px;
}
.activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.row-actions {
  flex-wrap: wrap;
  margin-top: 10px;
}
.filters + .empty {
  border-top: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin: 9px 0 18px;
}
.metric {
  padding: 12px;
  background: #f2f3ec;
  border-radius: 6px;
}
.metric dt {
  font-size: 13px;
  color: var(--muted);
}
.metric dd {
  margin: 4px 0 0;
  font-weight: 600;
  font-size: 21px;
}
#metrics:not(:empty),
.results:not(:empty) {
  margin-top: 20px;
}
.media-preview {
  margin: 8px 0;
  max-width: 100%;
  max-height: 230px;
  border-radius: 5px;
}
.profile {
  background: #f1f4ed;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 13px;
}
dialog {
  max-width: min(440px, calc(100% - 30px));
  width: 440px;
  max-height: 90vh;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 25px;
  color: var(--ink);
  box-shadow: 0 15px 50px #18272628;
}
dialog::backdrop {
  background: #19282c99;
}
dialog h2 {
  font-size: 21px;
}
.dialog-copy {
  white-space: pre-line;
  margin: 14px 0 24px;
  overflow-wrap: anywhere;
}
.actions {
  justify-content: flex-end;
}
.close {
  font-size: 26px;
}
.dialog-copy + .actions {
  flex-wrap: wrap;
}
#change-form > .wide {
  margin-top: 14px;
}
footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
footer .bar {
  padding: 23px 0;
  flex-wrap: wrap;
}
footer nav {
  display: flex;
  gap: 16px;
}
footer a {
  color: var(--muted);
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
.legal-card {
  max-width: 760px;
  margin: 45px auto;
  padding: clamp(22px, 5vw, 55px);
}
.legal-card h1 {
  font-size: 34px;
}
.legal-card h2 {
  font-size: 19px;
  margin: 25px 0 6px;
}
.legal-card p,
.legal-card li {
  color: #495652;
}
.legal-card .intro {
  margin-bottom: 15px;
}
@media (max-width: 800px) {
  .bar,
  main,
  .notice {
    width: calc(100% - 36px);
  }
  .login-wrap {
    grid-template-columns: 1.15fr 0.85fr;
  }
  .login-form {
    padding: 36px 25px;
  }
  .card-art .deck {
    transform: scale(0.83);
  }
  .duo {
    grid-template-columns: 1fr;
  }
  .mention-drawing {
    margin: 14px 0;
  }
  .workspace {
    padding-top: 25px;
  }
}
@media (max-width: 610px) {
  .masthead .bar {
    min-height: 57px;
  }
  .brand {
    font-size: 20px;
    gap: 7px;
  }
  .brand small {
    font-size: 10px;
    padding-left: 6px;
    margin-left: 3px;
  }
  .brand-mark {
    width: 23px;
    height: 29px;
    font-size: 23px;
  }
  .text-button {
    font-size: 12px;
    padding: 6px;
  }
  .bar,
  main,
  .notice {
    width: calc(100% - 28px);
  }
  .login-wrap {
    grid-template-columns: 1fr;
    margin: 24px auto 36px;
  }
  .card-art {
    min-height: 135px;
    grid-row: 1;
  }
  .card-art .deck {
    height: 93px;
    width: 125px;
    transform: none;
  }
  .arcana {
    width: 63px;
    height: 108px;
    border-width: 3px;
  }
  .arcana.back {
    left: 12px;
    top: -4px;
  }
  .arcana.front {
    left: 72px;
    top: 1px;
  }
  .orbit-one {
    width: 280px;
  }
  .orbit-two {
    width: 170px;
  }
  .login-form {
    padding: 23px 21px 30px;
  }
  .login-form .intro {
    margin: 8px 0 18px;
  }
  .login-form h1 {
    font-size: 32px;
  }
  .workspace-heading {
    display: grid;
    gap: 15px;
  }
  .account-picker .inline select {
    min-width: 125px;
  }
  .tabs {
    gap: 16px;
    margin: 18px 0;
  }
  .tab {
    font-size: 14px;
  }
  .tab-panel,
  .duo {
    gap: 12px;
  }
  .record-date {
    margin-left: 0;
  }
  footer .bar {
    gap: 6px;
    padding: 15px 0;
  }
  footer nav {
    gap: 12px;
  }
  .pass-boxes span {
    height: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.section-title > button {
  white-space: nowrap;
  flex-shrink: 0;
}

.permission-box:not(:empty) {
  padding: 14px 16px;
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.permission-box ul {
  margin: 8px 0;
  padding-left: 22px;
}
.permission-box p {
  margin: 5px 0 0;
}
.permission-box code {
  font-size: 12px;
}
@media (max-width: 450px) {
  .account-picker .inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .account-picker select {
    grid-column: 1/-1;
  }
}
