/* =====================================================================
   HOME PAGE: "Things to try" and "Everything on the site"  (/home-play.css)
   Same paper, serif and red as the rest of the home page.
   ===================================================================== */

.play {
    --p-ink: #1b1a17;
    --p-muted: #6b665c;
    --p-faint: #9a948a;
    --p-rule: #e4dfd5;
    --p-wash: #f7f4ee;
    --p-accent: #8a2b1d;
    --p-love: #d9466f;
    --p-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
    --p-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    margin: 34px 0 10px;
    font-family: var(--p-serif);
    color: var(--p-ink);
}
.play p { margin: 0; font-size: inherit; line-height: 1.45; }

.play-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 14px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--p-rule);
}
.play h3.play-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: normal;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--p-accent);
}
.play-sub { font-size: 0.85rem; font-style: italic; color: var(--p-faint); }

/* ---------------------------------------------------------------------
   The four live tiles
   --------------------------------------------------------------------- */
.play-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

a.play-tile, a.play-tile:visited {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 236px;
    overflow: hidden;
    padding: 13px 14px 13px;
    border: 1px solid var(--p-rule);
    border-radius: 10px;
    background: #fff;
    color: var(--p-ink);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(40, 30, 10, 0.04), 0 6px 18px rgba(40, 30, 10, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 1s ease, color 1s ease;
    opacity: 0;
    transform: translateY(6px);
}
a.play-tile.is-ready { opacity: 1; transform: none; transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.25s ease, background 1s ease; }
.play-grid a.play-tile:nth-child(2) { transition-delay: 0.08s; }
.play-grid a.play-tile:nth-child(3) { transition-delay: 0.16s; }
.play-grid a.play-tile:nth-child(4) { transition-delay: 0.24s; }
a.play-tile.is-ready:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(40, 30, 10, 0.05), 0 14px 30px rgba(40, 30, 10, 0.1); transition-delay: 0s; }
a.play-tile:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 3px; }

.play-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.play-kicker { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--p-accent); }
.play-new {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 99px;
    background: var(--p-love);
    color: #fff;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: 2px;
}
.play-name { margin-top: 2px; font-size: 1.02rem; font-weight: 600; line-height: 1.3; }
.play-meta { margin-top: 3px; font-size: 0.82rem; line-height: 1.4; color: var(--p-muted); }
.play-meta b { color: var(--p-ink); font-weight: 600; }
.play-go { margin-top: auto; padding-top: 10px; font-size: 0.84rem; color: var(--p-muted); transition: color 0.2s ease; }
a.play-tile:hover .play-go { color: var(--p-ink); }

