@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700&display=swap');
:root {
  --ink: #301c25;
  --muted: #746670;
  --wine: #59061e;
  --line: #eadfe3;
  --paper: #fffafb;
  --rose: #f8e9ee;
  --green: #146445;
  --radius: 22px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.65 'Noto Sans Thai',
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button,
a,
input,
select,
summary:focus-visible {
  outline-offset: 4px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #be5375;
}
button {
  cursor: pointer;
}
img {
  max-width: 100%;
  display: block;
}
.skip {
  position: absolute;
  top: -100px;
  padding: 12px;
  background: white;
  z-index: 100;
}
.skip:focus {
  top: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fffefef5;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.nav {
  max-width: 1280px;
  margin: auto;
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--wine);
}
.brand img {
  width: 46px;
  height: 46px;
}
.brand small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.17em;
  line-height: 1.3;
}
.navlinks {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-left: auto;
}
.navlink {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 99px;
  white-space: nowrap;
}
.navlink[aria-current='page'] {
  background: var(--rose);
  color: var(--wine);
}
.navlink:hover {
  background: #f6f1f3;
}
.count {
  border-radius: 99px;
  min-width: 23px;
  height: 23px;
  background: var(--wine);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
}
.avatar {
  height: 34px;
  width: 34px;
  border-radius: 50%;
  background: var(--wine);
  color: white;
  display: grid;
  place-items: center;
}
.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 38px 28px 80px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--wine);
  margin: 0 0 10px;
}
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 10px 0 34px;
}
.hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.04em;
  line-height: 1.3;
  margin: 0 0 12px;
  font-weight: 700;
}
.hero p {
  margin: 0;
  color: var(--muted);
}
.hero-note {
  background: linear-gradient(130deg, #59061e, #901d43);
  color: #fff;
  border-radius: 22px;
  padding: 22px 28px;
  max-width: 320px;
  font-size: 14px;
  flex-shrink: 0;
}
.hero-note strong {
  display: block;
  font-size: 18px;
  margin-bottom: 5px;
}
.hero-note p {
  color: #f9e4ec;
}
.searchbar {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 210px 240px auto;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.searchbar label {
  margin: 0;
}
.searchbar button {
  align-self: end;
}
.input,
input,
select {
  width: 100%;
  border: 1px solid #d8c9d0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  min-height: 48px;
}
.searchbar label span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 5px;
  color: var(--muted);
}
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 28px;
}
.catalog-search {
  margin: 0 0 28px;
}
.catalog-search > summary {
  cursor: pointer;
  width: fit-content;
  padding: 10px 0;
  color: var(--wine);
  font-weight: 600;
}
.catalog-search .searchbar {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  margin-bottom: 12px;
}
.category-pills .pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.purchase-terms {
  margin: 20px 0;
  padding: 16px;
  border-radius: 14px;
  background: #fff3f6;
}
.purchase-terms h2 {
  font-size: 16px;
  margin: 0 0 10px;
}
.purchase-terms small {
  font-size: 14px;
  color: var(--muted);
}
.shelf-access {
  padding: 12px;
  border-radius: 12px;
  background: #f7f5f6;
  margin: 10px 0;
}
.shelf-access p {
  margin: 6px 0 0;
}
.pill {
  font-size: 14px;
  padding: 9px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 99px;
}
.pill.active {
  background: var(--wine);
  border-color: var(--wine);
  color: white;
}
.results-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin: 0 0 18px;
}
.results-line h2 {
  font-size: 22px;
  margin: 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 14px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px #59061e0d;
}
.cover {
  aspect-ratio: 16/9;
  background: #f3edf0;
  overflow: hidden;
  display: block;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cardbody {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cardmeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.tag {
  display: inline-block;
  background: var(--rose);
  color: var(--wine);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
}
.card h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.6;
  margin: 0 0 10px;
}
.teacher {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
}
.card-bottom {
  margin-top: auto;
}
.meta {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}
.price {
  color: var(--wine);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.4;
}
.oldprice {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-decoration: line-through;
  margin-left: 8px;
}
.card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.card-actions form {
  margin: 0;
  flex: 1;
}
.btn {
  border: 1px solid var(--wine);
  border-radius: 12px;
  padding: 12px 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--wine);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  min-height: 48px;
  text-align: center;
  line-height: 1.5;
}
.btn:hover {
  background: #761134;
}
.btn.secondary {
  background: white;
  color: var(--wine);
  border-color: #d7bcc7;
}
.btn.secondary:hover {
  background: var(--rose);
}
.btn.quiet {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}
.btn.full {
  width: 100%;
}
.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.success,
.error,
.notice {
  border-radius: 14px;
  padding: 14px 18px;
  margin: 0 0 22px;
  font-size: 14px;
}
.success {
  color: #16533b;
  background: #eaf7ef;
  border: 1px solid #c5e5d1;
}
.error {
  background: #fff0f0;
  color: #951f2e;
  border: 1px solid #eab9c1;
}
.notice {
  background: #fff4e4;
  color: #715126;
  border: 1px solid #f0dabd;
}
.breadcrumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 26px;
}
.breadcrumbs a {
  color: var(--wine);
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: start;
}
.detail-title {
  font-size: clamp(26px, 3.5vw, 37px);
  line-height: 1.5;
  margin: 14px 0;
}
.detail-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #f5f1f3;
  border-radius: 20px;
  border: 1px solid var(--line);
  margin-bottom: 28px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  margin-bottom: 22px;
}
.panel h2 {
  font-size: 22px;
  margin: 0 0 18px;
}
.purchase {
  position: sticky;
  top: 112px;
}
.purchase .price {
  font-size: 34px;
}
.purchase p {
  color: var(--muted);
  font-size: 14px;
}
.purchase .btn {
  margin-top: 10px;
}
.purchase .test-label {
  color: var(--wine);
  background: var(--rose);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}
