.header-layout { grid-template-columns: auto 1fr auto; }
.header-layout .navigation { justify-content: center; gap: clamp(12px, 2vw, 29px); }
.header-actions { display: flex; align-items: center; gap: 7px; }
.header-actions .saved-nav { position: relative; }
.cart-nav { border-color: var(--cobalt); color: var(--cobalt); }
.icon-bag {
  position: relative;
  display: inline-block;
  flex: none;
  width: 15px;
  height: 13px;
  margin-top: 4px;
  border: 1.7px solid currentColor;
  border-radius: 2px;
}
.icon-bag::before {
  position: absolute;
  left: 3px;
  top: -6px;
  width: 6px;
  height: 6px;
  border: 1.7px solid currentColor;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  content: "";
}

.icon-person { position: relative; display: inline-block; flex: none; width: 15px; height: 17px; }
.icon-person::before, .icon-person::after { position: absolute; border: 1.7px solid currentColor; content: ""; }
.icon-person::before { width: 7px; height: 7px; left: 4px; top: 0; border-radius: 50%; }
.icon-person::after { width: 15px; height: 8px; bottom: 0; left: 0; border-radius: 8px 8px 2px 2px; }

.quiet-button { padding: 3px 0; border: 0; background: transparent; font-weight: 700; text-decoration: underline; text-underline-offset: .24em; }
.catalog-sort { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.catalog-sort select { max-width: 154px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--paper); font: inherit; }
.like-work {
  position: absolute;
  z-index: 1;
  top: 9px;
  right: 59px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid #19233b15;
  border-radius: 8px;
  background: var(--paper);
  font-size: 1.65rem;
  line-height: 1;
}
.like-work[aria-pressed="true"], #dialog-like[aria-pressed="true"] { color: #a52e56; border-color: #b06079; }
.like-work:hover, .quiet-button:hover { color: var(--cobalt); }
.purchase-block { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 17px; }
.price-note, .store-muted { color: var(--muted); font-size: .94rem; }
.dialog-actions .button { min-height: 41px; padding: 5px 9px; font-size: .9rem; }