/* ---- Weather: the tile takes on the visitor's sky ---- */
a.play-wx { background: linear-gradient(170deg, #cfe5ff 0%, #fbe3ea 75%, #fff4ea 100%); border-color: #e7dde4; }
a.play-wx[data-sky="partly"] { background: linear-gradient(170deg, #d6e4f3 0%, #f3e3ea 80%); }
a.play-wx[data-sky="cloudy"], a.play-wx[data-sky="fog"] { background: linear-gradient(170deg, #dcdbe3 0%, #efe7ea 85%); }
a.play-wx[data-sky="rain"] { background: linear-gradient(170deg, #bfcbe0 0%, #dcdde8 85%); }
a.play-wx[data-sky="snow"] { background: linear-gradient(170deg, #e3edf8 0%, #f8f3f6 85%); }
a.play-wx[data-sky="storm"] { background: linear-gradient(170deg, #4b4266 0%, #6f5d82 90%); color: #f6eef7; }
a.play-wx[data-night="1"] { background: linear-gradient(170deg, #141a3d 0%, #3a2350 75%, #5b2b5c 100%); color: #f6eaf2; border-color: #3b2d55; }
a.play-wx[data-night="1"][data-sky="rain"], a.play-wx[data-night="1"][data-sky="storm"] { background: linear-gradient(170deg, #11172a 0%, #2a3048 100%); }
a.play-wx[data-night="1"] .play-kicker, a.play-wx[data-sky="storm"] .play-kicker { color: #ffb0c8; }
a.play-wx[data-night="1"] .play-meta, a.play-wx[data-night="1"] .play-go, a.play-wx[data-night="1"] .play-wx-when,
a.play-wx[data-sky="storm"] .play-meta, a.play-wx[data-sky="storm"] .play-go { color: rgba(246, 234, 242, 0.75); }
.play-wx-ico.is-wait { opacity: 0.35; }
a.play-wx[data-night="1"]:hover .play-go { color: #fff; }
.play-wx-now { display: flex; align-items: center; gap: 2px; margin: 4px 0 0 -10px; }
.play-wx-ico { width: 74px; height: 74px; flex: none; transition: opacity 0.6s ease; filter: drop-shadow(0 4px 10px rgba(80, 40, 70, 0.18)); }
.play-wx-temp { font-size: 2.6rem; font-weight: 300; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.play-wx-line { display: block; width: 100%; height: 30px; margin-top: 8px; overflow: visible; }
.play-wx-area { fill: rgba(217, 70, 111, 0.12); }
.play-wx-path { fill: none; stroke: var(--p-love); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 400; animation: play-draw 1.6s ease both; }
.play-wx-line circle { fill: var(--p-love); }
a.play-wx[data-night="1"] .play-wx-path { stroke: #ff9cbc; }
.play-wx-when { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--p-faint); }

/* ---- Typing: a little dark screen with a sentence typing itself ---- */
.play-ty-screen {
    display: block;
    margin-top: 8px;
    min-height: 92px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #1c1a26;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 10px 24px rgba(0, 0, 0, 0.35);
    font-family: var(--p-mono);
    font-size: 0.86rem;
    line-height: 1.5;
}
.play-ty-text .ok { color: #f2e9dc; }
.play-ty-text .rest { color: #6d6878; }
.play-ty-text .bad { color: #ff6b81; text-decoration: underline; }
.play-ty-text .caret { display: inline-block; width: 2px; height: 1.05em; margin: 0 -1px; vertical-align: -0.15em; background: #ff9cbc; box-shadow: 0 0 8px #ff6f96; animation: play-blink 1s steps(1) infinite; }
.play-ty-stats { display: flex; align-items: flex-end; gap: 5px; margin-top: 9px; font-size: 0.8rem; color: var(--p-muted); }
.play-ty-stats b { font-size: 1.6rem; font-weight: 300; line-height: 1; color: var(--p-ink); font-variant-numeric: tabular-nums; min-width: 1.6em; }
.play-ty-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; margin-left: auto; }
.play-ty-bars i { width: 5px; height: var(--h); border-radius: 2px 2px 0 0; background: linear-gradient(var(--p-love), #f3b4c6); }

/* ---- Calculator: a glowing display and a graph drawing itself ---- */
.play-ca-screen {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: linear-gradient(160deg, #3a1f36, #24152a);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 10px 24px rgba(0, 0, 0, 0.35);
    font-family: var(--p-mono);
    color: #f6e3ee;
}
.play-ca-expr { min-height: 1.3em; font-size: 0.8rem; color: #c9a7bd; white-space: nowrap; }
.play-ca-res { min-height: 1.2em; font-size: 1.55rem; line-height: 1.15; text-shadow: 0 0 12px rgba(255, 140, 180, 0.55); font-variant-numeric: tabular-nums; }
.play-ca-res.pop { animation: play-pop 0.5s ease; }
.play-ca-graph { position: relative; display: block; margin-top: 8px; height: 46px; border: 1px solid var(--p-rule); border-radius: 8px; background: var(--p-wash); overflow: hidden; }
.play-ca-graph svg { display: block; width: 100%; height: 100%; overflow: visible; }
.play-ca-axis { stroke: #ddd5c8; stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
.play-ca-curve { fill: none; stroke: var(--p-love); stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.play-ca-fn { position: absolute; left: 7px; top: 3px; font-size: 0.68rem; font-style: italic; color: var(--p-faint); }

/* ---- World clock ---- */
.play-wc-list { display: flex; flex-direction: column; margin-top: 8px; }
.play-wc-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px dashed var(--p-rule); }
.play-wc-row:last-child { border-bottom: 0; }
.play-wc-sky { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #f2b84b; box-shadow: 0 0 0 3px rgba(242, 184, 75, 0.2); transition: background 0.6s ease; }
.play-wc-row[data-time="eve"] .play-wc-sky { background: #e8735a; box-shadow: 0 0 0 3px rgba(232, 115, 90, 0.2); }
.play-wc-row[data-time="night"] .play-wc-sky { background: #4a4f8a; box-shadow: 0 0 0 3px rgba(74, 79, 138, 0.18); }
.play-wc-city { flex: 1; min-width: 0; font-size: 0.93rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-wc-city small { display: block; font-size: 0.68rem; font-style: italic; color: var(--p-faint); }
.play-wc-time { font-size: 1.15rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.play-wc-time small { margin-left: 3px; font-size: 0.68rem; color: var(--p-faint); }
.play-wc-time .blink { font-weight: normal; animation: play-blink 1s steps(1) infinite; }

/* ---------------------------------------------------------------------
   Everything on the site
   --------------------------------------------------------------------- */
.find { margin-top: 34px; }
.find-surprise svg { fill: currentColor; stroke: none; }
.find-box { position: relative; margin-bottom: 18px; }
.find-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid #d9d3c7;
    border-radius: 999px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.find-search:focus-within { border-color: var(--p-accent); box-shadow: 0 0 0 4px rgba(138, 43, 29, 0.1); }
.find-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--p-muted); stroke-width: 2; stroke-linecap: round; }
.find-search input {
    flex: 1;
    min-width: 0;
    padding: 11px 0;
    border: 0;
    outline: none;
    background: none;
    font: inherit;
    font-size: 1rem;
    color: var(--p-ink);
}
.find-search input::placeholder { color: var(--p-faint); font-style: italic; }
.find-search kbd { padding: 0 7px; border: 1px solid var(--p-rule); border-radius: 5px; font-family: var(--p-mono); font-size: 0.75rem; color: var(--p-faint); }
.find-search:focus-within kbd { display: none; }
.find-results {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    padding: 6px;
    border: 1px solid var(--p-rule);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(40, 30, 10, 0.16);
    animation: play-drop 0.2s ease;
}
.find-results[hidden] { display: none; }
.find-none { padding: 10px 12px; font-style: italic; color: var(--p-muted); }

.find-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 22px; }
.play p.find-group-name { margin-bottom: 4px; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--p-faint); }
a.find-page, a.find-page:visited, a.find-hit, a.find-hit:visited {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 8px;
    margin: 0 -8px;
    border-radius: 8px;
    color: var(--p-ink);
    text-decoration: none;
    transition: background 0.18s ease;
}
a.find-hit { margin: 0; }
a.find-page:hover, a.find-hit:hover, a.find-hit.on { background: var(--p-wash); }
.find-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--p-wash);
    border: 1px solid var(--p-rule);
    transition: background 0.2s ease, transform 0.25s ease;
}
.find-ico svg { width: 17px; height: 17px; fill: none; stroke: var(--p-accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
a.find-page:hover .find-ico, a.find-hit.on .find-ico { background: #fff; transform: rotate(-6deg) scale(1.06); }
.find-txt { display: flex; flex-direction: column; min-width: 0; }
.find-name { font-size: 0.95rem; line-height: 1.25; }
.find-name .play-new { margin-left: 5px; }
.find-about { font-size: 0.78rem; line-height: 1.35; color: var(--p-muted); }

/* ---------------------------------------------------------------------
   Movement
   --------------------------------------------------------------------- */
@keyframes play-blink { 50% { opacity: 0; } }
@keyframes play-pop { 0% { transform: scale(0.9); opacity: 0.3; } 60% { transform: scale(1.06); } 100% { transform: none; opacity: 1; } }
@keyframes play-draw { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
@keyframes play-drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.find-surprise.is-spinning svg { animation: fresh-spin 0.5s ease; }

@media (prefers-reduced-motion: reduce) {
    a.play-tile, a.play-tile.is-ready { transition: none; transform: none; }
    .play-wx-path, .play-ca-res.pop, .play-ty-text .caret, .play-wc-time .blink { animation: none; }
}

/* ---------------------------------------------------------------------
   Smaller screens
   --------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .play-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .find-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
}
@media (max-width: 560px) {
    .play-grid { grid-template-columns: 1fr; gap: 12px; }
    a.play-tile { min-height: 0; }
    .play-ty-screen { min-height: 70px; }
    a.play-tile.is-ready:hover { transform: none; }
    .find-groups { grid-template-columns: 1fr; }
    .play-sub { display: none; }
}