.facts {
  display: grid;
  gap: 10px;
  padding: 18px 0;
  margin: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 14px;
}
.facts span:first-child {
  color: var(--muted);
}
.prose {
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.prose h3 {
  font-size: 18px;
}
.prose a {
  text-decoration: underline;
}
.module {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.module:first-child {
  border-top: 0;
}
.module summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  padding-right: 10px;
}
.module summary span {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}
.lesson-list {
  padding: 0;
  list-style: none;
  margin: 16px 0 0;
}
.lesson {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 0;
  border-top: 1px solid #f0e9ec;
  font-size: 14px;
}
.lesson-num {
  color: #9a8290;
  font-size: 12px;
  min-width: 26px;
  padding-top: 3px;
}
.lesson-title {
  flex: 1;
}
.lesson-state {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.included {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.included img {
  width: 110px;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.included strong {
  font-size: 15px;
}
.included p {
  font-size: 13px;
  margin: 5px 0;
  color: var(--muted);
}
.included:hover strong {
  text-decoration: underline;
}
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}
.cart-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 20px;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-bottom: 16px;
  align-items: start;
}
.cart-item img {
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  aspect-ratio: 16/9;
  object-fit: contain;
}
.cart-item h2 {
  font-size: 18px;
  margin: 8px 0;
}
.cart-item p {
  font-size: 13px;
  margin: 5px 0;
  color: var(--muted);
}
.remove {
  background: transparent;
  color: #925367;
  border: 0;
  padding: 8px 0;
  font-size: 13px;
  text-decoration: underline;
}
.total-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 12px 0;
  font-size: 14px;
}
.total-line.charge {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
  font-size: 18px;
  font-weight: 700;
}
.total-line.charge strong {
  font-size: 26px;
  color: var(--wine);
}
.empty {
  text-align: center;
  border: 1px dashed #d7bcc7;
  border-radius: 24px;
  padding: 60px 24px;
  background: white;
}
.empty h2 {
  margin: 0 0 8px;
  font-size: 24px;
}
.empty p {
  color: var(--muted);
  margin: 0 0 26px;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  max-width: 1060px;
  margin: 12px auto;
  gap: 50px;
  align-items: start;
}
.auth-intro {
  padding: 42px 0;
}
.auth-intro h1 {
  font-size: 40px;
  line-height: 1.4;
  margin: 16px 0;
}
.auth-intro p {
  color: var(--muted);
}
.steps {
  margin-top: 32px;
  display: grid;
  gap: 20px;
}
.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 15px;
}
.step b {
  background: var(--rose);
  color: var(--wine);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.form-card {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid label {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.form-grid input,
.form-grid select {
  margin-top: 8px;
}
.form-grid .span2 {
  grid-column: 1/-1;
}
.field-help {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-top: 6px;
}
.field-error {
  display: block;
  color: #9a2034;
  font-size: 13px;
  font-weight: 400;
  margin-top: 6px;
}
.form-card h2 {
  font-size: 23px;
  margin: 0 0 6px;
}
.form-card > p {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 26px;
}
.form-actions {
  margin-top: 26px;
}
.form-actions p {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin: 20px 0 0;
}
.form-actions a {
  color: var(--wine);
  text-decoration: underline;
}
.receipt {
  max-width: 780px;
  margin: auto;
}
.receipt-heading {
  text-align: center;
  padding: 20px 0 32px;
}
.checkmark {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  background: #e7f5ec;
  color: var(--green);
  font-size: 34px;
}
.receipt-heading h1 {
  font-size: 32px;
  margin: 18px 0 8px;
}
.receipt-heading p {
  color: var(--muted);
  margin: 0;
}
.receipt .included {
  justify-content: space-between;
}
.receipt-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}
.shelf-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 30px;
}
.shelf-heading h1 {
  font-size: 34px;
  margin: 0;
}
.active-tag {
  background: #e7f5ec;
  color: var(--green);
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 12px;
}
.footer {
  border-top: 1px solid var(--line);
  padding: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: white;
}
.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 36px;
}
.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 14px 22px;
  font-size: 14px;
}
.stat strong {
  display: block;
  font-size: 26px;
  color: var(--wine);
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  background: var(--rose);
  padding: 14px 18px;
  white-space: nowrap;
}
.data-table td {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.data-table .muted {
  font-size: 12px;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.history {
  list-style: none;
  padding: 0;
}
.history li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 1050px) {
  .searchbar {
    grid-template-columns: 1fr 1fr;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav {
    gap: 12px;
    padding: 12px 20px;
  }
  .navlink {
    padding: 9px 10px;
  }
  .hero-note {
    max-width: 270px;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .auth-layout {
    gap: 28px;
  }
  .auth-intro h1 {
    font-size: 32px;
  }
}
@media (max-width: 720px) {
  .nav {
    flex-wrap: wrap;
    gap: 8px;
    min-height: unset;
    padding: 10px 16px;
  }
  .brand {
    font-size: 18px;
  }
  .brand img {
    width: 37px;
    height: 37px;
  }
  .brand small {
    font-size: 10px;
  }
  .navlinks {
    gap: 0;
    flex: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .navlink {
    font-size: 13px;
    padding: 8px;
  }
  .navlink .nav-name {
    display: none;
  }
  .shell {
    padding: 26px 18px 55px;
  }
  .hero {
    display: block;
    padding: 0 0 25px;
  }
  .hero-note {
    max-width: none;
    margin-top: 22px;
    padding: 15px 20px;
  }
  .hero-note strong {
    font-size: 15px;
  }
  .hero-note p {
    font-size: 13px;
  }
  .searchbar {
    padding: 14px;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
  }
  .searchbar label:first-of-type {
    grid-column: 1/-1;
  }
  .searchbar button {
    grid-column: 1/-1;
  }
  .searchbar select {
    font-size: 14px;
  }
  .grid {
    gap: 16px;
  }
  .cardbody {
    padding: 17px;
  }
  .card h3 {
    font-size: 17px;
  }
  .cardmeta {
    flex-wrap: wrap;
  }
  .card-actions {
    flex-wrap: wrap;
  }
  .card-actions .btn {
    font-size: 14px;
    padding: 10px;
  }
  .teacher {
    font-size: 12px;
  }
  .price {
    font-size: 21px;
  }
  .detail-grid,
  .cart-layout,
  .auth-layout,
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .purchase {
    position: static;
    grid-row: 1;
  }
  .detail-title {
    font-size: 27px;
  }
  .auth-intro {
    padding: 0;
  }
  .auth-intro h1 {
    font-size: 30px;
  }
  .steps {
    display: none;
  }
  .form-card {
    padding: 24px;
  }
  .cart-item {
    grid-template-columns: 100px 1fr;
    gap: 15px;
    padding: 18px;
  }
  .cart-item > .price {
    grid-column: 2;
  }
  .cart-item h2 {
    font-size: 16px;
  }
  .shelf-heading {
    align-items: flex-start;
  }
  .shelf-heading h1 {
    font-size: 28px;
  }
  .receipt .included {
    flex-wrap: wrap;
  }
  .included img {
    width: 85px;
  }
  .panel {
    padding: 22px;
  }
  .meta {
    flex-wrap: wrap;
    gap: 6px;
  }
  .lesson-state {
    white-space: normal;
    text-align: right;
    max-width: 85px;
  }
  .topbar .navlinks .navlink {
    min-height: 40px;
  }
}
@media (max-width: 440px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span2 {
    grid-column: auto;
  }
  .brand small {
    display: none;
  }
  .navlink {
    font-size: 12px;
    padding: 7px;
  }
  .navlinks {
    flex-basis: 100%;
    justify-content: space-between;
  }
  .nav {
    justify-content: center;
  }
  .hero h1 {
    font-size: 32px;
  }
  .card h3 {
    font-size: 20px;
  }
  .teacher {
    font-size: 14px;
  }
  .card-actions {
    flex-wrap: nowrap;
  }
  .shelf-heading {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
  .card:hover {
    transform: none;
  }
}
.nav-logout {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  color: #79646e;
  font-size: 13px;
}
.navlinks form,
.admin-account form {
  margin: 0;
}
.account-dialog {
  color: #31151e;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  padding: 28px;
  border: 1px solid #eadfe3;
  border-radius: 24px;
  box-shadow: 0 24px 100px #28061238;
}
.account-dialog::backdrop {
  background: #21131a88;
  backdrop-filter: blur(4px);
}
.account-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.account-dialog h2 {
  font-size: 24px;
  margin: 0;
}
.account-dialog [data-close-account] {
  border: 0;
  background: #f8f2f4;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}
.account-dialog p {
  color: #79646e;
}
.account-dialog label {
  display: block;
  margin: 18px 0;
}
.account-dialog input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px;
  border: 1px solid #d9cdd2;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
}
.account-dialog input:focus {
  outline: 3px solid #f4d9e2;
  border-color: #7b1434;
}
.account-dialog-links,
.account-dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}
.account-dialog .error {
  color: #991b1b;
}
.account-dialog [hidden] {
  display: none;
}
.course-search-picker { position: relative; min-width: 0; color: var(--ink); }
.course-search-picker summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.course-search-picker summary::-webkit-details-marker { display: none; }
.course-search-picker summary::after { content: '⌄'; flex: none; }
.course-search-picker[open] summary { border-color: var(--wine); }
.course-search-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(420px, calc(100vw - 48px)); z-index: 30; background: white; padding: 16px; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 40px #3e092226; }
.course-search-panel label, .course-shelf-search label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
.course-search-panel input, .course-shelf-search input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background: white; font-size: 16px; }
.course-search-results { display: grid; gap: 5px; max-height: min(330px, 45vh); overflow-y: auto; margin-top: 12px; }
.course-search-results button { text-align: left; font: inherit; font-size: 14px; padding: 12px; border: 0; background: white; color: var(--ink); border-radius: 10px; cursor: pointer; line-height: 1.6; }
.course-search-results button:hover, .course-search-results button:focus-visible { background: #faf0f4; }
.course-search-results button[aria-pressed=true] { background: #f4e5eb; color: var(--wine); font-weight: 600; }
.course-search-count { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.course-shelf-search { display: flex; gap: 20px; align-items: end; margin-bottom: 24px; }
.course-shelf-search label { width: min(100%, 460px); }
.course-shelf-search p { white-space: nowrap; color: var(--muted); font-size: 14px; }
[data-shelf-course][hidden], .course-search-results button[hidden], [data-course-picker][hidden] { display: none !important; }
