:root {
  --riji-bg: #f8efe7;
  --riji-bg-deep: #f2e5da;
  --riji-surface: rgba(255, 255, 255, 0.78);
  --riji-surface-strong: rgba(255, 255, 255, 0.92);
  --riji-panel: #fffaf6;
  --riji-panel-soft: #fff4ec;
  --riji-panel-deep: #f6e8db;
  --riji-ink: #4c3b34;
  --riji-ink-soft: #8b7468;
  --riji-line: rgba(130, 98, 82, 0.12);
  --riji-accent: #d79a8f;
  --riji-accent-deep: #b77369;
  --riji-accent-soft: #f7d7d2;
  --riji-mint: #d8ebe6;
  --riji-lavender: #e7e2f6;
  --riji-gold: #f2dcb3;
  --riji-danger: #c98074;
  --riji-shadow: 0 18px 40px rgba(140, 104, 83, 0.14);
  --riji-card-shadow: 0 10px 24px rgba(153, 117, 96, 0.1);
  --riji-glow: 0 0 0 4px rgba(215, 154, 143, 0.12);
}

.app-view-panel__body--linglongxia {
  overflow: hidden;
  padding: 0;
}

.app-view-panel__body--linglongxia .riji-page {
  gap: 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.85), transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(247, 215, 210, 0.7), transparent 22%),
    linear-gradient(180deg, var(--riji-bg) 0%, var(--riji-bg-deep) 100%);
}

.riji-shell {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #fdf7f2 0%, #f6ede5 48%, #f3e8de 100%);
}

.riji-shell::before,
.riji-shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  pointer-events: none;
}

.riji-shell::before {
  top: 88px;
  right: -36px;
  width: 132px;
  height: 132px;
  background: rgba(247, 215, 210, 0.5);
}

.riji-shell::after {
  top: 360px;
  left: -44px;
  width: 144px;
  height: 144px;
  background: rgba(216, 235, 230, 0.52);
}

.riji-content {
  display: block;
  gap: 0;
  flex: 0 0 auto;
  min-height: auto;
  padding: 0 14px 0 !important;
  margin-top: 0;
  overflow: visible;
}