.recent { margin: 0 0 clamp(32px, 5vw, 63px); }
.recent .display, .media-section .display { font-size: clamp(1.95rem, 4.7vw, 4.2rem); }
.recent-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 210px)); gap: 12px; }
.recent-item { overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: transparent; text-align: left; }
.recent-item img { aspect-ratio: 1.9; object-fit: cover; }
.recent-item span { display: block; padding: 7px 9px; font-weight: 700; }
.media-section { padding: 0 0 clamp(36px, 6vw, 76px); }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2vw, 27px); }
.video-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fffaf0; }
.video-card video { display: block; width: 100%; aspect-ratio: 1.68; background: #202636; }
.video-card h3 { margin: 13px 15px 3px; font-size: clamp(1.04rem, 2.2vw, 1.4rem); line-height: 1.25; }
.video-card p { margin: 0 15px 16px; color: var(--muted); font-size: .94rem; }
.studio-questions { margin-top: 16px; }
.studio-questions details { padding-block: 9px; border-top: 1px solid var(--line); }
.studio-questions summary { cursor: pointer; font-weight: 700; }
.studio-questions details p { margin-top: 6px; }
.footer-nav .quiet-button { font-size: .94rem; }

.store-dialog { width: min(660px, calc(100% - 24px)); }
.store-body { padding: 34px clamp(16px, 4vw, 36px) 25px; }
.store-body .display { margin: 0 35px 20px 0; font-size: clamp(1.8rem, 5.2vw, 3.2rem); }
.store-content { min-width: 0; }
.store-message:empty { display: none; }
.store-message { margin-top: 13px; color: var(--cobalt-dark); font-size: .94rem; }
.store-muted + .store-buttons, .store-muted + .login-form, .store-buttons + .store-muted { margin-top: 15px; }
.store-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cart-items { display: grid; gap: 11px; margin: 0 0 16px; padding: 0; list-style: none; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 12px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.cart-item img { width: 72px; height: 55px; border-radius: 6px; object-fit: cover; }
.cart-item h3 { font-size: 1rem; }
.cart-item p { color: var(--muted); font-size: .88rem; }
.cart-quantity { display: flex; gap: 5px; align-items: center; }
.cart-quantity button { display: grid; width: 34px; min-height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: transparent; font-size: 1.04rem; }
.cart-quantity output { min-width: 20px; text-align: center; }
button:disabled { cursor: default; opacity: .63; }
.login-form { display: grid; gap: 8px; }
.login-form input { width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid #aaa49a; border-radius: 7px; background: #fffcf5; color: var(--ink); }
.login-form .button { justify-self: start; }
.login-methods { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.login-methods button[aria-pressed="true"] { border-color: var(--cobalt); color: var(--cobalt); }

.helper { position: fixed; z-index: 3; right: max(17px, env(safe-area-inset-right)); bottom: max(15px, env(safe-area-inset-bottom)); width: min(335px, calc(100vw - 28px)); pointer-events: none; }
.helper-launch { display: flex; justify-content: flex-end; }
.helper-launch button {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 9px 8px 14px;
  border: 1px solid #d5ccee;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 5px 22px #19233b29;
  pointer-events: auto;
}
.helper-tip { font-size: .91rem; font-weight: 700; }
.robot { position: relative; display: block; width: 44px; height: 42px; }
.robot-frame {
  position: absolute; inset: 3px 5px 4px 2px; display: grid; place-items: center; transform: rotate(-7deg);
  border: 3px solid #2d49d4; border-radius: 8px; background: linear-gradient(135deg, #f8eed3 0 23%, #acbbfb 23% 38%, #e1e9ff 38% 100%);
  box-shadow: inset 0 0 0 2px #fbf7ed, 0 2px 3px #1629945c; animation: robot-hop 8s ease-in-out infinite;
}
.robot-frame::before { position: absolute; top: -6px; left: 12px; width: 8px; height: 5px; border-radius: 4px 4px 0 0; background: #2d49d4; content: ""; }
.robot-eyes { width: 4px; height: 5px; margin: -4px 8px 0 0; border-radius: 50%; background: #19233b; box-shadow: 8px 0 #19233b; animation: robot-blink 4.2s ease infinite; }
.robot-smile { position: absolute; top: 17px; left: 11px; width: 8px; height: 4px; border-bottom: 2px solid #19233b; border-radius: 0 0 8px 8px; }
.robot-hand { position: absolute; top: 10px; right: 1px; width: 7px; height: 13px; transform: rotate(25deg); transform-origin: bottom; border-radius: 4px; background: #2d49d4; animation: robot-wave 7s ease-in-out infinite; }
.helper-launch button:hover .robot-hand, .helper[data-open] .robot-hand { animation-duration: 1.1s; }
@keyframes robot-blink { 0%, 88%, 98%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.1); } }
@keyframes robot-hop { 0%, 81%, 100% { transform: rotate(-7deg); } 88% { transform: translateY(-4px) rotate(5deg); } 94% { transform: rotate(-10deg); } }
@keyframes robot-wave { 0%, 78%, 100% { transform: rotate(25deg); } 84%, 94% { transform: rotate(60deg); } 89% { transform: rotate(8deg); } }
.helper-panel {
  display: grid;
  grid-template-rows: auto minmax(60px, 1fr) auto auto;
  max-height: min(480px, calc(100dvh - 92px));
  min-height: min(357px, calc(100dvh - 92px));
  overflow: hidden;
  margin-bottom: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 0 9px 26px #19233b38;
  pointer-events: auto;
}
.helper-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--cobalt); color: white; }
.helper-head h2 { font-size: 1.23rem; }
.helper-head p { font-size: .88rem; }
.helper-head button { width: 40px; height: 40px; border: 1px solid #ffffff95; border-radius: 6px; background: transparent; font-size: 1.45rem; }
.help-log { overflow: auto; padding: 10px; }
.help-log p { width: fit-content; max-width: 94%; margin-bottom: 9px; padding: 8px 10px; border-radius: 9px; font-size: .91rem; overflow-wrap: anywhere; }
.help-log .reply { background: #eee8ff; }
.help-log .question { margin-left: auto; background: #e7eefb; }
.help-topics { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 9px 8px; }
.help-topics button { padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; background: transparent; font-size: .85rem; }
.help-form { display: flex; gap: 6px; padding: 7px 9px 9px; border-top: 1px solid var(--line); }
.help-form input { min-width: 0; flex: 1; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; background: #fffcf5; color: var(--ink); }
.help-form .button { min-height: 40px; }
.privacy-banner {
  position: fixed; z-index: 4; left: 15px; bottom: 15px; width: min(430px, calc(100% - 30px));
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 5px 25px #19233b2c;
}
.privacy-banner h2 { font-size: 1.04rem; }
.privacy-banner p { margin: 4px 0 9px; font-size: .89rem; }
.privacy-banner div { display: flex; flex-wrap: wrap; gap: 6px; }
.privacy-banner .button { min-height: 38px; padding: 5px 9px; font-size: .9rem; }
@media (min-width: 701px) and (max-width: 1000px) {
  .header-actions .nav-label { display: none; }
}
@media (max-width: 700px) {
  .header-layout { grid-template-columns: minmax(0, 1fr) auto; }
  .header-layout .navigation { justify-content: start; gap: clamp(8px, 3.2vw, 18px); }
  .header-actions { grid-row: 1; grid-column: 2; gap: 4px; }
  .header-actions .saved-nav { grid-row: auto; grid-column: auto; min-width: 37px; min-height: 41px; justify-content: center; padding-inline: 8px; }
  .header-actions .nav-label { display: none; }
  .header-actions .saved-count { position: absolute; top: -6px; right: -5px; min-width: 15px; padding: 0 3px; font-size: .69rem; }
  .video-grid { grid-template-columns: minmax(0, 1fr); }
  .recent-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .like-work { right: 50px; width: 36px; height: 38px; }
  .work-media .save-work { width: 36px; height: 38px; }
  .helper-tip { display: none; }
  .helper-launch button { padding: 5px 7px; }
  .helper { right: max(10px, env(safe-area-inset-right)); }
  .privacy-banner { bottom: 77px; }
  .cart-item { grid-template-columns: 47px minmax(0, 1fr) auto; gap: 7px; }
  .cart-item img { width: 47px; height: 43px; }
  .cart-quantity button { width: 28px; }
  .catalog-sort select { font-size: .88rem; }
}
@media (max-width: 365px) {
  .header-layout .navigation a { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
  .robot-frame, .robot-eyes, .robot-hand, .helper-launch button:hover .robot-hand { animation: none; }
}
