/* Strip Studio — layout on top of the booth's shared theme (style.css). */

.studio-body {
  min-height: 100svh;
  display: block;
}

.studio-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 40px) 4px;
  flex-wrap: wrap;
}
.studio-back {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  opacity: .7;
  text-decoration: none;
}
.studio-back:hover { opacity: 1; }
.studio-title {
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: clamp(22px, 4vw, 34px);
  margin: 0;
  flex: 1;
}
.studio-title .kr { font-family: var(--display-kr); font-weight: 900; color: var(--accent); font-size: .9em; }
.studio-head .big-button { margin-top: 0; padding: 12px 18px; font-size: 14px; }
.studio-sub {
  font-size: 12px;
  opacity: .65;
  margin: 0 clamp(16px, 4vw, 40px) 10px;
  max-width: 70ch;
}

.studio-main {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  align-items: flex-start;
  padding: 8px clamp(16px, 4vw, 40px) 60px;
  flex-wrap: wrap;
}

.stage-wrap { flex: 1 1 420px; min-width: 300px; max-width: 620px; }

.cell-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.cell-tab {
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: 14px;
  width: 40px; height: 40px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(19,19,19,.9);
}
.cell-tab.active { background: var(--ink); color: #fff; }
.cell-tab.filled::after { content: "•"; color: var(--accent); margin-left: 2px; }

.stage {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 6px 6px 0 rgba(19,19,19,.9);
  overflow: hidden;
  background:
    repeating-conic-gradient(#e9e6df 0% 25%, #f4f1ea 0% 50%) 50% / 28px 28px;
  aspect-ratio: 4 / 3;
}
#cell-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.drop-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .08em;
  color: rgba(19,19,19,.45);
  cursor: pointer;
}
.drop-hint:hover { color: rgba(19,19,19,.7); }
/* author `display:flex` above outranks the UA `[hidden]{display:none}`, so hide
   explicitly once a cell has content — otherwise the hint keeps eating clicks. */
.drop-hint[hidden] { display: none; }
.stage.dragover { outline: 4px dashed var(--accent); outline-offset: -8px; }
.stage-note { font-size: 11px; opacity: .55; margin: 10px 2px 0; }

/* control panel */
.panel { flex: 1 1 260px; min-width: 240px; max-width: 340px; display: flex; flex-direction: column; gap: 16px; }
.tool-group {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(19,19,19,.9);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tool-label { font-family: var(--mono); font-size: 11px; letter-spacing: .22em; opacity: .6; margin: 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.layer-row { margin-top: 4px; }

.studio-btn {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(19,19,19,.9);
  transition: transform .1s ease, box-shadow .1s ease, background .1s ease;
  color: var(--ink);
}
.studio-btn:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 rgba(19,19,19,.9); }
.studio-btn:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 rgba(19,19,19,.9); }
.studio-btn.wide { width: 100%; }
.studio-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.studio-btn.danger { color: #b3261e; }
.studio-btn[disabled] { opacity: .5; cursor: progress; }

.ctl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
}
.ctl-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.ctl-row input[type="color"] { width: 40px; height: 28px; border: 2px solid var(--ink); border-radius: 6px; background: none; cursor: pointer; }

#text-input {
  width: 100%;
  font-family: var(--mono);
  font-size: 13px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 8px;
  resize: vertical;
}

.seg { display: flex; gap: 0; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.seg-btn {
  flex: 1;
  font-family: var(--mono);
  font-size: 12px;
  background: var(--paper);
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
}
.seg-btn.active { background: var(--ink); color: #fff; }

.hint { font-size: 11px; opacity: .6; line-height: 1.5; margin: 2px 0 0; }

.studio-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  z-index: 50;
  max-width: 90vw;
}

@media (max-width: 760px) {
  .studio-main { flex-direction: column; }
  .stage-wrap, .panel { max-width: none; width: 100%; }
}
