@import url("themes/ryune/fonts/zen-maru-gothic.css");

/* The ornate selectors share existing geometry; Ryune owns only its visual skin. */
:root[data-theme="ryune"] {
  --theme-ink: #fae8f1;
  --theme-muted: #c8a8b9;
  --theme-accent: #e893b8;
  --theme-accent-dark: #f5b8d2;
  --theme-line: #795265;
  --theme-gold: #df95b7;
  --theme-surface: #2b202a;
  --theme-soft: #3b2938;
  --theme-button-art: linear-gradient(145deg, #cf7caa, #984e77);
  --ryune-font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --scene-color: #211820;
  --scene-middle-art: url("themes/ryune/stars.svg");
  --scene-middle-min-width: 780px;
  --scene-middle-height-ratio: 1.5;
  --scene-cap-art: var(--scene-middle-art);
  --scene-top-art: url("themes/ryune/header-20260919.webp");
  --scene-top-mask: linear-gradient(#000 75%, transparent);
  --scene-footer-art: url("themes/ryune/footer-20260919.webp");
  --scene-footer-mask: linear-gradient(transparent, #000 28%);
}
.preview-ryune {
  background: #211820 url("themes/ryune/header-20260919.webp") center top / cover no-repeat;
}
[data-theme="ryune"] body { font-family: var(--ryune-font); }
[data-theme="ryune"] body::before { border-color: #e7a2c04d; }
[data-theme="ryune"] :is(button, input, select, textarea, .view-nav a, .period-navigation h1, .weekday-row span, .day-number) {
  font-family: var(--ryune-font);
}
[data-theme="ryune"] .theme-scene-top { background-size: contain; }
[data-theme="ryune"] .theme-scene::after { background: linear-gradient(#21182099, transparent); }
[data-theme="ryune"] .theme-scene-footer::before { background-size: contain; }
[data-theme="ryune"] :is(.calendar-header .brand-link, .account-brand-name) {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-style: italic; color: #fff0f8; border-color: #e7a2c0;
  text-shadow: 0 0 3px #f47cba, 0 0 10px #e56b9ccc, 0 2px 3px #170d16;
  background-image: none;
}
[data-theme="ryune"] :is(.brand-link, .account-brand-name)::before,
[data-theme="ryune"] :is(.brand-link, .account-brand-name)::after { color: #edaccd; }
[data-theme="ryune"] :is(.calendar-panel, .account-card, .card) {
  color: var(--theme-ink); border-color: #df95b7;
  background: radial-gradient(ellipse at top left, #57314355, transparent 25rem), #291f29;
  box-shadow: inset 0 0 0 2px #442d3c, inset 0 0 0 4px #d79ab34d, 0 0 12px #ff8fc240, 0 5px 22px #08040955;
}
[data-theme="ryune"] .calendar-panel::before { border-image-source: url("themes/ryune/lace-frame.svg"); border-image-repeat: round; }
[data-theme="ryune"] .calendar-api-app { box-shadow: 0 0 20px #dc76a944, 0 8px 25px #09050980; }
[data-theme="ryune"] :is(.period-navigation h1, .period-range) { color: #fff0f7; text-shadow: 0 0 6px #dd78a870; }
[data-theme="ryune"] .period-navigation h1 { line-height: 1.625; }
[data-theme="ryune"] :is(.period-button, .calendar-header > .today-link, .calendar-header > details > summary) {
  color: #ffe9f6; border-color: #dc98b8;
  background: radial-gradient(ellipse at 25% 0, #b26c9855, transparent 75%), linear-gradient(145deg, #57364d, #2c202d);
  box-shadow: inset 0 0 0 1px #f8c0de66, inset 0 3px 4px #ffd8e922, 0 0 7px #fa8dc43d;
}
[data-theme="ryune"] .calendar-header .view-nav::before {
  border-color: #dc98b8; background: linear-gradient(145deg, #53364a, #2d212d);
  box-shadow: inset 0 0 0 1px #e4a5c04d, 0 0 6px #fa8dc43d;
}
[data-theme="ryune"] .calendar-header .view-nav a { color: #ffe9f6; }
[data-theme="ryune"] .calendar-header .view-nav a + a::before { border-color: #9a617e66; }
[data-theme="ryune"] .calendar-header .view-nav a[aria-current="page"]::before {
  background: radial-gradient(ellipse at top, #f2b3d3aa, transparent 80%), linear-gradient(145deg, #d88db6, #b76795);
  box-shadow: inset 0 0 0 1px #ffd5e9, inset 0 0 0 3px #e39aba80, 0 0 9px #ef8fc178;
}
[data-theme="ryune"] .calendar-header .view-nav a[aria-current="page"] { color: #311928; }
[data-theme="ryune"] .calendar-header .view-nav a[aria-current="page"]::after,
[data-theme="ryune"] .period-button::after { background: #efb2d0; }
[data-theme="ryune"] .weekday-row { background: #342632; border-color: #895b73; box-shadow: inset 0 1px #e8bfd529; }
[data-theme="ryune"] .weekday-row span { color: #f6d6e7; line-height: 1.5625rem; }
[data-theme="ryune"] .weekday-row span:first-child { color: #f7a3c3; }
[data-theme="ryune"] .weekday-row span:last-child { color: #c5b9ed; }
[data-theme="ryune"] .month-grid { background: #2c232c; border-color: #a0728a; box-shadow: 0 0 0 2px #382633, 0 0 0 3px #dc98b83d; }
[data-theme="ryune"] .month-day:not(.selected):not(.outside-month) { background: linear-gradient(145deg, #352936, #2b232d); }
[data-theme="ryune"] :is(.month-day, .month-week .month-day:last-child, .month-week:last-child .month-day) { border-color: #76586c; }
[data-theme="ryune"] .month-day.outside-month { color: #a996a7; background: #292229; }
[data-theme="ryune"] .month-day.selected {
  background: radial-gradient(ellipse at 50% 45%, #c781b690, #70446199 55%, #442b42);
  box-shadow: inset 0 0 0 1px #f7bbdc, inset 0 0 0 3px #f9d9e83b, inset 0 0 14px 4px #f28cc56b, inset 0 0 28px 7px #cf82b936;
}
[data-theme="ryune"] .month-day.selected::after { color: #f8b7da; }
[data-theme="ryune"] .month-day.selected .day-number { color: #fff0f7; }
[data-theme="ryune"] .month-day.is-today .month-day-heading .day-number {
  color: #351e30; background: #ed9bc5; outline-color: #f5bddd;
  box-shadow: inset 0 0 0 2px #ffd7eb, 0 0 7px #f78fc7;
}
[data-theme="ryune"] .month-day.is-today .day-number::after { color: #f4beda; }
[data-theme="ryune"] .holiday-mark { color: #ffb4d0; }
[data-theme="ryune"] .work-icon { color: #cdb1c9; }
/* Keep the calendar API's category backgrounds; use dark ink on those light fills. */
[data-theme="ryune"] :is(.month-event, .selected-event, .timeline-event) { color: #332439; }
[data-theme="ryune"] :is(.selected-event, .timeline-event) :is(a, .event-meta, .timeline-event-meta) { color: #47374f; }
[data-theme="ryune"] .month-event { font-family: var(--ryune-font); }
[data-theme="ryune"] :is(.week-day, .timeline-canvas, .settings-record-card, .settings-menu-card, .form-section, .account-section, .account-list-card, .confirmation-list, .category-settings, .category-entry, .category-row, .category-catalog) {
  color: var(--theme-ink); border-color: #916078; background: #30242f; box-shadow: inset 0 0 0 2px #56354b44;
}
[data-theme="ryune"] :is(.week-day-heading a, .settings-menu-card strong, .form-section legend, .category-settings h2, .category-field label) { color: #f4bad5; }
[data-theme="ryune"] :is(.summary-badge, .day-setting-actions a, .event-icon-link, .day-summary, .day-setting-actions a.is-set, .summary-action.is-set) { background: #463047; color: #f6d6e7; border-color: #966a85; }
[data-theme="ryune"] .timeline-line { border-color: #553d52; }
[data-theme="ryune"] .timeline-line.hour-line { border-color: #84617b; }
[data-theme="ryune"] :is(.mobile-header-menu-panel, .notification-panel, .friend-picker-panel, .theme-dialog, .registration-menu, .registration-dialog) {
  color: var(--theme-ink); border-color: #dc98b8; background: linear-gradient(145deg, #483045, #2a202a);
  box-shadow: inset 0 0 0 2px #dc98b84d, 0 12px 40px #08050880;
}
[data-theme="ryune"] :is(.calendar-menu-submenu, .calendar-menu-submenu > summary) { border-color: #9b6b89; color: #f9d5e9; background: #3d2a3d; box-shadow: none; }
[data-theme="ryune"] :is(.calendar-menu-submenu > a, .calendar-menu-submenu > .theme-open, .mobile-header-menu-panel > a, .notification-list a, .friend-picker-option label, .friend-picker-trigger span, .participant-status summary, .invitation-manage a, .invitation-detail .selected-event-title, .invitation-detail .selected-event a) { color: #f9d5e9; }
[data-theme="ryune"] .calendar-menu-submenu > summary::before,
[data-theme="ryune"] .calendar-menu-submenu > :is(a, .theme-open)::before { color: #e79fc7; }
[data-theme="ryune"] :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { background: #392936; border-color: #9f6f8b; color: #ffebf7; }
[data-theme="ryune"] :is(.form-field, .account-main) :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { background: #392936; border-color: #9f6f8b; color: #ffebf7; }
[data-theme="ryune"] :is(.theme-dialog-heading button, .cancel-button, .account-back-link, .registration-close, .category-edit, .friend-picker-trigger button, .notification-more, .notification-close) { color: #ffe9f5; background: #62415d; border-color: #c48bab; }
[data-theme="ryune"] .theme-options button { color: #fbe1ee; background: #302230; border-color: #81556f; }
[data-theme="ryune"] .theme-options button[aria-pressed="true"] { border-color: #f0a9cf; box-shadow: 0 0 0 2px #d085ac55; }
[data-theme="ryune"] :is(.theme-persistence-note, .category-catalog p, .settings-menu-card span, .settings-menu-card small) { color: #d6b8ca; }
[data-theme="ryune"] .category-settings > .account-card-header h1 { color: #f7d6e8; }
[data-theme="ryune"] .category-settings > .account-card-header h1::before,
[data-theme="ryune"] .category-settings h2::after { color: #e5a4c7; }
[data-theme="ryune"] .category-settings button,
[data-theme="ryune"] .logout-form button { color: #fff0f8; background: var(--theme-button-art); border-color: #d599ba; box-shadow: inset 0 0 0 2px #f5b8d533; }
[data-theme="ryune"] .category-active label { color: #f7d6e8; background: #49334b; }
[data-theme="ryune"] .category-active input[type="checkbox"] { accent-color: #dd93be; }
[data-theme="ryune"] .registration-fab {
  background: radial-gradient(ellipse at 30% 0, #fbd1e9, transparent 65%), linear-gradient(145deg, #df87b5, #aa527f);
  border-color: #f1b6d5; box-shadow: inset 0 0 0 2px #ffe0ef, inset 0 0 0 4px #de9cc0, inset 0 0 12px #fbd1e955, 0 0 12px #ea90bd66;
}
[data-theme="ryune"] .theme-scene-footer span { color: #f5c6dd; text-shadow: 0 0 4px #371524; }
[data-theme="ryune"] .theme-scene-footer span::before,
[data-theme="ryune"] .theme-scene-footer span::after { color: #f2a9cc; }

/* Text occupies the existing space above the complete, bottom-aligned artwork. */
[data-theme="ryune"] .theme-scene-footer {
  min-height: calc(var(--scene-footer-art-height) + 3.5rem);
  align-items: flex-start;
  padding-top: .5rem;
}
[data-theme="ryune"] .theme-scene-footer > span { transform: none; line-height: 1.5; }

/* Decorative only: no meaning, hit targets, or animation. Hidden in other themes. */
.lune-doodle, .lune-doodle-row { display: none; pointer-events: none; user-select: none; }
[data-theme="ryune"] .lune-doodle {
  display: block; width: 48px; height: 34px; flex: 0 0 48px; opacity: .7;
  background: var(--lune-doodle-art) center / contain no-repeat;
}
.doodle-front { --lune-doodle-art: url("themes/ryune/doodle-front.svg"); }
.doodle-tilt { --lune-doodle-art: url("themes/ryune/doodle-tilt.svg"); }
.doodle-sleep { --lune-doodle-art: url("themes/ryune/doodle-sleep.svg"); }
.doodle-peek { --lune-doodle-art: url("themes/ryune/doodle-peek.svg"); }
[data-theme="ryune"] .lune-doodle-row { display: flex; justify-content: flex-end; padding-inline: .25rem; }
[data-theme="ryune"] .lune-day-doodle { margin-block: .25rem; }
[data-theme="ryune"] .lune-month-doodle { display: none; }
@media (max-width: 700px) {
  /* Only empty, non-holiday outside-month cells; owner details are hidden here. */
  [data-theme="ryune"] .lune-month-doodle {
    display: block; position: absolute; right: 2px; bottom: 3px;
    width: min(36px, calc(100% - 4px)); height: 26px; opacity: .55;
  }
}
