  .ptf-wrap{
    /* ベースカラー（70%） */
    --base:#FFFFFF;
    --base-light:#FAFAFA;
    --base-dark:#F5F5F5;
    /* メインカラー（25%） */
    --main:#1e3a5f;
    --main-light:#2d5a8f;
    --main-dark:#0f1e3a;
    /* アクセントカラー（5%） */
    --accent:#d4af37;
    --accent-light:#f4cf5f;
    --accent-dark:#b8941f;
    /* テキスト */
    --text:#2C3E50;
    --text-light:#7F8C8D;
    /* ボーダー・シャドウ */
    --border:#E8E8E8;
    --shadow:0 4px 20px rgba(30,58,95,.10);
    --shadow-hover:0 8px 30px rgba(30,58,95,.15);
    --danger:#c0392b;
    --sidebar-w:300px;
  }
  *{box-sizing:border-box;margin:0;padding:0}
  .ptf-wrap{
    font-family:"Yu Gothic","Hiragino Kaku Gothic ProN",Meiryo,system-ui,sans-serif;
    color:var(--text);
    background:#f0f4f8;
    height:100vh;
    overflow:hidden;
    display:flex;
  }

  /* ===== 左サイドバー ===== */
  .ptf-sidebar{
    width:var(--sidebar-w);
    flex-shrink:0;
    height:100vh;
    display:flex;
    flex-direction:column;
    background:var(--main);
    box-shadow:4px 0 20px rgba(30,58,95,.18);
    position:relative;
    overflow:hidden;
  }
  /* 光沢アニメ */
  .ptf-sidebar::before{
    content:"";
    position:absolute;
    inset:0 auto 0 -150%;
    width:250%;
    background:linear-gradient(90deg,transparent,rgba(212,175,55,.10),transparent);
    animation:shine 5s infinite;
    pointer-events:none;
  }
  @keyframes shine{0%{transform:translateX(0)}100%{transform:translateX(60%)}}

  /* タイトルブロック */
  .ptf-sidebar-title{
    flex-shrink:0;
    padding:22px 20px 18px;
    border-bottom:2px solid rgba(212,175,55,.35);
    position:relative;
    z-index:1;
  }
  .ptf-sidebar-title h1{
    font-size:20px;
    font-weight:900;
    color:#fff;
    letter-spacing:.04em;
    line-height:1.3;
  }
  .ptf-sidebar-title h1 span{
    display:block;
    font-size:12px;
    font-weight:700;
    color:rgba(255,255,255,.6);
    letter-spacing:.06em;
    margin-bottom:5px;
  }

  /* サイドバー本体（スクロールしない） */
  .ptf-sidebar-body{
    flex:1;
    display:flex;
    flex-direction:column;
    padding:16px 16px 14px;
    gap:12px;
    overflow:hidden;
    position:relative;
    z-index:1;
    min-height:0;
  }

  /* ドロップゾーン */
  .ptf-drop{
    flex-shrink:0;
    border:2px dashed rgba(255,255,255,.30);
    background:rgba(255,255,255,.07);
    border-radius:16px;
    padding:16px 12px;
    text-align:center;
    cursor:pointer;
    transition:.2s;
  }
  .ptf-drop:hover,.drop.dragover{
    border-color:var(--accent);
    background:rgba(212,175,55,.10);
  }
  .ptf-drop-icon{font-size:32px;line-height:1;margin-bottom:7px}
  .ptf-drop strong{font-size:14px;color:#fff;display:block}
  .ptf-drop small{font-size:11px;color:rgba(255,255,255,.6);display:block;margin-top:4px;line-height:1.5}
  input[type="file"]{display:none}

  /* ファイル名入力 */
  .ptf-field{display:flex;flex-direction:column;gap:5px;flex-shrink:0}
  .ptf-field label{font-size:11px;font-weight:900;color:rgba(255,255,255,.7);letter-spacing:.05em}
  .field input{
    border:2px solid rgba(255,255,255,.18);
    border-radius:12px;
    padding:10px 12px;
    font-size:14px;
    font-weight:800;
    color:#fff;
    background:rgba(255,255,255,.10);
    outline:none;
    transition:.2s;
  }
  .ptf-field input::placeholder{color:rgba(255,255,255,.35)}
  .ptf-field input:focus{border-color:var(--accent);background:rgba(212,175,55,.08)}

  /* ボタン */
  .ptf-btn{
    border:0;
    border-radius:14px;
    padding:12px 14px;
    font-weight:900;
    font-size:14px;
    cursor:pointer;
    transition:.2s;
    user-select:none;
    width:100%;
    flex-shrink:0;
  }
  .ptf-btn:hover:not(:disabled){transform:translateY(-2px)}
  .ptf-btn:disabled{opacity:.38;cursor:not-allowed;transform:none}
  .ptf-btn-make{
    background:linear-gradient(135deg,var(--accent-light),var(--accent));
    color:var(--main-dark);
    box-shadow:0 4px 14px rgba(212,175,55,.30);
  }
  .ptf-btn-clear{
    background:rgba(255,255,255,.10);
    color:rgba(255,255,255,.75);
    border:2px solid rgba(255,255,255,.18);
  }
  .ptf-btn-clear:hover:not(:disabled){background:rgba(192,57,43,.25);border-color:rgba(192,57,43,.5);color:#fff}

  /* 画質ボタン */
  .ptf-quality-btns{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-top:4px}
  .ptf-qbtn{
    border:2px solid rgba(255,255,255,.18);
    background:rgba(255,255,255,.08);
    color:rgba(255,255,255,.7);
    border-radius:10px;
    padding:8px 4px;
    font-size:12px;
    font-weight:900;
    cursor:pointer;
    transition:.15s;
  }
  .ptf-qbtn:hover{border-color:var(--accent);color:#fff}
  .ptf-qbtn-active{
    background:var(--accent);
    border-color:var(--accent);
    color:var(--main-dark);
  }

  /* 2カラムフィールド */
  .ptf-field-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex-shrink:0}
  .ptf-field select{
    border:2px solid rgba(255,255,255,.18);
    border-radius:12px;
    padding:10px 10px;
    font-size:13px;
    font-weight:800;
    color:#fff;
    background:rgba(255,255,255,.10);
    outline:none;
    transition:.2s;
    width:100%;
    appearance:none;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.6)' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 10px center;
    padding-right:28px;
    cursor:pointer;
  }
  .ptf-field select:focus{border-color:var(--accent);background-color:rgba(212,175,55,.10)}
  .ptf-field select option{background:var(--main-dark);color:#fff}

  /* ステータス */
  .ptf-status{
    flex-shrink:0;
    background:rgba(255,255,255,.09);
    border:1px solid rgba(212,175,55,.30);
    border-radius:12px;
    padding:10px 12px;
    font-size:12px;
    font-weight:800;
    color:rgba(255,255,255,.85);
    line-height:1.5;
    min-height:42px;
  }

  /* ===== 右メインエリア ===== */
  .ptf-main{
    flex:1;
    height:100vh;
    display:flex;
    flex-direction:column;
    min-width:0;
  }

  /* メインヘッダー */
  .ptf-main-head{
    flex-shrink:0;
    padding:14px 20px 10px;
    border-bottom:2px solid var(--border);
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
  }
  .ptf-main-head-title{
    font-size:14px;
    font-weight:900;
    color:var(--main);
    display:flex;
    align-items:center;
    gap:8px;
  }
  .ptf-main-head-title::before{
    content:"";
    display:block;
    width:4px;
    height:18px;
    background:var(--accent);
    border-radius:3px;
  }
  .ptf-count-badge{
    background:var(--main);
    color:#fff;
    border-radius:999px;
    font-size:11px;
    font-weight:900;
    padding:2px 9px;
  }

  /* カードリスト */
  .ptf-list-wrap{
    flex:1;
    overflow-y:auto;
    padding:14px 18px 18px;
    min-height:0;
  }
  .ptf-list-wrap::-webkit-scrollbar{width:6px}
  .ptf-list-wrap::-webkit-scrollbar-track{background:transparent}
  .ptf-list-wrap::-webkit-scrollbar-thumb{background:rgba(30,58,95,.18);border-radius:3px}

  .ptf-empty{
    border:2px dashed var(--border);
    border-radius:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    min-height:260px;
    color:var(--text-light);
    font-weight:900;
    font-size:14px;
    background:#fff;
    line-height:1.8;
  }

  /* カード（横長1行） */
  .ptf-card{
    background:#fff;
    border:2px solid var(--border);
    border-radius:16px;
    display:flex;
    align-items:center;
    gap:14px;
    padding:10px 14px 10px 10px;
    margin-bottom:9px;
    box-shadow:0 2px 10px rgba(30,58,95,.06);
    transition:.15s;
  }
  .ptf-card:last-child{margin-bottom:0}
  .ptf-card:hover{border-color:rgba(30,58,95,.20);box-shadow:var(--shadow-hover)}

  /* 番号 */
  .ptf-card-num{
    flex-shrink:0;
    width:28px;
    height:28px;
    background:var(--main);
    color:#fff;
    border-radius:8px;
    font-size:13px;
    font-weight:900;
    display:flex;
    align-items:center;
    justify-content:center;
  }

  /* サムネイル */
  .ptf-card-thumb{
    flex-shrink:0;
    width:64px;
    height:48px;
    border-radius:10px;
    overflow:hidden;
    background:repeating-conic-gradient(#f0f0f0 0 25%,#fff 0 50%) 50%/12px 12px;
    border:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .ptf-card-thumb img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    display:block;
  }

  /* ファイル名・サイズ */
  .ptf-card-info{
    flex:1;
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:3px;
  }
  .ptf-card-name{
    font-size:13px;
    font-weight:900;
    color:var(--main);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .ptf-card-sub{
    font-size:11px;
    color:var(--text-light);
    font-weight:700;
  }

  /* 操作ボタン群 */
  .ptf-card-actions{
    flex-shrink:0;
    display:flex;
    gap:6px;
  }
  .ptf-mini{
    border:1px solid var(--border);
    background:#fafafa;
    border-radius:9px;
    padding:7px 10px;
    font-size:13px;
    font-weight:900;
    color:var(--main);
    cursor:pointer;
    transition:.15s;
    line-height:1;
  }
  .ptf-mini:hover{border-color:var(--accent);background:#fffdf4}
  .ptf-mini:disabled{opacity:.3;cursor:not-allowed}
  .ptf-mini-del{color:var(--danger);border-color:rgba(192,57,43,.25)}
  .ptf-mini-del:hover{background:#fff5f5;border-color:var(--danger)}

  /* フッターノート */
  .ptf-footer-note{
    flex-shrink:0;
    padding:8px 18px 10px;
    font-size:11px;
    font-weight:700;
    color:var(--text-light);
    background:#fff;
    border-top:1px solid var(--border);
    text-align:center;
  }

  /* トースト */
  .ptf-toast{
    position:fixed;
    left:50%;
    bottom:20px;
    transform:translateX(-50%) translateY(80px);
    background:var(--main);
    color:#fff;
    border:2px solid var(--accent);
    padding:11px 20px;
    border-radius:999px;
    font-weight:900;
    font-size:14px;
    box-shadow:0 12px 28px rgba(0,0,0,.18);
    opacity:0;
    transition:.25s;
    z-index:99;
    white-space:nowrap;
  }
  .ptf-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
