/* ═══ APP THEME "farbfaecher" — grey controls, colour belongs to the themes ═══
   Active with <html data-theme="farbfaecher">; palette in /tokens.css (from shared/design-tokens.json).
   Here colour carries INFORMATION: every LEGO theme gets its own hue from the fan (--fan-0 .. --fan-11,
   theme number modulo twelve), and the controls stay grey so the theme colours are the only colourful
   surfaces. Condition colours and history lines stay blue and amber: condition means something else than
   theme, and the two colour systems must not be confused. */

[data-theme="farbfaecher"]{
  --bg:#fafafa;
  --sur:#ffffff;
  --bdr:#e6e6e6;
  --txt:#2b2b2b;
  --mut:#6b6b6b;
  --screen-bg:#fafafa;
  --rad:10px;
  /* Flatter than the base theme: where colour carries information, no shadow should compete for attention. */
  --sh0:0 1px 2px rgba(0,0,0,.05);
  --sh1:0 2px 6px rgba(0,0,0,.06);
  --sh2:0 8px 20px rgba(0,0,0,.08);
}

[data-theme="farbfaecher"] #login-screen,
[data-theme="farbfaecher"] #startup-screen{
  background:var(--screen-bg);color:var(--txt);
}

[data-theme="farbfaecher"] body{background:var(--bg)}
[data-theme="farbfaecher"] .sc{border-radius:10px;overflow:hidden}

/* The theme stripe on top of a tile and the detail dialog. The UI sets the colour per entry (--fan-hue)
   because only it knows the theme number; without it the stripe stays invisible rather than wrong. */
[data-theme="farbfaecher"] .sc::before{
  content:"";display:block;height:5px;
  background:var(--fan-hue, transparent);
}
[data-theme="farbfaecher"] .sc .snum{color:var(--mut)}

/* The controls stay grey — the main button too. */
[data-theme="farbfaecher"] .btn.bp{background:var(--b600);box-shadow:none}
[data-theme="farbfaecher"] nav .ntab.active{color:var(--b600)}

/* And the condition colours stay what they are everywhere. */
[data-theme="farbfaecher"] .cond-new{background:#dbeafe;color:#1d4ed8}
[data-theme="farbfaecher"] .cond-used{background:#fef3c7;color:var(--a-text)}
[data-theme="farbfaecher"][data-dark] .cond-new{background:var(--b100);color:var(--b700)}
[data-theme="farbfaecher"][data-dark] .cond-used{background:var(--a100);color:var(--a-text)}

/* Light mode gets a bit more fan: each key figure carries a hue as its edge, the open tab an underline in
   the fan gradient. The controls stay grey. */
[data-theme="farbfaecher"]:not([data-dark]) .bstat{border-top:4px solid var(--fan-7)}
[data-theme="farbfaecher"]:not([data-dark]) .bstat:nth-child(2){border-top-color:var(--fan-4)}
[data-theme="farbfaecher"]:not([data-dark]) .bstat:nth-child(3){border-top-color:var(--fan-1)}
[data-theme="farbfaecher"]:not([data-dark]) .bstat:nth-child(4){border-top-color:var(--fan-9)}
[data-theme="farbfaecher"] .sc::before{height:6px}
[data-theme="farbfaecher"]:not([data-dark]) header{border-bottom:0;box-shadow:none;
  background-image:linear-gradient(90deg,var(--fan-0),var(--fan-2),var(--fan-4),var(--fan-6),var(--fan-8),var(--fan-10));
  background-size:100% 3px;background-repeat:no-repeat;background-position:bottom;background-color:var(--sur)}
