:root {
  --bg: #f4efe6;
  --panel: rgba(255, 251, 245, 0.72);
  --panel-strong: rgba(255, 249, 240, 0.94);
  --text: #1f1b18;
  --muted: #62574c;
  --accent: #cd5c36;
  --accent-dark: #9d4122;
  --line: rgba(52, 38, 27, 0.12);
  --shadow: 0 18px 50px rgba(78, 51, 29, 0.16);

  --image-panel-width: 70vw;
  --image-panel-height: 100vh;

  --image-dropzone-panel-width: calc(0.9 * var(--image-panel-width));
  --image-dropzone-panel-height: calc(0.9 * var(--image-panel-height));

  --interface-panel-width: calc(100vw - var(--image-panel-width));
  --interface-panel-height: 100vh;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(205, 92, 54, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(87, 138, 114, 0.17), transparent 26%),
    linear-gradient(145deg, #f7f0e4 0%, #efe6da 48%, #efe1d1 100%);
}

/* MAIN PANELS */
#image-panel,
#grid,
#dropzone-panel,
#operations-panel {
    position: absolute;
    display: flex;
    align-items: center;
}

#image-panel {
    position: relative;
    left: 0px;
    top: 0px;
    width: var(--image-panel-width);
    height: var(--image-panel-height);
    justify-content: center; 
    background:
      radial-gradient(circle at top, rgba(255, 255, 255, 0.42), transparent 54%),
      linear-gradient(180deg, rgba(119, 86, 55, 0.08), rgba(64, 44, 28, 0.14));
}

#grid {
    inset: 0;
    z-index: 950;
    pointer-events: none;
    width: var(--image-panel-width);
    height: var(--image-panel-height);
}

#operations-panel {
    left: var(--image-panel-width);
    top: 0px;
    width: var(--interface-panel-width);
    height: 100vh;
    padding: 20px 18px;
    align-items: flex-start;
    background:
      linear-gradient(180deg, rgba(255, 250, 243, 0.94), rgba(246, 236, 224, 0.96));
    border-left: 1px solid rgba(80, 53, 33, 0.08);
    overflow-y: auto;
}


/* DROPZONE */

#dropzone-panel {
  inset: 0;
  margin: auto;
  justify-content: center;
  width: var(--image-dropzone-panel-width);
  height: var(--image-dropzone-panel-height);
}
#dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  z-index: 900;
  overflow: hidden;
  position: relative;
  touch-action: none;
  background: transparent;
  border: 0;
  outline: none;
  box-shadow: none;
}

#preview {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: center center;
  max-width: none;
  max-height: none;
  user-select: none;
  -webkit-user-drag: none;
  background: #ffffff;
  border: 0;
  outline: none;
  box-shadow: none;
}

#dropzone-label {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  color: #62574c;
  font-weight: 500;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}
#dropzone.dragover {
  background-color: rgba(205, 92, 54, 0.1);
}

.operations-shell {
  position: relative;
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 6px 2px 18px;
}

.operations-shell h1 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.tool-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.tool-group {
  display: block;
  padding: 10px 11px;
  border: 1px solid rgba(72, 47, 30, 0.1);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.82);
  box-shadow: 0 10px 24px rgba(78, 51, 29, 0.08);
}

.tool-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 7px;
  align-items: stretch;
}

.action-pill {
  appearance: none;
  border: 1px solid rgba(92, 62, 41, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--accent-dark);
  min-height: 34px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.15;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  text-align: left;
  vertical-align: middle;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    opacity 140ms ease,
    box-shadow 140ms ease;
}

.action-pill::before {
  content: none;
}

.action-pill:hover {
  color: var(--accent);
  background: rgba(255, 248, 242, 0.96);
  border-color: rgba(157, 65, 34, 0.24);
  box-shadow: 0 6px 16px rgba(78, 51, 29, 0.08);
}

.action-pill:active {
  opacity: 0.75;
}

.action-pill-accent {
  color: var(--accent);
  border-color: rgba(157, 65, 34, 0.24);
  background: rgba(255, 244, 238, 0.96);
}

.action-pill-accent::before {
  content: none;
}

#coloris-field {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
