:root {
  color-scheme: light;
  --bg: #fffafb;
  --panel: #ffffff;
  --line: #efdce3;
  --text: #3d3038;
  --muted: #806b76;
  --accent: #ce365d;
  --red: #c72e4d;
  --pink-wash: #fff0f4;
  --pink-soft: #ffe4ed;
  --mint-wash: #edf8f4;
  --mint-ink: #28735c;
}

* { letter-spacing: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.65 "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, .grid > * { min-width: 0; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
button, a { transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
.log:focus-visible {
  outline: 3px solid #ed9bb5;
  outline-offset: 3px;
}
a { color: #b62d52; text-underline-offset: 3px; }
a:hover { color: #8e2142; }
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}
button:disabled { cursor: wait; opacity: .48; }
button:not(:disabled):active { filter: brightness(.96); }
.icon { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.layout-width { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 10px 16px; background: #fff; border: 1px solid var(--accent); }
.skip-link:focus { top: 12px; }

.site-header {
  display: block;
  background: #fff0f4;
  border-top: 4px solid #e24464;
  border-bottom: 1px solid #f0d9e2;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 122px; padding-block: 15px; }
.brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.brand-mascot { display: block; width: 76px; height: 88px; object-fit: contain; flex: 0 0 76px; }
.eyebrow { color: #ad3e61; font-size: 10px; font-weight: 750; letter-spacing: 0; }
h1 { margin: 3px 0 0; color: #623048; font-size: 25px; line-height: 1.35; font-weight: 750; letter-spacing: 0; }
.brand-caption { margin: 5px 0 0; color: #866374; font-size: 12px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-note { display: flex; align-items: center; gap: 7px; color: #a65672; font-size: 12px; white-space: nowrap; }
.header-note .icon { width: 15px; height: 15px; flex-basis: 15px; }
.header-actions .subtle { background: #fff9fb; }
.site-nav { display: flex; align-items: center; gap: 12px; margin: 0; min-height: 68px; border-bottom: 1px solid var(--line); }
.site-nav a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 68px; padding: 15px 18px; color: #8a737f; border-bottom: 3px solid transparent; font-size: 14px; font-weight: 650; }
.site-nav a:hover { background: #fff0f4; }
.site-nav a[aria-current] { color: #b72c52; background: #fff3f7; border-bottom-color: #d74067; }
.workspace { padding-block: 8px 20px; }
.workspace.activity-workspace { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 40px; align-items: start; }
.card {
  min-width: 0;
  margin: 0;
  padding: 26px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.activity-form { grid-column: 1; grid-row: 1; }
.shop-settings { grid-column: 1; grid-row: 2; }
.activity-history { grid-column: 2; grid-row: 1 / span 2; border-bottom: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-title h2, .section-title h3 { display: flex; align-items: center; gap: 9px; min-width: 0; margin: 0; }
.section-title h2 .icon { color: #d34268; }
h2 { color: #5e3548; font-size: 18px; line-height: 1.5; font-weight: 750; }
h3 { color: #654654; font-size: 14px; font-weight: 650; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 3px 10px; border: 1px solid #f0d3df; border-radius: 6px; color: #ac3b60; background: #fff0f5; font-size: 11px; font-weight: 650; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
p { overflow-wrap: anywhere; }
.section-intro { margin: 0 0 20px; font-size: 13px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.scope-grid { grid-template-columns: 124px minmax(0, 1fr); }
label { display: block; margin: 17px 0 7px; color: #705261; font-size: 12px; font-weight: 650; }
input, select, textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e6cdd8;
  border-radius: 6px;
  background: #fff;
  color: #46343d;
  box-shadow: none;
}
input:hover, select:hover, textarea:hover { border-color: #dca3b7; }
input:focus, select:focus, textarea:focus { border-color: #d45b81; }
input::placeholder, textarea::placeholder { color: #846c79; opacity: 1; }
input:disabled, select:disabled, textarea:disabled { background: #f9f0f4; color: #9b808d; }
input[readonly], textarea[readonly] { background: #fcf4f7; color: #846d78; }
input[type="number"], input[inputmode="numeric"] { font-variant-numeric: tabular-nums; }
input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; flex: 0 0 22px; accent-color: #d63e68; }
textarea { min-height: 88px; resize: vertical; font-family: Consolas, "SFMono-Regular", monospace; font-size: 12px; line-height: 1.6; }
.primary { background: #d33861; border-color: #d33861; color: #fff; }
.primary:hover:not(:disabled) { background: #b72a50; border-color: #b72a50; }
.secondary { background: #fff0f5; border-color: #ecc4d3; color: #a83258; }
.secondary:hover:not(:disabled) { background: #ffe1ec; border-color: #dfa2b7; }
.danger { background: #fff; border-color: #e4a9b9; color: #bd3555; }
.danger:hover:not(:disabled) { background: #fff0f2; border-color: #d56380; }
.subtle { background: transparent; border-color: #e9d6df; color: #8a6677; }
.subtle:hover:not(:disabled) { background: #fff0f5; border-color: #dba6ba; color: #a62f54; }
.actions { display: flex; gap: 12px; margin-top: 20px; }
.actions button { flex: 1; min-height: 46px; padding-inline: 12px; font-size: 14px; }
.wide { width: 100%; margin-top: 20px; }
#saveActivity { margin-top: 4px; }
.notice { margin: 12px 0; padding: 12px 14px; border: 1px solid #cde5dc; border-radius: 6px; background: #f0faf6; color: #3c6b59; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice.error { border-color: #edb7c5; background: #fff0f3; color: #ae2e4d; }
#pageMessage { margin: 18px 0 0; }
.log { min-height: 244px; max-height: 300px; margin: 14px 0 24px; padding: 16px; border: 1px solid #eddae2; border-radius: 6px; background: #fff; color: #735263; font: 12px/1.85 Consolas, "SFMono-Regular", monospace; white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; }
.activity-history > .section-title:nth-of-type(2) { margin-top: 20px; }
#activityRuns { max-height: 420px; padding-right: 5px; overflow: auto; overscroll-behavior: contain; }
.operation-link { display: block; width: 100%; min-height: 42px; text-align: left; white-space: normal; overflow-wrap: anywhere; font-size: 11px; font-weight: 500; line-height: 1.7; }
.run-item { padding: 10px 0; border-bottom: 1px solid #f0e1e7; color: #866d7b; overflow-wrap: anywhere; }
.run-item:last-child { border-bottom: 0; }
.run-error { color: #bd3555; }
.activity-history .run-item { padding: 6px 0; border-bottom: 0; }
details { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
summary { color: #95546e; font-size: 13px; font-weight: 650; line-height: 1.7; cursor: pointer; }
summary::marker { color: #ce557e; }
details[open] > summary { margin-bottom: 16px; }
details button { margin-top: 12px; }
.shop-settings details { margin-top: 0; padding-top: 0; border-top: 0; }
.shop-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid #f0e1e7; }
.shop-row > div { min-width: 0; overflow-wrap: anywhere; }
.shop-row button { min-height: 34px; margin: 0; padding: 7px 11px; font-size: 11px; }
.shop-row:last-child { border-bottom: 0; }
.shop-buttons { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.shop-row .small { font-size: 11px; }
.schedule { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 8px; border-top: 1px solid var(--line); }
.schedule p { margin-top: 4px; }
.history-controls { display: flex; align-items: end; gap: 12px; max-width: 470px; }
.history-controls > div { flex: 1; min-width: 0; }
.history-controls label { margin-top: 0; }
.history-controls button { min-height: 44px; }
.history-panel .section-title { margin-bottom: 20px; }
.collector-panel > .notice { background: #fff7eb; border-color: #ecd9b8; color: #846335; }
#profitResults { padding: 20px 0; }
#profitResults:empty { padding: 0; }
.profit-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.group-title { grid-column: 1 / -1; margin: 8px 0 2px; color: #8d6579; font-size: 12px; font-weight: 650; }
.data-item { min-width: 0; margin: 0; padding: 16px; border: 1px solid #e8d6df; border-left: 3px solid #d97b9d; border-radius: 6px; background: #fff; }
.row-main, .row-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-main { color: #614252; font-size: 13px; font-weight: 650; }
.row-main > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.row-sub { margin-top: 12px; padding: 10px 0 0; border-top: 1px solid #f1e6eb; border-radius: 0; background: transparent; color: #806575; font-size: 11px; }
.amount { flex-shrink: 0; font-size: 21px; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.positive { color: #278368; }
.negative { color: #ca3958; }
.tone-0 .data-item { border-left-color: #dd85a4; }
.tone-1 .data-item { border-left-color: #77b9a5; }
.tone-2 .data-item { border-left-color: #e4bd6c; }
.tone-3 .data-item { border-left-color: #91b5d4; }
.tone-4 .data-item { border-left-color: #dc8f8c; }
.site-footer { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 28px 0 36px; color: #8b6578; font-size: 11px; text-align: center; }
.site-footer .icon { width: 13px; height: 13px; flex-basis: 13px; color: #d86b8c; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; border-top: 4px solid #e24464; background: #fff0f5; }
.login-card { width: 100%; max-width: 430px; margin: 0; padding: 32px 36px; border: 1px solid #ebccda; border-radius: 8px; background: #fffdfd; box-shadow: 0 10px 35px #b64c7110; }
.login-brand { text-align: center; }
.login-mascot { display: block; width: 126px; height: 145px; margin: 0 auto 16px; object-fit: contain; }
.login-card h1 { margin: 9px 0 7px; color: #76364e; font-size: 25px; }
.login-card p { margin: 0 0 22px; font-size: 12px; }
.login-card form { margin-top: 26px; }
.login-card label { margin-top: 15px; }
.login-card input { min-height: 46px; }
.login-card .wide { min-height: 46px; margin-top: 26px; font-size: 14px; }
.login-card .login-footnote { margin: 20px 0 0; color: #8f6a7d; font-size: 11px; text-align: center; }
.login-card .notice { margin-top: 20px; }
* { scrollbar-width: thin; scrollbar-color: #e7bfd0 #fff8fa; }

@media (max-width: 900px) {
  .layout-width { width: calc(100% - 40px); }
  .workspace.activity-workspace { column-gap: 26px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .scope-grid { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; }
  .header-note { display: none; }
  .actions { gap: 10px; }
  .actions button { gap: 6px; padding-inline: 10px; font-size: 13px; }
}
@media (max-width: 720px) {
  .workspace.activity-workspace { display: block; }
  .activity-history { border-bottom: 1px solid var(--line); }
  .activity-form { padding-bottom: 24px; }
  .shop-settings { padding-block: 19px; }
  .activity-history { padding-top: 25px; }
  .profit-group { grid-template-columns: minmax(0, 1fr); }
  .log { min-height: 200px; max-height: 280px; }
  .scope-grid { grid-template-columns: 124px minmax(0, 1fr); }
  .actions button { font-size: 14px; }
}
@media (max-width: 480px) {
  .layout-width { width: calc(100% - 32px); }
  .header-inner { gap: 10px; min-height: 105px; padding-block: 12px; }
  .brand { gap: 10px; }
  .brand-mascot { width: 54px; height: 70px; flex-basis: 54px; }
  .eyebrow { font-size: 9px; }
  h1 { font-size: 21px; }
  .brand-caption { margin-top: 4px; font-size: 11px; }
  .header-actions .subtle { min-height: 36px; padding: 7px 10px; font-size: 11px; gap: 5px; }
  .header-actions .icon { width: 14px; height: 14px; flex-basis: 14px; }
  .site-nav { gap: 4px; min-height: 60px; }
  .site-nav a { min-height: 60px; padding: 12px 14px; font-size: 13px; }
  .site-nav .icon { width: 16px; height: 16px; flex-basis: 16px; }
  .card { padding-block: 23px; }
  .section-title { gap: 10px; }
  h2 { font-size: 17px; }
  .section-title > button { min-height: 34px; padding: 7px 10px; font-size: 11px; }
  .section-intro { margin-bottom: 14px; font-size: 12px; }
  .grid { gap: 12px; }
  .scope-grid { grid-template-columns: 108px minmax(0, 1fr); }
  input, select, textarea { font-size: 16px; }
  textarea { font-size: 12px; }
  select { padding-inline: 10px; }
  label { font-size: 12px; }
  .actions button { gap: 6px; padding-inline: 10px; font-size: 13px; }
  .actions .icon { width: 16px; height: 16px; flex-basis: 16px; }
  .shop-row { align-items: flex-start; gap: 8px; font-size: 12px; }
  .shop-buttons { max-width: 114px; }
  .shop-buttons button { padding-inline: 9px; font-size: 10px; }
  .row-main { font-size: 13px; }
  .row-sub { flex-wrap: wrap; gap: 4px; }
  .amount { font-size: 20px; }
  .history-controls { gap: 10px; }
  .history-controls button { padding-inline: 12px; font-size: 12px; }
  .badge { padding-inline: 8px; font-size: 10px; }
  .login-page { padding: 24px 16px; }
  .login-card { padding: 26px 24px; }
  .login-mascot { width: 110px; height: 126px; }
  .login-card h1 { font-size: 23px; }
  .login-card form { margin-top: 20px; }
}
@media (max-width: 360px) {
  .brand-mascot { width: 46px; flex-basis: 46px; }
  .brand { gap: 8px; }
  .brand-caption { display: none; }
  h1 { font-size: 20px; }
  .header-actions .subtle { padding-inline: 8px; }
  .scope-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .site-nav a { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Sticker stationery theme; business controls retain their original dimensions. */
:root {
  --bg: #fff5fa;
  --accent: #e52d64;
  --line: #f0ccdc;
  --pink-wash: #fff0f7;
}
body {
  background-color: #fff7fb;
  background-image: linear-gradient(90deg, #f5bfd62c 50%, transparent 50%),
    linear-gradient(#f5bfd62c 50%, transparent 50%);
  background-size: 32px 32px;
}
body > .layout-width { position: relative; z-index: 1; background: #fffdfef5; padding-inline: 24px; }
.kitty-sticker {
  display: inline-block;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  background: url("kitty-stickers-v2.webp") 0 0 / 200% 200% no-repeat;
}
.kitty-peek { background-position: 100% 0; }
.kitty-bow { background-position: 0 100%; }
.kitty-shop { background-position: 100% 100%; }
.kitty-ambience { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.kitty-ambience .kitty-sticker { position: absolute; width: 88px; height: 88px; opacity: .66; animation: kitty-drift 6s ease-in-out infinite; }
.decor-one { left: 1.2%; top: 29%; transform: rotate(-16deg); }
.decor-two { right: .5%; top: 48%; animation-delay: -2s !important; }
.decor-three { right: 1%; bottom: 4%; width: 64px !important; height: 64px !important; animation-delay: -4s !important; }
.decor-four { left: -.8%; bottom: 9%; animation-delay: -1s !important; }
.kitty-spark { position: absolute; color: #e6982b; font-size: 36px; font-weight: 400; line-height: 1; animation: kitty-twinkle 3s ease-in-out infinite; }
.spark-one { left: 4%; top: 57%; }
.spark-two { right: 4%; top: 31%; animation-delay: -1.5s; color: #58a896; }
.site-header {
  position: relative;
  z-index: 2;
  border-top: 5px solid #e72e64;
  border-bottom: 0;
  background-color: #ffe3ef;
  background-image: linear-gradient(90deg, #ffffff40 50%, transparent 50%), linear-gradient(#ffffff40 50%, transparent 50%);
  background-size: 24px 24px;
}
.header-inner { min-height: 158px; gap: 18px; }
.brand { gap: 16px; position: relative; }
.brand-sticker { width: 118px; height: 118px; animation: kitty-bob 4.6s ease-in-out infinite; }
.brand h1 { font-size: 30px; color: #9e2853; text-shadow: 2px 2px 0 #fff; }
.eyebrow { color: #a62d58; font-weight: 800; font-size: 10px; }
.brand-caption { color: #a6486b; }
.kitty-header-scene { position: relative; height: 140px; flex: 0 0 340px; }
.kitty-scene-caption { position: absolute; top: 16px; left: 13px; transform: rotate(-7deg); color: #b93461; font: 800 14px/1.3 "Segoe UI", sans-serif; text-align: center; }
.kitty-scene-caption b { color: #d36b82; font: italic 23px/1.2 Georgia, serif; }
.scene-peek { position: absolute; width: 93px; height: 93px; left: 13px; bottom: -6px; animation: kitty-bob 4s ease-in-out -1s infinite; }
.scene-bow { position: absolute; width: 70px; height: 70px; top: 8px; left: 135px; transform: rotate(12deg); animation: kitty-sway 5s ease-in-out infinite; }
.scene-shop { position: absolute; width: 128px; height: 128px; right: 2px; bottom: 1px; animation: kitty-bob 4.4s ease-in-out -2s infinite; }
.header-actions { flex-direction: column; align-items: flex-end; gap: 12px; }
.header-note { font-size: 10px; color: #b24c70; }
.header-note .icon { color: #e93269; fill: #ffccdc; animation: kitty-heartbeat 2.6s ease-in-out infinite; }
.header-actions .subtle { background: #ffffffbf; border-color: #edacc8; box-shadow: 2px 3px 0 #f8bfd5; }
.kitty-ribbon { height: 30px; overflow: hidden; border-block: 1px dashed #ef78a1; background: #e9346a; color: #fff8fb; }
.kitty-ribbon-track { display: flex; width: max-content; height: 28px; animation: kitty-marquee 32s linear infinite; }
.kitty-ribbon-track > span { display: flex; align-items: center; justify-content: space-around; gap: 28px; width: 440px; flex: 0 0 440px; font-size: 10px; font-weight: 700; }
.kitty-ribbon i { width: 7px; height: 7px; border: 1px solid #fff; background: #ffcb58; transform: rotate(45deg); }
.site-nav { justify-content: space-between; gap: 12px; min-height: 72px; border-bottom: 2px dashed #efbcd1; }
.nav-links { display: flex; gap: 6px; min-width: 0; }
.site-nav a { min-height: 72px; padding-inline: 17px; color: #aa6583; }
.site-nav a[aria-current] { background: #fff0f7; color: #cc275e; border-bottom-color: #e9346a; }
.site-nav a[aria-current] > .icon { animation: kitty-sway 3.6s ease-in-out infinite; }
.kitty-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.kitty-tools button { position: relative; width: 38px; min-height: 38px; height: 38px; padding: 7px; border-radius: 6px; }
.kitty-tools .kitty-party { width: 47px; height: 47px; padding: 0; border: 0; background: transparent; }
.kitty-party .kitty-sticker { width: 47px; height: 47px; animation: kitty-sway 5s ease-in-out infinite; }
.kitty-tools button::after { position: absolute; bottom: calc(100% + 7px); right: 0; z-index: 5; padding: 5px 9px; border-radius: 5px; background: #7b3052; color: #fff; font-size: 11px; font-weight: 500; white-space: nowrap; content: attr(aria-label); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s ease; }
.kitty-tools button:hover::after, .kitty-tools button:focus-visible::after { opacity: 1; visibility: visible; }
.kitty-motion[aria-pressed="true"] { background: #e9f8f1; color: #28735c; border-color: #94cdb7; }
.workspace.activity-workspace { column-gap: 40px; }
.card { animation: kitty-enter .6s ease both; }
.activity-history { animation-delay: .1s; }
.shop-settings, .history-panel { animation-delay: .16s; }
.section-title { padding-bottom: 13px; border-bottom: 1px dashed #efc2d4; }
.section-title h2 { color: #9c345d; }
.section-title h2 > .icon { display: none; }
.section-title h2::before { content: ""; display: block; flex: 0 0 34px; width: 34px; height: 34px; background: url("kitty-stickers-v2.webp") 0 100% / 200% 200% no-repeat; transform: rotate(-10deg); }
.activity-history > .section-title:first-child { border-bottom-color: #a8d5c4; }
.activity-history h2 { color: #3c806d; }
.badge { background: #fff5d3; color: #94621f; border-color: #ebd48b; box-shadow: 2px 2px 0 #f9ebbe; transform: rotate(2deg); }
label { color: #9a4268; }
input, select, textarea { border-color: #e8b6cc; background-color: #fffafd; transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
input:focus, select:focus, textarea:focus { background-color: #fff; box-shadow: 3px 3px 0 #f8dce9; }
button { transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease; }
button:not(:disabled):hover { transform: translateY(-2px); }
button:not(:disabled):active { transform: translateY(2px) scale(.97); }
.primary { position: relative; overflow: hidden; background: #e62e65; border-color: #df275e; box-shadow: 0 4px 0 #b31f50; }
.primary::after { content: ""; position: absolute; inset: 0; transform: translateX(-160%) skewX(-20deg); background: linear-gradient(90deg, transparent, #ffffff40, transparent); pointer-events: none; animation: kitty-shine 6s ease-in-out infinite; }
.primary:hover:not(:disabled) { background: #d72059; border-color: #cb2459; box-shadow: 0 6px 0 #ad1f4e; }
.primary:active:not(:disabled) { box-shadow: 0 1px 0 #ad1f4e; }
.secondary { background: #fff0f7; border-color: #e6a5c2; box-shadow: 0 3px 0 #f1cadc; }
.danger { border: 1px dashed #df7b9d; background: #fff8fb; box-shadow: 0 3px 0 #f6d8e4; }
.log { border: 1px solid #b8d7c9; border-left: 4px solid #91c4b0; padding-top: 14px; color: #567466; line-height: 24px; background-color: #f7fffb; background-image: repeating-linear-gradient(transparent, transparent 23px, #deeee6 23px, #deeee6 24px); }
.activity-history > .notice:not(.error) { border-color: #b8decd; background: #effbf4; }
.operation-link { box-shadow: none; border-style: dashed; background: #fff8fb; }
.operation-link:hover:not(:disabled) { background: #ffedf5; }
.shop-settings summary { color: #ad3d69; }
.site-footer { position: relative; gap: 18px; min-height: 120px; padding-block: 22px; border-top: 2px dashed #edbdd1; color: #aa6381; font-size: 10px; }
.site-footer strong { display: inline-block; margin-bottom: 3px; color: #b23f6c; font-size: 11px; }
.footer-sticker { width: 72px; height: 72px; animation: kitty-bob 4s ease-in-out infinite; }
.footer-bow { width: 46px; height: 46px; animation: kitty-sway 5s ease-in-out infinite; }
.kitty-confetti { position: fixed; inset: 0; z-index: 9999; pointer-events: none; overflow: hidden; contain: strict; }
.kitty-confetti > span { position: absolute; top: 0; left: 0; width: 34px; height: 34px; will-change: transform, opacity; }
.kitty-confetti > .kitty-paper { width: 15px; height: 19px; margin: 8px; border-radius: 2px; background: #7ec9b0; }
.kitty-confetti > .kitty-paper-heart { width: 18px; height: 18px; border-radius: 0; background: #f34d86; clip-path: polygon(50% 18%, 64% 2%, 85% 2%, 100% 23%, 100% 42%, 50% 100%, 0 42%, 0 23%, 15% 2%, 36% 2%); }
.login-page { position: relative; isolation: isolate; border-top: 6px solid #e72e64; background-color: #fff3fa; background-image: linear-gradient(90deg, #f5bfd62c 50%, transparent 50%), linear-gradient(#f5bfd62c 50%, transparent 50%); background-size: 28px 28px; }
.login-page .kitty-ambience { z-index: -1; }
.login-page .decor-one { width: 180px; height: 180px; left: 9%; top: 12%; opacity: .9; }
.login-page .decor-two { width: 200px; height: 200px; right: 8%; top: 44%; opacity: .9; }
.login-page .decor-three { right: 16%; bottom: 6%; width: 120px !important; height: 120px !important; }
.login-page .decor-four { width: 155px; height: 155px; left: 11%; bottom: 10%; opacity: .9; }
.login-card { position: relative; padding: 25px 36px 30px; border: 2px solid #eda6c5; border-top: 7px solid #ec427a; box-shadow: 7px 7px 0 #f5c9dc, 0 14px 40px #b42c5b12; animation: kitty-enter .7s ease both; }
.login-sticker { display: block; width: 146px; height: 146px; margin: 0 auto 8px; animation: kitty-bob 4.6s ease-in-out infinite; }
.login-corner-bow { position: absolute; z-index: 2; width: 83px; height: 83px; top: -35px; left: -27px; transform: rotate(-16deg); animation: kitty-sway 5s ease-in-out infinite; }
.login-tools { position: absolute; top: 10px; right: 12px; flex-direction: column; gap: 2px; }
.login-tools .kitty-party, .login-tools .kitty-party .kitty-sticker { width: 38px; height: 38px; }
.login-tools .kitty-motion { width: 30px; height: 30px; min-height: 30px; padding: 5px; }
.login-card h1 { color: #af2b5b; }
.login-card .login-footnote { color: #b2738e; }
.kitty-paused *, .kitty-paused *::before, .kitty-paused *::after,
.kitty-background *, .kitty-background *::before, .kitty-background *::after { animation-play-state: paused !important; }
.kitty-paused button { transition: none; }
.kitty-paused button:hover, .kitty-paused button:active { transform: none; }
.kitty-paused .card, .kitty-paused .login-card { animation: none; opacity: 1; transform: none; }
@keyframes kitty-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-5px) rotate(3deg); } }
@keyframes kitty-sway { 0%, 100% { rotate: -8deg; } 50% { rotate: 8deg; } }
@keyframes kitty-drift { 0%, 100% { translate: 0 0; rotate: -8deg; } 50% { translate: 0 -12px; rotate: 4deg; } }
@keyframes kitty-twinkle { 0%, 100% { transform: scale(.65) rotate(0); opacity: .3; } 50% { transform: scale(1) rotate(90deg); opacity: .85; } }
@keyframes kitty-heartbeat { 0%, 45%, 100% { transform: scale(1); } 15%, 30% { transform: scale(1.16); } }
@keyframes kitty-marquee { to { transform: translateX(-440px); } }
@keyframes kitty-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes kitty-shine { 0%, 65%, 100% { transform: translateX(-160%) skewX(-20deg); } 85% { transform: translateX(160%) skewX(-20deg); } }
@media (min-width: 1450px) {
  .kitty-ambience .kitty-sticker { width: 110px; height: 110px; }
}
@media (max-width: 1050px) {
  .kitty-header-scene { flex-basis: 275px; }
  .scene-bow { left: 107px; width: 58px; height: 58px; }
  .scene-shop { width: 112px; height: 112px; right: 0; }
  .scene-peek { width: 80px; height: 80px; }
  .header-note { display: none; }
}
@media (max-width: 900px) {
  .kitty-header-scene { display: none; }
  .header-inner { min-height: 142px; }
  .brand-sticker { width: 108px; height: 108px; }
  .workspace.activity-workspace { column-gap: 26px; }
  .login-page .decor-one { left: -4%; }
  .login-page .decor-two { right: -8%; }
  .login-page .decor-four { left: -6%; }
}
@media (max-width: 600px) {
  body > .layout-width { padding-inline: 12px; width: calc(100% - 16px); }
  .header-inner { width: calc(100% - 28px); gap: 10px; min-height: 124px; padding-block: 12px; }
  .brand { gap: 9px; }
  .brand-sticker { width: 86px; height: 86px; }
  .brand h1 { font-size: 25px; }
  .brand .eyebrow { font-size: 8px; }
  .brand-caption { font-size: 10px; margin-top: 4px; }
  .header-actions .subtle { font-size: 10px; gap: 5px; padding-inline: 8px; min-height: 34px; }
  .header-actions .icon { width: 13px; height: 13px; flex-basis: 13px; }
  .kitty-ribbon { height: 26px; }
  .kitty-ribbon-track { height: 24px; }
  .kitty-ribbon-track > span { font-size: 9px; }
  .site-nav { min-height: 64px; gap: 4px; }
  .nav-links { gap: 0; }
  .site-nav a { min-height: 64px; padding: 10px 10px; gap: 5px; font-size: 12px; }
  .site-nav a > .icon { width: 15px; height: 15px; flex-basis: 15px; }
  .kitty-tools { gap: 4px; }
  .kitty-tools .kitty-party, .kitty-party .kitty-sticker { width: 37px; height: 37px; }
  .kitty-tools .kitty-motion { width: 32px; height: 32px; min-height: 32px; padding: 6px; }
  .section-title h2::before { width: 29px; height: 29px; flex-basis: 29px; }
  .section-title h2 { gap: 6px; }
  .activity-history .section-title { gap: 6px; }
  .activity-history .section-title > button { padding-inline: 8px; }
  .login-card { padding-inline: 26px; }
  .login-page .decor-one { width: 100px; height: 100px; left: -16px; top: 3%; }
  .login-page .decor-two { width: 115px; height: 115px; right: -20px; top: auto; bottom: 1%; }
  .login-page .decor-three, .login-page .decor-four { display: none; }
  .login-corner-bow { width: 64px; height: 64px; left: -12px; top: -28px; }
  .login-sticker { width: 130px; height: 130px; }
  .site-footer { gap: 10px; }
  .footer-sticker { width: 58px; height: 58px; }
  .footer-bow { width: 36px; height: 36px; }
}
@media (max-width: 360px) {
  .brand-sticker { width: 72px; height: 72px; }
  .brand h1 { font-size: 23px; }
  .header-actions .subtle { font-size: 9px; padding-inline: 6px; }
  .site-nav a { padding-inline: 7px; font-size: 11px; }
  .kitty-tools { gap: 2px; }
  .kitty-tools .kitty-party, .kitty-party .kitty-sticker { width: 32px; height: 32px; }
  .activity-history h2 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.kitty-motion-on) *, body:not(.kitty-motion-on) *::before,
  body:not(.kitty-motion-on) *::after { animation: none !important; transition: none !important; }
  body:not(.kitty-motion-on) button:hover, body:not(.kitty-motion-on) button:active { transform: none !important; }
}

/* Touch-first playroom: all decoration stays outside the business workflow. */
body {
  --candy: #e92e6b;
  --candy-dark: #aa2751;
  --candy-wash: #ffe1ee;
  --candy-soft: #fff2f8;
  --candy-line: #edb4ce;
  --candy-check: #f6bdd635;
  background-color: var(--candy-soft);
  background-image: linear-gradient(90deg, var(--candy-check) 50%, transparent 50%), linear-gradient(var(--candy-check) 50%, transparent 50%);
}
body[data-kitty-palette="mint"] { --candy: #278b75; --candy-dark: #216853; --candy-wash: #d7f4e8; --candy-soft: #f1fff8; --candy-line: #a5d7c3; --candy-check: #9cd4bb35; }
body[data-kitty-palette="sky"] { --candy: #427ec3; --candy-dark: #365d91; --candy-wash: #dcecff; --candy-soft: #f3f9ff; --candy-line: #aac8eb; --candy-check: #aecae835; }
.site-header { padding-top: env(safe-area-inset-top, 0px); border-top-color: var(--candy); background-color: var(--candy-wash); }
.brand h1, .brand .eyebrow { color: var(--candy-dark); }
.kitty-ribbon { background: var(--candy); border-color: var(--candy-line); }
.kitty-bunting { display: flex; align-items: center; justify-content: space-around; height: 25px; border-bottom: 1px dashed var(--candy-line); background: #ffffff8c; pointer-events: none; }
.kitty-bunting .kitty-sticker { width: 37px; height: 37px; transform-origin: center top; animation: kitty-bow-dance 3s ease-in-out infinite; }
.kitty-bunting .kitty-sticker:nth-child(2n) { animation-delay: -.8s; }
.kitty-bunting .kitty-sticker:nth-child(3n) { animation-delay: -1.7s; }
button.kitty-boop { display: block; min-height: 0; padding: 0; border: 0; border-radius: 0; background-color: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.kitty-boop:active:not(:disabled) { filter: none; }
.site-nav a[aria-current] { color: var(--candy-dark); background-color: var(--candy-soft); border-color: var(--candy); }
.primary { background-color: var(--candy); border-color: var(--candy); box-shadow: 0 4px 0 var(--candy-dark); }
.primary:hover:not(:disabled) { background-color: var(--candy); border-color: var(--candy-dark); box-shadow: 0 6px 0 var(--candy-dark); }
.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--candy-dark); }
.kitty-playroom { position: relative; min-width: 0; border-bottom: 2px dashed var(--candy-line); }
.kitty-playbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 70px; }
.kitty-room-toggle { display: flex; justify-content: flex-start; gap: 7px; min-width: 0; min-height: 48px; padding: 4px 0; color: var(--candy-dark); background: transparent; border: 0; box-shadow: none; }
.kitty-room-toggle > .kitty-sticker { width: 37px; height: 37px; animation: kitty-sway 4s ease-in-out infinite; }
.kitty-room-title { font-size: 13px; white-space: nowrap; }
.kitty-room-toggle > .icon { width: 16px; height: 16px; flex-basis: 16px; }
.kitty-love-count { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 23px; padding-inline: 5px; border: 1px solid #efb1ca; border-radius: 5px; color: #c92d68; background: #fff0f6; font-size: 11px; font-variant-numeric: tabular-nums; }
.kitty-palettes { display: flex; flex: 0 0 auto; align-items: center; gap: 2px; }
.kitty-swatch { width: 44px; height: 44px; min-height: 44px; padding: 8px; border: 0; background: transparent; }
.kitty-swatch-color { display: block; width: 23px; height: 23px; border: 3px solid white; border-radius: 50%; background: #ee70a0; outline: 1px solid #f0bdd2; transition: transform .15s ease, outline-color .15s ease; }
.kitty-swatch[data-palette="mint"] .kitty-swatch-color { background: #6bbda2; outline-color: #b0d6c8; }
.kitty-swatch[data-palette="sky"] .kitty-swatch-color { background: #7faee5; outline-color: #b8cdec; }
.kitty-swatch[aria-pressed="true"] .kitty-swatch-color { outline: 2px solid var(--candy-dark); transform: scale(1.12); }
.kitty-play-panel { padding: 0 0 18px; animation: kitty-enter .3s ease both; }
.kitty-play-top, .kitty-play-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kitty-heart-meter { flex: 1; max-width: 230px; min-width: 0; }
.kitty-meter-title { display: flex; align-items: center; gap: 6px; color: #aa426e; font-size: 11px; }
.kitty-meter-title > .icon { width: 15px; height: 15px; flex-basis: 15px; fill: #ffcfdf; }
.kitty-meter-title output { margin-left: auto; color: #cf2f67; font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.kitty-meter { height: 8px; margin-top: 5px; overflow: hidden; border: 1px solid #edb8cf; border-radius: 4px; background: #fff5fa; }
.kitty-meter > span { display: block; height: 100%; min-width: 0; max-width: 100%; background: repeating-linear-gradient(110deg, #ee5f94 0 8px, #ff9ec0 8px 16px); transition: width .3s ease; }
.kitty-board-tools { display: flex; flex: 0 0 auto; gap: 5px; }
.kitty-icon-button { position: relative; width: 44px; min-height: 44px; padding: 10px; background: #fff; color: var(--candy-dark); border: 1px solid var(--candy-line); box-shadow: 0 2px 0 var(--candy-wash); }
.kitty-icon-button:disabled { cursor: default; }
.kitty-mood { display: block; min-height: 24px; margin: 9px 0 7px; color: #a95679; text-align: center; font-size: 12px; line-height: 24px; overflow-wrap: anywhere; }
.kitty-playstage { position: relative; height: 236px; overflow: hidden; border: 2px solid var(--candy-line); border-radius: 8px; background-color: #fffdfd; background-image: linear-gradient(#f4dce836 1px, transparent 1px), linear-gradient(90deg, #b8dfcf32 1px, transparent 1px); background-size: 22px 22px; box-shadow: inset 0 0 0 5px #fff; }
.kitty-playstage::before, .kitty-playstage::after { content: ""; position: absolute; z-index: 0; width: 36px; height: 36px; background: url("kitty-stickers-v2.webp") 0 100% / 200% 200% no-repeat; opacity: .4; pointer-events: none; }
.kitty-playstage::before { left: 6px; bottom: 7px; transform: rotate(-16deg); }
.kitty-playstage::after { top: 8px; right: 8px; transform: rotate(14deg); }
.kitty-board-items { position: absolute; inset: 0; }
.kitty-board-mark { position: absolute; right: 12px; bottom: 10px; color: #d897b5; font-size: 9px; font-weight: 750; transform: rotate(-5deg); pointer-events: none; }
.kitty-board-item { position: absolute; z-index: 2; display: block; width: 62px; height: 62px; min-height: 62px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; transform: translate(-50%, -50%); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.kitty-board-item > .kitty-sticker { display: block; width: 100%; height: 100%; pointer-events: none; }
.kitty-board-item.kitty-buddy { width: 92px; height: 92px; min-height: 92px; z-index: 3; }
.kitty-board-item:not(:disabled):hover, .kitty-board-item:not(:disabled):active { transform: translate(-50%, -50%) scale(1.05); filter: none; }
.kitty-board-item.is-dragging:not(:disabled) { z-index: 8; transform: translate(-50%, -50%) scale(1.12) rotate(-7deg); cursor: grabbing; }
.kitty-board-item:focus-visible { outline-offset: -2px; outline: 2px dashed #e5568d; border-radius: 6px; }
.kitty-play-bottom { margin-top: 12px; }
.kitty-sticker-tray { display: flex; align-items: center; gap: 3px; }
.kitty-stamp { position: relative; display: block; width: 44px; height: 44px; min-height: 44px; padding: 4px; border: 1px dashed var(--candy-line); background: #fff; }
.kitty-stamp > .kitty-sticker { display: block; width: 34px; height: 34px; }
.kitty-party-command { gap: 6px; min-height: 44px; padding-inline: 12px; color: #fff; background: var(--candy); box-shadow: 0 3px 0 var(--candy-dark); font-size: 12px; white-space: nowrap; }
.kitty-party-command > .icon { width: 16px; height: 16px; flex-basis: 16px; }
.kitty-playroom[data-combo="3"] .kitty-room-toggle { animation: kitty-party-pop .6s ease; }
.kitty-playroom [title] { -webkit-tap-highlight-color: transparent; }
.kitty-icon-button::after, .kitty-stamp::after, .kitty-swatch::after { position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 12; transform: translateX(-50%); padding: 4px 8px; border-radius: 4px; background: #793552; color: #fff; font-size: 10px; white-space: nowrap; content: attr(aria-label); opacity: 0; visibility: hidden; pointer-events: none; }
.kitty-swatch { position: relative; }
.login-page { background-color: var(--candy-soft); background-image: linear-gradient(90deg, var(--candy-check) 50%, transparent 50%), linear-gradient(var(--candy-check) 50%, transparent 50%); border-color: var(--candy); padding-top: max(32px, env(safe-area-inset-top)); padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.login-card { border-color: var(--candy-line); border-top-color: var(--candy); }
.login-card .kitty-playroom { margin-top: 4px; border-top: 1px dashed var(--candy-line); }
.login-card .kitty-playbar { min-height: 62px; gap: 4px; }
.login-card .kitty-room-toggle { gap: 4px; }
.login-card .kitty-room-toggle > .kitty-sticker { width: 28px; height: 28px; }
.login-card .kitty-room-title { font-size: 11px; }
.login-card .kitty-love-count { display: none; }
.login-card .kitty-playstage { height: 220px; }
.login-card .kitty-sticker-tray { gap: 2px; }
.login-card .kitty-party-command { padding-inline: 9px; font-size: 11px; }
.login-card .kitty-play-bottom { gap: 8px; flex-wrap: wrap; }
.site-footer { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.kitty-paused .kitty-play-panel { animation: none; opacity: 1; transform: none; }
.kitty-paused .kitty-board-item:not(:disabled):hover, .kitty-paused .kitty-board-item:not(:disabled):active { transform: translate(-50%, -50%); }
@keyframes kitty-bow-dance { 0%, 100% { transform: translateY(-2px) rotate(-10deg); } 50% { transform: translateY(3px) rotate(10deg); } }
@keyframes kitty-party-pop { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.08) rotate(-2deg); } 70% { transform: scale(.98) rotate(1deg); } }
@supports (min-height: 100svh) { .login-page { min-height: 100svh; } }
@media (hover: hover) {
  .kitty-icon-button:hover::after, .kitty-stamp:hover::after, .kitty-swatch:hover::after { opacity: 1; visibility: visible; }
}
@media (min-width: 721px) {
  .kitty-play-panel { max-width: 660px; margin-inline: auto; }
  .kitty-playstage { height: 270px; }
}
@media (max-width: 600px) {
  .header-inner { min-height: 124px; }
  .brand-sticker { width: 95px; height: 95px; }
  .brand h1 { font-size: 25px; }
  .site-nav .nav-links a { padding-inline: 8px; }
  .site-nav .kitty-tools { gap: 4px; }
  .site-nav .kitty-tools .kitty-party, .site-nav .kitty-party .kitty-sticker,
  .site-nav .kitty-tools .kitty-motion { width: 44px; height: 44px; min-height: 44px; }
  .site-nav .kitty-tools .kitty-motion { padding: 11px; }
  .kitty-tools button::after { display: none; }
  .kitty-playbar { min-height: 66px; gap: 5px; }
  .kitty-room-toggle { gap: 5px; }
  .kitty-room-toggle > .kitty-sticker { width: 30px; height: 30px; }
  .kitty-room-title { font-size: 12px; }
  .kitty-palettes { gap: 0; }
  .kitty-love-count { font-size: 10px; min-width: 24px; padding-inline: 4px; }
  .kitty-play-bottom { gap: 8px; }
  .kitty-party-command { padding-inline: 10px; font-size: 11px; }
  .kitty-sticker-tray { gap: 3px; }
  .kitty-play-top { gap: 12px; }
  .kitty-heart-meter { max-width: none; }
  input, select, textarea { font-size: 16px; }
  textarea { font-size: 16px; line-height: 1.5; }
  .site-footer { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .header-actions .subtle, .section-title > button, .shop-row button, .shop-buttons button { min-height: 44px; padding-block: 9px; }
  .login-tools .kitty-party, .login-tools .kitty-motion { width: 44px; height: 44px; min-height: 44px; }
  .login-tools .kitty-motion { padding: 11px; }
}
@media (max-width: 374px) {
  .brand-sticker { width: 80px; height: 80px; }
  .brand h1 { font-size: 23px; }
  .kitty-love-count { display: none; }
  .kitty-room-title { font-size: 11px; }
  .kitty-play-bottom { flex-wrap: wrap; }
  .kitty-party-command { margin-left: auto; }
  .kitty-board-tools { gap: 3px; }
  .kitty-play-top { gap: 8px; }
  .site-nav .nav-links a { padding-inline: 6px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.kitty-motion-on) .kitty-board-item:not(:disabled):hover,
  body:not(.kitty-motion-on) .kitty-board-item:not(:disabled):active { transform: translate(-50%, -50%) !important; }
}
@media (hover: none) {
  button:not(.kitty-board-item):not(.kitty-boop):hover:not(:active) { transform: none; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .header-inner, body > .layout-width { width: calc(100% - max(32px, env(safe-area-inset-left)) - max(32px, env(safe-area-inset-right))); }
  .login-page { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
}
