.studio-main {
  padding-top: 150px;
  padding-bottom: 80px;
}
.studio-heading,
.library-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 40px;
}
.studio-heading h1 {
  font-size: clamp(38px, 4.5vw, 60px);
  line-height: 1.08;
  margin: 16px 0 20px;
}
.studio-heading p,
.library-heading p {
  color: #737d77;
  line-height: 1.6;
}
.studio-heading > .button {
  flex-shrink: 0;
}
.studio-gate {
  text-align: center;
  padding: 70px 24px;
  border: 1px solid #e4e9e5;
  border-radius: 32px;
  background: radial-gradient(ellipse at 50% 0, #e3f6ec, transparent 60%), #fff;
}
.gate-mark {
  display: block;
  font-size: 64px;
  color: #2b7051;
  margin-bottom: 20px;
}
.studio-gate h2 {
  font-size: 30px;
  margin-bottom: 18px;
}
.studio-gate p {
  color: #68766d;
  margin: 18px auto;
  max-width: 500px;
  line-height: 1.7;
}
.studio-gate .button {
  margin: 12px 6px;
}
.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: start;
}
.drawing-card,
.polish-card {
  border: 1px solid #e3e8e4;
  border-radius: 28px;
  background: #ffffffdf;
  box-shadow: 0 16px 60px #253d2d06;
  overflow: hidden;
  min-width: 0;
}
.drawing-heading {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.art-title-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #87928b;
  min-width: 0;
}
.art-title-label input {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  letter-spacing: -0.5px;
  font-size: 21px;
  font-weight: 600;
  color: #28352c;
  margin-top: 9px;
}
.studio-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 100px;
  background: #ecf3ef;
  color: #52735e;
  font-size: 11px;
  white-space: nowrap;
}
.drawing-tools {
  border-top: 1px solid #edf0ed;
  border-bottom: 1px solid #edf0ed;
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.tool {
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 16px;
}
.tool span {
  font-size: 12px;
  margin-left: 3px;
}
.tool.active {
  background: #e0f3e8;
  color: #286346;
}
.color-control,
.size-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #68756c;
  margin: 0 4px;
}
.color-control input {
  width: 30px;
  height: 30px;
  padding: 2px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #fff;
}
.size-control input {
  width: 66px;
  accent-color: #42785b;
}
.size-control output {
  min-width: 14px;
}
.history-tools {
  margin-left: auto;
  display: flex;
}
.canvas-wrap {
  position: relative;
  aspect-ratio: 4/3;
  background: #fff;
}
#drawing-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
#canvas-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #a6b0a8;
}
#canvas-hint span {
  font-size: 45px;
  color: #c8d4cb;
  margin-bottom: 12px;
}
#canvas-hint p {
  font-size: 19px;
  margin-bottom: 8px;
}
.canvas-footer {
  padding: 18px 24px;
  border-top: 1px solid #edf0ed;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.canvas-footer > span {
  font-size: 11px;
  color: #8b948f;
}
.canvas-footer > div {
  display: flex;
  gap: 8px;
}
.canvas-footer .button {
  padding: 10px 16px;
  font-size: 12px;
}
.polish-card {
  padding: 25px;
}
.polish-card > .eyebrow {
  font-size: 9px;
  letter-spacing: 1.4px;
}
.polish-card h2 {
  font-size: 29px;
  line-height: 1.15;
  margin: 18px 0 12px;
}
.polish-card > p {
  font-size: 13px;
  color: #7a847e;
  line-height: 1.65;
}
#polish-modes {
  border: 0;
  margin: 22px 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
#polish-modes label {
  padding: 14px 12px;
  border: 1px solid #e5ebe6;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