.riji-header {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0;
  padding: 16px 14px 12px;
  border-radius: 0;
  background: rgba(253, 247, 242, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 -1px 0 rgba(130, 98, 82, 0.08);
}

.riji-header .back-btn {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(130, 98, 82, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: var(--riji-ink);
  box-shadow: 0 8px 16px rgba(146, 111, 92, 0.08);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.riji-header .card-header-title {
  display: none;
}

.riji-header-title {
  position: absolute;
  left: 50%;
  top: calc(50% + 1px);
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 800;
  color: var(--riji-ink);
  letter-spacing: 0.03em;
  pointer-events: none;
}

.riji-book {
  position: relative;
  overflow: visible;
  margin: 0;
  padding: 10px 0 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.riji-paper {
  position: relative;
  margin: 0;
  min-height: 640px;
  padding: 4px 0 28px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.riji-hero {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding: 20px 18px 18px;
  color: var(--riji-ink);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(247, 215, 210, 0.62), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 249, 244, 0.95));
  border: 1px solid rgba(130, 98, 82, 0.1);
  box-shadow: var(--riji-shadow);
  overflow: hidden;
}

.riji-hero::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 116px;
  height: 116px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(247, 215, 210, 0.6), rgba(231, 226, 246, 0.45));
  transform: rotate(18deg);
}

.riji-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.riji-date-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(130, 98, 82, 0.1);
  color: var(--riji-ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.riji-overview {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 2px;
}

.riji-stat {
  display: grid;
  gap: 4px;
  padding: 13px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(130, 98, 82, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.riji-stat span {
  font-size: 11px;
  color: var(--riji-ink-soft);
}

.riji-stat strong {
  font-size: 20px;
  color: var(--riji-ink);
  line-height: 1.2;
}

.riji-tab-panel {
  display: none;
  gap: 14px;
  margin-top: 16px;
  padding-bottom: 6px;
}

.riji-tab-panel.is-active {
  display: grid;
}

.riji-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(130, 98, 82, 0.1);
  box-shadow: var(--riji-card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.riji-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.riji-section-head strong {
  font-size: 17px;
  color: var(--riji-ink);
  line-height: 1.35;
}

.riji-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(247, 215, 210, 0.46);
  color: var(--riji-accent-deep);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.riji-form {
  display: grid;
  gap: 12px;
}

.riji-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.riji-field {
  display: grid;
  gap: 6px;
}

.riji-field.full {
  grid-column: 1 / -1;
}

.riji-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--riji-ink);
}

.riji-mini-danger {
  border: none;
  border-radius: 999px;
  min-height: 30px;
  padding: 0 12px;
  background: linear-gradient(180deg, #d99689, #c47c70);
  color: #fffaf8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(196, 124, 112, 0.16);
  flex-shrink: 0;
}

.riji-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.riji-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.riji-switch input {
  display: none;
}

.riji-switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(139, 116, 104, 0.18);
  box-shadow: inset 0 1px 2px rgba(67, 41, 24, 0.08);
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.riji-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #f4e8dd);
  box-shadow: 0 2px 6px rgba(56, 35, 21, 0.1);
  transition: transform 0.2s ease;
}

.riji-switch input:checked + .riji-switch-track {
  background: linear-gradient(180deg, #e3a79b, #cf8479);
}

.riji-switch input:checked + .riji-switch-track::after {
  transform: translateX(18px);
}

.riji-switch-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--riji-ink-soft);
  white-space: nowrap;
}

.riji-input,
.riji-select,
.riji-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(130, 98, 82, 0.12);
  border-radius: 16px;
  background: rgba(255, 251, 248, 0.94);
  color: var(--riji-ink);
  outline: none;
  font-size: 13px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.5);
}

.riji-input,
.riji-select {
  height: 42px;
  padding: 0 13px;
}

.riji-textarea {
  min-height: 132px;
  padding: 13px;
  resize: vertical;
  line-height: 1.8;
}

.riji-input::placeholder,
.riji-textarea::placeholder {
  color: rgba(139, 116, 104, 0.72);
}

.riji-input:focus,
.riji-select:focus,
.riji-textarea:focus {
  border-color: rgba(215, 154, 143, 0.6);
  box-shadow: var(--riji-glow);
}

.riji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.riji-btn {
  border: none;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--riji-accent-deep);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(190, 144, 124, 0.08);
}

.riji-btn.primary {
  background: linear-gradient(180deg, #e3a79b, #cb8175);
  color: #fffaf8;
}

.riji-btn.danger {
  background: linear-gradient(180deg, #d99689, #c47c70);
  color: #fff9f7;
}

.riji-btn.ghost {
  background: rgba(255, 255, 255, 0.84);
  color: var(--riji-ink-soft);
  border: 1px solid rgba(130, 98, 82, 0.1);
  box-shadow: none;
}

.riji-card-list {
  display: grid;
  gap: 10px;
}

.riji-entry-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 243, 0.94));
  border: 1px solid rgba(130, 98, 82, 0.1);
  box-shadow: 0 10px 20px rgba(180, 140, 115, 0.08);
}

button.riji-entry-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.riji-entry-card.is-compact {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.riji-entry-card.is-compact:active {
  transform: scale(0.99);
}

.riji-entry-card.is-compact:hover {
  box-shadow: 0 14px 24px rgba(180, 140, 115, 0.13);
}

.riji-entry-card.is-compact::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 14px;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(231, 226, 246, 0.34), rgba(247, 215, 210, 0.22));
  opacity: 0.9;
  pointer-events: none;
}

.riji-entry-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.riji-entry-top strong {
  display: block;
  font-size: 15px;
  color: var(--riji-ink);
  line-height: 1.45;
  padding-right: 22px;
}

.riji-entry-top span {
  font-size: 11px;
  color: var(--riji-ink-soft);
  white-space: nowrap;
}

