
    :root {
      --bg-outer: #060a14;
      --panel-bg: rgba(13, 21, 38, 0.88);
      --gold: #e7c986;
      --gold-bright: #fff2cc;
      --text-main: #f8f4ea;
      --text-sub: #c6d0e0;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    html, body {
      min-height: 100%;
      background: radial-gradient(circle at 50% 0%, #172340 0%, var(--bg-outer) 74%);
      color: var(--text-main);
      font-family: "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 16px 14px 44px;
      gap: 14px;
    }

    /* Studio Control Bar */
    .studio-bar {
      width: 100%;
      max-width: 980px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 14px 16px;
      border-radius: 20px;
      background: var(--panel-bg);
      border: 1px solid rgba(231, 201, 134, 0.26);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }

    .bar-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .matrix-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .row-label {
      font-size: 11.5px;
      font-weight: 700;
      color: var(--gold);
      letter-spacing: 0.06em;
      min-width: 58px;
    }

    .seg {
      display: inline-flex;
      flex-wrap: wrap;
      background: rgba(255, 255, 255, 0.06);
      border-radius: 999px;
      padding: 3px;
      gap: 3px;
    }

    .btn {
      border: 1px solid rgba(255, 255, 255, 0.15);
      background: rgba(255, 255, 255, 0.06);
      color: var(--text-main);
      font-family: inherit;
      font-size: 12.5px;
      font-weight: 600;
      padding: 6px 12px;
      border-radius: 999px;
      cursor: pointer;
      transition: all 0.2s ease;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .btn:hover {
      border-color: var(--gold);
      background: rgba(231, 201, 134, 0.16);
      transform: translateY(-1px);
    }

    .btn:disabled {
      opacity: 0.55;
      cursor: wait;
      transform: none;
    }

    .btn.seg-btn {
      border: none;
      background: transparent;
      color: var(--text-sub);
      padding: 6px 12px;
    }

    .btn.seg-btn.active {
      background: linear-gradient(135deg, #f3dca4 0%, #c89f52 100%);
      color: #161108;
      box-shadow: 0 2px 10px rgba(231, 201, 134, 0.35);
    }

    .btn.sub-btn.active {
      background: rgba(231, 201, 134, 0.22);
      color: #fff4d2;
      border: 1px solid rgba(231, 201, 134, 0.72);
    }

    .btn.concept-btn.active {
      background: linear-gradient(135deg, #90e0ef 0%, #4895ef 100%);
      color: #091324;
      box-shadow: 0 2px 10px rgba(144, 224, 239, 0.35);
    }

    .btn.primary {
      background: linear-gradient(135deg, #f3dca4 0%, #c89f52 100%);
      color: #161108;
      border-color: transparent;
    }

    .btn.video-btn {
      background: linear-gradient(135deg, #ff758f 0%, #d90429 100%);
      color: #fff;
      border-color: transparent;
      box-shadow: 0 2px 12px rgba(217, 4, 41, 0.38);
    }

    .cinema-bar {
      display: none;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: center;
      font-size: 12px;
      color: var(--text-sub);
    }
    .cinema-bar.visible { display: flex; }

    /* Editor */
    .custom-panel {
      display: none;
      width: 100%;
      max-width: 980px;
      padding: 16px 18px;
      border-radius: 18px;
      background: rgba(13, 21, 38, 0.94);
      border: 1px solid rgba(231, 201, 134, 0.28);
    }
    .custom-panel.open { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
    .field { display: flex; flex-direction: column; gap: 5px; }
    .field.full { grid-column: 1 / -1; }
    .field label { font-size: 12px; color: var(--gold); font-weight: 600; }
    .field input, .field textarea {
      width: 100%; padding: 9px 12px; border-radius: 10px;
      border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.06);
      color: #fff; font-family: inherit; font-size: 13.5px; outline: none;
    }
    .field textarea { min-height: 82px; resize: vertical; line-height: 1.6; }

    /* Unified WYSIWYG Canvas Stage */
    .stage-wrap {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
    }

    .status-pill {
      font-size: 12px;
      color: var(--gold);
      letter-spacing: 0.04em;
      padding: 5px 14px;
      border-radius: 999px;
      background: rgba(231, 201, 134, 0.1);
      border: 1px solid rgba(231, 201, 134, 0.28);
    }

    .canvas-shell {
      position: relative;
      width: min(92vw, 415px);
      aspect-ratio: 9 / 16;
      border-radius: 26px;
      overflow: hidden;
      border: 1.5px solid rgba(231, 201, 134, 0.44);
      box-shadow: 0 32px 72px rgba(0, 0, 0, 0.68);
      transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1), aspect-ratio 0.4s ease;
    }

    .canvas-shell.ratio-1-1 {
      width: min(92vw, 540px);
      aspect-ratio: 1 / 1;
    }

    .canvas-shell.drag-over {
      box-shadow: 0 0 0 3px var(--gold), 0 32px 72px rgba(0, 0, 0, 0.72);
    }

    #stageCanvas {
      display: block;
      width: 100%;
      height: 100%;
    }

    .toast {
      position: fixed;
      bottom: 22px;
      left: 50%;
      transform: translateX(-50%) translateY(16px);
      background: rgba(12, 19, 34, 0.96);
      border: 1px solid var(--gold);
      color: var(--gold-bright);
      padding: 9px 18px;
      border-radius: 999px;
      font-size: 13px;
      opacity: 0;
      pointer-events: none;
      transition: all 0.28s ease;
      z-index: 40;
    }
    .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

    @media (max-width: 740px) {
      .bar-row { justify-content: center; }
      .custom-panel.open { grid-template-columns: 1fr; }
    }
  
html {display:block;padding:0} body {width:100%;padding:20px 12px 32px} .studio-bar{padding:16px}.brand{display:flex;align-items:center;gap:12px;width:100%;max-width:980px}.brand img{width:48px;height:48px;border-radius:14px;object-fit:cover}h1{font-size:20px}.brand p,footer,.delivery{font-size:13px;color:var(--text-sub);line-height:1.7}.brand p{margin-top:3px}.btn,.btn.seg-btn{min-height:44px}.seg{border-radius:18px}.canvas-shell{max-width:100%;transition:none}.status-pill{text-align:center;line-height:1.6;border-radius:14px}.delivery{max-width:680px;width:100%;padding:16px;border:1px solid #e7c98644;border-radius:16px}progress{width:100%;accent-color:var(--gold)}#exportResult{margin-top:10px}a.btn{text-decoration:none}.toast{width:max-content;max-width:92vw;border-radius:16px;text-align:center}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--gold);outline-offset:3px}.field input,.field textarea{font-size:16px}footer{margin-top:12px} @media(max-width:480px){.matrix-row{gap:6px}.row-label{width:100%}.bar-row{justify-content:flex-start}.btn{font-size:12px;padding:7px 10px}.studio-bar{gap:16px}.brand h1{font-size:19px}}

@media(max-width:480px){[aria-label="주제 카테고리"],[aria-label="인사 컨셉"]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.matrix-row:has(>[aria-label="주제 카테고리"]),.matrix-row:has(>[aria-label="인사 컨셉"]){width:100%}}
