*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body { font-family: 'Nunito', sans-serif; background: #0d0d0d; color: #fff; min-height: 100vh; }

    .navbar { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 1.5rem; background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.08); position: sticky; top: 0; z-index: 100; }
    .nav-logo  { font-size: 1.1rem; font-weight: 800; }
    .nav-badge { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #f4c842; background: rgba(244,200,66,.12); border: 1px solid rgba(244,200,66,.25); padding: .25rem .75rem; border-radius: 50px; }
    .nav-step  { font-size: .8rem; color: rgba(255,255,255,.4); }

    .editor-layout { display: flex; height: calc(100vh - 56px); overflow: hidden; }

    .left-panel { width: 340px; flex-shrink: 0; background: #111; border-right: 1px solid rgba(255,255,255,.07); padding: 1rem; overflow-y: auto; height: 100%; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent; }
    .left-panel::-webkit-scrollbar { width: 4px; }
    .left-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

    .right-panel { flex: 1; background: #0d0d0d; padding: 1.5rem; overflow-y: auto; height: 100%; display: flex; flex-direction: column; align-items: center; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent; }
    .right-panel::-webkit-scrollbar { width: 4px; }
    .right-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

    .panel-section { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 1rem; margin-bottom: .85rem; }
    .section-label { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: .75rem; }

    .field { margin-bottom: .75rem; }
    .field:last-child { margin-bottom: 0; }
    .field label { display: block; font-size: .72rem; font-weight: 600; color: rgba(255,255,255,.4); margin-bottom: .3rem; }
    .field input[type="text"], .field textarea { width: 100%; font-family: 'Nunito', sans-serif; font-size: .88rem; font-weight: 600; color: #fff; background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.1); border-radius: 8px; padding: .55rem .75rem; outline: none; resize: none; transition: border-color .2s; }
    .field textarea { height: 80px; line-height: 1.6; }
    .field input[type="text"]:focus, .field textarea:focus { border-color: rgba(244,200,66,.5); background: rgba(255,255,255,.08); }
    .field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.2); font-weight: 400; }

    /* Color picker row */
    .color-picker-row { display: flex; align-items: center; gap: .65rem; }
    .color-picker-row input[type="color"] {
      width: 44px; height: 36px;
      border: 1.5px solid rgba(255,255,255,.15);
      border-radius: 8px; cursor: pointer;
      padding: 2px; background: rgba(255,255,255,.06);
      flex-shrink: 0;
    }
    .color-picker-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; border-radius: 5px; }
    .color-picker-row input[type="color"]::-webkit-color-swatch { border: none; border-radius: 5px; }
    .color-hex-display { font-size: .78rem; font-weight: 700; color: rgba(255,255,255,.5); font-family: monospace; letter-spacing: .04em; }

    .upload-zone { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem; border: 2px dashed rgba(255,255,255,.15); border-radius: 8px; cursor: pointer; font-size: .8rem; color: rgba(255,255,255,.4); position: relative; transition: border-color .2s, color .2s; }
    .upload-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
    .upload-zone:hover { border-color: rgba(244,200,66,.4); color: #f4c842; }

    .share-section { background: linear-gradient(135deg, rgba(244,200,66,.08), rgba(232,80,106,.06)); border: 1.5px solid rgba(244,200,66,.2); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
    .share-section .section-label { color: #f4c842; }
    #generate-btn { width: 100%; padding: .8rem; font-family: 'Nunito', sans-serif; font-size: .9rem; font-weight: 800; background: linear-gradient(135deg, #f4c842, #e8506a); color: #1a0010; border: none; border-radius: 10px; cursor: pointer; transition: transform .15s, box-shadow .15s; box-shadow: 0 4px 16px rgba(244,200,66,.2); }
    #generate-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(244,200,66,.3); }
    .result-area { display: none; margin-top: .75rem; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; overflow: hidden; }
    .result-area.show { display: block; }
    .result-url { display: block; padding: .6rem .8rem; font-size: .7rem; color: rgba(255,255,255,.5); word-break: break-all; border-bottom: 1px solid rgba(255,255,255,.07); line-height: 1.5; }
    .result-actions { display: flex; }
    .result-btn { flex: 1; padding: .55rem; font-family: 'Nunito', sans-serif; font-size: .75rem; font-weight: 700; border: none; background: transparent; color: rgba(255,255,255,.5); cursor: pointer; transition: background .2s, color .2s; }
    .result-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
    .result-btn + .result-btn { border-left: 1px solid rgba(255,255,255,.07); }
    .result-btn.copied { color: #34d399; }

    /* Preview */
    .preview-topbar { width: 100%; max-width: 700px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-shrink: 0; }
    .preview-label { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.4); }
    .live-dot { font-size: .72rem; font-weight: 700; color: #34d399; display: flex; align-items: center; gap: .3rem; }
    .live-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #34d399; animation: pulse 1.5s infinite; flex-shrink: 0; }
    @keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.3;transform:scale(.65)} }

    #preview-card { width: 100%; max-width: 700px; background: #0a0a0a; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }

    .prev-intro { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem 2rem; background: linear-gradient(160deg, #1a0030, #0a0a0a); transition: background .4s; }
    .prev-intro h1 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 800; margin-bottom: .75rem; }
    .prev-intro p  { color: rgba(255,255,255,.5); font-size: .95rem; margin-bottom: 1.5rem; }
    .scroll-hint   { font-size: .72rem; color: rgba(255,255,255,.28); letter-spacing: .1em; animation: bounce .9s ease-in-out infinite alternate; }
    @keyframes bounce { from{transform:translateY(0)} to{transform:translateY(6px)} }

    .prev-timeline { padding: 3rem 1.5rem; position: relative; transition: background .4s; }
    .timeline-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg,#f4c842,rgba(244,200,66,.2)); transform: translateX(-50%); }

    .tl-item { display: flex; margin-bottom: 3rem; position: relative; align-items: flex-start; }
    .tl-item.right { justify-content: flex-end; padding-right: calc(50% + 30px); }
    .tl-item.left  { justify-content: flex-start; padding-left: calc(50% + 30px); }
    .tl-item:last-child { margin-bottom: 0; }

    .tl-dot { position: absolute; left: 50%; top: 18px; width: 14px; height: 14px; background: #f4c842; border-radius: 50%; transform: translateX(-50%); z-index: 2; box-shadow: 0 0 0 4px rgba(244,200,66,.2); }

    .tl-card { background: #fff; color: #111; border-radius: 12px; padding: 1rem; width: 100%; max-width: 260px; transition: background .3s, color .3s; }
    .tl-year { display: inline-block; background: #f4c842; color: #111; font-size: .7rem; font-weight: 800; padding: .2rem .6rem; border-radius: 50px; margin-bottom: .5rem; }
    .tl-card h3 { font-size: .95rem; font-weight: 800; margin-bottom: .6rem; line-height: 1.3; }
    .tl-img-box { width: 100%; height: 130px; background: #e5e5e5; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; overflow: hidden; margin-bottom: .6rem; }
    .tl-img-box img { width: 100%; height: 100%; object-fit: cover; }
    .tl-caption { font-size: .78rem; color: #555; line-height: 1.5; transition: color .3s; }

    .prev-final { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem 2rem; background: linear-gradient(160deg, #0a0a0a, #1a0030); transition: background .4s; }
    .prev-final h2 { font-size: 1.7rem; font-weight: 800; margin-bottom: 1rem; }
    .prev-final p  { color: rgba(255,255,255,.7); font-size: .9rem; line-height: 1.75; max-width: 400px; margin-bottom: 1rem; white-space: pre-wrap; }
    .final-from    { color: #f4c842; font-weight: 700; font-size: .95rem; }
    .fp-box        { max-width: 160px; height: 160px; border-radius: 50%; overflow: hidden; margin: 1rem auto; border: 3px solid rgba(244,200,66,.4); display: none; align-items: center; justify-content: center; }
    .fp-box img    { width: 100%; height: 100%; object-fit: cover; }

    @media (max-width: 760px) {
      .editor-layout { flex-direction: column; height: auto; overflow: visible; }
      .left-panel  { width: 100%; height: auto; border-right: none; border-bottom: 1px solid rgba(255,255,255,.07); }
      .right-panel { height: auto; overflow: visible; }
      .tl-item.right { padding-right: calc(50% + 18px); }
      .tl-item.left  { padding-left:  calc(50% + 18px); }
      .tl-card { max-width: 210px; }
    }