.riji-summary {
  margin: 0;
  color: var(--riji-accent-deep);
  font-size: 12px;
  line-height: 1.7;
  font-weight: 700;
}

.riji-content-text {
  margin: 0;
  color: var(--riji-ink);
  font-size: 13px;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}

.riji-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.riji-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(247, 215, 210, 0.34);
  color: var(--riji-accent-deep);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(215, 154, 143, 0.08);
}

.riji-sticky-note {
  position: relative;
  margin-left: auto;
  width: min(182px, 100%);
  padding: 13px 13px 15px;
  border-radius: 6px 16px 16px 16px;
  background:
    linear-gradient(180deg, rgba(255, 240, 191, 0.96), rgba(245, 224, 158, 0.94));
  color: #735424;
  box-shadow:
    0 12px 22px rgba(162, 126, 54, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  transform: rotate(1.2deg);
}

.riji-sticky-note::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 18px;
  width: 48px;
  height: 14px;
  border-radius: 4px;
  background: rgba(224, 198, 126, 0.64);
  transform: rotate(-5deg);
  box-shadow: 0 2px 4px rgba(73, 54, 15, 0.08);
}

.riji-sticky-note strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
}

.riji-sticky-note p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.riji-empty {
  padding: 24px 14px;
  border-radius: 22px;
  border: 1px dashed rgba(130, 98, 82, 0.18);
  background: rgba(255, 255, 255, 0.54);
  text-align: center;
  color: var(--riji-ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.riji-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.riji-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.riji-calendar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--riji-ink);
}

.riji-weekdays,
.riji-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.riji-weekdays span {
  text-align: center;
  font-size: 11px;
  color: var(--riji-ink-soft);
  font-weight: 700;
}

.riji-day {
  min-height: 44px;
  border: 1px solid rgba(130, 98, 82, 0.1);
  border-radius: 16px;
  background: rgba(255, 251, 248, 0.82);
  color: var(--riji-ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.riji-day.is-muted {
  color: rgba(139, 116, 104, 0.45);
  background: rgba(255, 251, 248, 0.48);
}

.riji-day.has-entry {
  background:
    linear-gradient(180deg, rgba(247, 215, 210, 0.62), rgba(255, 247, 242, 0.86));
  border-color: rgba(215, 154, 143, 0.22);
}

.riji-day.is-selected {
  background: linear-gradient(180deg, #e4aaa0, #cb8175);
  color: #fffaf8;
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(203, 129, 117, 0.18);
}

.riji-bottom-tabs {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 14px 12px;
  padding: 10px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(130, 98, 82, 0.08);
  box-shadow: 0 14px 26px rgba(162, 126, 104, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.riji-tab-btn {
  min-height: 48px;
  border: none;
  border-radius: 18px;
  background: transparent;
  color: rgba(76, 59, 52, 0.64);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.riji-tab-btn.is-active {
  background: linear-gradient(180deg, rgba(247, 215, 210, 0.88), rgba(232, 190, 181, 0.92));
  color: #7f4e45;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 8px 16px rgba(215, 154, 143, 0.18);
}

@media (max-width: 420px) {
  .riji-content {
    padding: 0 12px 0 !important;
  }

  .riji-header {
    padding: 14px 12px 10px;
  }

  .riji-header-title {
    font-size: 17px;
  }

  .riji-overview,
  .riji-form-grid {
    grid-template-columns: 1fr;
  }

  .riji-hero {
    padding: 18px 16px 16px;
    border-radius: 24px;
  }

  .riji-section {
    padding: 14px;
    border-radius: 22px;
  }

  .riji-entry-card {
    border-radius: 20px;
  }

  .riji-bottom-tabs {
    margin: auto 12px 10px;
    padding: 8px;
    border-radius: 22px;
  }

  .riji-tab-btn {
    min-height: 44px;
    border-radius: 16px;
  }

  .riji-day {
    min-height: 40px;
    border-radius: 14px;
  }
}