#polish-modes label:has(input:checked) {
  background: #ebf7ef;
  border-color: #a8d7b9;
}
#polish-modes input,
.ai-consent input {
  accent-color: #397957;
  flex-shrink: 0;
}
#polish-modes strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
}
#polish-modes small {
  display: block;
  font-size: 11px;
  color: #88918a;
  margin-top: 5px;
  line-height: 1.5;
}
.ai-consent {
  display: flex;
  align-items: start;
  gap: 8px;
  font-size: 11px;
  color: #727e75;
  line-height: 1.6;
  margin: 16px 0;
}
.ai-consent input {
  margin-top: 3px;
}
#polish {
  width: 100%;
  font-size: 14px;
  padding: 14px 12px;
}
.polish-card .quiet-note {
  font-size: 11px;
  margin-top: 12px;
}
#result-panel {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #e4eae5;
}
.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 12px;
}
.result-heading h3 {
  font-size: 13px;
}
.result-heading .studio-pill {
  font-size: 9px;
  padding: 4px 6px;
}
#result-image {
  width: 100%;
  border-radius: 16px;
  border: 1px solid #edf0ed;
}
#apply-result {
  width: 100%;
  margin: 12px 0;
  font-size: 12px;
}
#download-result {
  display: block;
  text-align: center;
  font-size: 12px;
}
.studio-status {
  min-height: 24px;
  margin: 20px 4px;
  font-size: 14px;
  color: #48614f;
  line-height: 1.6;
}
.polish-progress {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.6;
}
.polish-progress p {
  color: #7a847e;
  font-size: 12px;
  margin-top: 7px;
}
.progress-shimmer {
  height: 6px;
  background: linear-gradient(90deg, #e5eee8, #79ae90, #e5eee8);
  background-size: 200%;
  animation: studio-shimmer 2s linear infinite;
  border-radius: 10px;
  margin-bottom: 16px;
}
@keyframes studio-shimmer {
  to {
    background-position: -200% 0;
  }
}
.library-section {
  padding-top: 55px;
  scroll-margin-top: 110px;
}
.library-heading h2 {
  font-size: 38px;
  line-height: 1.1;
  margin: 15px 0;
}
.library-heading p {
  font-size: 13px;
}
.library-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 28px;
}
.library-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.library-tabs button {
  border: 1px solid #e4e9e5;
  background: #fff;
  color: #718078;
  padding: 9px 15px;
  border-radius: 100px;
  font-size: 12px;
}
.library-tabs button[aria-pressed="true"] {
  background: #263c2e;
  color: #fff;
  border-color: #263c2e;
}
.library-search input {
  border: 1px solid #e0e7e1;
  border-radius: 100px;
  padding: 11px 17px;
  background: #fff;
  font-size: 13px;
  width: 200px;
  max-width: 100%;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.work-card {
  min-width: 0;
  border-radius: 22px;
  border: 1px solid #e4eae5;
  background: white;
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  text-align: left;
  padding: 0;
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 35px #263e2b12;
}
.work-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: #f5f8f5;
  display: block;
}
.work-card-copy {
  display: block;
  padding: 18px;
}
.work-card strong {
  display: block;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 7px;
}
.work-card small {
  display: block;
  color: #87918a;
  font-size: 11px;
}
.library-section > .quiet-note {
  margin-top: 25px;
  font-size: 12px;
  line-height: 1.7;
}
.library-empty {
  text-align: center;
  padding: 64px 20px;
  border: 1px dashed #d9e3dc;
  border-radius: 25px;
}
.library-empty > span {
  font-size: 42px;
  color: #a1beab;
  display: block;
  margin-bottom: 16px;
}
.library-empty h3 {
  font-size: 22px;
  margin-bottom: 12px;
}
.library-empty p {
  font-size: 14px;
  color: #869289;
}
.library-skeleton {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.library-skeleton > div {
  aspect-ratio: 1.1;
  background: #eaf0ec;
  border-radius: 22px;
}
.artwork-details {
  width: min(950px, calc(100% - 32px));
  max-height: 90vh;
  padding: 0;
  overflow: auto;
}
.artwork-details[open] {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
#detail-image {
  width: 100%;
  align-self: center;
}
.detail-copy {
  padding: 50px 28px 28px;
  min-width: 0;
}
.detail-copy h2 {
  font-size: 27px;
  margin: 14px 0 24px;
  overflow-wrap: anywhere;
}
.detail-copy dl {
  margin-bottom: 24px;
  font-size: 12px;
}
.detail-copy dt {
  color: #86918a;
  margin-top: 10px;
}
.detail-copy dd {
  overflow-wrap: anywhere;
  margin: 4px 0 0;
}
.detail-copy label {
  font-size: 12px;
  color: #7c8b80;
}
.detail-copy input {
  width: 100%;
  margin: 8px 0 16px;
  border: 1px solid #dae4dc;
  border-radius: 12px;
  padding: 12px;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-actions .button {
  font-size: 12px;
  padding: 11px 14px;
}
#detail-status {
  margin-top: 15px;
  font-size: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1050px) {
  .studio-layout {
    grid-template-columns: minmax(0, 1fr) 275px;
    gap: 16px;
  }
  .polish-card {
    padding: 20px;
  }
  .drawing-heading {
    padding: 20px;
  }
  .drawing-tools {
    padding: 10px;
  }
  .size-control {
    margin: 0;
  }
}
@media (max-width: 900px) {
  .studio-layout {
    grid-template-columns: 1fr;
  }
  .polish-card {
    display: block;
  }
  #polish-modes {
    grid-template-columns: repeat(3, 1fr);
  }
  #result-image {
    max-height: 350px;
    object-fit: contain;
  }
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .studio-main {
    padding-top: 120px;
  }
  .studio-heading,
  .library-heading {
    align-items: start;
    flex-direction: column;
    gap: 20px;
  }
  .studio-heading h1 {
    font-size: 40px;
  }
  .studio-heading p {
    font-size: 14px;
  }
  .drawing-heading {
    padding: 18px;
  }
  .studio-pill {
    font-size: 10px;
  }
  .art-title-label input {
    font-size: 18px;
  }
  #polish-modes {
    grid-template-columns: 1fr;
  }
  .drawing-tools {
    gap: 5px;
  }
  .tool {
    padding: 7px;
  }
  .tool span {
    display: none;
  }
  .canvas-footer {
    padding: 16px;
  }
  .library-heading h2 {
    font-size: 32px;
  }
  .library-tabs button {
    padding: 8px 12px;
  }
  .library-search,
  .library-search input {
    width: 100%;
  }
  .artwork-details[open] {
    grid-template-columns: 1fr;
  }
  #detail-image {
    max-height: 35vh;
    object-fit: contain;
  }
  .detail-copy {
    padding: 28px 22px;
  }
}
@media (max-width: 450px) {
  .library-grid {
    grid-template-columns: 1fr;
  }
  .studio-gate {
    padding: 45px 20px;
  }
  .drawing-heading {
    gap: 8px;
  }
  .size-control input {
    width: 45px;
  }
  .color-control {
    margin: 0;
  }
  .history-tools {
    margin-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .progress-shimmer {
    animation: none;
  }
  .work-card {
    transition: none;
  }
}
