/* Daily Review - Personal Reflection Notebook */

.daily-review-container {
  width: calc(100% - 64px);
  max-width: 1440px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 2rem 0 4rem;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(250, 248, 245, 0.96)),
    #faf8f5;
  font-family: var(--font-family, 'Segoe UI', 'Noto Sans Thai', system-ui, -apple-system, sans-serif);
}

/* SP2.5 Step 02: bounded Passbook hierarchy and readable action states. */
.passbook-page .review-date-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding: 0.62rem 0.78rem;
  border: 1px solid rgba(201, 152, 73, 0.25);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--journal-ink, #4a3728);
}

.passbook-page .review-date-context-date {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.passbook-page .review-date-context-label {
  color: var(--journal-muted, #8a7a6a);
  font-size: 0.72rem;
  font-weight: 700;
}

.passbook-page .review-date-context time {
  color: var(--journal-ink, #4a3728);
  font-size: 0.94rem;
  font-weight: 800;
}

.passbook-page .review-mode-badge {
  flex: 0 0 auto;
  padding: 0.32rem 0.62rem;
  border: 1px solid rgba(7, 124, 71, 0.24);
  border-radius: 999px;
  background: #eef8ec;
  color: var(--journal-green-deep, #075b38);
  font-size: 0.76rem;
  font-weight: 800;
}

.passbook-page .review-mode-history {
  border-color: rgba(201, 152, 73, 0.35);
  background: #fff5e5;
  color: #8f6326;
}

.passbook-page .summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.passbook-page .summary-item:nth-child(4) {
  border-top: 3px solid #d6b263;
  background: #fff8df;
}

.passbook-page .reflection-card-primary .card-body,
.passbook-page .secondary-reflections .card-body,
.passbook-page .action-card .card-body {
  padding-right: 0.1rem;
}

.passbook-page .plan-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
}

.passbook-page .action-card {
  min-width: 0;
}

.passbook-page .plan-count {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--journal-green-deep, #075b38);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.passbook-page .card-reminder .plan-count {
  color: #8f6326;
}

.passbook-page .plan-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.passbook-page .plan-item-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.24rem 0;
}

.passbook-page .plan-item-row .todo-item,
.passbook-page .plan-item-title {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.42rem;
  padding: 0;
}

.passbook-page .plan-item-title {
  flex-wrap: wrap;
}

.passbook-page .plan-title-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.passbook-page .plan-item-icon {
  flex: 0 0 auto;
}

.passbook-page .plan-date {
  color: var(--journal-muted, #8a7a6a);
  font-size: 0.7rem;
  white-space: nowrap;
}

.passbook-page .plan-item-state,
.passbook-page .plan-source-label {
  color: var(--journal-muted, #8a7a6a);
  font-size: 0.72rem;
  line-height: 1.35;
}

.passbook-page .plan-item-state {
  flex: 0 0 auto;
  white-space: nowrap;
}

.passbook-page .plan-source-label {
  margin: 0.08rem 0 0.1rem;
  font-weight: 700;
}

.passbook-page .plan-item-readonly {
  border-bottom: 1px dashed rgba(201, 152, 73, 0.18);
}

.passbook-page .plan-item-readonly .plan-item-title {
  cursor: default;
}

.passbook-page .plan-action-btn,
.passbook-page .plan-delete-btn {
  flex: 0 0 auto;
  min-height: 2rem;
}

.passbook-page .plan-action-btn {
  padding: 0.28rem 0.5rem;
  font-size: 0.72rem;
}

.passbook-page .plan-delete-btn {
  min-width: 2rem;
}

.passbook-page .secondary-reflections {
  margin-top: 0.85rem;
}

.passbook-page .secondary-reflections > .reflection-heading {
  margin-bottom: 0.18rem;
  font-size: 0.94rem;
}

.passbook-page .secondary-reflections > .reflection-subtitle {
  margin-bottom: 0.45rem;
}

.passbook-page .reflection-limitations {
  margin-top: 0.62rem;
  padding: 0.48rem 0.62rem;
  border-left: 3px solid rgba(201, 152, 73, 0.55);
  border-radius: 6px;
  background: rgba(255, 248, 224, 0.72);
  color: #6d5a3d;
  font-size: 0.74rem;
  line-height: 1.45;
}

.passbook-page .reflection-limitations-label {
  display: block;
  margin-bottom: 0.18rem;
  font-weight: 800;
}

.passbook-page .reflection-limitations ul {
  margin: 0;
  padding-left: 1.1rem;
}

.passbook-page .reflection-limitations li + li {
  margin-top: 0.12rem;
}

@media (max-width: 900px) {
  .passbook-page .plan-card-grid {
    grid-template-columns: 1fr;
  }

  .passbook-page .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .passbook-page .review-date-context {
    align-items: flex-start;
  }

  .passbook-page .plan-item-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .passbook-page .plan-item-row .todo-item,
  .passbook-page .plan-item-title {
    flex-basis: 100%;
  }

  .passbook-page .plan-item-row[data-plan-type="todo"] {
    flex-wrap: nowrap;
  }

  .passbook-page .plan-item-row[data-plan-type="todo"] .todo-item {
    flex-basis: auto;
  }

  .passbook-page .plan-item-state {
    margin-left: 1.5rem;
  }

  .passbook-page .plan-action-btn,
  .passbook-page .plan-delete-btn {
    min-height: 2.25rem;
  }
}

/* ─── Notebook Bookmarks Container ─── */

.notebook-bookmarks-container-mobile {
  display: contents; /* Flat on desktop, behaves as relative absolute positioning children */
}

.notebook-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 96px;
  height: 26px;
  box-sizing: border-box;
  gap: 0.35rem;
  padding: 0.15rem 0.65rem;
  background: linear-gradient(180deg, #eae1d3 0%, #dfd3c1 100%);
  border: 1px solid #c4b59f;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: #5c4b3a;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.notebook-tab:hover {
  background: #f0e6d9;
  color: #2b1f14;
  transform: translateY(-2px);
}

.notebook-tab-nav {
  background: rgba(223, 211, 193, 0.7);
  color: #5c4b3a;
}

.notebook-tab-nav:hover {
  background: #ffffff;
  color: #2b1f14;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(74, 55, 40, 0.12);
}

.notebook-tab-active {
  background: #ffffff;
  border-color: #ebe3d8;
  color: #2b1f14;
  z-index: 3;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
  box-shadow: 0 -2px 8px rgba(74, 55, 40, 0.05);
}

.notebook-tab-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: #ffffff;
  z-index: 4;
}

.notebook-tab-today {
  background: linear-gradient(135deg, #d97736 0%, #b85c1e 100%);
  color: #ffffff;
  border-color: #a34e18;
}

.notebook-tab-today:hover {
  background: linear-gradient(135deg, #e48342 0%, #c46424 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(184, 92, 30, 0.3);
}

.notebook-tab-disabled {
  opacity: 0.45;
  pointer-events: none;
  background: rgba(220, 208, 193, 0.5);
  color: #8c7c6a;
  border-color: transparent;
}

.tab-arrow {
  font-size: 0.72rem;
  opacity: 0.8;
}

.tab-pin {
  font-size: 0.85rem;
}

/* ─── Notebook Page Body ─── */

.notebook-page-body {
  background: #fdfbf7; /* warmer notebook cover background */
  border: 1px solid #ebdcc9;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.02),
    0 12px 36px rgba(74, 55, 40, 0.08);
  position: relative;
  z-index: 2;
}

.review-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  border: 1px solid #ebe3d8;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.98), rgba(255, 253, 248, 0.78)),
    linear-gradient(145deg, #f7ebd7, #d7ecd7);
  box-shadow: 0 4px 15px rgba(68, 62, 49, 0.04);
}

.review-kicker {
  margin: 0 0 0.2rem;
  color: #0f6f3c;
  font-size: 0.85rem;
  font-weight: 800;
}

.review-hero h1 {
  margin: 0;
  color: #1c7341;
  font-size: 1.8rem;
  line-height: 1.2;
}

.review-lead {
  margin: 0;
  color: #4d5a51;
  font-size: 1rem;
}

.review-date {
  flex: 0 0 auto;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(195, 217, 195, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #4a554e;
  font-size: 0.95rem;
  font-weight: 700;
}

.reflection-intro {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid #7ab87a;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 1px 3px rgba(0,0,0,0.035);
}

.reflection-intro p {
  margin: 0;
  color: #4f5b54;
  font-size: 0.98rem;
  line-height: 1.65;
}

.reflection-intro p:first-child {
  margin-bottom: 0.2rem;
  color: #3a2a1a;
  font-weight: 700;
}

.daily-review-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  position: relative;
}

.daily-review-spread::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -1.5rem;
  bottom: -1.5rem;
  width: 8px;
  background: linear-gradient(to right, 
    rgba(74, 55, 40, 0.04) 0%, 
    rgba(74, 55, 40, 0.12) 50%, 
    rgba(74, 55, 40, 0.04) 100%);
  transform: translateX(-50%);
  z-index: 10;
}

.page-left,
.page-right {
  position: relative;
}

.page-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e8e0d4;
}

.page-date {
  margin: 0 0 0.25rem;
  color: #4a3728;
  font-size: 1.15rem;
  font-weight: 800;
}

.page-label {
  display: block;
  color: #a89888;
  font-size: 0.86rem;
}

.data-card,
.note-section {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #ebe3d8;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.data-card {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.15s ease;
}

.data-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #ede8e0;
}

.card-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.card-title {
  margin: 0;
  color: #4a3728;
  font-size: 0.98rem;
  font-weight: 800;
}

.summary-card,
.card-primary {
  border-color: rgba(122, 184, 122, 0.55);
  box-shadow: 0 8px 18px rgba(68, 88, 58, 0.07);
}

.summary-card {
  background: linear-gradient(180deg, #fffefa, #f7fbf3);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.summary-item {
  min-height: 86px;
  padding: 0.85rem;
  border: 1px solid #e2ecd9;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.summary-value {
  display: block;
  margin-bottom: 0.3rem;
  color: #1f6c42;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.summary-label {
  color: #5a675f;
  font-size: 0.8rem;
  line-height: 1.45;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Admin Import uses the full content canvas instead of the notebook page width. */
.admin-import-container {
  width: calc(100% - 32px);
  max-width: none;
}

.admin-import-spread {
  display: block;
}

.admin-import-spread::before {
  display: none;
}

.admin-import-container .data-card {
  width: 100%;
  box-sizing: border-box;
}

/* My Info */
.my-info-page .daily-review-spread {
  display: block;
}

.my-info-page .daily-review-spread::before {
  display: none;
}

.my-info-content {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.my-info-card {
  margin-bottom: 1rem;
}

.my-info-main-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.34fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.25rem;
  width: 100%;
}

.my-info-sidebar,
.my-info-operate-area {
  min-width: 0;
}

.my-info-operate-area .my-info-background-card {
  min-height: 100%;
}

.my-info-name-card {
  width: 100%;
}

.my-info-name-card .card-body {
  max-width: none;
}

.my-info-background-card {
  width: 100%;
}

.my-info-help,
.my-info-body-text {
  margin: 0;
  line-height: 1.55;
}

.my-info-help {
  color: var(--muted, #8a7a6a);
  font-size: 0.84rem;
}

.my-info-body-text {
  color: var(--text, #3a2a1a);
  font-size: 0.9rem;
}

.my-info-label {
  color: #6f5b46;
  font-size: 0.8rem;
  font-weight: 700;
}

.my-info-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border, #ded4c7);
  border-radius: var(--radius-md, 8px);
  background: #fff;
  color: var(--text, #3a2a1a);
  font: inherit;
  font-size: 1rem;
}

.my-info-textarea {
  min-height: 360px;
  resize: vertical;
}

.my-info-input:focus {
  outline: 3px solid rgba(48, 125, 79, 0.18);
  border-color: #4d9a68;
}

.my-info-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  min-height: 2.25rem;
}

.my-info-actions .sbj-btn:disabled {
  cursor: wait;
  opacity: 0.6;
}

.my-info-feedback {
  display: none;
  font-size: 0.84rem;
  line-height: 1.4;
}

.my-info-feedback-success {
  color: var(--success, #2e7d4f);
}

.my-info-feedback-error {
  color: var(--danger, #b42318);
}

.my-info-status-card {
  border-color: rgba(122, 184, 122, 0.55);
  background: linear-gradient(180deg, #fffefa, #f7fbf3);
}

.my-info-status-card .card-header {
  flex-wrap: wrap;
}

.my-info-readonly-badge {
  margin-left: auto;
  padding: 0.2rem 0.55rem;
  border: 1px solid #dfe9d9;
  border-radius: 999px;
  color: #6b7a6d;
  font-size: 0.72rem;
  font-weight: 700;
}

.my-info-status-label {
  margin: 0;
  color: #2f6f43;
  font-size: 1rem;
  font-weight: 800;
}

.my-info-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.my-info-tools-card {
  background: rgba(255, 255, 255, 0.72);
}

.my-info-tool-body {
  align-items: flex-start;
}

.my-info-tool-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.my-info-tool-title {
  color: #4a3728;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .my-info-main-grid {
    grid-template-columns: 1fr;
  }

  .my-info-textarea {
    min-height: 240px;
  }

  .my-info-tool-link-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* UX/UI adjustment sprint — warm, friendly surfaces scoped to the Web pages. */
.passbook-page,
.my-info-page,
.tags-page {
  background:
    radial-gradient(circle at 8% 5%, rgba(247, 190, 123, 0.16), transparent 16rem),
    radial-gradient(circle at 92% 20%, rgba(137, 201, 155, 0.14), transparent 18rem),
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(250, 248, 245, 0.98));
}

.passbook-page .review-hero,
.my-info-page .my-info-hero {
  position: relative;
  overflow: hidden;
  border-color: rgba(198, 154, 78, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 86% 20%, rgba(247, 196, 130, 0.23), transparent 12rem),
    linear-gradient(135deg, #fffdf8 0%, #fffaf0 58%, #f1f8eb 100%);
  box-shadow: 0 10px 28px rgba(83, 67, 42, 0.07);
}

.passbook-page .review-hero::after,
.my-info-page .my-info-hero::after {
  content: '🌿  ✦';
  position: absolute;
  right: 1.4rem;
  bottom: 0.35rem;
  color: rgba(209, 157, 75, 0.5);
  font-size: 1.7rem;
  letter-spacing: 0.2rem;
  pointer-events: none;
  transform: rotate(-4deg);
}

.passbook-page .review-hero-illustration {
  position: absolute;
  z-index: 0;
  right: clamp(8rem, 18vw, 16rem);
  bottom: 0.35rem;
  width: clamp(150px, 20vw, 260px);
  height: auto;
  opacity: 0.94;
  pointer-events: none;
}

.passbook-page .data-card,
.my-info-page .data-card,
.tags-page .data-card {
  border-color: rgba(202, 174, 132, 0.34);
  border-radius: 15px;
  box-shadow: 0 5px 16px rgba(76, 63, 43, 0.045);
}

.passbook-page .data-card:hover,
.my-info-page .data-card:hover,
.tags-page .data-card:hover {
  box-shadow: 0 8px 22px rgba(76, 63, 43, 0.08);
}

.passbook-page .card-activity { border-left: 4px solid #e5a05e; background: linear-gradient(100deg, rgba(255, 247, 233, 0.7), #fffdfa 30%); }
.passbook-page .card-health { border-left: 4px solid #e88e9a; background: linear-gradient(100deg, rgba(255, 241, 244, 0.72), #fffdfa 30%); }
.passbook-page .card-food { border-left: 4px solid #91c99b; background: linear-gradient(100deg, rgba(241, 250, 239, 0.78), #fffdfa 30%); }
.passbook-page .card-expense { border-left: 4px solid #e4bd63; background: linear-gradient(100deg, rgba(255, 249, 226, 0.78), #fffdfa 30%); }
.passbook-page .card-todo { border-left: 4px solid #b89ad5; background: linear-gradient(100deg, rgba(248, 242, 255, 0.78), #fffdfa 30%); }
.passbook-page .card-reminder { border-left: 4px solid #e6a77d; background: linear-gradient(100deg, rgba(255, 245, 237, 0.78), #fffdfa 30%); }

.passbook-page .summary-card {
  border-color: rgba(126, 183, 126, 0.42);
  background: linear-gradient(135deg, #fffdf8, #f2f9ed);
}

.passbook-page .summary-item {
  border-color: rgba(216, 190, 143, 0.3);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.82);
}

.passbook-page .summary-item:nth-child(1) .summary-value { color: #d37d35; }
.passbook-page .summary-item:nth-child(2) .summary-value { color: #3b9a68; }
.passbook-page .summary-item:nth-child(3) .summary-value { color: #8f72b4; }

.passbook-page .card-icon,
.my-info-page .card-icon,
.tags-page .card-icon { filter: saturate(0.9); }

.passbook-page .card-body { position: relative; padding-bottom: 1.8rem; }
.passbook-page .card-activity .card-body::after,
.passbook-page .card-health .card-body::after,
.passbook-page .card-food .card-body::after,
.passbook-page .card-expense .card-body::after,
.passbook-page .card-todo .card-body::after,
.passbook-page .card-reminder .card-body::after {
  display: block;
  position: absolute;
  right: 0.15rem;
  bottom: 0.05rem;
  padding: 0.18rem 0.38rem;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.8);
  font-size: 1.15rem;
  line-height: 1;
  filter: saturate(0.82);
}
.passbook-page .card-activity .card-body::after { content: '🏃🏻'; }
.passbook-page .card-health .card-body::after { content: '💗'; }
.passbook-page .card-food .card-body::after { content: '🍽️'; }
.passbook-page .card-expense .card-body::after { content: '👜'; }
.passbook-page .card-todo .card-body::after { content: '📖'; }
.passbook-page .card-reminder .card-body::after { content: '🌱'; }

.passbook-page .reflection-card,
.passbook-page .section-note,
.passbook-page .note-section { position: relative; overflow: hidden; }
.passbook-page .reflection-card::after,
.passbook-page .section-note::after,
.passbook-page .note-section::after {
  content: '☁️';
  position: absolute;
  right: 1rem;
  bottom: 0.7rem;
  color: rgba(151, 112, 177, 0.32);
  font-size: 1.45rem;
  pointer-events: none;
}

.passbook-page .reflection-empty {
  position: relative;
  min-height: 2.6rem;
  padding-right: 3rem;
  padding: 0.7rem 0.8rem;
  border-radius: 11px;
  background: rgba(243, 248, 238, 0.72);
  color: #6f806e;
}

.passbook-page .reflection-empty::after {
  content: '☁️';
  position: absolute;
  right: 0.8rem;
  top: 50%;
  font-size: 1.25rem;
  transform: translateY(-50%);
}

.my-info-page .my-info-hero { padding: 1.35rem 1.6rem; }
.my-info-page .my-info-hero h1 { color: #087c47; }
.my-info-page .my-info-main-grid { gap: 1.15rem; }
.my-info-page .my-info-name-card { border-top: 4px solid #d69a49; }
.my-info-page .my-info-background-card { border-top: 4px solid #4b9c6d; }
.my-info-page .my-info-status-card { border-top: 4px solid #bb91d1; }
.my-info-page .my-info-secondary-card { border-top: 3px solid rgba(214, 154, 73, 0.68); }
.my-info-page .my-info-input { border-radius: 11px; background: #fffdf8; }
.my-info-page .my-info-textarea { min-height: 380px; line-height: 1.65; }
.my-info-page .my-info-privacy-note { position: relative; z-index: 1; }

.tags-page .tags-search-card,
.tags-page .tags-create-card { border-top: 3px solid rgba(214, 154, 73, 0.72); }
.tags-page .tag-group-card { border-top: 3px solid #93bf8f; }
.tags-page .tag-group-card .card-title { color: #315642; }
.tags-page .tag-table th { color: #806b55; letter-spacing: 0.02em; }
.tags-page .tag-table td { border-bottom-color: rgba(202, 174, 132, 0.22); }
.tags-page .tag-table tbody tr:last-child td { border-bottom: 0; }
.tags-page .tag-table td:first-child code {
  display: inline-flex;
  max-width: 100%;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(83, 155, 104, 0.18);
  border-radius: 999px;
  background: #eef8eb;
  color: #34744b;
}
.tags-page .tag-label-input,
.tags-page .tag-note-input,
.tags-page .tags-field input,
.tags-page .tags-field select,
.tags-page .tags-field textarea { border-radius: 10px; background: #fffdf8; }
.tags-page .tag-enabled-toggle { width: 40px; height: 22px; background: #e1ddd4; }
.tags-page .tag-enabled-toggle::before { width: 16px; height: 16px; }
.tags-page .tag-enabled-toggle:checked { background: #168653; border-color: #168653; }
.tags-page .tag-enabled-toggle:checked::before { transform: translateX(18px); }

@media (max-width: 760px), (max-width: 900px) and (orientation: portrait) {
  .passbook-page,
  .my-info-page,
  .tags-page { width: calc(100% - 24px); padding-top: 1rem; }
  .passbook-page .review-hero,
  .my-info-page .my-info-hero { padding: 1rem; }
  .passbook-page .review-hero::after,
  .my-info-page .my-info-hero::after { right: 0.6rem; font-size: 1rem; }
  .my-info-page .my-info-textarea { min-height: 260px; }
}

.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.15rem 0;
}

.data-label {
  color: #8a7a6a;
  font-size: 0.85rem;
  font-weight: 400;
}

.data-value {
  color: #3a2a1a;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
}

.data-value-large {
  color: #2a7a3a;
  font-size: 1.1rem;
  font-weight: 800;
}

.data-row-vertical {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.data-label-sub {
  padding-left: 0.5rem;
  font-size: 0.8rem;
}

.data-value-sub {
  color: #5a4a3a;
  font-size: 0.85rem;
}

.data-row-total {
  padding-bottom: 0.35rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid #f0e8e0;
}

.meals-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.meals-list li {
  padding: 0.15rem 0.6rem;
  border-radius: 6px;
  background: #f5f0ea;
  color: #5a4a3a;
  font-size: 0.85rem;
}

.card-health { border-left: 3px solid #e88a8a; }
.card-activity { border-left: 3px solid #7ab87a; }
.card-food { border-left: 3px solid #8ae8a8; }
.card-expense { border-left: 3px solid #e8c88a; }
.card-todo { border-left: 3px solid #c48ae8; }
.card-reminder { border-left: 3px solid #e8a88a; }

.card-body-todo {
  gap: 0.3rem;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
  color: #4a3a2a;
  font-size: 0.85rem;
  cursor: default;
}

.todo-item input[type="checkbox"] {
  accent-color: #7ab87a;
}

.todo-done {
  color: #a09080;
  text-decoration: line-through;
}

.reminder-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.reminder-list li {
  position: relative;
  padding: 0.25rem 0 0.25rem 1rem;
  color: #5a4a3a;
  font-size: 0.85rem;
}

.reminder-list li::before {
  content: '•';
  position: absolute;
  left: 0.25rem;
  color: #c48ae8;
}

.section-note {
  margin-bottom: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e4ebdc;
  border-radius: 8px;
  background: rgba(250, 255, 247, 0.86);
}

.section-note h3 {
  margin: 0 0 0.35rem;
  color: #315642;
  font-size: 1rem;
}

.section-note p {
  margin: 0;
  color: #657064;
  font-size: 0.86rem;
  line-height: 1.55;
}

.progress-bar-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.progress-bar-bg {
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 7px;
  background: #f0eae4;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 0.5s ease;
}

.progress-bar-running {
  background: linear-gradient(90deg, #77b96f, #48935d);
}

.progress-bar-sleep {
  background: linear-gradient(90deg, #8ab4e8, #6a94c8);
}

.progress-text {
  color: #8a7a6a;
  font-size: 0.8rem;
}

.note-section {
  display: flex;
  gap: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: rgba(255, 253, 248, 0.92);
}

.note-icon {
  padding-top: 0.1rem;
  font-size: 1.3rem;
  line-height: 1;
}

.note-content {
  flex: 1;
}

.note-label {
  margin: 0 0 0.35rem;
  color: #5c705f;
  font-size: 0.8rem;
  font-weight: 800;
}

.note-text {
  margin: 0;
  color: #5a4a3a;
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.6;
}

.clickable-note {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #ebe3d8;
  border-radius: 8px;
}

.clickable-note:hover {
  background: #ffffff;
  border-color: #d6cab8;
  box-shadow: 0 4px 12px rgba(74, 55, 40, 0.05);
}

.clickable-note.editing-active {
  cursor: default;
  background: #ffffff;
  border-color: #c4b59f;
  box-shadow: 0 4px 15px rgba(74, 55, 40, 0.08);
}

.note-edit-form {
  width: 100%;
}

.note-textarea-field {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem;
  border: 1px solid #c4b59f;
  border-radius: 6px;
  background: #fdfbf7;
  color: #3a2a1a;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
}

.note-textarea-field:focus {
  outline: none;
  border-color: #2b1f14;
  background: #ffffff;
}

.note-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.insights-placeholder {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border: 1px dashed #d4cabc;
  border-radius: 10px;
  background: rgba(245, 242, 238, 0.62);
  opacity: 0.78;
}

.placeholder-icon {
  padding-top: 0.1rem;
  font-size: 1.1rem;
  line-height: 1;
}

.placeholder-title {
  margin: 0 0 0.25rem;
  color: #8a7a6a;
  font-size: 0.86rem;
  font-weight: 600;
}

.placeholder-text {
  margin: 0;
  color: #a09080;
  font-size: 0.8rem;
  line-height: 1.5;
}

.state-shell {
  min-height: 56vh;
  display: grid;
  place-items: center;
}

.state-card {
  max-width: 620px;
  margin: 0 auto;
  padding: 3rem 2rem;
  text-align: center;
}

.state-icon {
  margin: 0 0 1rem;
  font-size: 2rem;
  line-height: 1;
}

.state-title {
  margin: 0 0 0.5rem;
  color: var(--text, #4a3728);
  font-size: 1.15rem;
  font-weight: 800;
}

.state-description {
  margin: 0;
  color: var(--muted, #8a7a6a);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ─── Notebook Wrapper and Bookmarks (Desktop: min-width: 901px) ─── */
.notebook-wrapper {
  position: relative;
  margin-top: 1.5rem;
}

@media (min-width: 901px) {
  /* White paper sheets frame for left and right pages */
  .page-left,
  .page-right {
    background: #ffffff;
    border: 1px solid rgba(225, 218, 205, 0.5);
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 
      0 4px 12px rgba(74, 55, 40, 0.02),
      0 1px 2px rgba(74, 55, 40, 0.03);
    min-height: 520px;
  }

  .notebook-bookmarks-left,
  .notebook-bookmarks-right {
    position: absolute;
    top: 2rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .notebook-bookmarks-left {
    right: 100%;
    align-items: flex-end;
  }

  .notebook-bookmarks-right {
    left: 100%;
    align-items: flex-start;
  }

  /* Style of side tabs */
  .notebook-bookmarks-left .notebook-tab {
    border-radius: 6px 0 0 6px;
    border-right: none;
    margin-right: -1px;
    box-shadow: -2px 2px 4px rgba(74, 55, 40, 0.03);
    padding: 0.5rem 0.75rem;
  }

  .notebook-bookmarks-left .notebook-tab:hover {
    transform: translateX(-4px);
    box-shadow: -4px 4px 8px rgba(74, 55, 40, 0.08);
  }

  .notebook-bookmarks-left .notebook-tab-active {
    background: #ffffff;
    border-color: #ebe3d8;
    z-index: 12;
    transform: translateX(-6px);
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
    box-shadow: -6px 6px 12px rgba(74, 55, 40, 0.1);
  }

  .notebook-bookmarks-left .notebook-tab-active::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: -2px;
    width: 3px;
    background: #ffffff;
    z-index: 13;
  }

  .notebook-bookmarks-right .notebook-tab {
    border-radius: 0 6px 6px 0;
    border-left: none;
    margin-left: -1px;
    box-shadow: 2px 2px 4px rgba(74, 55, 40, 0.03);
    padding: 0.5rem 0.75rem;
  }

  .notebook-bookmarks-right .notebook-tab:hover {
    transform: translateX(4px);
    box-shadow: 4px 4px 8px rgba(74, 55, 40, 0.08);
  }

  .notebook-bookmarks-right .notebook-tab-active {
    background: #ffffff;
    border-color: #ebe3d8;
    z-index: 12;
    transform: translateX(6px);
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
    box-shadow: 6px 6px 12px rgba(74, 55, 40, 0.1);
  }

  .notebook-bookmarks-right .notebook-tab-active::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -2px;
    width: 3px;
    background: #ffffff;
    z-index: 13;
  }
  
  /* Compact arrow buttons on sides */
  .notebook-tab-arrow {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.8rem;
    opacity: 0.8;
  }
}

@media (max-width: 900px) {
  .daily-review-container {
    padding: 1rem;
    width: calc(100% - 24px); /* slightly narrower margins on mobile */
  }

  .review-hero {
    display: grid;
    padding: 1.35rem;
  }

  .review-hero h1 {
    font-size: 1.5rem;
  }

  .review-lead {
    font-size: 0.95rem;
  }

  .review-date {
    width: fit-content;
  }

  .daily-review-spread {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .daily-review-spread::before {
    display: none;
  }

  .page-left,
  .page-right {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    min-height: auto;
  }

  .notebook-page-body {
    background: #ffffff;
    border: 1px solid #ebe3d8;
    padding: 1rem;
  }

  /* Horizontal scroll styling for mobile bookmarks */
  .notebook-bookmarks-container-mobile {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-bottom: -1px;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .notebook-bookmarks-container-mobile::-webkit-scrollbar {
    display: none;
  }

  .notebook-bookmarks-left,
  .notebook-bookmarks-right {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 4px;
  }

  /* Reset bookmark styles to horizontal tabs */
  .notebook-bookmarks-left .notebook-tab,
  .notebook-bookmarks-right .notebook-tab {
    border-radius: 8px 8px 0 0;
    border: 1px solid #c4b59f;
    border-bottom: none;
    padding: 0.45rem 1rem;
    transform: none !important;
    box-shadow: none !important;
  }

  .notebook-bookmarks-left .notebook-tab-active,
  .notebook-bookmarks-right .notebook-tab-active {
    background: #ffffff;
    border-color: #ebe3d8;
    z-index: 3;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
  }

  .notebook-bookmarks-left .notebook-tab-active::after,
  .notebook-bookmarks-right .notebook-tab-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 3px;
    background: #ffffff;
    width: auto;
    z-index: 4;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .review-hero h1 {
    font-size: 1.35rem;
  }

  .reflection-intro {
    padding: 0.9rem 1rem;
  }

  .data-row {
    align-items: flex-start;
  }
}

@media print {
  .daily-review-container {
    background: #fff;
    padding: 0;
  }

  .data-card,
  .note-section {
    break-inside: avoid;
  }
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-action-link {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  flex: 0 0 2.75rem;
  box-sizing: border-box;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
  color: #736b5e;
  text-decoration: none;
  font-weight: 500;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.15s ease;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.card-action-link:hover {
  color: #2b251f;
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.12);
}

.card-action-link-main {
  font-size: 0.9rem;
  background: rgba(138, 117, 86, 0.08);
  color: #614d33;
}

.card-action-link-main:hover {
  background: rgba(138, 117, 86, 0.15);
  color: #3b2d1c;
}

/* Journal finish: make the page read like an opened personal notebook. */
.notebook-page-body {
  background:
    linear-gradient(90deg, rgba(205, 183, 153, 0.12) 0, rgba(255,255,255,0) 18px),
    #fdfbf7;
  border-color: #dfcfba;
}

.review-hero {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 1.35rem 1.65rem;
  border-color: #dfcfba;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.98), rgba(255, 253, 248, 0.82)),
    repeating-linear-gradient(0deg, rgba(130, 103, 72, 0.04) 0, rgba(130, 103, 72, 0.04) 1px, transparent 1px, transparent 28px);
}

.review-hero::after {
  content: '';
  position: absolute;
  right: -32px;
  bottom: -48px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(183, 145, 99, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(183, 145, 99, 0.05), 0 0 0 24px rgba(183, 145, 99, 0.04);
}

.review-hero-copy { position: relative; z-index: 1; }

.review-kicker {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.review-lead {
  line-height: 1.75;
  color: #786958;
}

.review-hero-stamp {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  min-width: 112px;
  padding: 0.65rem 0.8rem 0.5rem;
  border: 1px solid rgba(183, 145, 99, 0.45);
  border-radius: 50%;
  color: #8a6846;
  transform: rotate(3deg);
  opacity: 0.88;
}

.review-hero-stamp-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.review-hero-stamp strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
}

.review-hero-stamp-line {
  width: 62px;
  margin-top: 0.18rem;
  border-bottom: 1px solid currentColor;
}

.page-header {
  border-bottom: 1px solid #d9c7af;
}

.page-date {
  font-family: Georgia, 'Times New Roman', 'Noto Serif Thai', serif;
  letter-spacing: 0.01em;
}

.page-label {
  line-height: 1.65;
}

.data-card {
  border-color: #e6dac9;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(74, 55, 40, 0.035);
}

.data-card:not(.summary-card):not(.reflection-card) {
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(177, 151, 119, 0.07) 31px, rgba(177, 151, 119, 0.07) 32px),
    rgba(255, 255, 255, 0.94);
}

.reflection-section {
  position: relative;
  padding-left: 0.85rem;
  border-left: 1px solid #e2d2bd;
}

.reflection-heading {
  margin-top: 0;
  color: #4a3728;
  font-family: Georgia, 'Times New Roman', 'Noto Serif Thai', serif;
}

.reflection-subtitle {
  line-height: 1.75;
  color: #786958;
}

.reflection-card {
  border-color: #dfcfba;
  border-radius: 4px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 2px 3px 0 rgba(191, 163, 129, 0.09);
}

.reflection-card .card-header {
  border-bottom-style: solid;
  border-bottom-color: #eadfce;
}

.reflection-card .reflection-text,
.reflection-card .card-body {
  line-height: 1.8;
}

.user-reflection-section {
  margin-top: 1.5rem;
}

.user-reflection-section h3 {
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed #d9c7af;
  color: #4a3728;
  font-family: Georgia, 'Times New Roman', 'Noto Serif Thai', serif;
  font-size: 0.98rem;
  font-weight: 800;
}

.user-reflection-section h3 span {
  color: #a18b73;
  font-family: var(--font-family, 'Segoe UI', 'Noto Sans Thai', sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
}

.note-section {
  position: relative;
  border: 0;
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(214, 172, 105, 0.22) 0, rgba(214, 172, 105, 0.22) 3px, transparent 3px),
    #fffdf4;
  box-shadow: 0 2px 0 rgba(156, 126, 91, 0.14), 0 8px 16px rgba(74, 55, 40, 0.055);
}

.note-section::before {
  content: '✎';
  position: absolute;
  top: 0.55rem;
  right: 0.8rem;
  color: #c29b69;
  font-size: 1.1rem;
  opacity: 0.72;
}

.note-label {
  color: #8b765d;
  letter-spacing: 0.02em;
}

.note-text {
  color: #4f4031;
  font-family: Georgia, 'Times New Roman', 'Noto Serif Thai', serif;
  font-size: 0.96rem;
  line-height: 2.05;
  padding-bottom: 0.08rem;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(2.05em - 1px),
    #e9dcc7 calc(2.05em - 1px),
    #e9dcc7 2.05em
  );
}

.note-textarea-field {
  line-height: 2.05;
  background-color: #fffdf4;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(2.05em - 1px),
    #e9dcc7 calc(2.05em - 1px),
    #e9dcc7 2.05em
  );
}

/* Keep the two-page spread on medium screens, but bring bookmarks inside the viewport. */
@media (min-width: 901px) and (max-width: 1500px) {
  .notebook-bookmarks-container-mobile {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 0 -1px;
    padding: 0 1rem;
  }

  .notebook-bookmarks-container-mobile::-webkit-scrollbar {
    display: none;
  }

  .notebook-bookmarks-left,
  .notebook-bookmarks-right {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 4px;
  }

  .notebook-bookmarks-left .notebook-tab,
  .notebook-bookmarks-right .notebook-tab {
    border-radius: 6px 6px 0 0;
    border: 1px solid #c4b59f;
    border-bottom: none;
    padding: 0.15rem 0.65rem;
    transform: none !important;
    box-shadow: none !important;
  }

  .notebook-bookmarks-left .notebook-tab-active,
  .notebook-bookmarks-right .notebook-tab-active {
    background: #ffffff;
    border-color: #ebe3d8;
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
  }
}

/* On genuinely wide screens, give the side bookmarks a little more breathing room. */
@media (min-width: 1501px) {
  .notebook-tab {
    height: 28px;
    padding: 0.25rem 0.65rem;
  }

  .notebook-tab-active,
  .notebook-bookmarks-left .notebook-tab-active,
  .notebook-bookmarks-right .notebook-tab-active {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
  }

  .notebook-tab-arrow {
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
  }
}

@media (max-width: 900px) {
  .review-hero { min-height: 0; }

  .review-hero-stamp {
    justify-self: start;
    margin-top: 0.4rem;
  }

  .reflection-section {
    padding-left: 0.55rem;
  }
}

/* Bookmark tab alignment correction: force the large desktop notebook tabs
   into one horizontal row across the notebook top edge. */
@media (min-width: 901px) {
  .passbook-page .notebook-wrapper {
    margin-top: 2.15rem !important;
  }

  .passbook-page .notebook-bookmarks-container-mobile {
    position: absolute !important;
    top: -1.55rem !important;
    right: 1.15rem !important;
    left: 1.15rem !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 0.28rem !important;
    overflow: visible !important;
    z-index: 4 !important;
  }

  .passbook-page .notebook-bookmarks-left,
  .passbook-page .notebook-bookmarks-right {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    gap: 0.28rem !important;
    width: auto !important;
  }

  .passbook-page .notebook-tab {
    width: auto !important;
    min-width: 68px !important;
    height: 36px !important;
    padding: 0.44rem 0.64rem 0.32rem !important;
    border-radius: 5px 5px 2px 2px !important;
    transform: none !important;
  }

  .passbook-page .notebook-tab-arrow {
    min-width: 43px !important;
  }

  .passbook-page .notebook-tab-active {
    min-width: 70px !important;
    height: 48px !important;
    padding: 0.56rem 0.65rem 0.82rem !important;
    transform: translateY(0.18rem) !important;
    z-index: 6 !important;
  }
}

/* Final precedence layer for the approved Passbook notebook baseline. */
.passbook-page .review-hero {
  min-height: 0 !important;
  aspect-ratio: 4 / 1;
  margin-bottom: 0.85rem !important;
  padding: clamp(1.4rem, 3vw, 3rem) clamp(1.45rem, 4vw, 4.25rem) !important;
  align-items: flex-start;
  background: url('/assets/passbook-hero-desktop.png') center / cover no-repeat !important;
  box-shadow: 0 12px 26px rgba(91, 68, 40, 0.08) !important;
}

.passbook-page .review-hero-stamp { display: none !important; }

.passbook-page .review-hero::before,
.passbook-page .review-hero::after {
  display: none;
}

.passbook-page .review-hero-copy {
  z-index: 1;
  width: min(34rem, 39%);
  margin-top: clamp(0.1rem, 1vw, 0.75rem);
}

.passbook-page .review-hero h1 {
  color: #355c37;
  font-family: Georgia, 'Times New Roman', 'Noto Serif Thai', serif;
  font-size: clamp(2rem, 4.2vw, 4rem);
  letter-spacing: -0.025em;
}

.passbook-page .review-lead {
  color: #6b7d5a;
  font-size: clamp(0.95rem, 1.55vw, 1.35rem);
}

.passbook-page .review-hero-description {
  margin: clamp(1.35rem, 3vw, 2.7rem) 0 0;
  color: #756f62;
  font-size: clamp(0.78rem, 1.15vw, 1rem);
  line-height: 1.7;
}

.mobile-date-selector { display: none; }

.passbook-page .notebook-wrapper { margin-top: 2.35rem !important; }

.passbook-page .notebook-page-body {
  padding: 0.86rem !important;
  border-color: #dfbb83 !important;
  border-radius: 18px !important;
  background: #f1e6d2 !important;
  box-shadow: 0 3px 7px rgba(99, 72, 38, 0.1), 0 16px 30px rgba(99, 72, 38, 0.1) !important;
}

.passbook-page .daily-review-spread { gap: 0 !important; }

.passbook-page .daily-review-spread::before {
  display: block !important;
  /* Align the spine with the paper sheets, not the warmer inside cover. */
  top: 0.86rem !important;
  bottom: 0.86rem !important;
  width: 9px !important;
  background: linear-gradient(90deg, rgba(133, 96, 49, 0.16), rgba(255, 255, 255, 0.94) 48%, rgba(133, 96, 49, 0.12)) !important;
  box-shadow: 0 0 8px rgba(126, 91, 49, 0.1);
  z-index: 4 !important;
}

.passbook-page .page-left,
.passbook-page .page-right {
  padding: 0.78rem 0.82rem !important;
  border-color: #eee3d1 !important;
  background: #fffefb !important;
  box-shadow: 0 2px 6px rgba(91, 68, 40, 0.055) !important;
}

.passbook-page .page-left {
  border-radius: 13px 4px 4px 13px !important;
  padding-right: 0.98rem !important;
}

.passbook-page .page-right {
  border-radius: 4px 13px 13px 4px !important;
  padding-left: 0.98rem !important;
}

@media (min-width: 901px) {
  .passbook-page .notebook-bookmarks-container-mobile {
    top: -1.72rem !important;
    gap: 0 !important;
  }

  .passbook-page .notebook-bookmarks-left,
  .passbook-page .notebook-bookmarks-right {
    flex: 1 1 0 !important;
    gap: 0.3rem !important;
  }

  .passbook-page .notebook-bookmarks-left { justify-content: flex-end !important; }
  .passbook-page .notebook-bookmarks-right { justify-content: flex-start !important; }

  /* Keep the navigation controls at the outside edges of the notebook. */
  .passbook-page .notebook-bookmarks-left .notebook-tab-arrow { margin-right: auto; }
  .passbook-page .notebook-bookmarks-right .notebook-tab-arrow { margin-left: auto; }

  .passbook-page .notebook-tab {
    min-width: 70px !important;
    height: 38px !important;
    padding: 0.5rem 0.66rem 0.37rem !important;
    border-radius: 7px 7px 2px 2px !important;
    background: linear-gradient(180deg, #fff7e8 0%, #f4dfba 100%) !important;
    box-shadow: 0 3px 6px rgba(103, 72, 35, 0.14) !important;
  }

  .passbook-page .notebook-tab-arrow {
    min-width: 42px !important;
    background: #fff9ef !important;
  }

  .passbook-page .notebook-tab-active {
    min-width: 74px !important;
    height: 58px !important;
    padding: 0.65rem 0.68rem 1rem !important;
    background: linear-gradient(180deg, #35a56d, #087c47) !important;
    border-color: #087c47 !important;
    border-radius: 6px 6px 1px 1px !important;
    box-shadow: 0 5px 10px rgba(7, 91, 56, 0.24) !important;
    transform: translateY(0.36rem) !important;
  }
}

@media (max-width: 760px), (max-width: 900px) and (orientation: portrait) {
  .passbook-page .notebook-bookmarks-container-mobile { display: none !important; }

  .passbook-page .review-hero {
    aspect-ratio: 1 / 1;
    padding: 1.45rem 1.25rem !important;
    background-image: url('/assets/passbook-hero-mobile.png') !important;
    background-position: center;
  }

  .passbook-page .review-hero-copy {
    width: min(100%, 20rem);
    margin-top: 0;
  }

  .passbook-page .review-hero h1 {
    font-size: clamp(1.9rem, 10vw, 2.55rem);
  }

  .passbook-page .review-lead {
    font-size: 0.95rem;
  }

  .passbook-page .review-hero-description {
    display: none;
  }

  .passbook-page .mobile-date-selector {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) 3rem;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    margin: 0.85rem 0 0.6rem;
  }

  .passbook-page .mobile-date-arrow,
  .passbook-page .mobile-date-select-label {
    min-height: 2.75rem;
    border: 1px solid #e3c58e;
    border-radius: 9px;
    background: linear-gradient(180deg, #fff8ea, #f5e3c2);
    box-shadow: 0 2px 5px rgba(103, 72, 35, 0.1);
  }

  .passbook-page .mobile-date-arrow {
    display: grid;
    place-items: center;
    color: #846844;
    font-size: 0.9rem;
    text-decoration: none;
  }

  .passbook-page .mobile-date-arrow-disabled { opacity: 0.38; }

  .passbook-page .mobile-date-select-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.6rem;
    color: #6f5b40;
    font-size: 0.72rem;
    font-weight: 700;
  }

  .passbook-page .mobile-date-select-label > span { display: none; }

  .passbook-page .mobile-date-select-label select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #4d3d2a;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
  }

  .passbook-page .notebook-bookmarks-container-mobile { display: none !important; }

  .passbook-page .notebook-wrapper { margin-top: 1.25rem !important; }
  .passbook-page .notebook-page-body { padding: 0.48rem !important; }
  .passbook-page .daily-review-spread { gap: 0.65rem !important; }
  .passbook-page .daily-review-spread::before { display: none !important; }
  .passbook-page .page-left,
  .passbook-page .page-right {
    padding: 0.7rem 0.62rem !important;
    border-radius: 12px !important;
  }
}

/* Passbook baseline correction: the spread reads as two paper sheets within
   one warmer notebook cover.  These rules intentionally sit last so the
   approved notebook proportions win over earlier responsive legacy rules. */
.passbook-page .review-hero {
  min-height: 104px;
  margin-bottom: 0.85rem;
  padding: 0.82rem 1.45rem;
}

.passbook-page .review-hero-stamp {
  display: none !important;
}

.passbook-page .review-hero-illustration {
  top: 0;
  bottom: auto;
  left: 38%;
  width: clamp(280px, 33vw, 440px);
  max-width: 48%;
  height: 98px;
  object-position: center right;
}

.passbook-page .notebook-wrapper {
  margin-top: 2.35rem !important;
}

.passbook-page .notebook-page-body {
  padding: 0.86rem;
  border-color: #dfbb83;
  border-radius: 18px;
  background: #f1e6d2;
  box-shadow:
    0 3px 7px rgba(99, 72, 38, 0.1),
    0 16px 30px rgba(99, 72, 38, 0.1);
}

.passbook-page .daily-review-spread {
  gap: 0;
}

.passbook-page .daily-review-spread::before {
  display: block;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 9px;
  background: linear-gradient(90deg, rgba(133, 96, 49, 0.16), rgba(255, 255, 255, 0.94) 48%, rgba(133, 96, 49, 0.12));
  box-shadow: 0 0 8px rgba(126, 91, 49, 0.1);
  z-index: 4;
}

.passbook-page .page-left,
.passbook-page .page-right {
  padding: 0.78rem 0.82rem;
  border-color: #eee3d1;
  background: #fffefb;
  box-shadow: 0 2px 6px rgba(91, 68, 40, 0.055);
}

.passbook-page .page-left {
  border-radius: 13px 4px 4px 13px;
  padding-right: 0.98rem;
}

.passbook-page .page-right {
  border-radius: 4px 13px 13px 4px;
  padding-left: 0.98rem;
}

@media (min-width: 901px) {
  .passbook-page .notebook-bookmarks-container-mobile {
    top: -1.72rem !important;
    right: 1.15rem !important;
    left: 1.15rem !important;
    gap: 0 !important;
  }

  .passbook-page .notebook-bookmarks-left,
  .passbook-page .notebook-bookmarks-right {
    flex: 1 1 0 !important;
    gap: 0.3rem !important;
  }

  .passbook-page .notebook-bookmarks-left { justify-content: flex-end !important; }
  .passbook-page .notebook-bookmarks-right { justify-content: flex-start !important; }

  .passbook-page .notebook-tab {
    min-width: 70px !important;
    height: 38px !important;
    padding: 0.5rem 0.66rem 0.37rem !important;
    border-radius: 7px 7px 2px 2px !important;
    background: linear-gradient(180deg, #fff7e8 0%, #f4dfba 100%) !important;
    box-shadow: 0 3px 6px rgba(103, 72, 35, 0.14) !important;
  }

  .passbook-page .notebook-tab-arrow {
    min-width: 42px !important;
    background: #fff9ef !important;
  }

  .passbook-page .notebook-tab-active {
    min-width: 74px !important;
    height: 58px !important;
    padding: 0.65rem 0.68rem 1rem !important;
    background: linear-gradient(180deg, #35a56d, #087c47) !important;
    border-color: #087c47 !important;
    border-radius: 6px 6px 1px 1px !important;
    box-shadow: 0 5px 10px rgba(7, 91, 56, 0.24) !important;
    transform: translateY(0.36rem) !important;
  }
}

@media (max-width: 900px) {
  .passbook-page .review-hero {
    min-height: 96px;
    padding: 0.72rem 1rem;
  }

  .passbook-page .review-hero-illustration {
    left: 30%;
    width: 240px;
    max-width: 62%;
    height: 82px;
  }

  .passbook-page .notebook-wrapper { margin-top: 1.25rem !important; }
  .passbook-page .notebook-page-body { padding: 0.48rem; }
  .passbook-page .daily-review-spread { gap: 0.65rem; }
  .passbook-page .daily-review-spread::before { display: none; }
  .passbook-page .page-left,
  .passbook-page .page-right {
    padding: 0.7rem 0.62rem;
    border-radius: 12px;
  }
}

/* Final Hero refinement: keep the date only on the active bookmark. */
.passbook-page .review-hero-stamp {
  display: none !important;
}

.passbook-page .review-hero {
  min-height: 104px;
  margin-bottom: 0.85rem;
  padding: 0.82rem 1.45rem;
}

.passbook-page .review-hero-illustration {
  top: 0;
  height: 96px;
}

@media (max-width: 900px) {
  .passbook-page .review-hero {
    min-height: 96px;
    padding: 0.72rem 1rem;
  }

  .passbook-page .review-hero-illustration {
    height: 82px;
  }
}

/* Hero refinement: the active bookmark is the single visible date indicator. */
.passbook-page .review-hero-stamp {
  display: none !important;
}

.passbook-page .review-hero {
  min-height: 104px;
  margin-bottom: 0.85rem;
  padding: 0.82rem 1.45rem;
}

.passbook-page .review-hero-illustration {
  top: 0;
  height: 96px;
}

@media (max-width: 900px) {
  .passbook-page .review-hero {
    min-height: 96px;
    padding: 0.72rem 1rem;
  }

  .passbook-page .review-hero-illustration {
    height: 82px;
  }
}

/* Records: use the full notebook width and keep each stored item easy to scan. */
.records-page-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.records-page {
  min-width: 0;
}

.records-page .page-header {
  margin-bottom: 0.85rem;
}

.records-page-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.records-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 1px solid rgba(7, 124, 71, 0.22);
  border-radius: 9px;
  background: var(--journal-paper);
  color: var(--journal-green-deep);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.records-back-link:hover,
.records-back-link:focus-visible {
  border-color: rgba(7, 124, 71, 0.42);
  background: var(--journal-mist);
  color: var(--journal-green);
}

@media (max-width: 600px) {
  .records-page .page-header {
    gap: 0.6rem;
    flex-wrap: wrap;
  }

  .records-page-header-actions {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }
}

.records-toolbar,
.records-pagination {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #e6dac9;
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.82);
}

.records-toolbar-inner,
.records-pagination-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.records-filter-label {
  color: #786958;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.records-filter-select {
  min-height: 32px;
  padding: 0 2rem 0 0.65rem;
  border: 1px solid #d9c7af;
  border-radius: 5px;
  background: #fffdf8;
  color: #4a3728;
  font: inherit;
  font-size: 0.85rem;
}

.records-range {
  margin-left: auto;
  color: #8a7a6a;
  font-size: 0.8rem;
}

.record-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #e6dac9;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: inherit;
}

.record-card:hover {
  border-color: #c9ad8c;
  box-shadow: 0 4px 12px rgba(74, 55, 40, 0.08);
}

.record-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #eadfce;
  border-radius: 8px;
  background: #fbf7ef;
  font-size: 1.15rem;
}

.record-main {
  min-width: 0;
}

.record-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex-wrap: wrap;
  color: #8a7a6a;
  font-size: 0.75rem;
}

.record-type-badge,
.record-tag {
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #f4eee5;
  color: #6f5b46;
  font-size: 0.7rem;
  font-weight: 700;
}

.record-tag {
  background: #eef5e9;
  color: #4d7655;
}

.record-summary {
  margin: 0.25rem 0 0;
  color: #3a2a1a;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.record-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem 1rem;
  margin-top: 0.45rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #eee4d5;
  border-radius: 5px;
  background: #fffdf8;
}

.record-detail-row {
  display: grid;
  grid-template-columns: minmax(70px, auto) minmax(0, 1fr);
  gap: 0.4rem;
  min-width: 0;
  padding: 0.18rem 0;
  border-bottom: 1px dashed #eee4d5;
  font-size: 0.78rem;
  line-height: 1.4;
}

.record-detail-label {
  color: #8a7a6a;
  overflow-wrap: anywhere;
}

.record-detail-value {
  color: #3a2a1a;
  overflow-wrap: anywhere;
}

.record-note {
  margin: 0.3rem 0 0;
  padding-left: 0.55rem;
  border-left: 2px solid #e5d4bd;
  color: #786958;
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.records-empty {
  padding: 2rem;
  text-align: center;
}

.records-empty p {
  margin: 0;
  color: #8a7a6a;
}

.records-pagination {
  margin-top: 0.85rem;
  margin-bottom: 0;
}

.records-pagination-inner {
  justify-content: center;
}

.records-page-count {
  min-width: 92px;
  color: #8a7a6a;
  font-size: 0.8rem;
  text-align: center;
}

.records-notice {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--journal-border);
  border-radius: 10px;
  background: var(--journal-paper);
  color: var(--journal-ink);
  font-size: 0.84rem;
}

.records-notice-success { border-color: rgba(7, 124, 71, 0.24); background: var(--journal-mist); color: var(--journal-green-deep); }
.records-notice-warning { border-color: rgba(201, 152, 73, 0.35); background: #fff8ec; color: #8f6326; }
.records-notice-error { border-color: rgba(180, 70, 70, 0.25); background: #fff5f2; color: #8b3f3f; }

.record-delete-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.6rem;
}

.record-delete-button {
  min-height: 32px;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(180, 70, 70, 0.25);
  border-radius: 8px;
  background: transparent;
  color: #8b3f3f;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.record-delete-button:hover,
.record-delete-button:focus-visible {
  border-color: #b44646;
  background: #fff5f2;
  color: #7c2f2f;
}

.record-delete-dialog[hidden] {
  display: none;
}

.record-delete-dialog {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.record-delete-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 48, 38, 0.42);
  backdrop-filter: blur(2px);
}

.record-delete-dialog-card {
  position: relative;
  width: min(420px, 100%);
  padding: 1.35rem;
  border: 1px solid rgba(180, 70, 70, 0.2);
  border-radius: 16px;
  background: var(--journal-paper);
  box-shadow: 0 18px 44px rgba(34, 48, 38, 0.22);
  color: var(--journal-ink);
}

.record-delete-dialog-kicker {
  margin: 0 0 0.3rem;
  color: #8b3f3f;
  font-size: 0.75rem;
  font-weight: 800;
}

.record-delete-dialog-card h3 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', 'Noto Serif Thai', serif;
  font-size: 1.15rem;
}

.record-delete-dialog-card > p:not(.record-delete-dialog-kicker) {
  margin: 0.55rem 0 0;
  color: var(--journal-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.record-delete-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.record-delete-dialog-confirm {
  min-height: 40px;
  padding: 0.55rem 0.9rem;
  border: 1px solid #b44646;
  border-radius: 9px;
  background: #b44646;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.record-delete-dialog-confirm:hover,
.record-delete-dialog-confirm:focus-visible {
  border-color: #8b3f3f;
  background: #8b3f3f;
}

.record-delete-dialog-open {
  overflow: hidden;
}

.record-delete-in-progress .record-delete-dialog-card {
  cursor: wait;
}

.record-delete-in-progress .record-delete-dialog-confirm,
.record-delete-in-progress .record-delete-dialog-actions .sbj-btn-secondary,
.record-delete-in-progress .record-delete-button {
  cursor: wait;
  opacity: 0.62;
}

.record-delete-in-progress .record-delete-dialog-backdrop {
  cursor: wait;
}

@media (max-width: 640px) {
  .records-range {
    width: 100%;
    margin-left: 0;
  }

  .record-card {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.6rem;
  }

  .record-icon {
    width: 34px;
    height: 34px;
  }

  .record-summary {
    white-space: normal;
  }

  .record-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .record-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ─── Passbook + My Info experience polish ───────────────────────────────
   Keep the personal-paper direction, while reducing visual noise and making
   editable, reflected, and supporting information easier to distinguish. */

.daily-review-container {
  --journal-cream: #fff8ec;
  --journal-paper: #fffdf8;
  --journal-mist: #edf6e9;
  --journal-green: #087c47;
  --journal-green-deep: #075b38;
  --journal-green-soft: #d7ead0;
  --journal-ink: #223026;
  --journal-muted: #647061;
  --journal-warm: #ecd9b8;
  --journal-gold: #c99849;
  --journal-border: rgba(7, 91, 56, 0.14);
  box-sizing: border-box;
  color: var(--journal-ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(201, 152, 73, 0.12), transparent 20rem),
    linear-gradient(180deg, var(--journal-cream), #fdf9ef);
}

.app-main:has(.daily-review-container) {
  background: var(--journal-cream, #fff8ec);
}

.review-hero {
  isolation: isolate;
  border-radius: 18px;
  border-color: var(--journal-border);
  background:
    radial-gradient(circle at 82% 25%, rgba(201, 152, 73, 0.16), transparent 13rem),
    linear-gradient(90deg, var(--journal-paper), #fff6e6);
  box-shadow: 0 18px 44px rgba(66, 52, 26, 0.09);
}

.review-hero::before,
.my-info-hero::before {
  content: '';
  position: absolute;
  z-index: 0;
  left: 38%;
  bottom: 1.05rem;
  width: clamp(90px, 18vw, 230px);
  height: 38px;
  border-top: 2px solid rgba(201, 152, 73, 0.46);
  border-radius: 50%;
  transform: rotate(-4deg);
  pointer-events: none;
}

.review-hero::after {
  width: 126px;
  height: 126px;
  right: -38px;
  bottom: -52px;
  border-color: rgba(7, 124, 71, 0.16);
  box-shadow: 0 0 0 12px rgba(7, 124, 71, 0.035);
}

.review-hero h1 {
  color: var(--journal-green);
  font-size: clamp(1.55rem, 2.6vw, 2rem);
}

.review-kicker {
  color: var(--journal-green);
}

.review-lead {
  color: var(--journal-muted);
}

.review-hero-stamp {
  border-color: rgba(201, 152, 73, 0.58);
  background: rgba(255, 253, 248, 0.82);
  color: #8f6326;
  transform: rotate(2deg);
}

.notebook-wrapper {
  margin-top: 1rem;
}

.notebook-page-body {
  border-color: var(--journal-border);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 18px 44px rgba(66, 52, 26, 0.08);
}

.daily-review-spread {
  gap: clamp(1.25rem, 2.2vw, 2rem);
}

.daily-review-spread::before {
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(7, 91, 56, 0.18) 12%, rgba(201, 152, 73, 0.2) 88%, transparent);
}

.page-header {
  position: relative;
  margin-bottom: 1.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 0;
}

.page-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--journal-green) 0 36px, var(--journal-gold) 36px 48px, rgba(7, 91, 56, 0.11) 48px 100%);
}

.page-date {
  color: var(--journal-ink);
  font-size: 1.08rem;
}

.page-label {
  color: var(--journal-muted);
}

.data-card {
  border-color: var(--journal-border);
  border-radius: 12px;
  box-shadow: 0 5px 16px rgba(66, 52, 26, 0.04);
}

.data-card:hover {
  box-shadow: 0 5px 16px rgba(66, 52, 26, 0.04);
}

.data-card:not(.summary-card):not(.reflection-card) {
  background: rgba(255, 253, 248, 0.94);
}

.card-header {
  position: relative;
  border-bottom: 0;
}

.daily-review-container .card-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 124, 71, 0.22), rgba(201, 152, 73, 0.18), transparent 92%);
}

.card-title {
  color: var(--journal-ink);
}

.summary-card {
  border-color: rgba(7, 124, 71, 0.24);
  border-radius: 14px;
  background:
    radial-gradient(circle at 96% 0, rgba(201, 152, 73, 0.14), transparent 9rem),
    var(--journal-mist);
  box-shadow: none;
}

.summary-item {
  min-height: 78px;
  border-color: rgba(7, 124, 71, 0.14);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.84);
}

.summary-value {
  color: var(--journal-green);
}

.summary-label {
  color: #405046;
}

.reflection-intro {
  border: 1px solid rgba(7, 124, 71, 0.17);
  border-left: 4px solid var(--journal-green);
  border-radius: 12px;
  background: var(--journal-mist);
  box-shadow: none;
}

.reflection-section {
  padding-left: 0;
  border-left: 0;
}

.reflection-card {
  border-color: var(--journal-border);
  border-radius: 12px;
  background: var(--journal-paper);
  box-shadow: none;
}

.reflection-card-primary {
  position: relative;
  overflow: hidden;
  border-color: rgba(7, 124, 71, 0.25);
  background:
    radial-gradient(circle at 100% 0, rgba(201, 152, 73, 0.13), transparent 8rem),
    var(--journal-mist);
  box-shadow: inset 4px 0 0 var(--journal-green);
}

.reflection-empty {
  color: var(--journal-muted);
  font-style: normal;
}

.note-section {
  border: 1px solid rgba(201, 152, 73, 0.35);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(201, 152, 73, 0.22) 0 4px, transparent 4px),
    var(--journal-paper);
  box-shadow: 0 8px 22px rgba(66, 52, 26, 0.06);
}

.note-text,
.note-textarea-field {
  background-image: none;
}

.clickable-note {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.clickable-note:hover {
  border-color: var(--journal-gold);
  box-shadow: 0 9px 22px rgba(95, 72, 45, 0.08);
  transform: translateY(-1px);
}

.notebook-tab {
  border-color: rgba(7, 91, 56, 0.19);
  background: #f2ead8;
  color: #465448;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.notebook-tab-active {
  border-color: rgba(7, 124, 71, 0.24);
  color: var(--journal-green-deep);
}

.notebook-tab-today {
  border-color: var(--journal-green);
  background: var(--journal-green);
}

.notebook-tab-today:hover {
  border-color: var(--journal-green-deep);
  background: var(--journal-green-deep);
  box-shadow: 0 3px 8px rgba(7, 91, 56, 0.22);
}

.daily-review-container .sbj-btn-primary {
  border-color: var(--journal-green);
  background: var(--journal-green);
  color: #fff;
}

.daily-review-container .sbj-btn-primary:hover {
  border-color: var(--journal-green-deep);
  background: var(--journal-green-deep);
}

.daily-review-container .sbj-btn-secondary {
  border-color: rgba(7, 124, 71, 0.22);
  background: var(--journal-paper);
  color: var(--journal-green-deep);
}

.daily-review-container .sbj-btn-secondary:hover {
  border-color: rgba(7, 124, 71, 0.35);
  background: var(--journal-mist);
}

.card-action-link:focus-visible,
.notebook-tab:focus-visible,
.clickable-note:focus-visible,
.my-info-input:focus-visible,
.my-info-page .sbj-btn:focus-visible {
  outline: 3px solid rgba(47, 111, 67, 0.22);
  outline-offset: 2px;
}

/* My Info uses the same warm, personal visual language without imitating the
   two-page Passbook layout. */
.my-info-page {
  max-width: 1380px;
}

.my-info-page .page-left {
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
  min-height: 0;
}

.my-info-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--journal-border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 84% 10%, rgba(201, 152, 73, 0.16), transparent 12rem),
    linear-gradient(90deg, var(--journal-paper), #fff6e6);
  box-shadow: 0 18px 44px rgba(66, 52, 26, 0.08);
}

.my-info-hero > * {
  position: relative;
  z-index: 1;
}

.my-info-hero h1 {
  margin: 0;
  color: var(--journal-green);
  font-family: Georgia, 'Times New Roman', 'Noto Serif Thai', serif;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.25;
}

.my-info-hero p:not(.review-kicker) {
  margin: 0.35rem 0 0;
  color: var(--journal-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.my-info-privacy-note {
  flex: 0 0 auto;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(7, 124, 71, 0.18);
  border-radius: 999px;
  background: rgba(237, 246, 233, 0.9);
  color: var(--journal-green-deep);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.my-info-main-grid {
  grid-template-columns: minmax(240px, 0.32fr) minmax(0, 1fr);
  gap: 1.25rem;
}

.my-info-sidebar {
  position: relative;
}

.my-info-sidebar::before {
  content: '';
  position: absolute;
  z-index: 0;
  left: 1rem;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--journal-gold), rgba(7, 124, 71, 0.36), var(--journal-green));
  opacity: 0.5;
}

.my-info-page .my-info-card {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  border-radius: 14px;
  background: var(--journal-paper);
}

.my-info-page .my-info-card:hover {
  box-shadow: 0 5px 16px rgba(66, 52, 26, 0.04);
}

.my-info-page .my-info-card .card-header {
  align-items: flex-start;
}

.my-info-card-kicker {
  display: block;
  margin-bottom: 0.12rem;
  color: var(--journal-green);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.my-info-name-card {
  border-top: 3px solid var(--journal-gold);
  background:
    radial-gradient(circle at 100% 0, rgba(201, 152, 73, 0.11), transparent 8rem),
    var(--journal-paper);
}

.my-info-background-card {
  border-top: 3px solid var(--journal-green);
}

.my-info-background-card .card-body {
  gap: 0.65rem;
}

.my-info-input {
  border-color: rgba(7, 91, 56, 0.18);
  border-radius: 10px;
  background: #fffcf5;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.my-info-input:hover {
  border-color: rgba(7, 124, 71, 0.4);
}

.my-info-input:focus {
  border-color: var(--journal-green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(7, 124, 71, 0.12);
}

.my-info-textarea {
  min-height: clamp(300px, 44vh, 520px);
  line-height: 1.7;
}

.my-info-actions {
  padding-top: 0.2rem;
}

.my-info-feedback {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--journal-mist);
}

.my-info-status-card {
  border-color: rgba(7, 124, 71, 0.2);
  background:
    radial-gradient(circle at 100% 0, rgba(201, 152, 73, 0.12), transparent 7rem),
    var(--journal-mist);
  box-shadow: none;
}

.my-info-readonly-badge {
  border-color: rgba(7, 124, 71, 0.15);
  background: rgba(255, 253, 248, 0.88);
  color: var(--journal-green-deep);
}

.my-info-status-label {
  color: var(--journal-green-deep);
}

.card-health { border-left-color: #d98e8e; }
.card-activity { border-left-color: var(--journal-green); }
.card-food { border-left-color: #79b99a; }
.card-expense { border-left-color: var(--journal-gold); }
.card-todo { border-left-color: #9c8ac4; }
.card-reminder { border-left-color: #d29a72; }

/* Passbook keeps its notebook composition, but shares Landing/My Info's
   restrained cream, green, and gold palette. */
.passbook-page .notebook-page-body {
  background: rgba(255, 248, 236, 0.72);
}

@media (min-width: 901px) {
  .passbook-page .page-left,
  .passbook-page .page-right {
    border-color: var(--journal-border);
    background: var(--journal-paper);
  }
}

.passbook-page .summary-card {
  border-color: rgba(201, 152, 73, 0.26);
  background:
    radial-gradient(circle at 96% 0, rgba(7, 124, 71, 0.08), transparent 10rem),
    linear-gradient(135deg, #fffaf0, var(--journal-paper));
}

.passbook-page .summary-item {
  border-color: rgba(201, 152, 73, 0.2);
  background: rgba(255, 253, 248, 0.96);
}

.passbook-page .reflection-intro {
  border-color: rgba(201, 152, 73, 0.28);
  border-left-color: var(--journal-green);
  background:
    radial-gradient(circle at 100% 0, rgba(7, 124, 71, 0.07), transparent 8rem),
    var(--journal-paper);
}

.passbook-page .reflection-card-primary {
  border-color: rgba(7, 124, 71, 0.2);
  background:
    radial-gradient(circle at 100% 0, rgba(215, 234, 208, 0.5), transparent 9rem),
    var(--journal-paper);
}

.passbook-page .notebook-tab {
  border-color: rgba(201, 152, 73, 0.28);
  background: #f8efde;
  color: var(--journal-muted);
}

.passbook-page .notebook-tab-active {
  border-color: rgba(7, 124, 71, 0.22);
  background: var(--journal-paper);
  color: var(--journal-green-deep);
}

.passbook-page .card-health,
.passbook-page .card-reminder {
  border-left-color: var(--journal-gold);
}

.passbook-page .card-activity,
.passbook-page .card-todo {
  border-left-color: var(--journal-green);
}

.passbook-page .card-food {
  border-left-color: #79a887;
}

.passbook-page .card-expense {
  border-left-color: #b78645;
}

.my-info-related-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1.25rem;
}

.my-info-related-grid .my-info-card {
  min-height: calc(100% - 1rem);
}

.my-info-link {
  margin-top: 0.25rem;
}

@media (max-width: 900px) {
  .daily-review-container {
    width: calc(100% - 24px);
    padding-top: 1rem;
  }

  .notebook-page-body {
    border-radius: 14px;
    background: #fbfaf7;
  }

  .my-info-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.85rem;
  }

  .my-info-main-grid,
  .my-info-related-grid {
    grid-template-columns: 1fr;
  }

  .my-info-textarea {
    min-height: 280px;
  }
}

@media (max-width: 520px) {
  .daily-review-container {
    width: calc(100% - 20px);
    padding-bottom: 2.5rem;
  }

  .review-hero,
  .my-info-hero {
    padding: 1rem;
    border-radius: 14px;
  }

  .review-hero-stamp {
    min-width: 100px;
  }

  .notebook-page-body {
    padding: 0.75rem;
  }

  .data-card {
    padding: 0.9rem;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .summary-item {
    min-height: 72px;
    padding: 0.65rem 0.45rem;
  }

  .summary-value {
    font-size: 1.15rem;
  }

  .summary-label {
    font-size: 0.72rem;
  }

  .my-info-privacy-note {
    white-space: normal;
  }

  .my-info-actions .sbj-btn {
    min-height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notebook-tab,
  .clickable-note,
  .my-info-input {
    transition: none;
  }

  .clickable-note:hover {
    transform: none;
  }
}

/* Passbook visual correction: compact, content-led cards with the mockup's
   soft category surfaces. Keep this scoped so My Info, Tags, and Admin retain
   their existing presentation. */
.passbook-page {
  padding-top: 1.15rem;
}

.passbook-page .review-hero {
  min-height: 132px;
  padding: 1.15rem 1.5rem;
  background:
    radial-gradient(circle at 78% 22%, rgba(247, 196, 130, 0.18), transparent 11rem),
    linear-gradient(135deg, #fffdf8 0%, #fffaf0 58%, #f3f8ed 100%);
}

.passbook-page .review-hero-illustration {
  right: clamp(7rem, 13vw, 10rem);
  bottom: 0.15rem;
  width: clamp(260px, 28vw, 420px);
}

.passbook-page .notebook-wrapper {
  margin-top: 0.65rem;
}

.passbook-page .notebook-page-body {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.72);
}

.passbook-page .daily-review-spread {
  gap: 1rem;
}

.passbook-page .page-left,
.passbook-page .page-right {
  padding: 0.7rem;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.7);
}

.passbook-page .page-header {
  margin-bottom: 0.7rem;
  padding-bottom: 0.5rem;
}

.passbook-page .data-card {
  margin-bottom: 0.65rem;
  padding: 0.7rem 0.82rem;
  border-radius: 12px;
}

.passbook-page .card-header {
  margin-bottom: 0.42rem;
  padding-bottom: 0.38rem;
}

.passbook-page .card-title {
  font-size: 0.94rem;
}

.passbook-page .card-body {
  gap: 0.2rem;
  padding-right: 3.7rem;
  padding-bottom: 0.25rem;
}

.passbook-page .data-row {
  min-height: 1.45rem;
}

.passbook-page .summary-card {
  padding: 0.72rem 0.82rem;
  background: linear-gradient(135deg, #fffdf8 0%, #f2f9ed 100%);
}

.passbook-page .summary-item {
  min-height: 66px;
  padding: 0.62rem;
  background: rgba(255, 253, 248, 0.88);
}

.passbook-page .card-activity {
  background: linear-gradient(110deg, rgba(255, 239, 216, 0.92), #fffdfa 58%);
}
.passbook-page .card-health {
  background: linear-gradient(110deg, rgba(255, 232, 237, 0.94), #fffdfa 58%);
}
.passbook-page .card-food {
  background: linear-gradient(110deg, rgba(226, 245, 224, 0.94), #fffdfa 58%);
}
.passbook-page .card-expense {
  background: linear-gradient(110deg, rgba(255, 244, 201, 0.94), #fffdfa 58%);
}
.passbook-page .card-todo,
.passbook-page .card-reminder {
  background: linear-gradient(110deg, rgba(243, 234, 255, 0.94), #fffdfa 58%);
}

.passbook-page .card-activity .card-body::after,
.passbook-page .card-health .card-body::after,
.passbook-page .card-food .card-body::after,
.passbook-page .card-expense .card-body::after,
.passbook-page .card-todo .card-body::after,
.passbook-page .card-reminder .card-body::after {
  right: 0.1rem;
  bottom: -0.08rem;
  width: 56px;
  height: 42px;
}

.passbook-page .reflection-section {
  padding-left: 0;
  border-left: 0;
}

.passbook-page .reflection-heading {
  margin-bottom: 0.25rem;
}

.passbook-page .reflection-subtitle {
  margin-bottom: 0.7rem;
  line-height: 1.55;
}

.passbook-page .reflection-card {
  margin-bottom: 0.65rem;
  padding: 0.7rem 0.82rem;
  border-radius: 12px;
}

.passbook-page .reflection-card .card-body {
  line-height: 1.55;
}

.passbook-page .reflection-card-primary {
  background: linear-gradient(110deg, rgba(243, 234, 255, 0.94), #fffdfa 62%);
}

.passbook-page .reflection-card:nth-of-type(2) {
  background: linear-gradient(110deg, rgba(255, 232, 237, 0.9), #fffdfa 62%);
}

.passbook-page .reflection-card:nth-of-type(3) {
  background: linear-gradient(110deg, rgba(255, 239, 216, 0.9), #fffdfa 62%);
}

.passbook-page .reflection-empty {
  min-height: 2rem;
  padding: 0.5rem 0.65rem;
  background: rgba(255, 253, 248, 0.68);
}

.passbook-page .reflection-card::after {
  right: 0.65rem;
  bottom: 0.48rem;
  width: 68px;
  height: 46px;
}

.passbook-page .user-reflection-section {
  margin-top: 0.9rem;
}

.passbook-page .note-section {
  margin-bottom: 0.6rem;
  padding: 0.8rem;
  background: linear-gradient(110deg, rgba(243, 234, 255, 0.76), #fffdf8 64%);
}

@media (max-width: 900px) {
  .passbook-page .notebook-page-body {
    padding: 0.75rem;
  }

  .passbook-page .page-left,
  .passbook-page .page-right {
    padding: 0.3rem;
  }

  .passbook-page .review-hero-illustration {
    right: 4.6rem;
    width: clamp(180px, 42vw, 260px);
  }
}
.passbook-page .card-activity .card-body::after,
.passbook-page .card-health .card-body::after,
.passbook-page .card-food .card-body::after,
.passbook-page .card-expense .card-body::after,
.passbook-page .card-todo .card-body::after,
.passbook-page .card-reminder .card-body::after {
  content: '';
  display: block;
  width: 64px;
  height: 48px;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: saturate(0.92);
}
.passbook-page .review-hero::after,
.my-info-page .my-info-hero::after {
  content: '✦';
}
.passbook-page .card-activity .card-body::after { background-image: url('/assets/sbj-ui-assets-v1/activity.png'); }
.passbook-page .card-health .card-body::after { background-image: url('/assets/sbj-ui-assets-v1/health.png'); }
.passbook-page .card-food .card-body::after { background-image: url('/assets/sbj-ui-assets-v1/food.png'); }
.passbook-page .card-expense .card-body::after { background-image: url('/assets/sbj-ui-assets-v1/expense.png'); }
.passbook-page .card-todo .card-body::after,
.passbook-page .card-reminder .card-body::after { background-image: url('/assets/sbj-ui-assets-v1/personal-empty.png'); }

.passbook-page .reflection-card::after,
.passbook-page .section-note::after,
.passbook-page .note-section::after,
.passbook-page .reflection-empty::after {
  content: '';
  background-image: url('/assets/sbj-ui-assets-v1/personal-empty.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.72;
}

@media (max-width: 760px) {
  .passbook-page .review-hero-illustration {
    right: 3.4rem;
    width: 145px;
    opacity: 0.78;
  }
}

/* Final desktop bookmark row override. */
@media (min-width: 901px) {
  .passbook-page .notebook-wrapper { margin-top: 2.15rem !important; }
  .passbook-page .notebook-bookmarks-container-mobile {
    position: absolute !important;
    top: -1.55rem !important;
    right: 1.15rem !important;
    left: 1.15rem !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 0.28rem !important;
    overflow: visible !important;
    z-index: 4 !important;
  }
  .passbook-page .notebook-bookmarks-left,
  .passbook-page .notebook-bookmarks-right {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    gap: 0.28rem !important;
    width: auto !important;
  }
  .passbook-page .notebook-tab {
    width: auto !important;
    min-width: 68px !important;
    height: 36px !important;
    padding: 0.44rem 0.64rem 0.32rem !important;
    border-radius: 5px 5px 2px 2px !important;
    transform: none !important;
  }
  .passbook-page .notebook-tab-arrow { min-width: 43px !important; }
  .passbook-page .notebook-tab-active {
    min-width: 70px !important;
    height: 48px !important;
    padding: 0.56rem 0.65rem 0.82rem !important;
    transform: translateY(0.18rem) !important;
    z-index: 6 !important;
  }
}

/* Final Passbook notebook composition. The DOM remains the same; this turns
   the existing date groups into physical top bookmarks and restores the three
   visual layers from the approved guideline. */
.passbook-page .notebook-wrapper {
  margin-top: 2.1rem;
  position: relative;
}

.passbook-page .notebook-page-body {
  padding: 0.62rem;
  border: 1px solid rgba(213, 180, 133, 0.75);
  border-radius: 17px;
  background: #f1e6d2;
  box-shadow:
    0 2px 5px rgba(99, 72, 38, 0.08),
    0 15px 30px rgba(99, 72, 38, 0.09);
}

.passbook-page .daily-review-spread {
  gap: 0.55rem;
}

.passbook-page .daily-review-spread::before {
  display: block;
  left: 50%;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 5px;
  background: linear-gradient(90deg, rgba(181, 145, 95, 0.12), rgba(255, 255, 255, 0.8), rgba(181, 145, 95, 0.12));
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}

.passbook-page .page-left,
.passbook-page .page-right {
  min-height: 0 !important;
  padding: 0.9rem 0.82rem;
  border: 1px solid rgba(226, 216, 198, 0.88);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fffdf8);
  box-shadow:
    0 2px 7px rgba(91, 68, 40, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.passbook-page .page-left {
  border-radius: 14px 8px 8px 14px;
}

.passbook-page .page-right {
  border-radius: 8px 14px 14px 8px;
}

.passbook-page .notebook-bookmarks-container-mobile {
  position: absolute;
  top: -1.45rem;
  right: 1.2rem;
  left: 1.2rem;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.3rem;
  overflow: visible;
  pointer-events: none;
}

.passbook-page .notebook-bookmarks-left,
.passbook-page .notebook-bookmarks-right {
  position: static;
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  pointer-events: auto;
}

.passbook-page .notebook-bookmarks-left {
  justify-content: flex-end;
}

.passbook-page .notebook-bookmarks-right {
  justify-content: flex-start;
}

.passbook-page .notebook-tab {
  width: auto;
  min-width: 74px;
  height: 38px;
  padding: 0.48rem 0.72rem 0.38rem;
  border: 1px solid rgba(213, 177, 121, 0.68);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #fff5df, #f3dfbd);
  color: #79613f;
  font-size: 0.72rem;
  box-shadow: 0 2px 5px rgba(103, 72, 35, 0.12);
  transform: none;
}

.passbook-page .notebook-tab:hover {
  background: #fff8ea;
  transform: translateY(-3px);
}

.passbook-page .notebook-tab-arrow {
  min-width: 42px;
  padding-inline: 0.52rem !important;
  font-size: 0.7rem;
}

.passbook-page .notebook-tab-active {
  min-width: 72px;
  height: 52px;
  padding: 0.62rem 0.72rem 0.92rem;
  border-color: #18754a;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #2e9a64, #087c47);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 4px 8px rgba(7, 91, 56, 0.22);
  clip-path: polygon(0 0, 100% 0, 100% 86%, 50% 100%, 0 86%);
  transform: translateY(0.25rem);
}

.passbook-page .notebook-tab-active:hover {
  background: linear-gradient(180deg, #3ca873, #087c47);
  transform: translateY(0.25rem);
}

.passbook-page .notebook-tab-active::after {
  display: none;
}

.passbook-page .notebook-tab-disabled {
  opacity: 0.38;
  box-shadow: none;
}

@media (max-width: 900px) {
  .passbook-page .notebook-wrapper {
    margin-top: 1.35rem;
  }

  .passbook-page .notebook-bookmarks-container-mobile {
    position: static;
    justify-content: flex-start;
    align-items: flex-end;
    width: 100%;
    max-width: 100%;
    margin-bottom: -1px;
    padding: 0 0.35rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .passbook-page .notebook-bookmarks-left,
  .passbook-page .notebook-bookmarks-right {
    flex: 0 0 auto;
  }

  .passbook-page .notebook-page-body {
    padding: 0.48rem;
  }

  .passbook-page .daily-review-spread::before {
    display: none;
  }

  .passbook-page .page-left,
  .passbook-page .page-right {
    padding: 0.72rem 0.62rem;
    border-radius: 12px;
  }
}

/* Passbook editorial correction: make the approved composition carry the
   page, rather than layering decoration onto the legacy card proportions. */
.passbook-page .review-hero {
  min-height: 146px;
  padding: 1.2rem 1.45rem;
  background:
    radial-gradient(circle at 79% 35%, rgba(237, 211, 158, 0.2), transparent 12rem),
    linear-gradient(105deg, #fffdf8 0%, #fffaf0 58%, #f4f8ed 100%);
}

.passbook-page .review-hero-illustration {
  top: 0.2rem;
  right: auto;
  left: 37%;
  bottom: auto;
  width: clamp(320px, 34vw, 460px);
  max-width: 46%;
  height: 132px;
  object-fit: contain;
  object-position: center;
  opacity: 0.98;
}

.passbook-page .review-hero::after {
  content: '';
  right: -30px;
  bottom: -64px;
  width: 170px;
  height: 170px;
  border-color: rgba(7, 124, 71, 0.1);
  box-shadow: 0 0 0 14px rgba(7, 124, 71, 0.025);
}

.passbook-page .notebook-page-body {
  padding: 0.72rem;
  background: rgba(255, 253, 248, 0.56);
}

.passbook-page .daily-review-spread {
  gap: 0.72rem;
}

.passbook-page .daily-review-spread::before {
  display: none;
}

.passbook-page .page-left,
.passbook-page .page-right {
  padding: 0.35rem;
  background: transparent;
}

.passbook-page .page-header {
  margin-bottom: 0.52rem;
  padding: 0 0.15rem 0.42rem;
  border-bottom: 1px solid rgba(201, 152, 73, 0.22);
}

.passbook-page .data-card {
  margin-bottom: 0.48rem;
  padding: 0.56rem 0.68rem;
  border-radius: 11px;
  box-shadow: 0 3px 10px rgba(76, 63, 43, 0.035);
}

.passbook-page .data-card:not(.summary-card):not(.reflection-card),
.passbook-page .card-activity,
.passbook-page .card-health,
.passbook-page .card-food,
.passbook-page .card-expense,
.passbook-page .card-todo,
.passbook-page .card-reminder {
  background-image: none;
}

.passbook-page .card-activity { background: #fff4e4; }
.passbook-page .card-health { background: #fff0f2; }
.passbook-page .card-food { background: #eff9eb; }
.passbook-page .card-expense { background: #fff8dc; }
.passbook-page .card-todo,
.passbook-page .card-reminder { background: #f7f0ff; }

.passbook-page .card-header {
  margin-bottom: 0.28rem;
  padding-bottom: 0.28rem;
  border-bottom-color: rgba(201, 152, 73, 0.2);
}

.passbook-page .card-title {
  font-size: 0.9rem;
  line-height: 1.28;
}

.passbook-page .card-body {
  gap: 0.08rem;
  padding-right: 4.65rem;
  padding-bottom: 0.1rem;
}

.passbook-page .data-row {
  min-height: 1.28rem;
  gap: 0.5rem;
  padding: 0.06rem 0;
}

.passbook-page .data-label,
.passbook-page .data-value {
  font-size: 0.78rem;
}

.passbook-page .card-body-todo,
.passbook-page .card-reminder .card-body {
  padding-right: 4.65rem;
}

.passbook-page .card-activity .card-body::after,
.passbook-page .card-health .card-body::after,
.passbook-page .card-food .card-body::after,
.passbook-page .card-expense .card-body::after,
.passbook-page .card-todo .card-body::after,
.passbook-page .card-reminder .card-body::after {
  right: 0.28rem;
  bottom: 0.1rem;
  width: 82px;
  height: 64px;
  opacity: 0.98;
}

.passbook-page .card-food .card-body:has(.reflection-empty),
.passbook-page .card-expense .card-body:has(.reflection-empty) {
  min-height: 4.15rem;
  padding-right: 6.4rem;
}

.passbook-page .card-food .card-body:has(.reflection-empty)::after,
.passbook-page .card-expense .card-body:has(.reflection-empty)::after {
  display: none;
}

.passbook-page .card-food .reflection-empty,
.passbook-page .card-expense .reflection-empty {
  position: relative;
  min-height: 3.35rem;
  padding: 0.58rem 0.7rem;
  background: rgba(255, 253, 248, 0.56);
}

.passbook-page .card-food .reflection-empty::after,
.passbook-page .card-expense .reflection-empty::after {
  right: 0.35rem;
  width: 92px;
  height: 70px;
  opacity: 0.98;
}

.passbook-page .summary-card {
  padding: 0.6rem 0.68rem;
  background: linear-gradient(135deg, #fffdf8 0%, #f2f9ed 100%);
}

.passbook-page .summary-card .card-header {
  margin-bottom: 0.38rem;
}

.passbook-page .summary-grid {
  gap: 0.42rem;
}

.passbook-page .summary-item {
  min-height: 62px;
  padding: 0.5rem 0.55rem;
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.78);
}

.passbook-page .summary-item:nth-child(1) {
  border-top: 3px solid #e4a05b;
  background: #fff5e9;
}
.passbook-page .summary-item:nth-child(2) {
  border-top: 3px solid #86bf8d;
  background: #f0f8ec;
}
.passbook-page .summary-item:nth-child(3) {
  border-top: 3px solid #b99ad4;
  background: #f7f0ff;
}

.passbook-page .summary-value {
  margin-bottom: 0.18rem;
  font-size: 1.16rem;
}

.passbook-page .summary-label {
  font-size: 0.7rem;
  line-height: 1.28;
}

.passbook-page .reflection-section {
  margin-top: 0.25rem;
}

.passbook-page .reflection-subtitle {
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.42;
}

.passbook-page .reflection-card {
  margin-bottom: 0.48rem;
  padding: 0.56rem 0.68rem;
  border-radius: 11px;
  box-shadow: none;
}

.passbook-page .reflection-card .card-body {
  min-height: 2.05rem;
  padding-right: 5.35rem;
  line-height: 1.42;
}

.passbook-page .reflection-card::after {
  right: 0.65rem;
  bottom: 0.32rem;
  width: 88px;
  height: 66px;
  opacity: 0.98;
}

.passbook-page .reflection-card-primary {
  background: #f7f0ff;
  border-left-color: #b99ad4;
}

.passbook-page .reflection-health {
  background: #fff0f2;
  border-left: 3px solid #e78e9a;
}

.passbook-page .reflection-health::after {
  background-image: url('/assets/sbj-ui-assets-v1/health.png');
}

.passbook-page .reflection-activity {
  background: #fff4e4;
  border-left: 3px solid #e4a05b;
}

.passbook-page .reflection-activity::after {
  background-image: url('/assets/sbj-ui-assets-v1/activity.png');
}

.passbook-page .reflection-empty {
  min-height: 2.1rem;
  padding: 0.45rem 0.58rem;
  background: rgba(255, 253, 248, 0.62);
  font-size: 0.78rem;
}

.passbook-page .reflection-empty::after {
  display: none;
}

.passbook-page .note-section {
  min-height: 0;
  margin-bottom: 0.45rem;
  padding: 0.64rem;
  background: #f7f0ff;
}

@media (max-width: 900px) {
  .passbook-page .review-hero-illustration {
    left: 28%;
    width: 300px;
    max-width: 60%;
    height: 112px;
  }
}

@media (max-width: 760px) {
  .passbook-page .review-hero-illustration {
    left: 22%;
    right: auto;
    width: 240px;
    max-width: 66%;
    height: 94px;
  }
}

/* Final desktop bookmark row override. */
@media (min-width: 901px) {
  .passbook-page .notebook-wrapper { margin-top: 2.15rem !important; }
  .passbook-page .notebook-bookmarks-container-mobile {
    position: absolute !important;
    top: -1.55rem !important;
    right: 1.15rem !important;
    left: 1.15rem !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 0.28rem !important;
    overflow: visible !important;
    z-index: 4 !important;
  }
  .passbook-page .notebook-bookmarks-left,
  .passbook-page .notebook-bookmarks-right {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    gap: 0.28rem !important;
    width: auto !important;
  }
  .passbook-page .notebook-tab {
    width: auto !important;
    min-width: 68px !important;
    height: 36px !important;
    padding: 0.44rem 0.64rem 0.32rem !important;
    border-radius: 5px 5px 2px 2px !important;
    transform: none !important;
  }
  .passbook-page .notebook-tab-arrow { min-width: 43px !important; }
  .passbook-page .notebook-tab-active {
    min-width: 70px !important;
    height: 48px !important;
    padding: 0.56rem 0.65rem 0.82rem !important;
    transform: translateY(0.18rem) !important;
    z-index: 6 !important;
  }
}

/* Mobile correction: preserve the dedicated mobile composition without making
   the hero taller than the first passbook content, and keep every date usable
   without a horizontal scroll trap. */
@media (max-width: 760px), (max-width: 900px) and (orientation: portrait) {
  .passbook-page .notebook-bookmarks-container-mobile { display: none !important; }

  .passbook-page .review-hero {
    aspect-ratio: auto !important;
    height: min(80vw, 300px) !important;
    min-height: 260px !important;
    background-size: 100% auto !important;
    background-position: center bottom !important;
  }

  .passbook-page .notebook-wrapper { margin-top: 0.8rem !important; }

  .passbook-page .notebook-bookmarks-container-mobile {
    position: static !important;
    display: none !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    width: 100% !important;
    margin-bottom: 0.45rem !important;
    padding: 0 0.2rem !important;
    overflow: visible !important;
  }

  .passbook-page .notebook-bookmarks-left,
  .passbook-page .notebook-bookmarks-right {
    display: flex !important;
    flex: 1 1 100% !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 0.24rem !important;
  }

  .passbook-page .notebook-tab {
    min-width: 52px !important;
    height: 33px !important;
    padding: 0.38rem 0.45rem 0.28rem !important;
    font-size: 0.67rem !important;
  }

  .passbook-page .notebook-tab-arrow { min-width: 42px !important; }

  .passbook-page .notebook-tab-active {
    min-width: 58px !important;
    height: 39px !important;
    padding: 0.45rem 0.5rem 0.58rem !important;
    transform: none !important;
    margin-right: 0 !important;
  }
}

/* Last Passbook bookmark precedence: preserve the physical, centered open-page
   arrangement from the approved guideline. */
@media (min-width: 901px) {
  .passbook-page .notebook-wrapper { margin-top: 2.35rem !important; }

  .passbook-page .notebook-bookmarks-container-mobile {
    /* The tab baseline meets the top of the inner paper, not its content. */
    top: -2.64rem !important;
    gap: 0 !important;
  }

  .passbook-page .notebook-bookmarks-left,
  .passbook-page .notebook-bookmarks-right {
    flex: 1 1 0 !important;
    gap: 0.3rem !important;
  }

  .passbook-page .notebook-bookmarks-left { justify-content: flex-end !important; }
  .passbook-page .notebook-bookmarks-right { justify-content: flex-start !important; }

  .passbook-page .notebook-tab {
    min-width: 70px !important;
    height: 38px !important;
    padding: 0.5rem 0.66rem 0.37rem !important;
    border-radius: 7px 7px 2px 2px !important;
    background: linear-gradient(180deg, #fff7e8 0%, #f4dfba 100%) !important;
    box-shadow: 0 3px 6px rgba(103, 72, 35, 0.14) !important;
  }

  .passbook-page .notebook-tab-arrow {
    min-width: 42px !important;
    background: #fff9ef !important;
  }

  .passbook-page .notebook-tab-active {
    min-width: 74px !important;
    height: 58px !important;
    padding: 0.65rem 0.68rem 1rem !important;
    background: linear-gradient(180deg, #35a56d, #087c47) !important;
    border-color: #087c47 !important;
    border-radius: 6px 6px 1px 1px !important;
    box-shadow: 0 5px 10px rgba(7, 91, 56, 0.24) !important;
    /* The active bookmark intentionally overlaps the top edge of its paper. */
    transform: translateY(0.56rem) !important;
    /* The open-day bookmark belongs to the left sheet, just before the spine. */
    margin-right: 0.55rem;
  }
}

/* Final bounded responsive correction: give long user names real copy width,
   then switch small screens to a compact, image-free Hero and date selector. */
.passbook-page .review-hero-copy {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.passbook-page .review-hero h1 {
  max-width: 100% !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 760px), (max-width: 900px) and (orientation: portrait) {
  .passbook-page .review-hero {
    aspect-ratio: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 0.5rem !important;
    padding: 0.9rem 0.9rem !important;
    background-image: none !important;
    background: linear-gradient(145deg, #fffdf8 0%, #fff8ea 62%, #f3f8ed 100%) !important;
  }

  .passbook-page .review-hero-copy {
    width: 100% !important;
    max-width: none !important;
    margin-top: 0 !important;
  }

  .passbook-page .review-hero h1 {
    font-size: clamp(1.55rem, 8vw, 2.05rem) !important;
    line-height: 1.16 !important;
  }

  .passbook-page .review-hero-description {
    display: none !important;
  }

  .passbook-page .mobile-date-selector {
    display: grid !important;
    position: static !important;
    grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem !important;
    align-items: center !important;
    gap: 0.4rem !important;
    width: 100% !important;
    margin: 0.55rem 0 0.45rem !important;
    padding: 0 !important;
  }

  .passbook-page .mobile-date-arrow,
  .passbook-page .mobile-date-select-label {
    min-width: 0 !important;
    min-height: 2.55rem !important;
    border: 1px solid #e3c58e !important;
    border-radius: 9px !important;
    background: linear-gradient(180deg, #fff8ea, #f5e3c2) !important;
    box-shadow: 0 2px 5px rgba(103, 72, 35, 0.1) !important;
  }

  .passbook-page .mobile-date-arrow {
    display: grid !important;
    place-items: center !important;
    color: #846844 !important;
    font-size: 0.82rem !important;
    text-decoration: none !important;
  }

  .passbook-page .mobile-date-arrow-disabled {
    opacity: 0.38 !important;
  }

  .passbook-page .mobile-date-select-label {
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    padding: 0 0.45rem !important;
    color: #6f5b40 !important;
  }

  .passbook-page .mobile-date-select-label > span {
    display: none !important;
  }

  .passbook-page .mobile-date-select-label select {
    width: 100% !important;
    min-width: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: #4d3d2a !important;
    font: inherit !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    text-align: center !important;
  }

  .passbook-page .notebook-bookmarks-container-mobile {
    display: none !important;
  }

  .passbook-page .notebook-wrapper {
    margin-top: 0.55rem !important;
  }
}

/* Final desktop-only Hero correction: keep the Hero and notebook start in the
   same viewport while preserving the desktop artwork and long-name wrapping. */
@media (min-width: 901px) {
  .passbook-page .review-hero {
    aspect-ratio: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 0.3rem !important;
    padding: 0.78rem clamp(1.2rem, 3vw, 3.25rem) !important;
    align-items: flex-start !important;
    background: url('/assets/passbook-hero-desktop.png') center / cover no-repeat !important;
  }

  .passbook-page .review-hero-copy {
    width: 100% !important;
    max-width: none !important;
    margin-top: 0 !important;
  }

  .passbook-page .review-kicker {
    margin: 0 0 0.12rem !important;
    font-size: 0.72rem !important;
    line-height: 1 !important;
  }

  .passbook-page .review-hero h1 {
    margin: 0 !important;
    font-size: clamp(2rem, 3.7vw, 3.35rem) !important;
    line-height: 1.02 !important;
  }

  .passbook-page .review-lead {
    margin: 0.18rem 0 0 !important;
    font-size: 0.98rem !important;
    line-height: 1.15 !important;
  }

  .passbook-page .review-hero-description {
    display: none !important;
  }
}

/* Medium Passbook correction: stack the paper pages before a two-column
   spread makes the action cards too narrow to read. Date bookmarks remain in
   the existing desktop row because they sit outside the spread. */
@media (min-width: 901px) and (max-width: 1120px) {
  .passbook-page .daily-review-spread {
    grid-template-columns: 1fr;
    gap: 0.85rem !important;
  }

  .passbook-page .daily-review-spread::before {
    display: none !important;
  }

  .passbook-page .page-left,
  .passbook-page .page-right {
    padding: 1rem 1.05rem !important;
    border-radius: 14px !important;
  }
}

/* My Info is a review surface: show the current snapshot without exposing
   profile/context mutation controls in the Web portal. */
.my-info-readonly-mode .my-info-readonly-card {
  background: var(--journal-paper, #fffdf8);
}

.my-info-readonly-value {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(7, 91, 56, 0.18);
  border-radius: 10px;
  background: #fffcf5;
  color: var(--text, #3a2a1a);
  font: inherit;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.my-info-readonly-text {
  min-height: clamp(120px, 18vh, 220px);
  white-space: pre-wrap;
}

.my-info-readonly-value.is-empty,
.my-info-status-label.is-empty {
  color: var(--muted, #8a7a6a);
  font-style: italic;
}

.my-info-status-success {
  color: var(--journal-green-deep, #2f6f43);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
