
.toast.show { z-index: 150000 !important; }

.toast.toast--action {
  display: inline-flex; align-items: center; gap: 12px;
  white-space: normal; text-align: left;
  padding-right: 6px;
}
.toast.toast--action.show { pointer-events: auto !important; }
.toast__msg { flex: 1 1 auto; min-width: 0; }
.toast__act {
  flex: 0 0 auto;
  background: transparent; color: inherit;
  border: 1px solid currentColor; border-radius: 999px;
  font: inherit; font-weight: 700; letter-spacing: .02em;
  padding: 4px 12px; min-height: 32px; cursor: pointer;
}
.toast__act:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.nav-anchor-flash { animation: nav-anchor-flash 1.5s ease-out; }
@keyframes nav-anchor-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--cp-amber, #ffb24a); } 100% { box-shadow: 0 0 0 3px transparent; } }

#page-home .home-header { flex-wrap: wrap; }
.sync-pill {
  order: 10; flex: 0 0 100%; max-width: max-content;
  display: inline-flex; align-items: center; gap: 6px;
  margin: 2px 0 0; padding: 3px 10px; min-height: 28px;
  font: inherit; font-size: 14px; line-height: 1.2; cursor: pointer;
  color: var(--cp-text-2, var(--color-text-secondary));
  background: transparent;
  border: 1px solid var(--cp-line, var(--color-border)); border-radius: 999px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sync-pill[hidden] { display: none; }
.sync-pill::before {
  content: ''; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cp-lime, #c8d870);
}
.sync-pill[data-state="saving"]::before { background: var(--cp-amber, #ffb24a); animation: busy-pulse 1s ease-in-out infinite; }
.sync-pill[data-state="offline"]::before { background: var(--cp-text-mute, #8a6a52); }
.sync-pill[data-state="offline"] { color: var(--cp-text, var(--color-text)); border-style: dashed; }
.sync-pill[data-state="error"]::before { background: var(--cp-red, #e84030); }
.sync-pill[data-state="error"] { color: var(--cp-amber, #ffb24a); border-color: var(--cp-amber, #ffb24a); }
.sync-pill:focus-visible { outline: 2px solid var(--cp-amber, #ffb24a); outline-offset: 2px; }

.acct-row--learn { align-items: flex-start; padding: 8px 0; cursor: default; }
.acct-row--learn .acct-row__label { flex: 1 1 auto; min-width: 0; }
.acct-row--learn .acct-select, .acct-row--learn .acct-switch { margin-top: 2px; }
.acct-row__effect { display: block; font-size: 12px; color: var(--cp-cyan, var(--color-primary)); margin-top: 2px; }
.acct-scope {
  display: inline-block; margin-left: 6px; padding: 0 6px; vertical-align: 1px;
  font-size: 11px; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-muted);
}
.acct-learn__sum { margin: 0 0 6px; font-size: 14px; color: var(--color-text-secondary); }
.acct-learn__foot { margin: 8px 0 0; font-size: 12px; color: var(--color-text-muted); }
.acct-agent__lbl { display: block; font-size: 15px; margin-bottom: 6px; }
.acct-agent__notes { width: 100%; box-sizing: border-box; resize: vertical; min-height: 72px; font: inherit; font-size: 15px; }
.acct-agent__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 10px; font-size: 12px; color: var(--color-text-muted); flex-wrap: wrap; }
.acct-agent__btns { display: inline-flex; gap: 8px; }
.acct-agent__share .acct-row { cursor: default; }
.acct-danger .acct-row__label, .acct-danger .acct-class-btn__hint { color: var(--cp-red, #e84030); }
.acct-delete__err { margin: 8px 0 0; font-size: 13px; color: var(--cp-red, #e84030); }
.acct-delete__err.hidden { display: none; }
#acctPrivacySection .acct-class-btn { width: 100%; text-align: left; }
#acctPrivacySection .acct-class-btn + .acct-class-btn { margin-top: 10px; }
.acct-class-btn > .acct-row__label { flex: 1 1 0; min-width: 0; }
.acct-class-btn > .acct-class-btn__hint { flex: 0 1 auto; }

.plc-intents .plc-interest__words { font-family: var(--font-pixel, inherit); font-size: 14px; line-height: 1.3; color: var(--color-text-secondary); }

.busy {
  position: fixed; inset: 0; z-index: 200000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(8, 3, 4, .62);
  -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px);
  animation: busy-fade .18s ease-out;
  touch-action: none;
}
.busy[hidden], .busy-pill[hidden], .busy-top[hidden] { display: none !important; }
.busy__card {
  width: min(320px, 100%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 18px 16px;
  background: var(--cp-bg-2, var(--color-surface, #2c1a16));
  color: var(--cp-text, var(--color-text, #fff0d8));
  border: 2px solid var(--cp-amber, #ffb24a);
  box-shadow: 4px 4px 0 #000, 0 0 22px rgba(255, 178, 74, .28);
  font-family: var(--font-pixel, inherit);
  text-align: center; outline: none;
}
.busy__cup {
  position: relative; width: 56px; height: 56px;
  display: flex; align-items: flex-end; justify-content: center;
}
.busy__zh {
  font-family: 'Noto Sans SC', sans-serif; font-weight: 900; font-size: 34px; line-height: 1;
  color: var(--cp-amber, #ffb24a);
  text-shadow: 0 0 10px rgba(255, 178, 74, .45);
}
.busy__steam { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; height: 18px; }
.busy__steam i {
  display: block; width: 3px; height: 12px; border-radius: 2px;
  background: var(--cp-text-2, #d8b894); opacity: 0;
  animation: busy-steam 1.5s ease-in-out infinite;
}
.busy__steam i:nth-child(2) { animation-delay: .35s; }
.busy__steam i:nth-child(3) { animation-delay: .7s; }
.busy__label { font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; max-width: 100%; }
.busy__bar {
  position: relative; width: 100%; height: 10px; overflow: hidden;
  background: var(--cp-bg-0, #14080a);
  border: 1px solid var(--cp-line-bright, #8a5a3a);
}
.busy__fill {
  position: absolute; top: 0; bottom: 0; left: 0; width: 34%;
  background: repeating-linear-gradient(90deg, var(--cp-amber, #ffb24a) 0 6px, var(--cp-orange, #ff7a3a) 6px 8px);
  animation: busy-indet 1.2s ease-in-out infinite;
}
.busy__card--det .busy__fill { animation: none; left: 0; transition: width .25s ease-out; }
.busy__count { font-size: 16px; color: var(--cp-text-2, #d8b894); min-height: 1em; }
.busy__count:empty { display: none; }
.busy__stall { font-size: 16px; color: var(--cp-amber, #ffb24a); }
.busy__stall[hidden] { display: none; }
.busy__stall span { color: var(--cp-text-2, #d8b894); }
.busy__btns { display: flex; gap: 8px; justify-content: center; }
.busy__btn {
  min-height: 40px; min-width: 96px; padding: 6px 16px;
  font: inherit; font-size: 18px; cursor: pointer;
  color: var(--cp-amber, #ffb24a); background: transparent;
  border: 2px solid var(--cp-amber, #ffb24a); box-shadow: 2px 2px 0 #000;
}
.busy__btn[hidden] { display: none; }
.busy__btn:focus-visible { outline: 2px solid var(--cp-text, #fff0d8); outline-offset: 2px; }
.busy-pill {
  position: fixed; z-index: 200001; left: 50%; transform: translateX(-50%);
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  max-width: calc(100vw - 32px);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--cp-bg-2, #2c1a16); color: var(--cp-text, #fff0d8);
  border: 1px solid var(--cp-amber, #ffb24a); border-radius: 999px;
  box-shadow: 2px 2px 0 #000;
  font-family: var(--font-pixel, inherit); font-size: 16px;
  pointer-events: none;
  animation: busy-fade .18s ease-out;
}
.busy-pill__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.busy-pill__dot {
  flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cp-amber, #ffb24a);
  animation: busy-pulse 1s ease-in-out infinite;
}
.busy-top {
  position: fixed; z-index: 200001; left: 0; right: 0; top: 0;
  height: 3px; overflow: hidden; pointer-events: none;
  background: rgba(255, 178, 74, .15);
}
.busy-top span {
  position: absolute; top: 0; bottom: 0; left: 0; width: 30%;
  background: var(--cp-amber, #ffb24a);
  box-shadow: 0 0 8px var(--cp-amber, #ffb24a);
  animation: busy-indet 1.1s ease-in-out infinite;
}
@keyframes busy-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes busy-indet { 0% { left: -35%; } 100% { left: 100%; } }
@keyframes busy-steam { 0% { opacity: 0; transform: translateY(6px) scaleY(.6); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-8px) scaleY(1.1); } }
@keyframes busy-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .busy, .busy-pill { animation: none; }
  .busy__steam i { animation: none; opacity: .6; }
  .busy__fill, .busy-top span { animation-duration: 2.4s; }
  .busy-pill__dot { animation: none; opacity: 1; }
}
