:root {
  color-scheme: light;
  --text: #282124;
  --muted: #62565b;
  --wine: #802c43;
  --wine-deep: #482032;
  --paper: #f9f7f5;
  --line: #e8dfde;
  --white: #fff;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  --display: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--text); font: 1rem/1.5 var(--body); }
main.shell { min-height: calc(100vh - 156px); padding-top: 32px; padding-bottom: 48px; }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
a { color: var(--wine); text-underline-offset: .2em; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 2px solid #aa425e; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; letter-spacing: -.035em; line-height: 1.06; }
h1 { font-size: clamp(2.4rem, 5vw, 4.65rem); }
h2 { font-size: 2.45rem; }
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); font-size: 1.42rem; letter-spacing: -.065em; font-weight: 800; line-height: 1; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--wine); color: white; font: 1.2rem var(--display); }
.brand-sub { display: block; color: var(--muted); font-size: .73rem; font-weight: 600; letter-spacing: .01em; margin-top: 4px; white-space: nowrap; }
nav { display: flex; gap: 21px; align-items: center; font-size: .91rem; font-weight: 650; }
nav > a { text-decoration: none; color: var(--muted); }
nav > a[aria-current] { color: var(--wine); }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 5px; border-radius: 8px; padding: 8px 15px; border: 1px solid transparent; font-size: .91rem; font-weight: 700; text-decoration: none; }
.primary { background: var(--wine); color: white; }
.primary:hover { background: #692136; }
.secondary { background: white; color: var(--wine); border-color: var(--line); }
.secondary:hover { background: #f8eef0; }
.profile { position: relative; }
.profile summary { list-style: none; display: grid; place-items: center; background: #f2e7e9; color: var(--wine-deep); border-radius: 50%; width: 40px; height: 40px; overflow: hidden; cursor: pointer; }
.profile summary::-webkit-details-marker { display: none; }
.profile img { width: 100%; height: 100%; object-fit: cover; }
.profile-menu { position: absolute; z-index: 4; top: 50px; right: 0; min-width: 190px; background: white; border: 1px solid var(--line); box-shadow: 0 12px 30px #32213318; border-radius: 12px; padding: 14px; display: grid; gap: 9px; }
.profile-menu a, .text-button { color: var(--wine); font-size: .9rem; }
.text-button { padding: 0; border: 0; background: transparent; text-decoration: underline; }
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 282px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border-radius: 20px; background: radial-gradient(ellipse at 86% 30%, #742e49, transparent 62%), linear-gradient(110deg, #401d2c, #592339); padding: 38px 44px; color: #fff8f4; }
.hero::before, .hero::after { content: ""; z-index: -1; position: absolute; width: 370px; aspect-ratio: 1; border: 1px solid #e6a8b833; border-radius: 50%; right: -120px; top: -160px; }
.hero::after { width: 480px; right: -175px; top: -215px; }
.hero h1 { margin-top: 13px; }
.hero p { margin-top: 13px; max-width: 490px; color: #f3dfe4; }
.auction-state { display: inline-flex; gap: 7px; align-items: center; background: #ffffff19; color: #fff7f9; padding: 5px 11px; border-radius: 40px; font-size: .875rem; font-weight: 650; }
.auction-state span { background: #ecc3ae; width: 7px; height: 7px; border-radius: 50%; }
.auction-state.live span { background: #afe0b8; }
.auction-time { margin-top: 15px; font-size: .875rem; color: #f3dfe4; }
.hero-total { display: grid; align-content: center; gap: 5px; padding: 23px 26px; width: 232px; flex: 0 0 auto; border: 1px solid #f1c1cf57; border-radius: 14px; background: #fff0f313; color: #f8e6eb; font-size: .9rem; }
.hero-total strong { color: #fff8f4; font: 3rem/1.1 var(--display); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 34px 0 19px; }
.section-head p { color: var(--muted); margin-top: 5px; font-size: .92rem; }
.filter { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; white-space: nowrap; }
.filter button { border: 0; background: transparent; border-radius: 7px; color: var(--muted); padding: 7px 12px; font-size: .875rem; font-weight: 650; }
.filter button[aria-pressed="true"] { color: var(--wine-deep); background: #f0e2e5; }
.lot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 3px 8px #2b172206; scroll-margin-top: 20px; cursor: pointer; }
.card:target { outline: 2px solid var(--wine); }
.card:hover { border-color: #d7bec4; }
.photo-button { width: 100%; display: block; padding: 0; border: 0; border-radius: 13px 13px 0 0; overflow: hidden; background: #f0e6e9; }
.photo-button img, .photo-button .placeholder { display: block; width: 100%; aspect-ratio: 1.84; object-fit: cover; }
.placeholder { display: grid !important; place-content: center; background: radial-gradient(ellipse at 20% 5%, #fbede2, transparent 70%), linear-gradient(135deg,#edd0d8,#eee3e7); color: #9c6476; font-size: 2rem; }
.star { position: absolute; right: 11px; top: 11px; display: grid; place-items: center; width: 40px; height: 40px; color: var(--wine-deep); border: 1px solid #fff9; background: #fffdf7; border-radius: 50%; font: 1.5rem/1 var(--display); }
.star[aria-pressed="true"] { color: #80490b; background: #ffebca; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 16px 16px 13px; }
.lot-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .875rem; color: var(--muted); }
.donor { display: flex; align-items: center; gap: 6px; min-width: 0; }
.donor img { width: 22px; height: 22px; object-fit: cover; border-radius: 50%; }
.lot-meta > span:last-child { white-space: nowrap; }
.card h3 { margin-top: 5px; }
.title-button { border: 0; padding: 0; background: transparent; text-align: left; color: var(--text); font: 600 1.45rem/1.12 var(--display); letter-spacing: -.026em; }
.description { color: var(--muted); font-size: .96rem; line-height: 1.42; margin: 7px 0 14px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.card-bottom { margin-top: auto; padding-top: 11px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.price { display: grid; gap: 1px; }
.price span { color: var(--muted); font-size: .875rem; }
.price strong { color: var(--wine-deep); font-size: 1.36rem; line-height: 1.1; }
.bid-button { min-width: 69px; background: #f3e7ea; color: var(--wine); }
.bid-button:hover:not(:disabled) { background: #e9d4db; }
.leading { color: #326747; font-size: .875rem; margin-top: 6px; font-weight: 650; }
.site-footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding-block: 22px; color: var(--muted); font-size: .875rem; }
.empty { padding: 38px 22px; text-align: center; background: white; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.empty h1 { color: var(--text); margin-bottom: 12px; }
.form-panel { background: white; border: 1px solid var(--line); border-radius: 16px; max-width: 630px; margin: 12px auto; padding: clamp(19px, 4vw, 38px); }
.form-panel h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); margin-bottom: 20px; }
.form-panel > p { margin-bottom: 20px; color: var(--muted); }
.login { margin-top: clamp(30px, 9vh, 105px); max-width: 460px; }
.eyebrow { color: var(--wine); margin-bottom: 10px; font-size: .875rem; font-weight: 700; }
.stack { display: grid; gap: 15px; }
label { display: grid; gap: 6px; font-size: .92rem; font-weight: 650; }
label small { color: var(--muted); font-size: .875rem; font-weight: 400; }
input, textarea { width: 100%; border: 1px solid #d9cdd0; background: #fff; color: var(--text); border-radius: 8px; padding: 9px 10px; }
textarea { resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
.form-panel .demo-hint { margin: 16px 0 0; font-size: .875rem; overflow-wrap: anywhere; }
.notice { padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; font-size: .92rem; }
.notice.error { background: #f9e9ed; color: #77253d; }
.notice.success { background: #e7f2eb; color: #245737; }
.admin-heading { margin: 8px 0 20px; }
.admin-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: start; }
.admin-grid .form-panel { margin: 0; width: 100%; max-width: none; }
.admin-grid h2 { margin-bottom: 18px; }
.admin-auction { border-top: 1px solid var(--line); padding-block: 12px; }
.admin-auction summary { cursor: pointer; }
.admin-auction summary span { display: block; margin-left: 17px; color: var(--muted); font-size: .875rem; }
.admin-auction form, .report { margin-top: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row > * { min-width: 0; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; accent-color: var(--wine); }
.users-heading { margin-top: 22px; }
.users { padding: 0; list-style: none; }
.users li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 6px; border-top: 1px solid var(--line); }
.users li > div { min-width: 0; }
.users span { display: block; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
dialog { width: min(670px, calc(100% - 30px)); max-height: calc(100% - 36px); border: 1px solid var(--line); border-radius: 16px; padding: clamp(15px, 4vw, 26px); color: var(--text); }
dialog::backdrop { background: #23111fc0; }
#bid-dialog { max-width: 460px; }
#bid-dialog::backdrop { background: #23111f82; }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 14px; }
.dialog-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); overflow-wrap: anywhere; }
.icon-close { border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--text); flex: 0 0 39px; height: 39px; font-size: 1.35rem; line-height: 1; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 17px; }
.detail-actions .price { margin-right: auto; }
.detail-photos { display: grid; gap: 9px; }
.detail-photos img { display: block; width: 100%; max-height: 410px; object-fit: contain; border-radius: 8px; background: var(--paper); }
.detail-photos .placeholder { min-height: 130px; border-radius: 8px; }
.detail-donor { color: var(--muted); margin-top: 11px; font-size: .91rem; }
.detail-description { margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
#bid-item { margin-bottom: 13px; font-weight: 650; }
.confirm-total { display: flex; justify-content: space-between; align-items: center; background: #f8edf0; color: var(--wine-deep); padding: 9px 12px; margin: 12px 0; border-radius: 8px; }
.confirm-total strong { font-size: 1.3rem; }
@media (max-width: 850px) {
  .shell { width: calc(100% - 36px); }
  .hero { padding: 26px; }
  .hero-total { width: 180px; padding: 16px; }
  .lot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  main.shell { padding-top: 17px; }
  .shell { width: calc(100% - 28px); }
  .header-inner { min-height: 66px; gap: 8px; }
  .brand { gap: 6px; font-size: 1.2rem; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  nav { gap: 8px; }
  nav > a[aria-current="page"]:first-child { display: none; }
  nav .button { padding-inline: 8px; font-size: .83rem; }
  .profile summary { width: 34px; height: 34px; }
  .hero { align-items: stretch; flex-direction: column; gap: 15px; min-height: 0; padding: 20px; }
  .hero-total { width: auto; padding: 11px 14px; grid-template-columns: 1fr auto; align-items: center; }
  .hero-total strong { font-size: 2.2rem; grid-column: 2; grid-row: 1 / span 2; }
  .hero-total span:last-child { grid-column: 1; }
  .section-head { margin-top: 24px; }
  .section-head h2 { font-size: 2rem; }
  .filter button { padding-inline: 7px; }
  .lot-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

.lot-management { display: flex; gap: 6px; }
.trash-button { min-width: 42px; padding-inline: 8px; }
.trash-button:hover { background: #fae7ec; }
.lot-editor { margin-top: 16px; }
.edit-photos { margin: 0; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.edit-photos legend { padding-inline: 5px; font-size: .92rem; font-weight: 650; }
.edit-photo-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; }
.edit-photo-list label { color: var(--muted); font-size: .875rem; }
.edit-photo-list img { display: block; width: 100%; aspect-ratio: 1.6; object-fit: cover; border-radius: 5px; }
.edit-photo-list input { width: auto; accent-color: var(--wine); }
@media (max-width: 540px) {
  .detail-actions { flex-wrap: wrap; }
}

.account-avatar { display: flex; align-items: center; gap: 12px; }
.account-avatar img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }
.account-delete { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
