:root {
  color-scheme: light;
  --md-sys-color-primary: #6442b4;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #eaddff;
  --md-sys-color-on-primary-container: #2b0962;
  --md-sys-color-secondary: #405e91;
  --md-sys-color-secondary-container: #d8e6ff;
  --md-sys-color-on-secondary-container: #132e58;
  --md-sys-color-tertiary: #8d4938;
  --md-sys-color-tertiary-container: #ffdbcd;
  --md-sys-color-on-tertiary-container: #3b1005;
  --md-sys-color-surface: #fdf7ff;
  --md-sys-color-surface-container-low: #f7f0fb;
  --md-sys-color-surface-container: #f0e9f5;
  --md-sys-color-surface-container-high: #eae2f0;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-on-surface: #201b28;
  --md-sys-color-on-surface-variant: #50485c;
  --md-sys-color-outline: #7d7289;
  --md-sys-color-outline-variant: #cec3d9;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-on-error-container: #410002;
  --success-container: #c5efd6;
  --on-success-container: #114b32;
  --gold-container: #ffeba6;
  --on-gold-container: #574200;
  --motion: 240ms cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface); font: 14px/1.5 "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; border-radius: 24px; min-height: 44px; padding: 10px 20px; background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface); font-weight: 600; transition: background var(--motion), border-radius var(--motion), transform var(--motion); }
