:root { --b:#e5e7eb; --muted:#6b7280; --gray100:#f3f4f6; --gray50:#f9fafb; }

.panel { background:#fff; border:1px solid var(--b); border-radius:14px; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.pad   { padding:10px; }

#hpt-bottom-grid { display:grid; grid-template-columns: 1fr 1.15fr; gap:16px; align-items:start; }
@media (max-width: 980px){ #hpt-bottom-grid { grid-template-columns: 1fr; } }

.acc { border:1px solid var(--b); border-radius:10px; background:var(--gray100); }
.acc summary{
  list-style:none; cursor:pointer; padding:10px 12px; font-weight:600; font-size:13px;
  display:flex; align-items:center; justify-content:space-between;
  background:var(--gray100); border-radius:10px;
}
.acc summary::-webkit-details-marker{ display:none; }
.acc .caret{ transition:transform .2s ease; }
.acc[open] .caret{ transform:rotate(90deg); }
.acc .acc-body{
  padding:10px 12px 12px; border-top:1px dashed var(--b);
  background:var(--gray100); border-radius:0 0 10px 10px;
}

.hpt-info{
  background:#fff; border:1px solid var(--b); border-radius:10px;
  padding:10px; font-size:12px; color:#444; line-height:1.6;
}

#hpt-app button{
  padding:4px 8px !important;
  font-size:11px !important;
  line-height:1.1 !important;
  border-radius:8px !important;
}
#hpt-apply-reinhard, #hpt-reset {
  border: 1px solid #d4d4d4; border-radius:10px; background:#f7f7f7; color:#111; cursor:pointer; font-size:12px;
}
#hpt-apply-reinhard:hover, #hpt-reset:hover { background:#efefef; }
#hpt-dl { border:1px solid #111; border-radius:10px; background:#111; color:#fff; cursor:pointer; font-size:12px; }
#hpt-dl:hover { background:#000; }

.hpt-uploader{ border:2px dashed #d1d5db; border-radius:12px; padding:10px; text-align:center; background:#fff; margin-bottom:8px; }
.hpt-uploader-title{ font-size:12px; }
.hpt-uploader-note{ font-size:11px; color:#777; margin:6px 0 0; }
.hpt-row{ margin-top:6px; }
.hpt-lab{ display:block; font-size:12px; font-weight:600; }
.hpt-status{
  display:none;margin:8px 0;padding:8px 10px;border-radius:8px;background:#fff3cd;border:1px solid #ffe08a;color:#7a5b00;font-size:12px;
}

#hpt-tools{
  flex:0 0 64px; max-width:64px; min-width:54px;
  background:#ebefe7; border:1px solid var(--b); border-radius:14px; padding:8px;
  display:flex; flex-direction:column; align-items:center; gap:8px; height:auto; overflow:auto;
}
#hpt-tools .tool-stack{ display:flex; flex-direction:column; gap:8px; width:100%; align-items:center; }
#hpt-tools .tool-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; aspect-ratio:1/1; border:1px solid #d4d4d4; background:#e5e5e5;
  border-radius:10px; cursor:pointer; font-size:16px; user-select:none;
}
#hpt-tools .tool-btn.active{ background:#888; color:#ffe8b6; border-color:#ffe8b6; }
#hpt-tools .tool-btn .icon{ width:20px; height:20px; display:block; }

.hpt-stage{
  position:relative; width:100%; max-width:100%; margin:0 auto;
  user-select:none; touch-action:none; background:#f9fafb; overflow:hidden; min-height:360px;
}
.hpt-layer{ position:absolute; inset:0; width:100%; height:100%; }
.hpt-handle{ position:absolute; top:0; height:100%; width:2px; background:#111; cursor:ew-resize; touch-action:none; }
.hpt-handle-dot{ position:absolute; top:50%; transform:translate(-50%, -50%); left:0; width:20px; height:20px; border-radius:50%; background:#111; border:3px solid #fff; box-shadow:0 1px 2px rgba(0,0,0,.3); }

.hpt-viewrow{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.hpt-cropbox{ border-top:1px dashed var(--b); padding-top:10px; }
.hpt-croplab{ font-weight:600; font-size:12px; margin-bottom:6px; }
.hpt-cropbtns{ display:flex; gap:8px; flex-wrap:wrap; }
.hpt-crop-info{ font-size:12px; color:#444; margin-top:6px; }
.hpt-subtle{ font-size:12px; color:#6b7280; margin-top:8px; }

/* Top control row (drawbar) */
#hpt-drawbar{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:8px; font-size:12px; }
#hpt-drawbar label{ display:inline-flex; gap:6px; align-items:center; }
#hpt-drawbar select,
#hpt-drawbar input[type="number"]{
  padding:4px 6px; border:1px solid #d1d5db; border-radius:8px; font-size:12px; min-width:56px;
  font-weight:400;
}
#hpt-drawbar .pill{ padding:4px 8px; border:1px dashed #d1d5db; border-radius:999px; background:#f9fafb; }
.btn{ border:1px solid #111; background:#fff; cursor:pointer; }
.btn-dark{ background:#111; color:#fff; }

/* Ensure top Apply Crop text is black */
#hpt-top-crop-apply{ color:#000; }

/* CSS Fullscreen */
.hpt-fs{
  position:fixed !important; inset:0 !important; width:100vw !important; height:100vh !important; max-width:100vw !important;
  margin:0 !important; padding:12px !important; z-index:9999 !important; background:#fff !important;
}
.hpt-fs > div[style*="display:flex"]{ height:calc(100vh - 24px); }
.hpt-fs #hpt-menu{ height:100%; overflow:auto; }
.hpt-fs #hpt-right{ height:100%; display:flex; flex-direction:column; }
.hpt-fs #hpt-viewer-panel{ flex:1 1 auto; display:flex; flex-direction:column; overflow:auto; }
.hpt-fs #hpt-stage{ flex:0 0 auto; height:auto !important; min-height:0; }

#hpt-app:fullscreen #hpt-viewer-panel{ overflow:auto; }
#hpt-app:fullscreen #hpt-stage{ flex:0 0 auto; height:auto !important; min-height:0; }
.hpt-fs #hpt-layers, .hpt-fs #hpt-canvas-base, .hpt-fs #hpt-canvas-norm, .hpt-fs #hpt-canvas-crop, .hpt-fs #hpt-canvas-anno{
  width:100% !important; height:100% !important;
}

/* =========================
   Requested UI tweaks
   ========================= */

/* (A) Separate the control row from the image view */
#hpt-drawbar{
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--b);
  background: #fff;
}

/* (B) REMOVE the “Active tool” readout completely */
#hpt-active-tool { display:none !important; }
label[for="hpt-active-tool"] { display:none !important; }
#hpt-active-tool-wrap { display:none !important; }

/* (C) Make the color picker narrower (icon-size) */
#hpt-color{
  width: 36px;
  padding: 0 2px;
}

/* Keep these compact widths */
#hpt-font-family{
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#hpt-font-size, #hpt-stroke{
  width: 64px;
}
