:root {
  color-scheme: light;
  --bg: #f1f2f4;
  --paper: #fbfbfa;
  --ink: #1b202b;
  --muted: #4d5667;
  --line: #cbd0d8;
  --blue: #2447d8;
  --blue-soft: #e2e8ff;
  --shadow: rgba(23, 40, 89, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
[hidden] { display: none !important; }

.page-shell { overflow: clip; }
.site-header, .hero, .catalog, .about, .site-footer { max-width: 1440px; margin-inline: auto; }
.site-header { min-height: 72px; padding: 0 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.wordmark { width: max-content; text-decoration: none; font-family: Arial Black, Arial, sans-serif; font-size: 29px; font-weight: 900; letter-spacing: -.095em; line-height: 1; }
.wordmark-mark { color: var(--blue); font-size: 21px; vertical-align: top; margin-left: 4px; letter-spacing: 0; }
.header-nav { display: flex; align-items: center; gap: 38px; }
.header-nav a { text-decoration: none; font-size: 13px; font-weight: 700; }
.header-nav a:hover, .site-footer a:hover { color: var(--blue); }
.header-link { justify-self: end; text-decoration: none; font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--ink); padding-bottom: 4px; white-space: nowrap; }
.header-link span { margin-left: 12px; font-size: 17px; }
.header-link:hover { color: var(--blue); border-color: var(--blue); }

.hero { min-height: 390px; display: grid; grid-template-columns: 1.08fr .92fr; border-bottom: 1px solid var(--line); }
.hero-copy { padding: 34px 20px 34px 48px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.hero-kicker { margin: 0 0 14px; color: var(--blue); font: 700 11px/1.2 'Courier New', monospace; letter-spacing: .13em; text-transform: uppercase; }
.hero h1 { margin: 0; font-family: Arial Black, Arial, sans-serif; font-size: clamp(64px, 6vw, 90px); line-height: .91; letter-spacing: -.085em; font-weight: 900; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero-description { max-width: 390px; margin: 18px 0 20px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.hero-cta { display: inline-flex; gap: 40px; align-items: center; justify-content: space-between; background: var(--blue); color: #fff; text-decoration: none; font-size: 13px; font-weight: 700; padding: 17px 20px; min-width: 225px; white-space: nowrap; }
.hero-cta span { font-size: 19px; line-height: 0; }
.hero-cta:hover { background: #1839bc; }
.hero-cta:active, .card-footer button:active, .saved-filter:active, .save-item:active { transform: translateY(1px); }
.hero-art { min-height: 390px; position: relative; overflow: hidden; background: var(--blue-soft); }
.hero-art::before { content: ''; position: absolute; width: 430px; height: 430px; border: 45px solid var(--blue); border-radius: 50%; left: 10%; top: 4%; opacity: .95; }
.hero-photo { position: absolute; overflow: hidden; background: #d0d4dc; box-shadow: 12px 12px 0 var(--shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo-main { width: 62%; height: 77%; left: 17%; top: 9%; transform: rotate(-7deg); }
.hero-photo-small { width: 43%; height: 43%; right: 0; bottom: -7%; transform: rotate(10deg); }
.hero-sticker { position: absolute; z-index: 1; width: 130px; height: 130px; left: 0; bottom: 20px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--blue); color: white; font-family: Arial Black, Arial, sans-serif; font-size: 16px; line-height: 1.02; letter-spacing: -.04em; transform: rotate(-14deg); }

.catalog { padding: 50px 48px 96px; }
.catalog-heading { max-width: 900px; margin-bottom: 28px; }
.catalog h2 { margin: 0; font-family: Arial Black, Arial, sans-serif; font-weight: 900; letter-spacing: -.075em; font-size: clamp(46px, 4.4vw, 64px); line-height: .98; }
.catalog h2 em { color: var(--blue); font-style: normal; }
.catalog-intro { margin: 18px 0 0; font-size: 16px; color: var(--muted); line-height: 1.5; }
.catalog-controls { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(180px, 260px) auto; align-items: end; gap: 16px; padding: 16px 0 20px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.control-field { display: flex; flex-direction: column; gap: 8px; }
.control-field label { font: 700 11px/1.2 'Courier New', monospace; letter-spacing: .02em; color: var(--muted); }
.input-wrap { position: relative; }
.search-symbol { position: absolute; left: 15px; top: 50%; transform: translateY(-54%); font-size: 25px; line-height: 1; pointer-events: none; color: var(--blue); }
.control-field input, .control-field select { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 0; background: var(--paper); color: var(--ink); font-size: 14px; }
.control-field input { padding: 0 14px 0 44px; }
.control-field input::placeholder { color: #596273; opacity: 1; }
.control-field select { padding: 0 36px 0 14px; cursor: pointer; }
.control-field input:focus, .control-field select:focus { border-color: var(--blue); }
.saved-filter { min-width: 160px; height: 48px; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); padding: 0 14px; display: flex; gap: 9px; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; white-space: nowrap; }
.saved-filter:hover, .saved-filter[aria-pressed="true"] { background: var(--blue); color: white; border-color: var(--blue); }
.saved-icon { font-size: 22px; line-height: 1; }
.saved-count { min-width: 20px; font: 700 12px 'Courier New', monospace; }
.catalog-status { display: flex; align-items: center; gap: 14px; margin: 18px 0; font: 700 12px 'Courier New', monospace; color: var(--muted); }
.catalog-status #result-count { color: var(--ink); }
.status-rule { width: 34px; height: 1px; background: var(--line); }

.workshop-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 26px; align-items: start; }
.workshop-card { grid-column: span 6; min-width: 0; background: var(--paper); border: 1px solid var(--line); position: relative; }
.workshop-card:nth-child(4n+1), .workshop-card:nth-child(4n+4) { grid-column: span 7; }
.workshop-card:nth-child(4n+2), .workshop-card:nth-child(4n+3) { grid-column: span 5; }
.workshop-card::before { content: ''; position: absolute; z-index: 1; left: 16px; top: 16px; width: 17px; height: 17px; border: 5px solid var(--paper); border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 1px rgba(22,35,70,.2); }
.card-media { height: 275px; overflow: hidden; background: #d4d8e0; }
.workshop-card:nth-child(4n+1) .card-media, .workshop-card:nth-child(4n+4) .card-media { height: 320px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.workshop-card:hover .card-media img { transform: scale(1.035); }
.card-body { padding: 19px 24px 0; border-top: 2px dashed var(--line); }
.card-topline, .card-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-topline { color: var(--blue); font: 700 11px 'Courier New', monospace; text-transform: uppercase; letter-spacing: .04em; }
.card-saved { margin-left: 15px; color: var(--blue); }
.card-price { color: var(--ink); font-size: 16px; letter-spacing: -.02em; }
.card-main { display: grid; grid-template-columns: 82px 1fr; gap: 22px; align-items: start; padding: 22px 0 24px; min-height: 169px; }
.date-block { display: flex; flex-direction: column; align-items: flex-start; color: var(--blue); line-height: 1; }
.date-block strong { font-family: Arial Black, Arial, sans-serif; font-size: 48px; letter-spacing: -.09em; }
.date-block span { font: 700 13px 'Courier New', monospace; margin-top: 3px; letter-spacing: .04em; }
.card-text h3 { margin: 2px 0 8px; font-family: Arial Black, Arial, sans-serif; font-size: clamp(25px, 2.5vw, 36px); line-height: 1.06; letter-spacing: -.065em; }
.card-text p { max-width: 450px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.card-footer { min-height: 58px; border-top: 1px solid var(--line); font: 700 12px 'Courier New', monospace; }
.card-footer button { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: var(--blue); font: 700 13px Arial, sans-serif; white-space: nowrap; padding: 16px 0 16px 12px; }
.card-footer button span { font-size: 20px; line-height: 0; }
.card-footer button:hover { text-decoration: underline; text-underline-offset: 3px; }

.empty-state, .load-error { min-height: 350px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 45px; background: var(--blue-soft); }
.empty-glyph { color: var(--blue); font-size: 80px; line-height: 1; margin-bottom: 12px; }
.empty-state h3, .load-error h3 { font-family: Arial Black, Arial, sans-serif; letter-spacing: -.06em; font-size: clamp(32px, 4vw, 50px); margin: 0 0 9px; }
.empty-state p, .load-error p { color: var(--muted); margin: 0 0 22px; line-height: 1.5; }
.empty-state button, .load-error button { border: 0; background: var(--blue); color: white; padding: 15px 18px; font-weight: 700; }
.empty-state button:hover, .load-error button:hover { background: #1839bc; }

.about { border-top: 1px solid var(--line); display: grid; grid-template-columns: 160px 1fr auto; gap: 26px; align-items: end; padding: 70px 48px 78px; }
.about-asterisk { font-size: 130px; line-height: .9; color: var(--blue); }
.about h2 { margin: 0 0 18px; font-family: Arial Black, Arial, sans-serif; font-size: clamp(40px, 4vw, 58px); letter-spacing: -.07em; line-height: 1; }
.about p { max-width: 520px; margin: 0; color: var(--muted); line-height: 1.55; }
.about-link { align-self: end; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 6px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.about-link span { margin-left: 22px; font-size: 19px; }
.about-link:hover { color: var(--blue); border-color: var(--blue); }
.site-footer { min-height: 90px; border-top: 1px solid var(--ink); padding: 25px 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
.footer-logo { color: var(--ink); font-family: Arial Black, Arial, sans-serif; font-size: 23px; letter-spacing: -.08em; }
.site-footer a { text-decoration: none; color: var(--ink); font-weight: 700; }

.detail-dialog { position: fixed; width: min(1080px, calc(100vw - 60px)); max-width: none; max-height: min(850px, calc(100dvh - 60px)); padding: 0; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); box-shadow: 15px 15px 0 var(--shadow); overflow: auto; }
.detail-dialog::backdrop { background: rgba(15, 23, 42, .68); }
.detail-layout { display: grid; grid-template-columns: 44% 56%; min-height: 590px; }
.detail-media { min-height: 590px; background: #d4d8e0; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-content { display: flex; flex-direction: column; padding: 28px 35px 35px; min-width: 0; }
.detail-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--blue); font: 700 11px 'Courier New', monospace; letter-spacing: .04em; }
.close-detail { border: 0; background: transparent; color: var(--ink); padding: 5px 0 5px 10px; display: flex; align-items: center; gap: 10px; font: 700 13px Arial, sans-serif; }
.close-detail span { font-size: 27px; font-weight: 400; line-height: .7; }
.close-detail:hover { color: var(--blue); }
.detail-heading { margin-top: 55px; }
.detail-category { color: var(--blue); font: 700 12px 'Courier New', monospace; text-transform: uppercase; }
.detail-heading h2 { font-family: Arial Black, Arial, sans-serif; font-size: clamp(42px, 4.4vw, 64px); letter-spacing: -.075em; line-height: .96; margin: 11px 0 18px; }
.detail-heading p { color: var(--muted); font-size: 16px; line-height: 1.55; margin: 0; max-width: 480px; }
.detail-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 21px 24px; padding: 31px 0 30px; margin-top: auto; }
.detail-facts div { display: flex; flex-direction: column; gap: 7px; }
.detail-facts span { color: var(--muted); font: 700 11px 'Courier New', monospace; }
.detail-facts strong { font-size: 14px; line-height: 1.3; }
.save-item { width: 100%; min-height: 52px; border: 1px solid var(--blue); background: var(--blue); color: white; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 14px; }
.save-item span { font-size: 23px; line-height: 1; }
.save-item[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue); }
.save-item:hover { filter: brightness(.94); }

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --bg: #151a24; --paper: #202633; --ink: #f2f4f8; --muted: #c1c9d7; --line: #485165; --blue: #92a8ff; --blue-soft: #252e49; --shadow: rgba(5, 8, 19, .45); }
  .hero-cta, .empty-state button, .load-error button, .saved-filter:hover, .saved-filter[aria-pressed="true"], .save-item:not([aria-pressed="true"]) { color: #111b3d; }
  .hero-cta:hover, .empty-state button:hover, .load-error button:hover { background: #aec0ff; }
  .hero-sticker { color: #111b3d; }
  .card-media, .detail-media, .hero-photo { background: #3a4355; }
  .control-field input::placeholder { color: #c1c9d7; }
}

@media (max-width: 900px) {
  .site-header { padding-inline: 30px; }
  .hero-copy { padding-left: 30px; }
  .catalog { padding-inline: 30px; }
  .about { padding-inline: 30px; grid-template-columns: 110px 1fr; }
  .about-link { grid-column: 2; justify-self: start; }
  .site-footer { padding-inline: 30px; }
  .card-main { grid-template-columns: 64px 1fr; gap: 14px; }
  .date-block strong { font-size: 40px; }
  .card-text h3 { font-size: 28px; }
}

@media (max-width: 767px) {
  .site-header { min-height: 64px; padding-inline: 20px; display: flex; justify-content: space-between; }
  .wordmark { font-size: 27px; }
  .header-nav { display: none; }
  .header-link { font-size: 12px; }
  .header-link span { margin-left: 5px; }
  .hero { display: flex; flex-direction: column; min-height: 0; }
  .hero-copy { padding: 45px 20px 32px; }
  .hero-kicker { margin-bottom: 14px; }
  .hero h1 { font-size: clamp(56px, 14.5vw, 80px); }
  .hero-description { margin: 20px 0 24px; font-size: 15px; }
  .hero-art { min-height: 315px; }
  .hero-art::before { width: 290px; height: 290px; border-width: 31px; left: 14%; top: -16%; }
  .hero-photo-main { width: 59%; height: 78%; left: 18%; top: 4%; }
  .hero-photo-small { width: 43%; height: 48%; right: -3%; bottom: -3%; }
  .hero-sticker { width: 88px; height: 88px; left: 3%; bottom: 10px; font-size: 11px; }
  .catalog { padding: 58px 20px 72px; }
  .catalog-heading { margin-bottom: 32px; }
  .catalog h2 { font-size: clamp(40px, 10vw, 56px); }
  .catalog-intro { font-size: 14px; }
  .catalog-controls { grid-template-columns: 1fr 1fr; gap: 12px; padding: 17px 0 20px; }
  .search-field { grid-column: 1 / -1; }
  .category-field { min-width: 0; }
  .saved-filter { min-width: 0; width: 100%; }
  .catalog-status { font-size: 11px; gap: 9px; margin: 19px 0; }
  .status-rule { width: 20px; }
  .workshop-grid { display: block; }
  .workshop-card { margin-bottom: 18px; }
  .card-media, .workshop-card:nth-child(4n+1) .card-media, .workshop-card:nth-child(4n+4) .card-media { height: 235px; }
  .card-body { padding: 16px 18px 0; }
  .card-main { min-height: 0; padding: 18px 0 20px; }
  .date-block span { font-size: 11px; }
  .card-text h3 { font-size: 27px; }
  .card-text p { font-size: 13px; }
  .card-footer { font-size: 11px; }
  .card-footer button { font-size: 12px; gap: 5px; }
  .about { display: block; padding: 55px 20px 64px; }
  .about-asterisk { font-size: 90px; margin-bottom: 24px; }
  .about h2 { font-size: 40px; }
  .about p { font-size: 14px; }
  .about-link { display: inline-block; margin-top: 27px; }
  .site-footer { min-height: 110px; padding: 22px 20px; flex-wrap: wrap; }
  .site-footer span:nth-child(2) { display: none; }
  .detail-dialog { width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border: 0; box-shadow: none; }
  .detail-layout { display: flex; flex-direction: column; min-height: 100%; }
  .detail-media { min-height: 250px; height: 30dvh; flex: none; }
  .detail-content { padding: 21px 22px 26px; flex: 1; }
  .detail-heading { margin-top: 31px; }
  .detail-heading h2 { font-size: clamp(38px, 10.8vw, 54px); }
  .detail-heading p { font-size: 14px; }
  .detail-facts { padding: 31px 0 26px; gap: 18px 14px; }
  .detail-facts strong { font-size: 13px; }
}

@media (max-width: 390px) {
  .hero h1 { font-size: 55px; }
  .catalog h2 { font-size: 39px; }
  .saved-filter { padding-inline: 9px; gap: 4px; }
  .card-main { grid-template-columns: 55px 1fr; gap: 11px; }
  .date-block strong { font-size: 37px; }
  .card-text h3 { font-size: 25px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-photo-main { animation: settle-main .7s both; }
  .hero-photo-small { animation: settle-small .85s .15s both; }
  .hero-sticker { animation: settle-sticker .65s .25s both; }
  .workshop-card { animation: card-in .35s both; animation-delay: calc(var(--card-index) * 55ms); }
  @keyframes settle-main { from { opacity: 0; transform: translateY(26px) rotate(-2deg); } to { opacity: 1; transform: translateY(0) rotate(-7deg); } }
  @keyframes settle-small { from { opacity: 0; transform: translateY(30px) rotate(4deg); } to { opacity: 1; transform: translateY(0) rotate(10deg); } }
  @keyframes settle-sticker { from { opacity: 0; transform: scale(.8) rotate(-24deg); } to { opacity: 1; transform: scale(1) rotate(-14deg); } }
  @keyframes card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
