:root {
  color-scheme: light;
  --ink: #242424;
  --muted: #77736f;
  --line: #ebe7e1;
  --paper: #fffdf9;
  --accent: #e85e4f;
  --accent-soft: #fff0ec;
  --shadow: 0 16px 50px rgba(49, 38, 26, .11);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: #f7f4ef; color: var(--ink); }
body { min-width: 320px; }
button { font: inherit; }
.sketch-map-app { width: min(1440px, 100%); min-height: 760px; margin: 0 auto; padding: 24px; }
.sketch-map-shell { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); min-height: 720px; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: var(--paper); box-shadow: var(--shadow); }
.map-panel { position: relative; min-height: 720px; background: #eeeae4; }
#sketch-map-canvas { position: absolute; inset: 0; }
.map-brand { position: absolute; z-index: 2; top: 22px; left: 22px; padding: 11px 16px; border-radius: 999px; background: rgba(255, 253, 249, .92); box-shadow: 0 8px 26px rgba(0,0,0,.08); font-size: 16px; font-weight: 700; letter-spacing: .04em; }
.map-count { position: absolute; z-index: 2; right: 22px; bottom: 22px; padding: 10px 14px; border-radius: 999px; background: rgba(36,36,36,.8); color: #fff; font-size: 13px; }
.info-panel { display: flex; min-width: 0; flex-direction: column; background: var(--paper); }
.info-header { padding: 30px 30px 20px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .15em; }
.info-header h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; }
.info-header p { margin: 11px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.location-list { display: flex; gap: 8px; overflow-x: auto; padding: 17px 30px 0; scrollbar-width: thin; }
.location-chip { flex: 0 0 auto; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: #5f5a54; cursor: pointer; font-size: 13px; transition: .2s ease; }
.location-chip:hover, .location-chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.location-detail { padding: 23px 30px 10px; }
.location-detail h2 { margin: 0; font-size: 22px; }
.location-address { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.artwork-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; overflow: auto; padding: 10px 30px 30px; }
.artwork-card { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; cursor: zoom-in; transition: transform .2s ease, box-shadow .2s ease; }
.artwork-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(49,38,26,.1); }
.artwork-card img { display: block; width: 100%; aspect-ratio: 1 / 1.18; object-fit: cover; background: #f1ede8; }
.artwork-meta { padding: 10px 11px 12px; }
.artwork-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.artwork-author { overflow: hidden; color: #3c3935; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.artwork-date { flex: 0 0 auto; color: #99928b; font-size: 11px; }
.artwork-title { overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.empty-state, .error-state { display: grid; place-items: center; min-height: 230px; padding: 32px; color: var(--muted); text-align: center; line-height: 1.7; }
.error-state { color: #b33d34; }
.loading-state { display: flex; min-height: 400px; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.loading-spinner { width: 18px; height: 18px; border: 2px solid #ded8d0; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(22, 19, 16, .8); }
.modal[hidden] { display: none; }
.modal-content { position: relative; max-width: min(920px, 100%); max-height: 100%; }
.modal-content img { display: block; max-width: 100%; max-height: calc(100vh - 100px); border-radius: 14px; object-fit: contain; }
.modal-caption { margin-top: 10px; color: #fff; font-size: 13px; text-align: center; }
.modal-close { position: absolute; top: -12px; right: -12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #fff; color: #333; cursor: pointer; font-size: 21px; line-height: 1; }
.amap-marker-label { border: 0; border-radius: 999px; padding: 6px 10px; background: rgba(36,36,36,.88); color: #fff; font-size: 12px; }
@media (max-width: 860px) {
  .sketch-map-app { min-height: 100vh; padding: 0; }
  .sketch-map-shell { display: block; min-height: 100vh; border: 0; border-radius: 0; }
  .map-panel { min-height: 48vh; height: 48vh; }
  .info-panel { min-height: 52vh; }
  .info-header { padding: 22px 18px 15px; }
  .location-list { padding-right: 18px; padding-left: 18px; }
  .location-detail { padding: 20px 18px 8px; }
  .artwork-grid { padding-right: 18px; padding-left: 18px; }
  .map-brand { top: 14px; left: 14px; }
  .map-count { right: 14px; bottom: 14px; }
}
@media (max-width: 420px) {
  .artwork-grid { gap: 10px; }
  .artwork-meta { padding: 8px 9px 10px; }
  .artwork-author { font-size: 12px; }
  .artwork-date { font-size: 10px; }
}
