@charset "UTF-8";

.treasure-page {
  --page-tint: #FBF0DC;
  --page-art: url("./assets/cottage/nav-treasure-botanical.webp");
  min-height: 0;
  padding-bottom: 32px;
}

.treasure-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #FFF8F2;
}

.treasure-tab {
  min-height: 36px;
  padding: 6px 14px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text-soft);
  font-family: var(--sans);
  font-size: 15px;
  cursor: pointer;
}

.treasure-tab.is-active {
  background: var(--garden-pale);
  color: var(--ink);
  box-shadow: 0 1px 4px #B2939114;
}

.treasure-panel {
  min-width: 0;
}

.treasure-panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
  padding-inline: 3px;
}

.treasure-panel-bar > div {
  display: flex;
  align-items: baseline;
  gap: 11px;
}

.treasure-panel-bar strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}

.treasure-panel-bar span {
  color: var(--text-soft);
  font-size: 12px;
}

.notes-board {
  --stationery-background: url("./assets/cottage/patch-board-paper.webp");
  position: relative;
  isolation: isolate;
  min-height: 300px;
  overflow: hidden;
  border: 1.5px solid var(--cottage-stroke);
  border-radius: 24px;
  background: #FAF5F9;
  box-shadow: inset 0 0 0 7px #FFFEFA70, var(--cottage-shadow);
}

