/* kayrkayrk.com: one stylesheet for every page.
   Plain on purpose: one column, readable text, no effects. */

/* Colours in one place. Change them here and every page follows. */
:root {
  --paper: #fbfaf7;      /* background, slightly warm white */
  --ink: #1d1d1b;        /* main text */
  --quiet: #6b6a65;      /* dates, captions, footer */
  --line: #dddad2;       /* thin dividers */
  --accent: #b4432b;     /* links: a brick red, used sparingly */
}

/* Dark mode: same layout, swapped colours, follows the system setting. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171716;
    --ink: #e9e7e1;
    --quiet: #9b998f;
    --line: #34332f;
    --accent: #e0805f;
  }
}

/* Page: one centred column about 65 characters wide, the comfortable reading width. */
body {
  margin: 0 auto;
  max-width: 40rem;
  padding: 3.5rem 1.25rem 4rem;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}

/* Headings use the system sans-serif so they stand apart from the text. */
h1, h2 {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.2;
}
h1 { font-size: 2rem; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 2.5rem 0 0.5rem; }

p, ul { margin: 0 0 1rem; }
ul { padding-left: 1.2rem; }
li { margin: 0.25rem 0; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.quiet { color: var(--quiet); font-size: 0.9rem; }

/* Reference images: full width, thin border, caption underneath. */
figure { margin: 1.25rem 0; }
figure img { width: 100%; height: auto; border: 1px solid var(--line); display: block; }
figcaption { color: var(--quiet); font-size: 0.9rem; margin-top: 0.4rem; }

/* Placeholder box shown until a real image is added. */
.placeholder {
  border: 1px dashed var(--quiet);
  color: var(--quiet);
  padding: 2.5rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Colour table: no borders, just aligned columns (swatch, name, hex, rgb). */
.colours { border-collapse: collapse; margin: 0 0 1rem; }
.colours td { padding: 0.35rem 1.1rem 0.35rem 0; vertical-align: middle; }
.colours td:first-child { padding-right: 0.7rem; }
.colours td { white-space: nowrap; }
.colours .note { color: var(--quiet); font-size: 0.85rem; }
.swatch { display: block; width: 1.6rem; height: 1.6rem; border: 1px solid var(--line); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; white-space: nowrap; }
/* On narrow phones the rgb column is dropped so the table fits. */
@media (max-width: 34rem) { .colours .rgb { display: none; } }

/* The actual colours. Edit the hex codes here (the CSP blocks inline styles). */
.c1 { background: #a54d4d; }  /* iris */
.c2 { background: linear-gradient(to bottom, #666b9c, #3d405e); height: 2.6rem; }  /* eyes: gradient, taller */
.c3 { background: #ad7345; }  /* fur 1 */
.c4 { background: #c7c0b7; }  /* fur 2 */
.c5 { background: #634c4d; }  /* markings */
.c6 { background: #3d5a80; }  /* clothes */

footer { margin-top: 4rem; }

/* Admin page: one row per image (thumbnail, caption, hide, move buttons). */
.arrange { list-style: none; padding: 0; }
.arrange li { display: flex; gap: 0.75rem; align-items: center; padding: 0.5rem;
  border: 1px solid var(--line); margin: 0.5rem 0; background: var(--paper); cursor: grab; }
.arrange li.dragging { opacity: 0.5; }
.arrange img { width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--line); }
.arrange li > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 0.3rem; }
.arrange input[type=text] { font: inherit; font-size: 0.9rem; padding: 0.25rem 0.4rem;
  border: 1px solid var(--line); background: transparent; color: var(--ink); }
button { font: inherit; font-size: 0.95rem; padding: 0.3rem 0.8rem; cursor: pointer;
  border: 1px solid var(--quiet); background: transparent; color: var(--ink); }
button:hover { border-color: var(--accent); color: var(--accent); }
