/* The water basin (view #temizu, js/temizu.js). The hands and the step dots are in css/hands.css. */

/* the drawing keeps its proportions and stands on the scene's floor (cq units = the scene) */
.tz-wrap {
  position: absolute; left: 50%; bottom: 0; translate: -50% 0;
  width: min(100cqw - 4px, 76.9cqh, 440px); aspect-ratio: 400 / 520;
}
.tz-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* the basin's tap target (put the ladle back): over the stone basin */
.tz-basin-hit { position: absolute; left: 13%; top: 68%; width: 74%; height: 27%; padding: 0; border: 0; background: none; border-radius: 30px; cursor: pointer; }

.tz-back { opacity: .8; }
.tz-grain { fill: none; stroke: #f3d6bb; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 40 26; }
.tz-plaque { fill: #fff6ea; stroke: #f0b9a6; stroke-width: 2.4; }
.tz-plaque-in { fill: none; stroke: #f6d6c6; stroke-width: 1.6; }
.tz-plaque-text { font-family: var(--kanji); font-weight: 600; font-size: 16px; fill: var(--coral-ink); letter-spacing: .08em; }
/* stone */
.tz-rim { fill: #f4f1f8; }
.tz-inner { fill: #e4deee; stroke: #d6cee3; stroke-width: 1.6; }
.tz-rim-hi { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; opacity: .9; }
.tz-stone-hi { fill: none; stroke: #fbf9fd; stroke-width: 4; stroke-linecap: round; }
.tz-speck { fill: #e0d9ea; }
.tz-moss { fill: #cfeccb; stroke: #a9d8a6; stroke-width: 2; stroke-linejoin: round; }
.tz-pebble { fill: #ebe6f2; stroke: #d2c9df; stroke-width: 1.6; }
.tz-pebble-hi, .tz-step-hi { fill: #fbfaff; }
.tz-step { fill: #ece7f3; stroke: #cfc6de; stroke-width: 2; }
.tz-step-side { fill: #d9d1e6; stroke: #cfc6de; stroke-width: 2; }
/* water */
.tz-wg1 { stop-color: var(--water-hi); } .tz-wg2 { stop-color: var(--water); } .tz-wg3 { stop-color: var(--water-edge); stop-opacity: .55; }
.tz-water { stroke: var(--water-edge); stroke-width: 2; }
.tz-glint { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; opacity: .85; animation: glint 5s ease-in-out infinite alternate; }
@keyframes glint { to { transform: translateX(14px); opacity: .5; } }
.ripple.r3 { animation-delay: -.9s; animation-duration: 3.4s; }
.tz-dip { fill: none; stroke: #fff; stroke-width: 2.6; opacity: 0; transform-box: fill-box; transform-origin: center; }
/* the spout */
.tz-bamboo { fill: none; stroke: #c4e8c6; stroke-width: 15; stroke-linecap: round; }
.tz-bamboo-joint { fill: none; stroke: #9fd3a8; stroke-width: 15; stroke-dasharray: 2 34; }
.tz-bamboo-hi { fill: none; stroke: #e8f8e6; stroke-width: 3; stroke-linecap: round; }
.tz-bamboo-end { fill: #e6f6e3; stroke: #9fd3a8; stroke-width: 2; }
.tz-tie { fill: var(--straw); stroke: var(--straw-deep); stroke-width: 1.6; }
.tz-trickle { fill: none; stroke: var(--water-edge); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 7 7; animation: trickle .45s linear infinite; }
.tz-trickle.t2 { stroke: #fff; stroke-width: 2; stroke-dasharray: 3 11; animation-duration: .38s; }
@keyframes trickle { to { stroke-dashoffset: -14; } }
.tz-drop { fill: var(--water-edge); animation: tzDrop 1.1s ease-in infinite; transform-box: fill-box; }
@keyframes tzDrop { 0% { transform: translateY(0) scale(.5); opacity: 0; } 20% { opacity: 1; } 90% { transform: translateY(36px) scale(1); opacity: 1; } 100% { transform: translateY(40px); opacity: 0; } }
/* the towel, the bucket, the pot */
.tz-cloth { fill: #fff3f6; stroke: #f0bfcb; stroke-width: 2; }
.tz-cloth-fold { fill: #ffe1e8; stroke: #f0bfcb; stroke-width: 1.6; }
.tz-cloth-stripe { fill: none; stroke: #d9d0ff; stroke-width: 3; }
.tz-cloth-fringe { fill: none; stroke: #f0bfcb; stroke-width: 1.6; stroke-linecap: round; }
.tz-towel { transform-box: fill-box; transform-origin: 50% 0; animation: towel 4.2s ease-in-out infinite; }
@keyframes towel { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
.tz-hoop { fill: none; stroke: #c9a3d8; stroke-width: 3; stroke-linecap: round; }
.tz-pot { fill: #dcd3ff; stroke: #b9acf0; stroke-width: 2; stroke-linejoin: round; }
.tz-pot-rim { fill: #e9e3ff; stroke: #b9acf0; stroke-width: 2; }
.tz-pot-line { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; opacity: .8; }
.pot-leaf { fill: #c4e8c6; stroke: #95cf9e; stroke-width: 1.6; stroke-linejoin: round; }
.tz-usagi { fill: #fff; stroke: #dfe3f0; stroke-width: 1.6; }
.nt-b { fill: #ff9fa6; stroke: #e57f88; stroke-width: 1; }
/* summer: the wind chime */
.tz-chime { transform-box: view-box; transform-origin: 322px 130px; animation: chime 2.6s ease-in-out infinite; }
.tz-chime-tail { transform-box: view-box; transform-origin: 322px 206px; animation: chime 1.7s ease-in-out infinite reverse; }
@keyframes chime { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
.tz-chime-cord { fill: none; stroke: #e3c67e; stroke-width: 1.6; }
.tz-chime-glass { fill: rgba(225, 244, 252, .85); stroke: #9fd5ea; stroke-width: 2; stroke-linejoin: round; }
.tz-chime-band { fill: none; stroke: #ffc3cf; stroke-width: 2.4; stroke-linecap: round; }
.tz-chime-dot { fill: #cfc4ff; } .tz-chime-dot2 { fill: #ffe39a; }
.tz-chime-clap { fill: #f6cf63; }
.tz-tanzaku { fill: #ffe1ea; stroke: #f0b9c9; stroke-width: 1.6; }
.tz-tanzaku-line { fill: none; stroke: #f0b9c9; stroke-width: 1.4; stroke-linecap: round; }

/* ---------- hanachozu: the season's flowers and fruit (js/temizu.js FLOAT, RIM, POT) ---------- */
.tz-s { display: none; }
[data-season="spring"] .tz-s.spring, [data-season="summer"] .tz-s.summer,
[data-season="autumn"] .tz-s.autumn, [data-season="winter"] .tz-s.winter { display: inline; }
/* floating: a slow drift on the water, a bob and a little turn on top of it */
.fl-n { transform-box: fill-box; animation: flDrift 9s ease-in-out infinite alternate; }
.fl-b { transform-box: fill-box; transform-origin: 50% 60%; animation: flBob 3.4s ease-in-out infinite; }
@keyframes flDrift { 0% { transform: translate(-5px, 0); } 50% { transform: translate(2px, 1.6px); } 100% { transform: translate(6px, -1px); } }
@keyframes flBob { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-2.4px) rotate(-7deg); } 65% { transform: translateY(1.2px) rotate(6deg); } }
.fl-ring { fill: rgba(150, 200, 225, .22); stroke: #fff; stroke-width: 1.4; opacity: .9; }
/* the small temizu on the path (js/path-art.js MINI): thinner lines at that size */
.mini .ap-red, .mini .ap-gold, .mini .yz, .mini .hy-o { stroke-width: 1.2; }
.mini .ap-stem { stroke-width: 1.3; } .mini .ap-leaf, .mini .lf { stroke-width: .9; }
.mini .mp-red, .mini .mp-gold { stroke-width: 2.6; }
.mini .cm-f > * { stroke-width: .8; } .mini .cm-red.cm-f > * { stroke: #e5848f; } .mini .cm-white.cm-f > * { stroke: #e2cdd4; }
.skm { fill: #ffd6df; stroke: #f0a9bb; stroke-width: .8; }
.tzm-trickle { fill: none; stroke: var(--water-edge); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 3 3; animation: trickle .45s linear infinite; }
/* apples: round with a dimple at the top, a short stem, one leaf, a soft shine */
.ap-red { fill: #ffaaa4; stroke: #e7837e; stroke-width: 2.2; stroke-linejoin: round; }
.ap-gold { fill: #ffe08e; stroke: #e2b85a; stroke-width: 2.2; stroke-linejoin: round; }
.ap-dimple { fill: none; stroke-width: 1.6; stroke-linecap: round; }
.ap-red-d { stroke: #e7837e; } .ap-gold-d { stroke: #e2b85a; }
.ap-stem { fill: none; stroke: #b88a68; stroke-width: 2.4; stroke-linecap: round; }
.ap-leaf { fill: #b6e3a8; stroke: #85c27b; stroke-width: 1.6; stroke-linejoin: round; }
.ap-vein { fill: none; stroke: #e6f6df; stroke-width: 1; stroke-linecap: round; }
.ap-hi { fill: #fff3f0; opacity: .9; }
.mp-red { fill: #ffbea6; stroke: #e8957a; stroke-width: 1.4; stroke-linejoin: round; }
.mp-gold { fill: #ffdc94; stroke: #e0b45c; stroke-width: 1.4; stroke-linejoin: round; }
.mp-vein { fill: none; stroke: #fff4ea; stroke-width: .9; stroke-linecap: round; }
/* cherry blossoms */
.sk-o > * { fill: #ffd6df; stroke: #f0a9bb; stroke-width: 3.2; stroke-linejoin: round; }
.sk-f > * { fill: #ffe0e7; }
.sk-st { stroke: #f4b3c3; stroke-width: 1; }
.sk-dot { fill: #f6cf63; }
.sk-eye { fill: #fff0b8; stroke: #f6cf63; stroke-width: 1; }
.sk-petal { fill: #ffdbe3; stroke: #f0aabb; stroke-width: 1.4; stroke-linejoin: round; }
/* hydrangea heads: a dome of little four-petal florets */
.hy-o { stroke-width: 2; }
.hy-blue.hy-o { fill: #cfe0fb; stroke: #9db9ea; } .hy-blue .hy-p { fill: #dde9ff; stroke: #a9c2ee; }
.hy-lilac.hy-o { fill: #e2d8ff; stroke: #b9a9ee; } .hy-lilac .hy-p { fill: #ece5ff; stroke: #c3b5f0; }
.hy-pink.hy-o { fill: #ffd9e5; stroke: #eeb0c5; } .hy-pink .hy-p { fill: #ffe6ee; stroke: #f0bccd; }
.hy-p { stroke-width: .9; }
.hy-c { fill: #fff; }
.lf { fill: #c4e8b8; stroke: #8fc88a; stroke-width: 1.6; stroke-linejoin: round; }
.lf-vein { fill: none; stroke: #edf9e8; stroke-width: 1.1; stroke-linecap: round; }
/* yuzu and camellias */
.yz { fill: #ffe48c; stroke: #e6bd52; stroke-width: 2.2; }
.yz-dot { fill: #f3cc63; }
.yz-hi { fill: #fff8d8; }
.yz-nub { fill: #a8cf8c; stroke: #85b26b; stroke-width: 1; }
.cm-o > * { stroke-width: 3; }
.cm-red.cm-o > * { fill: #ffb0b8; stroke: #e5848f; } .cm-red.cm-f > * { fill: #ffb0b8; } .cm-red.cm-in > * { fill: #ffc8ce; }
.cm-white.cm-o > * { fill: #fffafb; stroke: #e2cdd4; } .cm-white.cm-f > * { fill: #fffafb; } .cm-white.cm-in > * { fill: #fff0f3; }
.cm-gold { fill: #ffe39a; stroke: #e5c070; stroke-width: 1.2; }
.cm-anther { fill: #f2bd4c; }

/* the ladle: a button laid over the view, moved by temizu.js (its cup's centre is the pivot) */
.tz-ladle {
  position: absolute; z-index: 3; left: 0; top: 0; width: 140px; aspect-ratio: 160 / 70;
  padding: 0; border: 0; background: none; cursor: pointer;
  transform-origin: 17.5% 51.4%;
  filter: drop-shadow(0 4px 4px rgba(110, 95, 170, .18));
}
.tz-ladle svg { width: 100%; height: 100%; overflow: visible; }
.ld-handle { fill: #f6e6bd; stroke: #e3c67e; stroke-width: 2; }
.ld-node { stroke: #e3c67e; stroke-width: 2; }
.ld-cup { fill: #d8f0d2; stroke: #9fd3a8; stroke-width: 2.2; }
.ld-cup-line { fill: none; stroke: #b9e2bb; stroke-width: 2; }
.ld-rim { fill: #eaf7e6; stroke: #9fd3a8; stroke-width: 2.2; }
.ld-water { fill: var(--water); opacity: 0; transition: opacity .3s; }
.tz-ladle.full .ld-water { opacity: 1; }
.ld-shine { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; opacity: .8; }
/* it glows a little when it is the thing to tap */
.view-temizu[data-state="idle"] .tz-ladle, .view-temizu[data-state="putBack"] .tz-ladle { animation: ladleCall 1.4s ease-in-out infinite; }
@keyframes ladleCall { 0%, 100% { filter: drop-shadow(0 4px 4px rgba(110, 95, 170, .18)); } 50% { filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 10px #f6cf63); } }
/* the pour: a generous, slightly wavering stream from the lip to the back of the hand (left/top set by
   temizu.js at the stream's centre line) */
.tz-stream {
  position: absolute; z-index: 2; width: 20px; margin-left: -10px; transform-origin: 50% 0; border-radius: 10px 10px 12px 12px; pointer-events: none;
  background: linear-gradient(90deg, rgba(150, 208, 232, .85), #e8f8fd 38%, #fff 50%, #e8f8fd 62%, rgba(150, 208, 232, .85));
  box-shadow: 0 0 8px rgba(169, 217, 236, .9);
  animation: streamWobble .32s ease-in-out infinite alternate;
}
.tz-stream::after { content: ''; position: absolute; left: 50%; bottom: -8px; width: 34px; height: 14px; translate: -50% 0; border-radius: 50%; background: radial-gradient(closest-side, #fff, rgba(212, 239, 250, .8) 60%, rgba(212, 239, 250, 0)); }
@keyframes streamWobble { from { scale: 1 1; } to { scale: .82 1; } }

/* the hands are always out here; each half is a button */
.tz-controls .hands { pointer-events: none; }
.hand-hit { position: absolute; top: 0; bottom: 22px; width: 50%; padding: 0; border: 0; background: none; border-radius: 30px; cursor: pointer; pointer-events: auto; }
.hand-hit.l { left: 0; } .hand-hit.r { right: 0; }
.view-temizu[data-state="rinseL"] .hand-hit.l::after, .view-temizu[data-state="rinseR"] .hand-hit.r::after {
  content: ''; position: absolute; left: 50%; top: 4%; width: 54px; height: 54px; translate: -50% 0; border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, .95); box-shadow: 0 0 0 4px rgba(169, 217, 236, .55);
  animation: ropeCall 1.3s ease-in-out infinite;
}
.view-temizu.busy .hand-hit::after { display: none; }
.view-temizu.busy .tz-ladle { animation: none; }
.view-temizu.has-line .hands { translate: -50% 16px; }

@media (prefers-reduced-motion: reduce) {
  .tz-trickle, .tzm-trickle, .tz-drop, .tz-ladle, .hand-hit::after, .tz-stream, .tz-glint, .tz-towel, .tz-chime, .tz-chime-tail, .fl-n, .fl-b { animation: none !important; }
}
