/* Moon and rabbit owns these surfaces. Standard-theme colors remain independent. */
.moon-menu-icon { display: none; }
:root:is([data-theme="moon-rabbit"], [data-theme="ryune"]) {
  --theme-ink: #292946;
  --theme-muted: #69667c;
  --theme-accent: #7770ab;
  --theme-accent-dark: #504875;
  --theme-line: #d7d1e1;
  --theme-gold: #c4ad79;
  --theme-surface: #fffdf9;
  --theme-soft: #eeebf5;
  --theme-button-art: linear-gradient(145deg, #746a9e, #62568e);
  /* Opt into the shared three-part scenery; artwork bytes stay unchanged. */
  --scene-display: block;
  --scene-page-display: flex;
  --scene-page-position: relative;
  --scene-page-isolation: isolate;
  --scene-page-min-height: 100dvh;
  --scene-content-position: relative;
  --scene-content-layer: 1;
  --scene-footer-display: flex;
  --scene-color: #242c4f;
  --scene-middle-art: url("themes/moon-rabbit/night-sky-20260918.webp");
  --scene-middle-min-width: 780px;
  --scene-middle-height-ratio: 1.5;
  --scene-top-art: url("themes/moon-rabbit/moon-garden-header-20260918.webp");
  --scene-top-height: clamp(200px, 50vw, 700px);
  --scene-cap-display: block;
  --scene-cap-art: linear-gradient(#151c3899, #242c4f33), var(--scene-middle-art);
  --scene-top-mask: linear-gradient(transparent, #000 12px, #000 90%, transparent);
  --scene-footer-art: var(--theme-footer-art);
  --scene-footer-height: clamp(125px, 29vw, 310px);
  --scene-footer-art-height: min(520px, calc(100vw / 3));

}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) body { background-color: var(--scene-color); background-image: none; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) body::before {
  content: ""; position: fixed; inset: 5px; z-index: 80; pointer-events: none;
  border: 1px solid #d5bd884d; border-radius: 3px;
}

:is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.calendar-main, .account-main) { margin-bottom: 1rem; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-main { width: min(calc(100% - 2rem), 68rem); }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-main::after { display: none; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header {
  --header-art-height: clamp(110px, 30vw, 280px);
  grid-template-columns: minmax(134px, 1fr) repeat(3, 64px);
  grid-template-areas: "brand brand brand brand" "tabs today notifications menu";
  padding: calc(var(--header-art-height) + 8px) .5rem 0;
  gap: .55rem; border: 0; border-radius: 0;
  margin-bottom: .5rem; background: none; box-shadow: none;
  isolation: isolate; z-index: 20;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header::before { display: none; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header::after { content: none; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.calendar-header .brand-link, .account-brand-name) {
  position: relative; justify-self: center; justify-content: center;
  width: fit-content; max-width: 100%; box-sizing: border-box;
  margin: 0 auto .35rem; padding: 0 .3rem .55rem;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 400; letter-spacing: .045em;
  line-height: 1.1; color: #fff3cf; text-shadow: 0 2px 10px #151b39;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cpath fill='%23dfc899' d='M8 0l2 4 6 2-6 2-2 4-2-4-6-2 6-2z'/%3E%3C/svg%3E") center bottom / 12px 9px no-repeat;
  box-shadow: none; border-radius: 0; border-bottom: 1px solid #dac5979e;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header .brand-link {
  text-shadow: 0 2px 3px #101b3e, 0 0 12px #101b3e;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.brand-link, .account-brand-name)::before {
  content: "☾"; margin-right: .25em; color: #dfc899; font-size: .8em;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.brand-link, .account-brand-name)::after {
  content: "✦"; margin-left: .4em; color: #dfc899; font-size: .45em; vertical-align: middle;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .view-nav {
  box-sizing: border-box; padding: 0; gap: 0; height: 46px;
  background: linear-gradient(#fffefa, #f0ecf5); border-color: var(--theme-gold);
  box-shadow: inset 0 0 0 2px #fffef9; border-radius: .75rem;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .view-nav a {
  min-width: 44px; min-height: 44px; height: 44px; box-sizing: border-box;
  color: #343057; border-radius: .65rem; font-family: Georgia, "Yu Mincho", serif; font-size: 1.15rem;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .view-nav a + a { border-left: 1px solid #c4ad7959; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .view-nav a[aria-current="page"] {
  color: #29213f; background: linear-gradient(135deg, #b4a6dd, #a393c8);
  box-shadow: inset 0 0 0 1px #e6d3a4, inset 0 0 9px #fffcdf80, 0 0 9px #beace759;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header > :is(.today-link, .notification-menu > summary, .mobile-header-menu > summary) { width: 100%; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header > .today-link,
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header > details > summary {
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: 100%; min-width: 44px; height: 50px; min-height: 44px; padding: 0;
  color: #343057; background: linear-gradient(#fffefa, #eeebf4); border: 1px solid var(--theme-gold);
  border-radius: .75rem; box-shadow: inset 0 0 0 2px #fffefa;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-menu-label { display: none; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .moon-menu-icon {
  display: block; width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .notification-menu svg { stroke: currentColor; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .notification-list time { color: var(--theme-muted); }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .notification-dot { background: #a575ad; border: 1px solid #fffdf9; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.calendar-panel, .account-card) {
  color: var(--theme-ink); background: linear-gradient(120deg, #fffdfb, #faf8fb);
  border-color: var(--theme-gold);
  box-shadow: inset 0 0 0 3px #fffef8, inset 0 0 0 4px #d5c6a475, 0 5px 22px #141a3230;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .period-navigation { grid-template-columns: 44px minmax(0,1fr) 44px; gap: .55rem; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .period-navigation h1 {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  min-width: 0; overflow-wrap: anywhere;
  font-size: clamp(1.5rem, 4.5vw, 2rem); font-weight: 600; color: #302d56;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .period-navigation .period-range { font-size: clamp(1.05rem, 3vw, 1.5rem); }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .period-button {
  min-height: 44px; border-color: #c8b183; background: linear-gradient(#fffefa, #eeebf5);
  box-shadow: inset 0 0 0 2px #fffdf7, 0 2px 4px #29294612;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .weekday-row span { color: #343052; font-family: "Yu Mincho", Georgia, serif; font-size: .95rem; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .weekday-row span:first-child { color: #a14156; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .weekday-row span:last-child { color: #5467a4; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-grid { background: #fffdfb; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-day { padding-bottom: .9rem; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-day .holiday-mark {
  display: block; min-width: 0; padding-inline: 3px;
  overflow-wrap: anywhere;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-day.selected {
  background: radial-gradient(ellipse at top left, #fffae3a6, transparent 65%), linear-gradient(140deg, #eee5ff, #e8e1f6);
  box-shadow: inset 0 0 0 1px #bba476, inset 0 0 0 3px #fff8dfa1, inset 0 0 12px #ae9ccc80;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-day.selected::after {
  content: "✧"; position: absolute; right: 4px; bottom: 0; height: .85rem;
  font-size: .8rem; line-height: .85rem; color: #9d804a; pointer-events: none;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-day.selected .day-number { background: transparent; color: #302653; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-day.is-today .month-day-heading .day-number {
  position: relative; background: #cdc0ed; color: #292144; outline: 1px solid #b5985c; outline-offset: 0;
  box-shadow: inset 0 0 0 2px #eee7fc, 0 0 5px #c9b6e5; border-radius: 50%;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-day.is-today .day-number::after {
  content: "✦"; position: absolute; top: -5px; right: -2px; color: #a07e38; font-size: 9px; line-height: 1;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-event { border-radius: 4px; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.mobile-header-menu-panel, .notification-panel, .friend-picker-panel, .theme-dialog, .registration-menu) {
  color: var(--theme-ink); border: 1px solid var(--theme-gold);
  background: linear-gradient(135deg, #fffdf9, #f3eff9);
  box-shadow: inset 0 0 0 3px #fffdf8, 0 12px 40px #151b3940;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.friend-picker-panel, .theme-dialog)::backdrop { background: #161d3c99; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.notification-list a, .friend-picker-option label, .friend-picker-trigger span, .participant-status summary, .invitation-manage a) { color: #504875; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .friend-picker-option input { accent-color: #8171a7; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.friend-picker-trigger button, .notification-more, .notification-close, .account-back-link, .cancel-button, .preview-tabs button) {
  color: #504875; background: #eeebf5; border: 1px solid #c5b792;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.friend-picker-footer button, .save-button, .primary-link) { background: var(--theme-button-art); border: 1px solid #d1ba83; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.form-field, .account-main) :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  color: var(--theme-ink); background-color: #fffefa; border-color: #bdb3cf;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.settings-menu-card, .settings-record-card, .form-section, .account-section, .account-list-card, .confirmation-list) { border-color: #d0c6dc; background-color: #faf8fd; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .account-brand {
  display: flex; justify-content: center; min-height: 0;
  padding: calc(clamp(110px, 30vw, 280px) + 8px) .5rem 0;
  margin-bottom: .5rem; overflow: visible;
  border: 0; border-radius: 0; background: none; box-shadow: none;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .account-brand-name {
  display: block; text-shadow: 0 2px 3px #101b3e, 0 0 12px #101b3e;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .account-brand::after { content: none; }


:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .theme-scene-footer span {
  color: #f3e6c9; font-family: Georgia, serif; font-size: .8rem; letter-spacing: .15em; text-align: center;
  text-shadow: 0 1px 3px #161c33, 0 0 8px #161c33;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .theme-scene-footer span::before,
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .theme-scene-footer span::after { content: "☾"; margin: 0 .65rem; color: #d8c391; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .registration-fab { border: 1px solid #d5bd86; box-shadow: inset 0 0 0 3px #faf0d566, 0 5px 15px #1e204566; }
@media (max-width: 700px) {
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.calendar-main, .account-main) { width: calc(100% - 1rem); }
  /* The theme's margin already includes the top safe area. */
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-main { padding-top: 0; }
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header { grid-template-columns: minmax(134px, 1fr) repeat(3, clamp(46px, 14.5vw, 60px)); gap: 4px; padding-right: 4px; padding-left: 4px; }
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-panel { padding: 1rem .5rem; }
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) .account-brand-name { font-size: 2rem; margin-bottom: .6rem; }
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-day.selected::after { right: 3px; }
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) .view-nav a { font-size: 1rem; }
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header .brand-link { font-size: 2rem; margin-bottom: .6rem; }
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) .theme-scene-footer span { transform: translateY(-1.5rem); }
}
@media (max-width: 360px) {
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header { padding-inline: 3px; gap: 3px; }
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.calendar-header .brand-link, .account-brand-name) { font-size: 1.85rem; }
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-panel { padding-inline: .4rem; }
}

/* Calendar decoration stays outside event text and hit areas. */
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-api-app {
  border-radius: 1.2rem;
  box-shadow: 0 0 25px #c5b6ed38, 0 8px 25px #11192b70;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-api-app::before {
  content: none;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-panel {
  padding-top: 1.6rem;
  border-color: #b69a60;
  background: radial-gradient(ellipse at 0 0, #e2d9f2b3, transparent 19rem),
    radial-gradient(ellipse at 100% 100%, #ddd3ed80, transparent 22rem),
    linear-gradient(110deg, #fff9ec, #fffdfb 35%, #f8f4fc);
  box-shadow: inset 0 0 0 2px #fff8de, inset 0 0 0 4px #b7a1ce5e,
    inset 0 0 0 5px #c5ab74a6, 0 0 0 1px #efe0b77a, 0 5px 22px #141a324d;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-panel::before {
  inset: 2px;
  border: 54px solid transparent;
  border-image: url("themes/moon-rabbit/celestial-frame.svg?v=2") 33.333% stretch;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .period-navigation { margin-bottom: .9rem; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .period-navigation h1 {
  text-shadow: 0 1px 0 #fff;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .period-navigation h1::after {
  content: none;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .weekday-row {
  border-top: 1px solid #cbb98f; border-radius: .45rem .45rem 0 0;
  background: linear-gradient(110deg, #e5dcf0, #faf7fa 50%, #e4dcee);
  box-shadow: inset 0 1px #fffdf7;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-grid {
  border: 1px solid #c1ad85; border-top: 0; border-radius: 0 0 .45rem .45rem;
  box-shadow: 0 0 0 2px #fffaf1, 0 0 0 3px #d6c6a777;
  overflow: hidden;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-day:not(.selected):not(.outside-month) {
  background: linear-gradient(145deg, #fffefb, #f5f1f9);
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-day { border-color: #d1c6dc; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-day.outside-month { background: #eae5f0; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .month-day.selected {
  /* Static light stays behind content and inside the cell, including grid edges. */
  background: radial-gradient(ellipse at 50% 45%, #fffcff 0%, #f3eaff 42%, #dfcdf5 100%);
  box-shadow: inset 0 0 0 1px #b29acb, inset 0 0 0 3px #fff8e6,
    inset 0 0 12px 4px #c6a3eea6, inset 0 0 28px 7px #ead8ffcc;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) :is(.period-button, .view-nav a, .calendar-header > .today-link,
  .calendar-header > details > summary) { position: relative; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .period-button,
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header > .today-link,
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header > details > summary,
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .view-nav {
  background: radial-gradient(ellipse at 28% 0, #ffffff, transparent 75%),
    linear-gradient(145deg, #f9f4e7, #e2d9ee 55%, #f9f6fd);
  border-color: #b99c61;
  box-shadow: inset 0 0 0 1px #fffbe9, inset 0 0 0 3px #d4c6e14d,
    inset 0 3px 4px #fffdf4, 0 2px 6px #17193245;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .view-nav a[aria-current="page"] {
  background: radial-gradient(ellipse at 25% 0, #f2e9ffb3, transparent 65%),
    linear-gradient(140deg, #bca8e5, #ad96d4 55%, #c8b7e8);
  box-shadow: inset 0 0 0 1px #b49a65, inset 0 0 0 3px #fff0c9b3, inset 0 0 12px #fff0d480;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .view-nav a[aria-current="page"]::after,
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .period-button::after {
  content: ""; position: absolute; right: 4px; bottom: 4px; width: 8px; height: 8px;
  background: #b2975d;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  pointer-events: none;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .registration-fab {
  background: radial-gradient(ellipse at 30% 0, #d8c4f7, transparent 65%), linear-gradient(145deg, #a88bce, #746396);
  box-shadow: inset 0 0 0 2px #fff3cb, inset 0 0 0 4px #c5ae79, inset 0 0 12px #efe0ff80,
    0 0 0 1px #b29453, 0 5px 18px #20244680;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .theme-scene-footer {
  box-shadow: none;
}
@media (min-width: 701px) {
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-panel::before { border-width: 70px; }
}

/* Bottom-aligned 36px faces retain 44px click targets beside 50px actions. */
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header .view-nav {
  position: relative; isolation: isolate; height: 44px;
  align-self: end;
  border: 0; background: none; box-shadow: none;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header .view-nav::before {
  content: ""; position: absolute; inset: 8px 0 0; z-index: -2; pointer-events: none;
  border: 1px solid #b99c61; border-radius: .75rem;
  background: linear-gradient(145deg, #fffdf7, #e2d9ee 55%, #f9f6fd);
  box-shadow: inset 0 0 0 1px #fffbe9, inset 0 3px 4px #fffdf4, 0 2px 6px #17193245;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header .view-nav a {
  border: 0; background: none; box-shadow: none;
  padding-top: 8px;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header .view-nav a::before {
  content: ""; position: absolute; inset: 8px 0 0; z-index: -1; pointer-events: none;
  border-radius: .65rem;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header .view-nav a + a::before { border-left: 1px solid #c4ad7959; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header .view-nav a[aria-current="page"]::before {
  background: radial-gradient(ellipse at 25% 0, #f2e9ffb3, transparent 65%),
    linear-gradient(140deg, #bca8e5, #ad96d4 55%, #c8b7e8);
  box-shadow: inset 0 0 0 1px #b49a65, inset 0 0 0 3px #fff0c9b3, inset 0 0 12px #fff0d480;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-header .view-nav a[aria-current="page"]::after { bottom: 4px; }
/* Category forms and cards are isolated from calendar and account controls. */
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-settings {
  background: radial-gradient(ellipse at 0 0, #e8dff5, transparent 21rem), linear-gradient(125deg, #fffbed, #fcf9ff 65%);
  border-color: #bda570;
  box-shadow: inset 0 0 0 2px #fff8dc, inset 0 0 0 4px #dacde7, 0 8px 25px #11192b70;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-settings > .account-card-header h1 {
  color: #393352; letter-spacing: .04em;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-settings > .account-card-header h1::before {
  content: "☾"; color: #9b814a; margin-right: .35em; font-weight: 400;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-entry {
  padding: 1rem; margin: 1.2rem 0; border: 1px solid #bcabc9; border-radius: 1rem;
  background: radial-gradient(ellipse at 100% 0, #e4d9f3, transparent 70%), #fffcf8;
  box-shadow: inset 0 0 0 3px #fffaf0, 0 3px 10px #54456d12;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-settings h2 {
  font-size: 1.1rem; color: #514568; margin: 0 0 .85rem;
  padding-bottom: .6rem; border-bottom: 1px solid #cbb98e;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-settings h2::after { content: " ✦"; color: #ad945d; font-size: .8em; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-field label { margin: .85rem 0 .35rem; color: #514568; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-field input {
  min-height: 46px; box-shadow: inset 0 2px 5px #66557d0d; border-color: #bcafcc;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-active label {
  display: flex; align-items: center; gap: .7rem; min-height: 44px; width: fit-content;
  padding: 0 .65rem; margin: .9rem 0 0; border-radius: .65rem;
  background: #eee6f6; color: #514568; cursor: pointer;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-active input[type="checkbox"] {
  width: 22px; height: 22px; min-height: 22px; flex: 0 0 22px;
  padding: 0; margin: 0; accent-color: #80649f; cursor: pointer;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-settings :is(input, a, button):focus-visible {
  outline: 3px solid #8c75b2; outline-offset: 3px;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-settings button {
  min-height: 46px; border: 1px solid #b49a62; color: #fffaf0;
  background: linear-gradient(135deg, #9983b9, #6c588c);
  box-shadow: inset 0 0 0 2px #d8c3e84d, 0 3px 8px #4d3c6e26;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-list { display: grid; gap: .65rem; margin: 1.35rem 0; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-row {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  min-width: 0; padding: .6rem .7rem; border: 1px solid #c7b88d; border-radius: .85rem;
  background: linear-gradient(115deg, #fffcf2, #f1eaf8);
  box-shadow: inset 0 0 0 2px #fffdf8, 0 2px 6px #52406e12;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-name { display: flex; align-items: center; gap: .6rem; min-width: 0; font-weight: 600; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-color {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px;
  width: 28px; height: 28px; font-size: 1.3rem; line-height: 1;
  border: 1px solid #d5c69d; border-radius: 50%; background: #fffdf9;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-edit {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 64px;
  min-height: 44px; border: 1px solid #b9a67a; border-radius: .65rem;
  color: #57466f; background: linear-gradient(#fffaf1, #e5daef); text-decoration: none;
  box-shadow: inset 0 0 0 2px #fffaf080;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-catalog {
  margin-top: 1.5rem; padding: 1rem; border: 1px solid #c8bad8; border-radius: .85rem; background: #f1ecf7;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-catalog p { color: #655b74; line-height: 1.7; }
@media (max-width: 360px) {
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-entry { padding: .8rem; }
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) .category-row { gap: .5rem; padding: .5rem; }
}

/* Native menu disclosures share one compact moonlit treatment. */
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .mobile-header-menu-panel {
  gap: .45rem; border: 1px solid #b69b63;
  background: radial-gradient(ellipse at 100% 0, #e3d8f3, transparent 70%), linear-gradient(130deg, #fffbed, #f4eefb);
  box-shadow: inset 0 0 0 2px #fff8e2, inset 0 0 0 4px #d5c7e480, 0 8px 24px #171d3c66;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-menu-submenu {
  border: 1px solid #c8b990; border-radius: .7rem; min-width: 0;
  background: #fcf9ffb3;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-menu-submenu > summary {
  gap: .4rem; min-height: 46px; color: #493d62;
  background: linear-gradient(125deg, #fffaf0, #e7ddf3); border-radius: .65rem;
  box-shadow: inset 0 0 0 1px #fffdf5; list-style: none;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-menu-submenu > summary::before {
  content: "☾"; color: #a58b52; font-size: 1.05rem; flex: 0 0 auto;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-menu-submenu > summary::after {
  content: ""; width: 7px; height: 7px; margin-left: auto; margin-right: .2rem;
  flex: 0 0 7px; border-right: 1.5px solid #8c759f; border-bottom: 1.5px solid #8c759f;
  transform: rotate(45deg);
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-menu-submenu[open] > summary {
  border-bottom: 1px solid #cbb991; border-radius: .65rem .65rem .25rem .25rem;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-menu-submenu[open] > summary::after { transform: rotate(225deg); }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-menu-submenu > :is(a, .theme-open) {
  width: 100%; min-height: 44px; padding: .65rem .7rem; gap: .45rem;
  color: #55466c; border-radius: .45rem;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .calendar-menu-submenu > :is(a, .theme-open)::before {
  content: "✧"; color: #ac955f; font-size: .8rem;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .mobile-header-menu-panel > a {
  border-bottom: 1px solid #cab88d66; border-radius: .4rem;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .mobile-header-menu-panel :is(a, button, summary, select):focus-visible {
  outline: 2px solid #8a70a7; outline-offset: -2px;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .mobile-header-menu-panel {
  max-height: min(32rem, calc(100dvh - clamp(110px, 30vw, 280px) - 12rem));
}
/* Align shared scenery with the existing page margins. */
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) body:has(.calendar-header) { --scene-top-offset: 1.5rem; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) body:has(.account-brand) { --scene-top-offset: max(1rem, env(safe-area-inset-top)); }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) body:has(.calendar-header, .account-brand) {
  --scene-top-display: block;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .theme-scene-footer span {
  position: relative; z-index: 1;
  text-shadow: 0 1px 2px #161c33, 0 0 3px #161c33, 0 0 8px #161c33;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .invitation-actions button:not(.secondary-action) {
  background: var(--theme-button-art); border: 1px solid #c4ad79;
}
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .invitation-detail .selected-event-title,
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .invitation-detail .selected-event a { color: #504875; }
:is([data-theme="moon-rabbit"], [data-theme="ryune"]) .event-form input[type="checkbox"] { accent-color: #8171a7; }
@media (max-width: 700px) {
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) body:has(.calendar-header) { --scene-top-offset: .75rem; }
  :is([data-theme="moon-rabbit"], [data-theme="ryune"]) body:has(.account-brand) { --scene-top-offset: max(.5rem, env(safe-area-inset-top)); }
}
