/* Shared styles for the color tools. */
.toolsWrap {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
}
.toolPanel {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
    border-radius: 12px;
    background: rgba(127,127,127,.08);
}
.toolGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.toolCard {
    display: block;
    padding: 20px;
    border: 1px solid rgba(127,127,127,.25);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,.04);
}
.toolCard:hover {
    border-color: currentColor;
}
.toolCard h2,
.toolCard h3 {
    margin-top: 0;
}
.toolRow {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.toolInput,
.toolNumber,
.toolSelect {
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(127,127,127,.4);
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
}
.toolInput {
    flex: 1 1 320px;
}
.toolNumber {
    width: 110px;
}
.toolColorInput {
    width: 52px;
    height: 44px;
    padding: 3px;
    border: 1px solid rgba(127,127,127,.4);
    border-radius: 8px;
    background: transparent;
}
.toolButton {
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}
.toolSwatch {
    min-height: 120px;
    border-radius: 12px;
    border: 1px solid rgba(127,127,127,.25);
    margin: 18px 0;
}
.toolResultGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.toolResult {
    padding: 14px;
    border: 1px solid rgba(127,127,127,.22);
    border-radius: 10px;
    overflow-wrap: anywhere;
}
.toolResultLabel {
    font-size: .85em;
    opacity: .7;
    margin-bottom: 5px;
}
.toolResultValue {
    font-weight: 700;
}
.toolMessage {
    margin-top: 10px;
    min-height: 1.4em;
}
.toolSeo {
    max-width: 900px;
    margin: 36px auto 0;
    line-height: 1.65;
}
.toolSeo h2,
.toolSeo h3 {
    margin-top: 1.4em;
}
.mixRows {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}
.mixRow {
    display: grid;
    grid-template-columns: 52px minmax(130px,1fr) 110px auto;
    gap: 10px;
    align-items: center;
}
.mixRemove {
    min-width: 42px;
}
.contrastPreview {
    display: grid;
    place-items: center;
    min-height: 150px;
    padding: 20px;
    border-radius: 12px;
    font-size: 1.35em;
    font-weight: 700;
    margin-top: 18px;
}
.harmonyGroup {
    margin-top: 24px;
}
.harmonyPalette {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}
.harmonyColor {
    min-height: 105px;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: end;
    justify-content: center;
    border: 1px solid rgba(127,127,127,.25);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255,255,255,.5);
}
.imageDrop {
    display: block;
    max-width: 620px;
    margin: 18px auto;
    padding: 28px;
    text-align: center;
    border: 2px dashed rgba(127,127,127,.45);
    border-radius: 12px;
    cursor: pointer;
}
.imageDrop.dragging {
    border-style: solid;
}
.imagePreview {
    display: none;
    max-width: 180px;
    max-height: 180px;
    margin: 16px auto;
    object-fit: contain;
}
.imageToolLayout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr);
    gap: 20px;
    align-items: start;
}
.canvasContainer {
    position: relative;
}
#imageCanvas {
    display: block;
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 10px;
}
#canvasPointer {
    position: absolute;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 1px black, 0 1px 4px rgba(0,0,0,.5);
    pointer-events: none;
}
.imageResultSwatch {
    height: 70px;
    border-radius: 10px;
    border: 1px solid rgba(127,127,127,.3);
    margin: 10px 0;
}
.matchList {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.matchRow {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 10px;
    align-items: center;
}
.matchSwatch {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid rgba(127,127,127,.3);
}
.smallNote {
    font-size: .9em;
    opacity: .75;
}
@media (max-width: 700px) {
    .toolPanel { padding: 16px; }
    .imageToolLayout { grid-template-columns: 1fr; }
    .mixRow { grid-template-columns: 48px 1fr 90px; }
    .mixRemove { grid-column: 2 / 4; }
}
