/* MyRugStudio: bright paper, print-shop ink, tangerine, and lilac. */
:root {
  --paper: #ffffff;
  --ink: #242127;
  --muted: #65616b;
  --line: #dedbe4;
  --gold: #a5341c;
  --accent: #ff6943;
  --accent-hover: #f0522c;
  --lilac: #d9cafa;
  --lilac-soft: #f1ebfc;
  --surface: #f7f6f9;
  --focus: #7044b8;
}

body { background: var(--paper); color: var(--ink); }
::selection { background: var(--lilac); color: var(--ink); }
button:hover { background: var(--lilac-soft); }
button:focus-visible, input:focus-visible, select:focus-visible,
summary:focus-visible, canvas:focus-visible, a:focus-visible {
  outline-color: var(--focus);
}
header { border-bottom-color: var(--line); }
.brand-icon { background: var(--accent); color: var(--ink); border-color: var(--ink); }
.hero-copy, .export-promise, .design-guide p, .design-guide li { color: #55515b; }
.headline-personal, h1 em { color: var(--ink); }
.eyebrow { color: var(--ink); }
.flap-tile, .flap-old, .flap-new {
  background: var(--accent); color: var(--ink);
}
.flap-tile { box-shadow: inset 0 0 0 1px #24212718, 0 2px 0 #24212714; }
.flap-tile::after { background: #24212730; }

a.start-design-button, .primary-link {
  background: var(--accent); color: var(--ink); border-color: var(--accent);
  box-shadow: none;
}
a.start-design-button .start-arrow { background: var(--ink); color: white; }
a.start-design-button:hover, .primary-link:hover {
  background: var(--accent-hover); border-color: var(--accent-hover); color: var(--ink);
  box-shadow: none;
}
a.start-design-button:hover .start-arrow { background: var(--lilac); color: var(--ink); }
.design-guide .primary-link { color: var(--ink); }
.hero-art :is(canvas,img), .featured-card :is(canvas,img) {
  filter: drop-shadow(5px 12px 10px #24212714);
}
.guide-invitation { border-top: 1px solid var(--line); padding-top: 26px; }
.guide-invitation a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.process li>span { color: var(--ink); background: var(--lilac); padding: 8px; align-self: start; }
.process h2 em { color: var(--ink); }
.design-guide .try-it { border-left-color: var(--accent); }

.design-page .compact-tools {
  background: var(--paper); border-color: var(--line); box-shadow: 0 4px 20px #24212705;
}
.design-page .canvas-toolbar, .design-page .zoom-tools, .design-page .canvas-footer {
  background: var(--surface); border-color: var(--line);
}
.design-page .quick-arrangement, .radial-options { background: var(--surface); }
.design-page .tool-tabs button { background: var(--surface); }
.design-page .tool-tabs button[aria-selected=true],
.color-target button[aria-pressed=true], .zoom-tools button[aria-pressed=true] {
  background: var(--ink); color: white; border-color: var(--ink);
}
.quick-arrangement button[aria-pressed=true], .symmetry button[aria-pressed=true],
.design-page .motif-library button[aria-pressed=true] {
  background: var(--lilac); color: var(--ink); border-color: var(--ink);
}
.design-page .motif-library button { background: var(--paper); }
.design-page .motif-library button:hover { background: var(--lilac-soft); }
.motif-library svg { fill: var(--motif-fill, #ff6943); stroke: var(--motif-outline, #242127); }
.rug-shapes button[aria-pressed=true] svg { fill: var(--lilac); }
.rug-shapes button:hover svg { fill: var(--lilac-soft); }
input[type=checkbox], input[type=range] { accent-color: var(--ink); }
select, .dimensions input, .name-fields input,
#save-dialog input:not([type=checkbox]), .privacy-note input {
  background: var(--paper); color: var(--ink); border-color: var(--line);
}
.corner { color: var(--muted); }
.share-button, .share-button:hover, .tutorial-actions #tutorial-next,
.rug-downloads button:first-child, .palette-actions #generate-palette {
  background: var(--accent); color: var(--ink); border-color: var(--accent);
}
.palette-actions #generate-palette:hover { background: var(--accent-hover); }
.palette-prompt { background: var(--lilac-soft); }
.background-controls .palette-prompt .micro { color: var(--muted); }
#trash { background: #fffffff2; border-color: #aaa3b3; }
.dragging-motif #trash { border-color: var(--accent); box-shadow: 0 4px 25px #24212722; }
.dragging-motif #trash.drop-ready { background: #b62f45; color: white; }

dialog, #start-dialog, #tutorial, #save-dialog {
  background: var(--paper); border-color: var(--line); box-shadow: 0 20px 80px #24212725;
}
dialog::backdrop { background: #24212799; }
.start-choices>button { background: var(--surface); }
.start-choices>button:hover { background: var(--lilac-soft); border-color: var(--ink); }
.template-options button { background: var(--surface); }
.template-options button:hover { background: var(--lilac-soft); border-color: var(--ink); }
.blank-rug-art i { background: var(--lilac); border-color: var(--ink); box-shadow: 3px 6px 8px #24212712; }
#tutorial-example { background: var(--surface); }
.tutorial-top span { color: var(--muted); }
.tour-dots span { background: var(--line); }
.tour-dots span.active { background: var(--accent); }
#rug-view-preview, #share-preview { background: var(--surface); }

/* The same color controls stay put while choosing motifs or editing colors. */
.shared-colors {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 8px;
  position: sticky; top: 8px; z-index: 6; background: var(--paper);
  padding: 4px 2px 8px; margin-bottom: 10px; border-bottom: 1px solid var(--line);
}
.shared-colors[hidden] { display: none; }
.shared-colors>.catalog-label { font-weight: 650; margin-bottom: 0; }
.shared-colors>.toggle, .shared-colors>.colors,
.shared-colors>.generated-palette, .shared-colors>.micro { grid-column: 1 / -1; }
.shared-colors .color-target { margin-bottom: 0; }
.shared-colors .color-target button { padding: 0 10px; min-height: 30px; }
.shared-colors>.toggle { min-height: 22px; line-height: 22px; font-size: 10px; }
.shared-colors .colors { display: flex; gap: 8px; margin: 4px 0; }
.shared-colors .colors button { width: 30px; height: 30px; min-height: 30px; border-width: 3px; }
.shared-colors .generated-palette { margin: 6px 0 0; padding-top: 8px; }
.shared-colors .generated-palette .catalog-label { font-size: 10px; margin-bottom: 6px; }
.shared-colors .generated-palette .colors {
  display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 4px; margin: 0;
}
.shared-colors .generated-palette .colors button { width: 100%; }
.shared-colors .micro { display: none; }

@media (pointer: coarse) {
  .shared-colors .color-target button { min-height: 40px; }
  .shared-colors>.toggle { min-height: 32px; line-height: 32px; }
  .shared-colors .colors { gap: 6px; }
  .shared-colors .colors button { width: 40px; height: 40px; min-height: 40px; }
  .shared-colors .generated-palette .colors { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
}

/* Color swatches retain their actual yarn/background color, including on hover. */
.colors button, .colors button:hover, .background-swatches button,
.background-swatches button:hover { background: var(--swatch); }

.repeat-dimensions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.repeat-dimensions[hidden], .layer-controls[hidden] { display: none; }
.repeat-dimensions label { font-size: 11px; }
.repeat-dimensions select { margin-top: 7px; margin-bottom: 0; }
.repeat-dimensions .micro { grid-column: 1 / -1; margin: 0 0 8px; }
.design-page .canvas-toolbar { flex-wrap: wrap; }
.layer-controls {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  flex: 1 0 100%; border-top: 1px solid var(--line); padding: 6px 0 2px;
}
.layer-controls label { font-size: 11px; font-weight: 600; }
.layer-controls input { width: auto; flex: 1; min-width: 50px; height: 20px; margin: 0; }
.layer-controls button { min-height: 32px; font-size: 10px; padding: 0 8px; }
.layer-controls output { min-width: 40px; text-align: right; font-size: 10px; font-variant-numeric: tabular-nums; }
.layer-control-hint { flex-basis: 100%; font-size: 10px; color: var(--muted); line-height: 1.5; }
.layer-step-buttons { display: flex; gap: 8px; }
.layer-step-buttons button { flex: 1; font-size: 11px; border: 1px solid var(--line); padding: 0 6px; }
.layer-list { display: grid; gap: 6px; margin-top: 12px; max-height: 500px; overflow-y: auto; padding: 2px; }
.layer-list button {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 8px; border: 1px solid var(--line); background: var(--paper); min-height: 56px;
}
.layer-list button[aria-pressed=true] { background: var(--lilac); border-color: var(--ink); }
.layer-list svg { width: 34px; height: 34px; flex-shrink: 0; }
.layer-list button>span { font-size: 11px; }
.layer-list small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.layer-list .layer-number { margin-left: auto; font-size: 10px; color: var(--muted); }
@media (pointer: coarse) { .layer-controls button { min-height: 40px; } }
