/* The three settings, each its own world. The scenes are pictures with their own light (a summer day, dusk at
   sea, a lamp-lit room), so their colors are their own and do not follow the table theme. Strands keep the
   theme's eight side colors, mixed with green for a vine, hemp for a rope and nothing for yarn, and keep
   their marks and stripes, so a strand is always told apart without color. */

/* ---------------------------------------------------------------------------------------------- */
/* Garden: a summer day */
.sky { fill: url(#garden-sky); }
.sky-high { stop-color: #4fa8ec; }
.sky-low { stop-color: #b8e3ff; }
.sky-haze { stop-color: #eef9ff; }
.sun-core { stop-color: #fff6c8; stop-opacity: .95; }
.sun-glow { stop-color: #ffe27a; stop-opacity: .45; }
.sun-clear { stop-color: #ffe27a; stop-opacity: 0; }
.sun-halo { fill: url(#garden-sun); }
.sun-disc { fill: #ffd84d; stroke: #ffb92e; stroke-width: 2; }
.ray { fill: #ffe68a; opacity: .75; }
.rays { transform-box: fill-box; transform-origin: center; animation: turn-slow 50s linear infinite; }
@keyframes turn-slow { to { transform: rotate(360deg); } }
.cloud-puff { fill: #fff; opacity: .94; }
.cloud { animation: cloud-drift 46s ease-in-out infinite alternate; animation-delay: var(--delay, 0s); }
@keyframes cloud-drift { from { transform: translateX(-36px); } to { transform: translateX(36px); } }
.hill.far { fill: #9bcf86; }
.hill.near { fill: #6fb45c; }
.tree { fill: #4b9645; }
body[data-setting="garden"] .slat, body[data-setting="garden"] .lattice { stroke: #fbf7ea; }
body[data-setting="garden"] .slat { stroke-width: 3; }
body[data-setting="garden"] .lattice { stroke-width: 2.2; opacity: .85; }
body[data-setting="garden"] .post, body[data-setting="garden"] .rail, body[data-setting="garden"] .finial { fill: #f6f1e2; stroke: #b5ab8f; stroke-width: 1.2; }
.bed { stroke: none; }
.bed-top { stop-color: #6e4b2c; }
.bed-bottom { stop-color: #47301d; }
body[data-setting="garden"] .grass { stroke: #4caf50; stroke-width: 2.2; }
.flower-stem { stroke: #3d8b3d; stroke-width: 1.6; }
.flower-a .flower-petal { fill: #ff6f91; }
.flower-b .flower-petal { fill: #ffd166; }
.flower-c .flower-petal { fill: #b38cff; }
.flower-heart { fill: #ffb300; stroke: #8d5a00; stroke-width: .6; }
.wing-a { fill: #ff9f1c; stroke: #3b2a14; stroke-width: .8; }
.wing-b { fill: #5ec2ff; stroke: #1a3550; stroke-width: .8; }
.butterfly-body { fill: #2b2118; }
.wing { transform-box: fill-box; transform-origin: calc(50% - var(--side) * 50%) 50%; animation: flap .22s ease-in-out infinite alternate; }
@keyframes flap { to { transform: scaleX(.25); } }
.butterfly { animation: flutter 18s ease-in-out infinite; animation-delay: var(--delay, 0s); }
@keyframes flutter {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(60px, -30px); }
  50% { transform: translate(110px, 10px); }
  75% { transform: translate(40px, 34px); }
}
/* Vines: green in the stem, the strand's color in its leaves */
body[data-setting="garden"] .stem { stroke: color-mix(in srgb, var(--c) 78%, #2e7d32); stroke-width: 7.5; }
.vine-edge { fill: none; stroke: #173f1a; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.vine-light { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; opacity: .45; }
body[data-setting="garden"] .stripe { stroke-width: 1.8; }
body[data-setting="garden"] .halo { stroke: color-mix(in srgb, #0f3a12 45%, transparent); stroke-width: 16; }
body[data-setting="garden"] .mark.leaf { stroke: #173f1a; stroke-width: .1; }
body[data-setting="garden"] .vein { stroke: color-mix(in srgb, var(--c) 50%, #2e7d32); }
.curl { fill: none; stroke: color-mix(in srgb, var(--c) 60%, #2e7d32); stroke-width: 1.8; stroke-linecap: round; }
body[data-setting="garden"] .tendril { stroke: color-mix(in srgb, var(--c) 55%, #2e7d32); }
.pot { fill: #c8643b; stroke: #6f321a; stroke-width: 1.4; stroke-linejoin: round; }
.pot-shade { fill: #000; opacity: .16; }
.pot-rim { fill: #da7a4c; stroke: #6f321a; stroke-width: 1.4; }
.pot-soil { fill: #3e2a18; }
.pot-shadow { fill: #000; opacity: .25; }
body[data-setting="garden"] .base .tag-plate { fill: #fff4dc; stroke: #6f321a; }

/* ---------------------------------------------------------------------------------------------- */
/* Ship: dusk at sea */
.dusk-sky { fill: url(#ship-sky); }
.dusk-high { stop-color: #1b2150; }
.dusk-mid { stop-color: #6b3a74; }
.dusk-low { stop-color: #f28a5a; }
.star { fill: #fff6d6; animation: twinkle 3.2s ease-in-out infinite alternate; animation-delay: var(--delay, 0s); }
@keyframes twinkle { from { opacity: .25; } to { opacity: .95; } }
.dusk-halo { fill: url(#ship-sun); }
.dusk-sun-core { stop-color: #ffcf8a; stop-opacity: .85; }
.dusk-sun-glow { stop-color: #ff9a62; stop-opacity: .35; }
.dusk-sun-clear { stop-color: #ff9a62; stop-opacity: 0; }
.dusk-sun { fill: #ffb265; }
body[data-setting="ship"] .sea { fill: url(#ship-sea); }
.sea-top { stop-color: #4a3f78; }
.sea-deep { stop-color: #131a3c; }
.glint { fill: #ffc98e; opacity: .7; animation: shimmer 2.4s ease-in-out infinite alternate; animation-delay: var(--delay, 0s); }
@keyframes shimmer { from { opacity: .25; } to { opacity: .85; } }
body[data-setting="ship"] .wave { stroke: #8d93d6; opacity: .45; }
body[data-setting="ship"] .horizon { stroke: #f7a879; opacity: .8; }
.gull-wing { fill: none; stroke: #1a1630; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gull { animation: glide 22s ease-in-out infinite alternate; animation-delay: var(--delay, 0s); }
@keyframes glide { from { transform: translate(-30px, 6px); } to { transform: translate(40px, -8px); } }
body[data-setting="ship"] .mast, body[data-setting="ship"] .yard, body[data-setting="ship"] .davit { stroke: #2a1b20; }
body[data-setting="ship"] .sail { fill: #edbd8b; stroke: #8a573a; }
body[data-setting="ship"] .seam { stroke: #b67d55; }
body[data-setting="ship"] .furl { fill: #c99668; stroke: #7a4c30; }
body[data-setting="ship"] .tie { stroke: #5a3622; }
body[data-setting="ship"] .rigging { stroke: #22172a; opacity: .7; }
body[data-setting="ship"] .ratline { stroke: #22172a; opacity: .5; }
body[data-setting="ship"] .pennant { fill: #d0453a; }
body[data-setting="ship"] .barrel { fill: #6e4429; stroke: #2a1b14; }
body[data-setting="ship"] .nest-rail { stroke: #2a1b14; }
body[data-setting="ship"] .lookout { fill: #2a1b20; }
body[data-setting="ship"] .deck { fill: #7a4d2c; }
body[data-setting="ship"] .plank { stroke: #4e2f19; opacity: .8; }
body[data-setting="ship"] .hull { fill: #3a2417; }
body[data-setting="ship"] .hull-plank { stroke: #26170e; }
body[data-setting="ship"] .wale { fill: #1f130b; }
body[data-setting="ship"] .port { fill: #ffcf7a; stroke: #1f130b; }
body[data-setting="ship"] .bulwark { fill: #5d3a22; stroke: #26170e; }
body[data-setting="ship"] .foam { fill: #c9cdfa; opacity: .55; stroke: none; }
body[data-setting="ship"] .boat { fill: #5d3a22; stroke: #1f130b; }
body[data-setting="ship"] .oar { stroke: #c99668; }
/* Hemp rope: the strand's color laid over hemp, with a three-strand lay */
body[data-setting="ship"] .stem { stroke: color-mix(in srgb, var(--c) 58%, #c9a36b); stroke-width: 11; stroke-linecap: round; }
.rope-shadow { fill: none; stroke: #1c120a; stroke-width: 15; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.rope-lay { fill: none; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.lay-light { fill: #fff2d6; fill-opacity: .35; }
.lay-groove { fill: #1e0f05; fill-opacity: .55; }
.rope-sheen { fill: none; stroke: #ffe6bf; stroke-width: 2; stroke-linecap: round; opacity: .35; }
body[data-setting="ship"] .stripe { stroke-width: 2.4; stroke-linecap: round; opacity: .95; }
body[data-setting="ship"] .halo { stroke: color-mix(in srgb, #0b0816 55%, transparent); stroke-width: 20; stroke-linecap: round; }
body[data-setting="ship"] .block { fill: #5d3a22; stroke: #1c120a; }
.coil-turn { fill: none; stroke: color-mix(in srgb, var(--c) 58%, #c9a36b); stroke-width: 4.5; }
.coil-shadow { fill: #000; opacity: .35; }
body[data-setting="ship"] .cleat { fill: #3a2417; stroke: #1c120a; }
body[data-setting="ship"] .base .tag-plate { fill: #f1d49a; stroke: #6b4a1e; }

/* ---------------------------------------------------------------------------------------------- */
/* Yarn: a lamp-lit room */
.wall { fill: url(#room-wall); }
.wall-high { stop-color: #f4dccb; }
.wall-low { stop-color: #e6bfa4; }
.paper { fill: url(#room-paper); }
.paper-petal { fill: #c97a7a; opacity: .38; }
.paper-heart { fill: #b25d5d; opacity: .4; }
.paper-leaf { fill: #7a9a6a; opacity: .35; }
.paper-stripe { stroke: #a45f55; stroke-width: 1; opacity: .16; }
.panel { fill: #8b5b3d; }
.panel-inset { fill: none; stroke: #5e3a24; stroke-width: 1.4; opacity: .7; }
.chair-rail { fill: #6c4329; }
.picture-frame { fill: #6c4329; stroke: #3d2414; }
.picture { fill: #bfe2f2; }
.picture-hill { fill: #7fb069; }
.lamp-light { fill: url(#room-lamp); }
.lamp-core { stop-color: #ffe3a6; stop-opacity: .5; }
.lamp-glow { stop-color: #ffc477; stop-opacity: .16; }
.lamp-clear { stop-color: #ffc477; stop-opacity: 0; }
body[data-setting="yarn"] .floor { fill: url(#room-floor); }
.floor-near { stop-color: #93603a; }
.floor-far { stop-color: #6f4527; }
body[data-setting="yarn"] .plank, .plank-joint { stroke: #4a2c17; stroke-width: 1.3; opacity: .55; }
.rug { fill: #9e3a4a; }
.rug-band { fill: none; stroke: #f0c04e; stroke-width: 3; stroke-dasharray: 8 5; }
body[data-setting="yarn"] .basket { fill: #c48d55; stroke: #5e3a1c; }
body[data-setting="yarn"] .weave { stroke: #6e4521; opacity: .55; }
body[data-setting="yarn"] .basket-rim { fill: #b07a44; stroke: #5e3a1c; }
body[data-setting="yarn"] .rail { fill: #7a4c2e; stroke: #3d2414; }
body[data-setting="yarn"] .knob { fill: #5e3a24; stroke: #2e1a0d; }
body[data-setting="yarn"] .halo { stroke: color-mix(in srgb, #3a1d12 45%, transparent); }

/* The dashed base line, the same warning everywhere */
.limit { stroke: #e2453c; }
body[data-setting="ship"] .limit { stroke: #ff7a6b; }

@media (forced-colors: active) {
  .sky, .dusk-sky, .wall, .paper { fill: Canvas; }
  .sun, .cloud, .butterfly, .star, .glint, .gull, .lamp-light, .dusk-halo, .dusk-sun { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .star { opacity: .7; }
  .glint { opacity: .6; }
}