button:hover:not(:disabled) { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
button:active:not(:disabled) { border-radius: 14px; transform: scale(.97); }
button:disabled { cursor: default; opacity: .42; }
:where(button,input,select,summary,a):focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { max-width: 1272px; padding: 0 40px; margin: auto; }
header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--md-sys-color-primary); font-size: 34px; }
.brand b { color: var(--md-sys-color-on-surface); font-size: 25px; letter-spacing: -1px; font-weight: 750; }
.brand span { font-size: 13px; color: var(--md-sys-color-on-surface-variant); margin-left: 4px; }
.local { display: inline-flex; align-items: center; gap: 8px; background: var(--success-container); color: var(--on-success-container); border-radius: 30px; padding: 8px 15px; font-size: 12px; font-weight: 600; }
.local i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.intro { display: flex; align-items: center; justify-content: space-between; min-height: 206px; padding: 16px 18px 28px 4px; }
.eyebrow { display: inline-block; color: var(--md-sys-color-primary); font-size: 12px; font-weight: 700; letter-spacing: 1px; margin: 0 0 12px; }
h1 { font-size: clamp(36px,4.3vw,56px); font-weight: 750; letter-spacing: -2px; line-height: 1.25; margin: 0; }
h1 em { font-style: normal; color: var(--md-sys-color-primary); }
.orbit { position: relative; flex: 0 0 184px; height: 160px; display: grid; place-items: center; margin-right: 36px; }
.orbit:before, .orbit:after { content: ""; position: absolute; width: 140px; height: 140px; background: var(--md-sys-color-primary-container); border-radius: 42px; transform: rotate(22.5deg); }
.orbit:after { transform: rotate(67.5deg); }
.orbit span { position: relative; z-index: 1; font-size: 94px; line-height: 1; color: var(--md-sys-color-primary); transform: rotate(-12deg); }
.orbit b { position: absolute; right: -19px; top: -4px; background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-tertiary); border-radius: 50%; width: 54px; height: 54px; display: grid; place-items: center; font-size: 29px; transform: rotate(12deg); }
.orbit i { position: absolute; z-index: 2; left: -7px; bottom: 1px; width: 30px; height: 30px; background: var(--gold-container); border-radius: 50% 50% 8px 50%; transform: rotate(20deg); }
.import-box { background: var(--md-sys-color-surface-container); border-radius: 32px; padding: 24px 28px 18px; }
label { display: block; margin-bottom: 12px; font-weight: 650; }
.input-row { display: flex; gap: 12px; }
input, select { color: var(--md-sys-color-on-surface); background: var(--md-sys-color-surface-container-lowest); border: 1px solid transparent; border-radius: 16px; padding: 13px 16px; min-height: 48px; }
input::placeholder { color: var(--md-sys-color-on-surface-variant); opacity: 1; }
#link { min-width: 0; flex: 1; border-bottom: 2px solid var(--md-sys-color-outline); border-radius: 16px 16px 4px 4px; }
#link:focus { border-bottom-color: var(--md-sys-color-primary); }
.primary { color: var(--md-sys-color-on-primary); background: var(--md-sys-color-primary); min-height: 54px; padding: 12px 28px; border-radius: 28px; }
.primary:hover:not(:disabled) { color: var(--md-sys-color-on-primary); background: #53339e; }
.import-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.import-footer>div { display: flex; gap: 4px; margin-left: auto; }
.text-button { background: transparent; color: var(--md-sys-color-primary); padding: 8px 14px; min-height: 40px; }
#status { color: var(--md-sys-color-on-surface-variant); font-size: 12px; margin: 8px 0 0; overflow-wrap: anywhere; }
#status:empty { display: none; }
#status.error { background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); padding: 10px 14px; border-radius: 12px; }
.archive { margin-top: 36px; }
.archive-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 4px; }
h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 27px; font-weight: 700; margin: 0; letter-spacing: -.6px; }
h2 span { font-size: 11px; font-weight: 600; background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); border-radius: 8px; padding: 5px 9px; letter-spacing: 0; }
#export { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
nav { display: flex; gap: 6px; padding: 6px; background: var(--md-sys-color-surface-container); border-radius: 30px; margin-top: 20px; width: fit-content; max-width: 100%; overflow-x: auto; }
nav button { background: transparent; white-space: nowrap; color: var(--md-sys-color-on-surface-variant); min-width: 108px; border-radius: 8px; }
nav button:first-child { border-radius: 24px 8px 8px 24px; }
nav button:last-child { border-radius: 8px 24px 24px 8px; }
nav button.active { color: var(--md-sys-color-on-primary); background: var(--md-sys-color-primary); border-radius: 24px; }
nav button.active:hover:not(:disabled) { background: #53339e; color: var(--md-sys-color-on-primary); }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.stat { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); border-radius: 28px; padding: 23px 24px 18px; min-height: 142px; }
.stat:first-child { color: var(--md-sys-color-on-primary); background: var(--md-sys-color-primary); border-radius: 28px 28px 12px 28px; }
.stat:nth-child(2) { background: var(--gold-container); color: var(--on-gold-container); }
.stat:nth-child(3) { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.stat:last-child { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); border-radius: 28px 28px 28px 12px; }
.stat label { font-size: 13px; margin-bottom: 10px; font-weight: 600; }
.stat strong { font-size: clamp(32px,4vw,48px); letter-spacing: -1.5px; line-height: 1.1; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat small { font-size: 12px; margin-left: 8px; }
.details-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: stretch; }
.five-panel,.distribution,.records-panel { border-radius: 28px; background: var(--md-sys-color-surface-container-low); padding: 24px; min-width: 0; }
.distribution { background: var(--md-sys-color-surface-container); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
h3 { font-size: 19px; font-weight: 650; letter-spacing: -.3px; margin: 0; }
.panel-heading>span { font-size: 12px; color: var(--md-sys-color-on-surface-variant); }
#five-list { max-height: 328px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--md-sys-color-outline-variant) transparent; padding-right: 5px; }
.five-entry { background: var(--md-sys-color-surface-container-lowest); border-radius: 16px; margin-bottom: 8px; padding: 14px 14px 12px; }
.five-entry:first-child { border-radius: 24px 24px 16px 16px; }
.five-entry:last-child { border-radius: 16px 16px 24px 24px; margin-bottom: 0; }
.five-row { display: grid; grid-template-columns: 36px minmax(72px,auto) 1fr 54px; gap: 10px; align-items: center; }
.five-icon { display: grid; place-items: center; width: 36px; height: 36px; background: var(--gold-container); color: var(--on-gold-container); border-radius: 13px; font-size: 23px; }
.five-name { font-size: 13px; font-weight: 650; }
.five-name small { display: block; font-size: 10px; color: var(--md-sys-color-on-surface-variant); font-weight: 400; margin-top: 3px; }
.bar { height: 8px; background: var(--md-sys-color-surface-container-high); border-radius: 20px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--md-sys-color-primary); }
.five-panel [data-tier="purple"] { --trail-color: #7850ca; }
.five-panel [data-tier="yellow"] { --trail-color: #eebc27; }
.five-panel [data-tier="red"] { --trail-color: #d84343; }
.five-panel .bar i { background: var(--trail-color); }
.five-panel .bar[data-tier="unknown"] i { background: repeating-linear-gradient(135deg,var(--md-sys-color-outline) 0 3px,var(--md-sys-color-outline-variant) 3px 6px); }
.five-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 12px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.five-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.five-legend span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--trail-color); }
.five-panel .panel-heading { flex-wrap: wrap; }
.five-row strong { font-size: 12px; text-align: right; font-weight: 650; }
.result-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; font-size: 12px; }
.result-badge { display: inline-flex; align-items: center; border-radius: 8px; padding: 4px 9px; font-size: 11px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.result-badge.won { background: var(--success-container); color: var(--on-success-container); }
.result-badge.lost { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.result-badge.unknown { background: var(--gold-container); color: var(--on-gold-container); }
.result-badge.na { color: var(--md-sys-color-on-surface-variant); }
.result-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 0 46px; }
.dist-row { margin: 26px 0 32px; }
.dist-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-weight: 600; }
.dist-label span:first-child { letter-spacing: 3px; }
.dist-label small { margin-left: 8px; font-weight: 400; color: var(--md-sys-color-on-surface-variant); }
.dist-row .bar { height: 16px; background: var(--md-sys-color-surface-container-lowest); }
.dist-row[data-rank="5"] i { background: #986900; }
.dist-row[data-rank="5"] .dist-label>span:first-child { color: #765100; }
.dist-row[data-rank="4"] i { background: var(--md-sys-color-primary); }
.dist-row[data-rank="4"] .dist-label>span:first-child { color: var(--md-sys-color-primary); }
.dist-row[data-rank="3"] i { background: var(--md-sys-color-secondary); }
.dist-row[data-rank="3"] .dist-label>span:first-child { color: var(--md-sys-color-secondary); }
.empty { text-align: center; color: var(--md-sys-color-on-surface-variant); padding: 45px 12px; line-height: 2; }
.records-panel { margin-top: 20px; background: var(--md-sys-color-surface-container-lowest); padding-bottom: 14px; }
.filters { display: flex; gap: 8px; }
.filters input,.filters select { min-height: 44px; padding: 10px 14px; font-size: 12px; background: var(--md-sys-color-surface-container-low); border-radius: 24px; }
#count { display: inline-block; background: var(--md-sys-color-surface-container); color: var(--md-sys-color-on-surface-variant); padding: 3px 9px; margin-left: 6px; font-size: 11px; font-weight: 500; border-radius: 8px; vertical-align: middle; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left; }
th { font-size: 12px; font-weight: 600; padding: 13px 14px; background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface-variant); }
th:first-child { border-radius: 14px 0 0 14px; }
th:last-child { border-radius: 0 14px 14px 0; }
td { font-size: 13px; padding: 15px 14px; border-bottom: 1px solid var(--md-sys-color-surface-container); }
td:first-child { font-weight: 650; }
tr:hover td { background: var(--md-sys-color-surface-container-low); }
tr[data-rank="5"] td:first-child,tr[data-rank="5"] td:nth-child(2) { color: #795500; }
tr[data-rank="4"] td:first-child,tr[data-rank="4"] td:nth-child(2) { color: var(--md-sys-color-primary); }
td:nth-child(5),td:nth-child(6) { color: var(--md-sys-color-on-surface-variant); font-size: 12px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; font-size: 12px; }
.pagination button { background: transparent; font-size: 12px; padding: 10px 13px; }
.guide { margin-top: 20px; border-radius: 20px; background: var(--md-sys-color-surface-container); padding: 0 20px; font-size: 13px; }
.guide summary { cursor: pointer; padding: 15px 0; font-weight: 650; color: var(--md-sys-color-primary); width: fit-content; }
.guide-content { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; padding: 0 0 22px; line-height: 1.8; color: var(--md-sys-color-on-surface-variant); }
.guide-content p { margin: 0; }
.guide-content b { color: var(--md-sys-color-on-surface); }
footer { padding: 25px 4px 32px; font-size: 12px; color: var(--md-sys-color-primary); font-weight: 650; }
@media(max-width:900px) {
  .shell { padding: 0 24px; }
  .stat { padding: 20px 18px; }
  .five-panel,.distribution,.records-panel { padding: 20px; }
  .five-row { grid-template-columns: 32px 72px 1fr 48px; gap: 8px; }
  .five-entry { padding: 12px; }
  .five-icon { width: 32px; height: 32px; }
  .result-line { margin-left: 40px; }
}
@media(max-width:700px) {
  .shell { padding: 0 16px; }
  header { min-height: 74px; }
  .brand span { display: none; }
  .brand b { font-size: 22px; }
  .local { font-size: 11px; padding: 7px 10px; }
  .intro { min-height: 174px; padding-right: 0; }
  h1 { font-size: 34px; letter-spacing: -1px; }
  .orbit { flex-basis: 100px; margin-right: 9px; transform: scale(.62); }
  .import-box { padding: 20px; border-radius: 24px; }
  .input-row { flex-wrap: wrap; gap: 10px; }
  #link { flex-basis: 100%; }
  .primary { flex: 1; min-height: 48px; }
  .archive { margin-top: 28px; }
  h2 { font-size: 23px; gap: 8px; }
  h2 span { font-size: 10px; }
  #export { padding: 10px 14px; font-size: 12px; white-space: nowrap; }
  nav { width: 100%; border-radius: 26px; }
  nav button { min-width: 92px; font-size: 12px; padding: 10px 14px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
  .stat { border-radius: 24px; min-height: 127px; }
  .stat strong { font-size: 39px; }
  .details-grid { grid-template-columns: 1fr; gap: 16px; }
  .five-panel,.distribution,.records-panel { border-radius: 24px; padding: 20px 16px; }
  .five-row { grid-template-columns: 36px 90px 1fr 54px; }
  .panel-heading { flex-wrap: wrap; }
  .filters { width: 100%; }
  .filters input { min-width: 0; flex: 1; }
  .filters select { max-width: 115px; }
  .records-panel { margin-top: 16px; }
  .guide-content { grid-template-columns: 1fr; }
  .pagination { font-size: 11px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition: none !important; animation: none !important; } }

/* Reusable SVG symbols keep stars independent of installed fonts. */
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -.125em; }
.brand > .icon { width: 32px; height: 32px; }
.orbit span { display: grid; place-items: center; }
.orbit span > .icon { width: 94px; height: 94px; }
.orbit b > .icon { width: 29px; height: 29px; }
.five-icon > .icon { width: 23px; height: 23px; }
.empty > .icon { width: 32px; height: 32px; margin-bottom: 8px; }
.stars { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; }
.stars > .icon { width: 16px; height: 16px; }
.dist-label .stars > .icon { width: 18px; height: 18px; }
footer > .icon { width: 16px; height: 16px; margin-right: 4px; }

.account-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 0 0; padding: 0 4px; }
#account-label { font-weight: 650; color: var(--md-sys-color-primary); line-height: 24px; }
.select-control { min-width: 0; max-width: 100%; }
.select-control--account { width: 280px; }
.select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 16px; background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); font-weight: 550; line-height: 24px; text-align: left; }
.select-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger > svg { width: 18px; height: 18px; flex: none; transition: transform var(--motion); }
.select-trigger[aria-expanded="true"] > svg { transform: rotate(180deg); }
.select-control--filter .select-trigger { min-height: 44px; padding: 10px 14px; border-radius: 24px; font-size: 12px; background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface); }
.select-menu { position: fixed; z-index: 1000; overflow-y: auto; padding: 6px; border: 1px solid var(--md-sys-color-outline-variant); border-radius: 18px; background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); box-shadow: 0 6px 24px #201b2820; overscroll-behavior: contain; }
.select-menu [role="option"] { display: flex; align-items: center; gap: 12px; min-height: 44px; border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 550; white-space: nowrap; cursor: pointer; }
.select-menu [role="option"] > span { flex: 1; }
.select-menu [role="option"].highlighted,.select-menu [role="option"]:hover { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.select-menu svg { width: 18px; height: 18px; flex: none; visibility: hidden; }
.select-menu [aria-selected="true"] svg { visibility: visible; }
@media(max-width:700px) {
  .account-controls { gap: 10px; }
  .select-control--account { flex: 1; }
  .select-control--account .select-trigger { gap: 8px; padding: 10px 12px; font-size: 12px; }
  .select-menu [role="option"] { font-size: 12px; }
}
.conflicts { padding: 16px; margin-bottom: 20px; border-radius: 20px; background: var(--gold-container); color: var(--on-gold-container); }
.conflict-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; }
.conflict-row span { display: block; margin-top: 4px; }
.conflict-row button { margin: 4px 4px 0 0; }
[hidden] { display: none !important; }
.wish-editable { cursor: context-menu; }
.wish-editable:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: -3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wish-context { position: fixed; z-index: 1100; width: 248px; padding: 8px; overflow-y: auto; border: 1px solid var(--md-sys-color-outline-variant); border-radius: 22px; background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); box-shadow: 0 12px 36px #201b2826; }
.wish-context-heading { padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--md-sys-color-outline-variant); }
.wish-context-heading strong { display: block; font-size: 15px; }
.wish-context-heading > span { display: block; margin-top: 3px; font-size: 11px; color: var(--md-sys-color-on-surface-variant); }
.wish-context-note { margin: 8px 12px; font-size: 12px; }
.wish-context-action { display: flex; align-items: center; width: 100%; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 12px; background: transparent; font-size: 13px; text-align: left; }
.wish-context-action > span:nth-child(2) { flex: 1; }
.wish-context-action:hover:not(:disabled),.wish-context-action:focus-visible { outline: none; background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.wish-action-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--md-sys-color-primary); flex: none; }
.wish-context-action.won .wish-action-dot { background: var(--on-success-container); }
.wish-context-action.lost .wish-action-dot { background: var(--md-sys-color-tertiary); }
.wish-context-action.auto { margin-top: 6px; }
.wish-context-action > svg { width: 18px; height: 18px; visibility: hidden; flex: none; }
.wish-context-action[aria-checked="true"] > svg { visibility: visible; }