.note-card {
  position: absolute;
  display: flex;
  width: 238px;
  min-height: 151px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 18px 15px;
  transform: translate(var(--note-shift-x, 0), var(--note-shift-y, 0)) rotate(var(--note-tilt, 0deg));
  border: 1px solid var(--note-edge, #DDC9AF);
  border-radius: var(--note-radius, 3px);
  background: var(--note-bg, #FFFDF3);
  color: var(--ink);
  box-shadow: 2px 8px 13px #9C806D1C;
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.note-card:hover {
  z-index: 5;
  transform: translate(var(--note-shift-x, 0), calc(var(--note-shift-y, 0) - 4px)) rotate(var(--note-tilt, 0deg));
  box-shadow: 4px 14px 24px #9C806D28;
}

.note-card::before {
  position: absolute;
  top: -11px;
  left: 50%;
  width: 68px;
  height: 19px;
  transform: translateX(-50%) rotate(calc(var(--note-tilt, 0deg) * -.35));
  background: var(--note-tape, #E8D8AFB8);
  box-shadow: 0 1px 2px #94755C16;
  content: "";
}

.note-card-body {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.note-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 5px;
  padding-top: 12px;
  color: var(--note-muted, #9B8373);
  font-size: 11px;
  line-height: 1.5;
}

.note-card-author {
  color: var(--note-muted, #9B8373);
}

.note-card-actions {
  display: flex;
  gap: 2px;
}

.note-card-actions button {
  padding: 2px 4px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--note-muted, #9B8373);
  font-size: 11px;
  cursor: pointer;
}

.note-card-actions button:hover {
  background: #FFFFFF75;
  color: var(--ink);
}

/* Twenty paper styles: same family, different paper moods. */
.note-0 {
  --note-bg: repeating-linear-gradient(0deg, #FFF8E7 0 27px, #EEDFC6 28px, #FFF8E7 29px);
  --note-edge: #E4D2B6;
  --note-tape: #B7CFB0A8;
}
.note-1 {
  --note-bg: radial-gradient(#CBB7DF55 1px, transparent 1.5px), #F8F2FB;
  --note-bg-size: 17px 17px;
  --note-edge: #DCCDE9;
  --note-tape: #D1BFE5AA;
}
.note-2 {
  --note-bg: linear-gradient(#F8D7D52E 1px, transparent 1px), linear-gradient(90deg, #F8D7D52E 1px, transparent 1px), #FFF5F4;
  --note-bg-size: 18px 18px;
  --note-edge: #E9C8C6;
  --note-tape: #F0ADAE99;
}
.note-3 {
  --note-bg: #EEF4E9;
  --note-edge: #CADCC2;
  --note-tape: #A8C39EA8;
  --note-radius: 2px 12px 2px 12px;
}
.note-4 {
  --note-bg: #FFF1B5;
  --note-edge: #E7D083;
  --note-tape: #F0D781A8;
}
.note-5 {
  --note-bg: #EEF3FA;
  --note-edge: #C7D4E5;
  --note-tape: #BACBE5A8;
}
.note-6 {
  --note-bg: repeating-linear-gradient(0deg, #FFF5EE 0 24px, #F0DAD0 25px, #FFF5EE 26px);
  --note-edge: #E8D1C7;
  --note-tape: #E8BFC0A8;
}
.note-7 {
  --note-bg: repeating-linear-gradient(90deg, #F7F2FB 0 14px, #EEE7F7 14px 28px);
  --note-edge: #D9CCE8;
  --note-tape: #CBB4E1A8;
}
.note-8 {
  --note-bg: #E9DAC7;
  --note-edge: #D0BBA0;
  --note-muted: #856A55;
  --note-tape: #D0B28EA8;
}
.note-9 {
  --note-bg: #F0F7EE;
  --note-edge: #D2E2C9;
  --note-tape: #B4CBA9A8;
}
.note-10 {
  --note-bg: radial-gradient(ellipse at 23% 25%, #FFFFFF 0 12%, transparent 13%), radial-gradient(ellipse at 77% 72%, #FFFFFF 0 17%, transparent 18%), #F2F1FA;
  --note-edge: #D9D7EA;
  --note-tape: #C8C5E3A8;
}
.note-11 {
  --note-bg: radial-gradient(circle at 0 0, #F8E1E3 0 13px, transparent 14px), radial-gradient(circle at 100% 100%, #F8E1E3 0 13px, transparent 14px), #FFF9F9;
  --note-edge: #EDD3D4;
  --note-radius: 16px 16px 2px 16px;
  --note-tape: #F0C8CA8F;
}
.note-12 {
  --note-bg: linear-gradient(#C7B9D33D 1px, transparent 1px), linear-gradient(90deg, #C7B9D33D 1px, transparent 1px), #FAF8FC;
  --note-bg-size: 14px 14px;
  --note-edge: #DDD1E8;
  --note-tape: #D6C6E8A8;
}
.note-13 {
  --note-bg: #FFF5CF;
  --note-edge: #E8D38D;
  --note-tape: #E7CC7FA8;
}
.note-14 {
  --note-bg: repeating-linear-gradient(0deg, #FFF8F0 0 26px, #EADFD5 27px, #FFF8F0 28px);
  --note-bg-margin: linear-gradient(90deg, transparent 28px, #F0BAB955 29px, transparent 30px);
  --note-edge: #E5D6C9;
  --note-tape: #C6DBBEA8;
}
.note-15 {
  --note-bg: radial-gradient(circle at 14% 12%, #F0ADAE48 0 3px, transparent 3.8px), radial-gradient(circle at 83% 22%, #D1BFE555 0 3px, transparent 4px), radial-gradient(circle at 70% 85%, #B7CFB05E 0 3px, transparent 4px), #FCF8F0;
  --note-edge: #E4D8C7;
  --note-tape: #E7CFBAA8;
}
.note-16 {
  --note-bg: repeating-linear-gradient(0deg, #FFF8EE 0 17px, #EBDDD0 18px, #FFF8EE 19px), repeating-linear-gradient(90deg, #FFF8EE 0 17px, #EBDDD0 18px, #FFF8EE 19px);
  --note-edge: #E5D4C5;
  --note-tape: #D2B9AAA8;
}
.note-17 {
  --note-bg: linear-gradient(135deg, #F6ECDC, #FFF9EF);
  --note-edge: #D7C2A7;
  --note-radius: 0;
  --note-tape: #B7CFB0A8;
}
.note-18 {
  --note-bg: #FBF7F0CC;
  --note-edge: #E9DED0;
  --note-tape: #D1BFE566;
  --note-radius: 2px;
}
.note-19 {
  --note-bg: linear-gradient(160deg, #F1EAF8, #E7DCF4);
  --note-edge: #D6C6E6;
  --note-muted: #836D92;
  --note-tape: #F0ADAE88;
}

.note-1, .note-10, .note-12 {
  background-size: var(--note-bg-size, auto);
}

.note-14 {
  background-image: var(--note-bg-margin), var(--note-bg);
}

.notes-board-empty {
  position: static;
  margin: 35px auto;
  max-width: 420px;
}

/* Jewel-box resource module */
.jewel-box {
  position: relative;
  min-height: 300px;
  padding: 30px 27px 26px;
  overflow: hidden;
  border: 2px solid #CBB4C6;
  border-radius: 28px;
  background: linear-gradient(#F0E4F2BF, #F0E4F2BF), url("./assets/cottage/botanical-notes-paper.webp") center / cover;
  box-shadow: inset 0 0 0 9px #F9EFF8, var(--cottage-shadow);
}

.jewel-box::before,
.jewel-box::after {
  position: absolute;
  top: 14px;
  bottom: 14px;
  width: 9px;
  border: 1px solid #CDB89E;
  border-radius: 9px;
  background: #F4E0BC;
  content: "";
}

.jewel-box::before { left: 11px; }
.jewel-box::after { right: 11px; }

.jewel-box-rim {
  position: absolute;
  top: -38px;
  right: -20px;
  left: -20px;
  height: 65px;
  border: 1px solid #CDB89E;
  border-radius: 50%;
  background: #F5E7CF;
  box-shadow: 0 7px 12px #BDA3BA16;
}

.resource-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  padding-top: 3px;
}

.resource-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 15px;
  border: 1px solid #DCCBBE;
  border-radius: 16px;
  background: #FFF9F1;
  box-shadow: 0 5px 12px #2D1C2620;
}

.file-icon {
  display: grid;
  width: 56px;
  min-height: 76px;
  place-items: center;
  align-content: start;
  gap: 4px;
  color: var(--file-ink, #796C63);
  font-family: var(--garden-ui);
  font-size: 10px;
  letter-spacing: .03em;
  line-height: 1.2;
  text-align: center;
}

.file-icon::before {
  display: block;
  width: 56px;
  height: 56px;
  background: var(--file-art, url("./assets/cottage/file-other-watercolor.webp")) center / contain no-repeat;
  content: "";
}

.file-extension { max-width: 100%; padding: 2px 5px; border: 1px solid #DCCFDD; border-radius: 6px; background: #FFFDFA; font-weight: 600; overflow-wrap: anywhere; }
.file-pdf { --file-art: url("./assets/cottage/file-pdf-watercolor.webp"); --file-ink: #A95C5A; }
.file-doc { --file-art: url("./assets/cottage/file-doc-watercolor.webp"); --file-ink: #5A7398; }
.file-ppt { --file-art: url("./assets/cottage/file-ppt-watercolor.webp"); --file-ink: #A46C3F; }
.file-xls { --file-art: url("./assets/cottage/file-xls-watercolor.webp"); --file-ink: #5C8255; }
.file-img { --file-art: url("./assets/cottage/file-img-watercolor.webp"); --file-ink: #8264A2; }
.file-audio { --file-art: url("./assets/cottage/file-audio-watercolor.webp"); --file-ink: #A45D75; }
.file-video { --file-art: url("./assets/cottage/file-video-watercolor.webp"); --file-ink: #6D629B; }
.file-zip { --file-art: url("./assets/cottage/file-zip-watercolor.webp"); --file-ink: #967A3E; }
.file-txt { --file-art: url("./assets/cottage/file-txt-watercolor.webp"); --file-ink: #71805B; }
.file-code { --file-art: url("./assets/cottage/file-code-watercolor.webp"); --file-ink: #56706A; }
.file-ebook { --file-art: url("./assets/cottage/file-ebook-watercolor.webp"); --file-ink: #71805B; }
.file-other { --file-art: url("./assets/cottage/file-other-watercolor.webp"); --file-ink: #796C63; }

.resource-info {
  min-width: 0;
}

.resource-name {
  display: block;
  width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  cursor: pointer;
}

.resource-name:hover {
  color: #95616D;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resource-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 3px 0 7px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.resource-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px;
  color: #A78F82;
  font-size: 10px;
}

.resource-actions {
  display: flex;
  gap: 4px;
  grid-column: 2;
  justify-self: end;
  margin-top: 3px;
}

.resource-actions button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #A78F82;
  font-size: 11px;
  cursor: pointer;
}

.resource-actions button:hover {
  background: #F1E3D7;
  color: var(--ink);
}

.jewel-empty {
  grid-column: 1 / -1;
  min-height: 260px;
  border-color: #C8AD8D55;
  background: #FFF9F1D9;
}

@media (max-width: 900px) {
  .notes-board {
    min-height: 0;
    padding: 18px;
    overflow: visible;
  }

  .note-card {
    position: relative;
    top: auto !important;
    left: auto !important;
    display: flex;
    width: auto;
    min-height: 145px;
    margin-bottom: 15px;
    transform: rotate(var(--note-tilt, 0deg));
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .jewel-box {
    min-height: 280px;
    padding: 24px 18px;
  }
}

@media (max-width: 600px) {
  .treasure-panel-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .treasure-panel-bar > div {
    justify-content: space-between;
    width: 100%;
  }

  .treasure-tabs {
    width: 100%;
  }

  .treasure-tab {
    flex: 1;
  }

  .note-card {
    padding-inline: 14px;
  }
}

/* 拾光补丁: the existing records become stitched cloth, not new cloud records. */
.patch-search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 10px 14px;
  border: 1px dashed #D8C3D5;
  border-radius: 16px;
  background: #FFFCF8;
  color: var(--text-soft);
  font-size: 14px;
}
.patch-search-field > span { flex: 0 0 auto; }
.patch-search-field input { width: min(430px, 100%); min-width: 0; background: #FFF8FB; }
.treasure-tabs { gap: 7px; padding: 6px; border: 1.5px solid #DCC8DC; border-radius: 20px 16px 21px 15px; background: #FFFCF9; box-shadow: 0 3px 0 #E7D9E54D; }
.treasure-tab { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 8px 15px; border: 1px solid transparent; border-radius: 14px 11px 15px 10px; }
.treasure-tab::before { width: 23px; height: 23px; flex: 0 0 23px; background: url("./assets/cottage/patch-fabric-weave.webp") center / cover; border: 1px dashed #BCA8BF; border-radius: 5px 8px 6px 7px; content: ""; rotate: -7deg; }
.treasure-tab:last-child::before { background: url("./assets/cottage/nav-diary-botanical.webp") center / contain no-repeat; border: 0; rotate: 4deg; }
.treasure-tab.is-active { border-color: #D7B9D1; background: #F6EAF5; box-shadow: inset 0 0 0 3px #FFFEFA80; }
.treasure-tab:hover { border-color: #DFC1CF; background: #FFF0F3; }
.notes-board .note-card {
  --patch-cloth: #FFF3D9;
  --patch-thread: #C8AD99;
  padding: 26px 20px 16px;
  border: 1.5px dashed var(--patch-thread);
  border-radius: 14px 10px 16px 11px;
  background-color: var(--patch-cloth);
  background-image: linear-gradient(color-mix(in srgb, var(--patch-cloth) 66%, transparent), color-mix(in srgb, var(--patch-cloth) 66%, transparent)), url("./assets/cottage/patch-fabric-weave.webp");
  background-size: auto, 180px 180px;
  background-blend-mode: multiply, multiply;
  box-shadow: 1px 5px 8px #8D708420, inset 0 0 9px #A7957A18;
}
.notes-board {
  background-color: #FFF9F2;
  background-image: linear-gradient(#FFF9F2CC,#FFF9F2CC),url("./assets/cottage/patch-fabric-weave.webp");
  background-size: auto,260px 260px;
}
.notes-board::before { border-image-slice: 420; }
.notes-board .note-card::after { position: absolute; inset: 5px; border: 1px dashed color-mix(in srgb, var(--patch-thread) 50%, transparent); border-radius: 9px 5px 11px 6px; pointer-events: none; content: ""; }
.notes-board .note-card::before { top: 5px; left: auto; right: 6px; width: 20px; height: 20px; transform: rotate(8deg); background: url("./assets/peach-garden-final/decor-pink-flower.svg") center / contain no-repeat; box-shadow: none; }
.notes-board :is(.note-1,.note-6,.note-11,.note-16) { --patch-cloth: #EDE3F6; --patch-thread: #B59ABF; }
.notes-board :is(.note-2,.note-7,.note-12,.note-17) { --patch-cloth: #F8E2E7; --patch-thread: #CDA5B0; }
.notes-board :is(.note-3,.note-8,.note-13,.note-18) { --patch-cloth: #E5EFDD; --patch-thread: #A0B593; }
.notes-board :is(.note-4,.note-9,.note-14,.note-19) { --patch-cloth: #E5EDF6; --patch-thread: #A4B5CA; }
.note-card-actions button { min-height: 28px; font-size: 12px; }
.note-card-footer { position: relative; z-index: 1; font-size: 12px; }
@media (max-width: 600px) {
  .patch-search-field { flex-direction: column; align-items: stretch; gap: 5px; }
  .patch-search-field input { width: 100%; }
  .treasure-tab { padding-inline: 10px; font-size: 14px; }
}
.notes-board { background: #FCE6E3 url("./assets/peach-garden-final/pattern-yue.svg") center / 240px 200px repeat; }
.notes-board::before { content: none; }
.treasure-tab:last-child::before { background-image: url("./assets/cottage/learning-resources-icon.webp"); }