.cloud-panel { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:22px 26px; margin:0 0 18px; border-radius:28px; background:var(--md-sys-color-secondary-container); color:var(--md-sys-color-on-secondary-container); }
.cloud-heading { display:flex; align-items:center; gap:16px; min-width:0; }
.cloud-heading > .icon { width:34px; height:34px; flex-shrink:0; }
.cloud-heading h2 { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:0; font-size:20px; }
#cloud-state { font-size:13px; font-weight:600; padding:6px 11px; border-radius:10px; background:#ffffff88; }
#cloud-user { margin:6px 0 0; font-size:14px; overflow-wrap:anywhere; }
#cloud-user:empty { display:none; }
.cloud-actions { display:flex; flex-wrap:wrap; gap:8px; flex-shrink:0; }
.cloud-actions button { min-height:42px; }
.cloud-panel[data-state="error"], .cloud-panel[data-state="conflict"] { background:var(--md-sys-color-tertiary-container); color:var(--md-sys-color-on-tertiary-container); }
.cloud-confirm { width:min(480px,calc(100% - 40px)); box-sizing:border-box; border:0; border-radius:28px; padding:28px; background:var(--md-sys-color-surface-container-low); color:var(--md-sys-color-on-surface); box-shadow:0 24px 80px #201b2838; }
.cloud-confirm::backdrop { background:#201b2866; }
.cloud-confirm h2 { margin:0 0 16px; font-size:24px; }
.cloud-confirm p { line-height:1.7; overflow-wrap:anywhere; }
.cloud-confirm ul { padding:16px 16px 16px 36px; border-radius:18px; background:var(--md-sys-color-primary-container); max-height:35vh; overflow:auto; }
.cloud-confirm li { padding:6px 0; }
.cloud-confirm > div { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; }
@media(max-width:700px) { .cloud-panel { align-items:stretch; flex-direction:column; padding:20px; gap:16px; } .cloud-actions { flex-shrink:1; } }

/* Expressive, in-place authentication. Motion never substitutes for a real state. */
.login-dialog { padding:0; border:0; border-radius:36px; width:min(900px,calc(100% - 40px)); max-height:calc(100dvh - 40px); color:var(--md-sys-color-on-surface); background:var(--md-sys-color-surface); box-shadow:0 32px 120px #23153440; }
.login-dialog::backdrop { background:#21172c66; backdrop-filter:blur(6px); }
.login-dialog[open] { animation:login-enter .38s cubic-bezier(.2,.8,.2,1) both; }
.login-layout { display:grid; grid-template-columns:.9fr 1.1fr; }
.login-art { display:flex; flex-direction:column; justify-content:space-between; min-height:600px; padding:34px; margin:10px; border-radius:28px 72px 28px 28px; background:var(--md-sys-color-primary-container); color:var(--md-sys-color-on-primary-container); overflow:hidden; }
.login-wordmark { font-size:23px; font-weight:750; letter-spacing:-.7px; }.login-wordmark span { font-size:12px; display:block; letter-spacing:2px; margin-top:3px; }
.login-constellation { height:230px; position:relative; display:grid; place-items:center; margin:24px 0; }
.login-flower { width:172px; height:172px; display:grid; place-items:center; background:var(--md-sys-color-primary); border-radius:44% 56% 36% 64% / 55% 37% 63% 45%; transform:rotate(-12deg); }
.login-flower svg { width:100px; height:100px; color:#fff7da; }
.login-satellite { position:absolute; width:60px; height:60px; padding:12px; right:0; top:10px; color:var(--md-sys-color-on-tertiary-container); background:var(--md-sys-color-tertiary-container); border-radius:20px; transform:rotate(12deg); }
.login-moon { position:absolute; width:64px; height:64px; bottom:12px; left:4px; border-radius:50% 50% 12px 50%; background:var(--gold-container); transform:rotate(-18deg); }.login-dot { position:absolute; width:19px; height:19px; right:14px; bottom:18px; border-radius:50%; background:var(--md-sys-color-secondary); }
.login-art-copy p { font-size:34px; font-weight:750; line-height:1.3; letter-spacing:-1px; margin:0 0 16px; }.login-art-copy>span { font-size:13px; }
.login-content { position:relative; padding:56px 40px 32px; align-self:center; min-width:0; }.login-close { position:absolute; top:16px; right:16px; width:40px; min-height:40px; height:40px; display:grid; place-items:center; padding:10px; background:transparent; }.login-close svg { width:20px; height:20px; }
.login-eyebrow { color:var(--md-sys-color-primary); font-size:12px; font-weight:700; letter-spacing:1.5px; }.login-content h2 { font-size:34px; line-height:1.2; letter-spacing:-1px; margin:10px 0 12px; }.login-description { margin:0 0 28px; line-height:1.65; }
.login-fields { display:grid; gap:18px; }.login-field label { margin:0 0 7px 2px; font-size:13px; }.login-field input { width:100%; min-width:0; height:56px; border:1px solid var(--md-sys-color-outline-variant); border-radius:16px; background:var(--md-sys-color-surface-container-lowest); padding:12px 16px; color:var(--md-sys-color-on-surface); }.login-field input:focus { border-color:var(--md-sys-color-primary); }.login-password { position:relative; }.login-password input { padding-right:54px; }.login-reveal { position:absolute; right:5px; top:6px; padding:11px; width:44px; height:44px; min-height:44px; background:transparent; }.login-reveal svg { width:22px; height:22px; }.login-code { letter-spacing:7px; font-size:22px; font-variant-numeric:tabular-nums; }
.login-submit { margin-top:24px; width:100%; min-height:56px; display:flex; justify-content:space-between; align-items:center; padding:15px 22px; border-radius:24px; font-size:16px; }.login-submit svg { width:23px; height:23px; }.login-links { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px; margin-top:10px; }.login-links button { font-size:13px; padding:8px 3px; min-height:44px; }.login-invite { font-size:12px; text-align:center; margin:24px 0 0; color:var(--md-sys-color-on-surface-variant); }
.login-error { background:var(--md-sys-color-error-container); color:var(--md-sys-color-on-error-container); border-radius:14px; padding:12px 14px; font-size:13px; margin:16px 0 0; }.login-password-rule { font-size:12px; margin:-6px 0 0; }.login-secret { border-radius:16px; background:var(--md-sys-color-secondary-container); padding:14px; }.login-secret span { display:block; font-size:12px; margin-bottom:6px; }.login-secret code { font-size:15px; overflow-wrap:anywhere; user-select:all; }
.login-wait { margin-top:20px; display:grid; gap:10px; color:var(--md-sys-color-primary); font-size:13px; }.login-progress { display:block; overflow:hidden; height:5px; border-radius:8px; background:var(--md-sys-color-primary-container); }.login-progress i { display:block; width:40%; height:100%; border-radius:8px; background:var(--md-sys-color-primary); animation:login-progress 1.7s ease-in-out infinite; }.login-dialog[data-busy=true] .login-flower { animation:login-morph 3s ease-in-out infinite; }.login-dialog[data-busy=true] .login-satellite { animation:login-float 2.2s ease-in-out infinite; }
@keyframes login-enter { from { opacity:0; transform:translateY(18px) scale(.98); } to { opacity:1; transform:none; } }
@keyframes login-progress { 0% { transform:translateX(-105%); } 100% { transform:translateX(355%); } }
@keyframes login-morph { 0%,100% { border-radius:44% 56% 36% 64% / 55% 37% 63% 45%; transform:rotate(-12deg) scale(1); } 50% { border-radius:64% 36% 56% 44% / 37% 63% 45% 55%; transform:rotate(14deg) scale(.93); } }
@keyframes login-float { 50% { transform:translateY(-9px) rotate(28deg); } }
@media(max-width:650px) { .login-dialog { width:calc(100% - 24px); max-height:calc(100dvh - 24px); border-radius:28px; }.login-layout { grid-template-columns:1fr; }.login-art { min-height:0; height:126px; padding:20px 24px; margin:8px; border-radius:22px 52px 22px 22px; flex-direction:row; align-items:center; }.login-wordmark { font-size:22px; }.login-art-copy { display:none; }.login-constellation { width:128px; height:100px; margin:0 20px 0 0; }.login-flower { width:82px; height:82px; }.login-flower svg { width:50px; height:50px; }.login-satellite { width:31px; height:31px; padding:6px; border-radius:10px; top:0; right:0; }.login-moon { width:27px; height:27px; bottom:3px; left:7px; }.login-dot { width:10px; height:10px; bottom:3px; right:3px; }.login-content { padding:24px; }.login-content h2 { font-size:29px; }.login-close { top:10px; right:10px; }.login-description { margin-bottom:22px; }.login-invite { margin-top:16px; } }
@media(prefers-reduced-motion:reduce) { .login-progress i { width:65%; transform:none; } }
.cloud-panel:is([data-state=restoring],[data-state=syncing]) .cloud-heading>.icon { animation:cloud-breathe 1.6s ease-in-out infinite; }
@keyframes cloud-breathe { 50% { opacity:.45; transform:translateY(-3px); } }
