/* ==================================================================
   DAYFORGE (2.0.0)
   A home screen: a wallpaper, tiles laid over it, and a dock of tools. Every rule starts with .dayforge or .df-, so nothing
   here touches the site's own styles.
================================================================== */
.dayforge {
    --df-ink: #4b4032; --df-soft: #6a645c; --df-brown: #8b5e3c; --df-gold: #d9a65a;
    --df-tile: #fffdf8; --df-line: #e6dcc8; --df-wash: #f6efe0; --df-glow: rgba(217, 166, 90, 0.55);
    margin: 0;
    padding: 16px 16px 120px;
    min-height: 100vh;
    z-index: 0;
    box-sizing: border-box;
    font-family: Georgia, serif;
    font-size: 17px;
    line-height: 1.5;
    color: var(--df-ink);
    position: relative;
}
.dayforge *, .dayforge *::before, .dayforge *::after { box-sizing: border-box; }
.dayforge [hidden] { display: none !important; }
.dayforge p { margin: 0; }
.df-loading { text-align: center; color: var(--df-soft); padding: 2rem 0; }

/* ---------------------------------------------------------------- the stack */
.df-stack-list { position: relative; z-index: 0; display: flex; flex-direction: column; row-gap: 14px; max-width: 680px; margin: 0 auto; }
.dayforge.is-free .df-stack-list { max-width: none; }

.df-widget {
    position: relative;
    background: var(--df-tile);
    color: var(--df-ink);
    border: 1px solid var(--df-line);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, opacity 0.15s ease-out;
    will-change: transform;
}
.df-stack-list.is-snapping .df-widget { transition: none; }
.df-widget.is-dragging {
    z-index: 5; opacity: 0.95; transition: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 2px var(--df-glow);
}
.df-widget.is-dragging.is-settling { transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.25); }   /* a small overshoot as it lands */
.df-widget.is-dragging.is-outside { opacity: 0.55; }
.df-widget.is-grabbed { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 3px var(--df-gold); transform: scale(1.01); }
.df-widget.is-pulse { animation: df-pulse 0.65s ease-out; }
@keyframes df-pulse { 0% { box-shadow: 0 0 0 0 var(--df-glow); } 100% { box-shadow: 0 0 0 14px rgba(217, 166, 90, 0); } }

/* where the tile will land */
.df-slot {
    position: absolute; left: 0; right: 0; z-index: -1; pointer-events: none;
    border: 2px dashed var(--df-gold); border-radius: 12px; background: rgba(217, 166, 90, 0.10);
    box-shadow: 0 0 10px var(--df-glow);
    transition: top 0.15s ease-out;
}
.dayforge.is-dragging { user-select: none; -webkit-user-select: none; }
.dayforge.is-dragging .df-widget:not(.is-dragging) .df-tools { opacity: 0.4; }

/* ---------------------------------------------------------------- the head of a tile */
.df-head {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px 6px 4px;
    border-bottom: 1px solid var(--df-line);
    background: var(--df-wash);
    border-radius: 11px 11px 0 0;
}
.df-title {
    flex: 1 1 auto; min-width: 0;
    font-size: 14px; font-weight: bold; letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-brown);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.df-ico { margin-right: 7px; font-size: 16px; letter-spacing: 0; }
.df-tools { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; gap: 6px; transition: opacity 0.15s ease; }

/* the three controls look nothing like each other: a grip, two word buttons, a switch */
.dayforge button { font-family: inherit; margin: 0; text-transform: none; letter-spacing: 0; box-shadow: none; }

.df-handle {
    flex: 0 0 auto; width: 34px; height: 34px; padding: 0;
    border: 0; border-radius: 8px; background: transparent;
    color: var(--df-brown); font-size: 20px; line-height: 1; letter-spacing: -2px;
    cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
    transition: opacity 0.15s ease, background 0.15s ease;
}
.df-handle:hover { background: rgba(139, 94, 60, 0.12); }
.df-widget.is-dragging .df-handle, .dayforge.is-dragging .df-handle { cursor: grabbing; }
.df-handle[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.df-handle[aria-disabled="true"]:hover { background: transparent; }

.df-btn {
    padding: 4px 13px; min-height: 30px;
    border: 1px solid var(--df-brown); border-radius: 999px; background: transparent;
    color: var(--df-brown); text-decoration: none; display: inline-flex; align-items: center; font-size: 14px; font-weight: bold; line-height: 1.2;
    cursor: pointer; transition: background 0.12s ease, color 0.12s ease;
}
.df-btn:hover { background: var(--df-brown); color: #fff; }
.is-dark .df-btn:hover, .is-dark .df-btn-main, .is-dark .df-edit[aria-expanded="true"], .is-dark .df-numeral { color: #1b1436; }
.df-copy { border-style: dashed; }
.df-edit[aria-expanded="true"] { background: var(--df-brown); color: #fff; }
.df-btn-main { background: var(--df-brown); color: #fff; }
.df-btn-main:hover { background: #6f4a2e; }

.df-icon {
    width: 30px; height: 30px; padding: 0; flex: 0 0 auto;
    border: 0; border-radius: 50%; background: transparent; color: var(--df-brown);
    font-size: 17px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.df-icon:hover { background: var(--df-wash); filter: brightness(1.1); }
.df-remove { font-size: 24px; }

.dayforge button:focus-visible, .dayforge a:focus-visible, .dayforge input:focus-visible, .dayforge select:focus-visible { outline: 3px solid var(--df-gold); outline-offset: 2px; }

/* ---------------------------------------------------------------- inside a tile */
.df-body { padding: 14px 18px 16px; }
.df-body > * + * { margin-top: 8px; }
.df-big { font-size: 25px; line-height: 1.25; color: var(--df-ink); }
.df-sub { color: var(--df-soft); font-size: 15px; margin-top: 2px !important; }
.df-line { font-size: 16px; }
.df-note { font-size: 13.5px; color: var(--df-soft); }
.df-flag { background: #fff8c4; border: 1px solid #e0c96d; border-radius: 6px; padding: 4px 8px; color: #4b4032; }
.df-dim { color: var(--df-soft); font-size: 0.85em; }
.df-centre { text-align: center; }
.df-quote { font-style: italic; color: var(--df-brown); padding-left: 12px; border-left: 3px solid var(--df-gold); }
.df-story { font-size: 21px; line-height: 1.4; font-style: italic; text-align: center; padding: 6px 4px; }
.df-task { background: var(--df-wash); border-radius: 8px; padding: 8px 12px; font-size: 16px; }
.df-glyph { color: var(--df-brown); }
.df-han { color: var(--df-brown); margin-left: 6px; }

.df-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15.5px; padding: 3px 0; border-bottom: 1px dotted var(--df-line); margin-top: 0 !important; }
.df-row:first-child { margin-top: 0; }
.df-big + .df-row, .df-sub + .df-row, .df-side + .df-row, .df-line + .df-row { margin-top: 8px !important; }
.df-k { color: var(--df-soft); }
.df-v { text-align: right; font-variant-numeric: tabular-nums; }

.df-bar { height: 10px; border-radius: 5px; background: var(--df-wash); border: 1px solid var(--df-line); overflow: hidden; }
.df-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--df-gold), var(--df-brown)); border-radius: 5px 0 0 5px; }

.df-pair { display: flex; gap: 16px; }
.df-half { flex: 1 1 0; min-width: 0; text-align: center; }
.df-half svg { display: block; margin: 0 auto 2px; }
.df-half .df-row { text-align: left; }
.df-label { font-size: 18px; }
.df-state { font-size: 13.5px; margin-bottom: 6px !important; }
.df-state.is-up { color: var(--df-brown); font-weight: bold; }
.df-state.is-down { color: var(--df-soft); }

.df-scale { position: relative; height: 8px; margin: 16px 8px 6px; border-radius: 4px; background: linear-gradient(90deg, #f2c14e, #e9dcbf); border: 1px solid var(--df-line); }
.df-scale-dot { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #4f7fa8; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--df-brown); }
.df-scale-ends { display: flex; justify-content: space-between; font-size: 12.5px; line-height: 1.3; color: var(--df-soft); margin-top: 4px !important; }
.df-scale-ends span:last-child { text-align: right; }

.df-side { display: flex; align-items: center; gap: 14px; }
.df-emoji { font-size: 44px; line-height: 1; }
.df-numeral {
    flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: #fff; background: var(--df-brown); box-shadow: 0 0 0 3px var(--df-tile), 0 0 0 5px var(--df-gold);
    margin: 5px;
}
.df-compass {
    flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; margin: 5px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--df-brown); box-shadow: 0 0 0 3px var(--df-tile), 0 0 0 5px var(--df-gold);
    font-size: 30px; color: var(--df-brown); background: transparent;
}
.df-compass span { display: block; line-height: 1; }

.df-stack { display: flex; height: 22px; border-radius: 6px; overflow: hidden; border: 1px solid var(--df-line); }
.df-stack span { display: block; height: 100%; }
.df-stack span + span { border-left: 2px solid var(--df-tile); }
.df-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.df-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.df-sigil-wrap { display: flex; justify-content: center; }
.df-sigil { width: 190px; height: 190px; color: var(--df-brown); }

.df-events { list-style: none; margin: 0; padding: 0; }
.df-events li { display: flex; align-items: baseline; gap: 12px; padding: 5px 0; border-bottom: 1px dotted var(--df-line); font-size: 16px; }
.df-ev-days { flex: 0 0 88px; text-align: right; font-weight: bold; color: var(--df-brown); font-variant-numeric: tabular-nums; }
.df-ev-name { flex: 1 1 auto; min-width: 0; }
.df-ev-name small { display: block; font-size: 12.5px; color: var(--df-soft); }

/* ---------------------------------------------------------------- the Edit panel: slides down inside the tile */
.df-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.15s ease; border-top: 1px solid transparent; }
.df-panel.is-open { grid-template-rows: 1fr; border-top-color: var(--df-line); }
.df-panel-inner { overflow: hidden; min-height: 0; }
.df-form, .df-sheet-box {
    --df-ink: #4b4032; --df-soft: #6a645c; --df-brown: #8b5e3c; --df-gold: #d9a65a; --df-line: #e6dcc8; --df-wash: #f6efe0;
    color: var(--df-ink);
}
.df-form { padding: 14px 18px 16px; background: #f6efe0; border-radius: 0 0 11px 11px; }
.df-form .df-btn:hover, .df-sheet-box .df-btn:hover, .df-form .df-btn-main, .df-sheet-box .df-btn-main { color: #fff; }
.df-form::before { content: "Edit"; display: block; font-size: 13px; font-weight: bold; letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-brown); margin-bottom: 8px; }
.df-field { display: block; margin: 0 0 12px !important; font-size: 15.5px; }
.df-field > span:first-child { display: block; margin-bottom: 3px; }
.df-check { display: flex !important; align-items: flex-start; gap: 10px; cursor: pointer; min-height: 30px; font-size: 15.5px; }
.df-check input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--df-brown); }
.df-check > span:first-child { margin: 0; }
.df-form select, .df-form input[type="number"], .df-form input[type="datetime-local"] {
    width: 100%; max-width: 100%; min-height: 38px; padding: 6px 8px;
    font: inherit; font-size: 15.5px; color: var(--df-ink);
    background: #fff; border: 1px solid #cdbfa3; border-radius: 6px;
}
.df-checks { border: 1px solid #cdbfa3; border-radius: 8px; padding: 6px 12px 10px; margin: 0 0 12px; background: #fff; max-height: 300px; overflow-y: auto; }
.df-checks legend { padding: 0 6px; font-size: 15.5px; }
.df-group { font-size: 12.5px; font-weight: bold; letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-brown); margin: 10px 0 4px !important; }
.df-action-note { font-size: 13.5px; color: var(--df-soft); }
.df-error { color: #9c2f1f; font-weight: bold; font-size: 15px; margin-bottom: 10px !important; }
.df-actions { display: flex; gap: 10px; margin-top: 4px; }
.df-actions .df-btn { min-height: 44px; padding: 8px 26px; font-size: 16px; }

/* ---------------------------------------------------------------- messages */
.df-link { border: 0; background: none; padding: 6px; color: var(--df-brown); font-size: 14px; text-decoration: underline; cursor: pointer; }
.df-link:hover { color: #000; }
.df-widget .df-link:hover { color: var(--df-ink); }
.df-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.df-toast {
    position: fixed; left: 50%; bottom: 84px; z-index: 300000; transform: translate(-50%, 30px);
    padding: 9px 18px; border-radius: 999px; background: var(--df-ink); color: #fff; font-size: 15px;
    opacity: 0; pointer-events: none; transition: transform 0.2s ease, opacity 0.2s ease; max-width: 90vw;
}
.df-toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------------------------------------------------------------- the free layout (desktop only): tiles anywhere, any size */
.df-resize { display: none; }

.dayforge.is-free .df-stack-list { display: block; min-height: 420px; }
.dayforge.is-free .df-widget { position: absolute; display: flex; flex-direction: column; min-width: 0; transition: box-shadow 0.15s ease-out, opacity 0.15s ease-out; }
.dayforge.is-free .df-widget > * { flex: 0 0 auto; }
.dayforge.is-free .df-widget.has-height > .df-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.dayforge.is-free .df-widget.is-dragging { transform: scale(1.02); }
.dayforge.is-free .df-widget.is-sizing { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 2px var(--df-glow); }
.dayforge.is-free .df-widget.is-editing { height: auto !important; z-index: 100000 !important; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); }
.dayforge.is-free .df-resize {
    display: block; position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; z-index: 2;
    cursor: nwse-resize; touch-action: none; border-radius: 0 0 11px 0;
    background: linear-gradient(135deg, transparent 50%, var(--df-gold) 50%, var(--df-gold) 58%, transparent 58%, transparent 68%, var(--df-gold) 68%, var(--df-gold) 76%, transparent 76%, transparent 86%, var(--df-gold) 86%);
    opacity: 0.75;
}
.dayforge.is-free .df-resize:hover, .dayforge.is-free .is-sizing .df-resize { opacity: 1; }
.dayforge.is-free.is-editing .df-resize { display: none; }
/* a faint grid shows while a tile is on the move: tiles settle on it */
.dayforge.is-free.is-dragging .df-stack-list { background-image: radial-gradient(circle, rgba(139, 94, 60, 0.28) 1px, transparent 1.6px); background-size: 20px 20px; }
.dayforge.is-free .df-story { font-size: 19px; }

/* ---------------------------------------------------------------- phones and fingers */
@media (pointer: coarse) {
    .df-handle { width: 44px; height: 44px; font-size: 24px; }
    .df-btn { min-height: 38px; padding: 6px 14px; }
    .df-icon { width: 40px; height: 40px; }
    .df-check { min-height: 44px; align-items: center; }
    .df-check input { width: 24px; height: 24px; margin: 0; }
    .df-chip { min-height: 44px; }
    .df-slot { border-width: 3px; }
}
@media (max-width: 480px) {
    .dayforge { padding: 8px 6px 130px; font-size: 16px; }
    .df-head { flex-wrap: wrap; row-gap: 2px; padding-right: 6px; }
    .df-title { font-size: 13px; letter-spacing: 0.05em; }
    .df-tools { gap: 5px; }
    .df-btn { padding: 4px 10px; font-size: 13px; }
    .df-body { padding: 12px 14px 14px; }
    .df-big { font-size: 22px; }
    .df-pair { gap: 10px; }
    .df-ev-days { flex-basis: 76px; }
    .df-story { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
    .df-widget, .df-slot, .df-panel, .df-toast { transition: none !important; }
    .df-widget.is-pulse { animation: none; }
}


/* ---------------------------------------------------------------- the home screen: wallpaper, empty wall, dock */
body.df-start { margin: 0; background: #fdfcf9; color: #4b4032; font-family: Georgia, serif; }
.df-hidden-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.df-wall { position: fixed; inset: 0; z-index: -1; background: #fdfcf9; }
.dayforge.is-dragging iframe { pointer-events: none; }        /* or an app would swallow the pointer mid-drag */

.df-empty {
    max-width: 460px; margin: 16vh auto 0; padding: 26px 28px; text-align: center;
    background: rgba(255, 253, 248, 0.92); border: 1px solid #e6dcc8; border-radius: 16px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    --df-brown: #8b5e3c;
}
.df-empty-title { font-size: 28px; letter-spacing: 0.3em; text-indent: 0.3em; color: #8b5e3c; margin-bottom: 8px !important; }
.df-empty-go { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px !important; }
.df-empty .df-btn { min-height: 44px; padding: 8px 20px; font-size: 16px; }
.df-empty .df-btn:hover, .df-empty .df-btn-main { color: #fff; }

.df-dock {
    position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 150000;
    display: flex; gap: 2px; padding: 5px; max-width: calc(100vw - 16px); overflow-x: auto;
    background: rgba(43, 33, 24, 0.82); border-radius: 999px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.df-dock-btn {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 15px; min-height: 40px; border: 0; border-radius: 999px; background: transparent;
    color: #f6e7b8; font-family: Georgia, serif; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.df-dock-btn:hover { background: rgba(246, 231, 184, 0.18); color: #fff; }
.dayforge.has-sheet .df-dock { display: none; }

/* a tile holding a Ramapani app */
.df-widget.is-app > .df-body { padding: 0; }
.df-frame { display: block; width: 100%; border: 0; border-radius: 0 0 11px 11px; background: #f4eee0; }
.dayforge.is-free .df-widget.is-app.has-height > .df-body { overflow: hidden; }
.dayforge.is-free .df-widget.has-height .df-frame { height: 100% !important; }

/* a tile with its title bar hidden: the bar appears as a tab just above the tile when the tile is pointed at,
   tapped or focused, so it never covers what is in the tile. Near the top of the screen it appears just below. */
.df-widget.no-title > .df-head {
    position: absolute; left: -1px; right: -1px; bottom: calc(100% - 1px); z-index: 3;
    border: 1px solid var(--df-line); border-bottom: 0; border-radius: 11px 11px 0 0;
    background: var(--df-tile); box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.14);
    opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
}
.df-widget.no-title.is-bar-below > .df-head {
    bottom: auto; top: calc(100% - 1px);
    border-bottom: 1px solid var(--df-line); border-top: 0; border-radius: 0 0 11px 11px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.14);
}
.df-widget.no-title:hover > .df-head, .df-widget.no-title:focus-within > .df-head, .df-widget.no-title.is-active > .df-head,
.df-widget.no-title.is-dragging > .df-head, .df-widget.no-title.is-editing > .df-head, .df-widget.no-title.is-grabbed > .df-head { opacity: 1; pointer-events: auto; }
/* while its bar shows, the tile comes to the front so the bar is not hidden behind a neighbour */
.df-widget.no-title:hover, .df-widget.no-title:focus-within, .df-widget.no-title.is-active { z-index: 99999 !important; }
.df-widget.no-title.is-editing { z-index: 100000 !important; }
.df-widget.no-title > .df-body { border-radius: 11px; }
.df-widget.no-title .df-frame { border-radius: 11px; }

/* ---------------------------------------------------------------- sheets: Add, Wallpaper, Colours and the wizard */
.df-sheet { position: fixed; inset: 0; z-index: 200000; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(24, 16, 8, 0.38); }
.df-sheet-box {
    width: min(760px, 100%); max-height: min(86vh, 860px); display: flex; flex-direction: column;
    background: #fffdf8; border-radius: 16px; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4); font-size: 16px;
}
.df-sheet-small { width: min(440px, 100%); }
.df-sheet-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 10px 20px; border-bottom: 1px solid #e6dcc8; }
.df-sheet-head h2 { margin: 0; font-size: 20px; font-weight: normal; color: #8b5e3c; }
.df-sheet-head h2:hover { color: #8b5e3c; }
.df-sheet-x { font-size: 26px; width: 36px; height: 36px; }
.df-sheet-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 20px 20px; }
.df-sheet-body > * + * { margin-top: 12px; }
.df-sheet-body .df-field { margin-bottom: 0 !important; }
.df-sheet-body input[type="number"] { width: 100%; min-height: 38px; padding: 6px 8px; font: inherit; color: #4b4032; background: #fff; border: 1px solid #cdbfa3; border-radius: 6px; }
.df-sheet-body input[type="range"] { width: 100%; accent-color: #8b5e3c; }

.df-pick-head { margin: 18px 0 8px; font-size: 13px; font-weight: bold; letter-spacing: 0.08em; text-transform: uppercase; color: #8b5e3c; }
.df-pick-head:hover { color: #8b5e3c; }
.df-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 0 !important; }
.df-pick {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; min-height: 58px; text-align: left;
    border: 1px solid #e6dcc8; border-radius: 10px; background: #fff; color: #4b4032; cursor: pointer;
}
.df-pick:hover { border-color: #8b5e3c; }
.df-pick-ico { flex: 0 0 auto; font-size: 24px; width: 30px; text-align: center; }
.df-pick-words { flex: 1 1 auto; min-width: 0; }
.df-pick-words b { display: block; font-size: 15px; }
.df-pick-words small { display: block; font-size: 12.5px; line-height: 1.3; color: #6a645c; }
.df-pick-tick { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #cdbfa3; color: transparent; font-size: 14px; line-height: 20px; text-align: center; }
.df-pick[aria-pressed="true"] { background: #fff8e1; border-color: #d9a65a; box-shadow: inset 0 0 0 1px #d9a65a; }
.df-pick[aria-pressed="true"] .df-pick-tick { background: #8b5e3c; border-color: #8b5e3c; color: #fff; }

.df-walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.df-wall-thumb { position: relative; aspect-ratio: 16 / 9; padding: 0; border: 2px solid #e6dcc8; border-radius: 10px; overflow: hidden; cursor: pointer; }
.df-wall-thumb span { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px; font-size: 12.5px; color: #fff; background: rgba(24, 16, 8, 0.6); }
.df-wall-thumb:hover { border-color: #8b5e3c; }
.df-wall-thumb[aria-pressed="true"] { border-color: #d9a65a; box-shadow: 0 0 0 3px #d9a65a; }
.df-file { position: relative; cursor: pointer; min-height: 40px; padding: 8px 18px; }
.df-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.df-file:focus-within { outline: 3px solid #d9a65a; outline-offset: 2px; }

.df-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px !important; }
.df-swatch { width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 2px solid #cdbfa3; cursor: pointer; }
.df-swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px #fffdf8, 0 0 0 5px #8b5e3c; }
.df-swatch-own { position: relative; overflow: hidden; background: conic-gradient(#e8891d, #f5cf2e, #6f9a5b, #4f7fa8, #8a5bb0, #c8553d, #e8891d); }
.df-swatch-own input { position: absolute; inset: -8px; width: 60px; height: 60px; opacity: 0; cursor: pointer; }

.df-wizard { width: min(820px, 100%); }
.df-wizard .df-sheet-body { display: flex; flex-direction: column; padding-bottom: 0; }
.df-wiz-steps { flex: 0 0 auto; display: flex; gap: 6px; }
.df-wiz-steps span { flex: 1 1 0; height: 5px; border-radius: 3px; background: #e6dcc8; }
.df-wiz-steps .is-done { background: #d9a65a; }
.df-wiz-steps .is-on { background: #8b5e3c; }
.df-wiz-body { flex: 1 1 auto; }
.df-wiz-body > * + * { margin-top: 12px; }
.df-wiz-lead { font-size: 20px; }
.df-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.df-wiz-latlng { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.df-wiz-foot { flex: 0 0 auto; position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 16px -20px 0; padding: 12px 20px; background: #fffdf8; border-top: 1px solid #e6dcc8; border-radius: 0 0 16px 16px; }
.df-wiz-foot .df-btn { min-height: 44px; padding: 8px 26px; font-size: 16px; }

@media (max-width: 480px) {
    .df-dock-btn { padding: 9px 11px; font-size: 14px; }
    .df-sheet { padding: 6px; align-items: flex-end; }
    .df-sheet-box { max-height: 92vh; }
    .df-wiz-latlng { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- notes and the to-do list */
/* the writing boxes take their colours from the tile, so they read well on light and dark tiles alike */
.df-widget { --df-field: rgba(255, 255, 255, 0.6); --df-field-on: #fff; --df-tick-mark: #fff; }
.df-widget.is-dark { --df-field: rgba(0, 0, 0, 0.28); --df-field-on: rgba(0, 0, 0, 0.42); --df-tick-mark: #1b1436; }
.df-notes, .df-todo-new {
    display: block; width: 100%; box-sizing: border-box;
    font: inherit; font-size: 16px; line-height: 1.5; color: var(--df-ink);
    background: var(--df-field); border: 1px solid var(--df-line); border-radius: 8px; padding: 8px 12px;
}
.df-notes::placeholder, .df-todo-new::placeholder, .df-todo-text::placeholder { color: var(--df-soft); opacity: 1; }
.df-notes { min-height: 160px; resize: vertical; }
.df-notes:focus, .df-todo-new:focus { outline: none; border-color: var(--df-gold); box-shadow: 0 0 0 2px var(--df-glow); background: var(--df-field-on); }
.df-notes.is-small { font-size: 14px; } .df-notes.is-large { font-size: 19px; }
.df-notes.is-sans { font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
.df-notes.is-hand { font-family: "Segoe Print", "Bradley Hand", "Comic Neue", "Comic Sans MS", cursive; }
.df-notes.is-mono { font-family: Consolas, "Cascadia Mono", "Courier New", monospace; }
.df-notes.is-lined {
    background-image: linear-gradient(transparent calc(1.5em - 1px), var(--df-line) calc(1.5em - 1px), var(--df-line) 1.5em, transparent 1.5em);
    background-size: 100% 1.5em; background-position: 0 8px; background-attachment: local;
}
.dayforge.is-free .df-widget.is-tool.has-height > .df-body { display: flex; flex-direction: column; }
.dayforge.is-free .df-widget.is-tool.has-height .df-notes { flex: 1 1 auto; min-height: 60px; resize: none; }
.dayforge.is-free .df-widget.is-tool.has-height .df-todo-list { flex: 1 1 auto; overflow-y: auto; }
.df-todo-add { display: flex; gap: 8px; align-items: center; }
.df-todo-add .df-btn { min-height: 40px; padding: 6px 18px; }
.df-todo-new { flex: 1 1 auto; min-height: 40px; }
.df-todo-list { list-style: none; margin: 8px 0 0; padding: 0; }
.df-todo-item { display: flex; align-items: center; gap: 8px; padding: 2px 0; border-bottom: 1px dotted var(--df-line); }
.df-todo-item.is-sub { padding-left: 30px; }
.df-todo-item.is-sub .df-todo-text { font-size: 15px; }
/* the tick box, square or round, drawn here so that it suits every tile colour */
.df-todo-tick {
    -webkit-appearance: none; appearance: none; flex: 0 0 auto; position: relative;
    width: 22px; height: 22px; margin: 0; cursor: pointer;
    border: 2px solid var(--df-brown); border-radius: 5px; background: var(--df-field);
    transition: background 0.12s ease;
}
.df-todo-list.is-round .df-todo-tick { border-radius: 50%; }
.df-todo-item.is-sub .df-todo-tick { width: 19px; height: 19px; }
.df-todo-tick:checked { background: var(--df-brown); }
.df-todo-tick:checked::after {
    content: ""; position: absolute; left: 50%; top: 45%; width: 30%; height: 55%;
    border: solid var(--df-tick-mark); border-width: 0 2.5px 2.5px 0; transform: translate(-50%, -50%) rotate(45deg);
}
.df-todo-tick:focus-visible { outline: 3px solid var(--df-gold); outline-offset: 2px; }
.df-todo-text {
    flex: 1 1 auto; min-width: 0; min-height: 38px; padding: 4px 6px;
    font: inherit; font-size: 16px; color: var(--df-ink);
    background: transparent; border: 1px solid transparent; border-radius: 6px;
}
.df-todo-text:hover { border-color: var(--df-line); }
.df-todo-text:focus { outline: none; border-color: var(--df-gold); background: var(--df-field-on); }
.df-todo-item.is-done .df-todo-text { color: var(--df-soft); }
.df-todo-list.is-strike .df-todo-item.is-done .df-todo-text { text-decoration: line-through; }
.df-todo-del, .df-todo-sub { flex: 0 0 auto; opacity: 0.35; }
.df-todo-sub { font-size: 16px; }
.df-todo-item:hover .df-todo-del, .df-todo-item:hover .df-todo-sub, .df-todo-item:focus-within .df-todo-sub, .df-todo-item:focus-within .df-todo-del,
.df-todo-del:focus-visible, .df-todo-sub:focus-visible { opacity: 1; }
@media (hover: none) { .df-todo-del, .df-todo-sub { opacity: 0.7; min-width: 40px; min-height: 40px; } .df-todo-tick { width: 26px; height: 26px; } }
.df-tool-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px !important; }
.df-tool-links { display: inline-flex; gap: 4px; }
.dayforge textarea:focus-visible { outline: 3px solid var(--df-gold); outline-offset: 2px; }

/* ---------------------------------------------------------------- day length, Moon sign, wheel, hexagram, mandala */
.df-center { text-align: center; }
.df-dim-line { color: var(--df-soft); font-size: 15px; }
.df-wheel-wrap, .df-hex-wrap { display: flex; align-items: center; gap: 16px; }
.df-wheel-wrap { flex-wrap: wrap; justify-content: center; }
.df-wheel-wrap > div, .df-hex-wrap > div { min-width: 0; }
.df-wheel { flex: 0 0 auto; width: 220px; height: 181px; color: var(--df-brown); font-family: Georgia, serif; }
.df-ogham { font-size: 1.25em; color: var(--df-brown); }
.df-hex { flex: 0 0 auto; width: 54px; height: 66px; color: var(--df-brown); }
.df-mandala-link { display: block; width: min(100%, 320px); margin: 0 auto; border-radius: 50%; }
.df-mandala { display: block; width: 100%; height: auto; border-radius: 50%; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); transition: transform 0.2s ease; }
.df-mandala-link:hover .df-mandala { transform: scale(1.02); }
.dayforge.is-free .df-widget.has-height[data-id="mandala"] .df-mandala-link { width: auto; max-width: 100%; height: calc(100% - 64px); aspect-ratio: 1; }
@media (max-width: 420px) { .df-wheel-wrap { flex-direction: column; } }

/* ---------------------------------------------------------------- the gratitude log and my dates */
.df-grat-day { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.df-grat-day .df-moon { flex: 0 0 auto; }
.df-grat-prompt { font-style: italic; color: var(--df-brown); margin-top: 2px !important; }
.df-grat-list { margin: 6px 0 0; padding-left: 26px; }
.df-grat-list li { padding: 2px 0; color: var(--df-soft); }
.df-grat-line, .df-dates-add input[type="text"], .df-dates-add input[type="date"] {
    width: 100%; box-sizing: border-box; min-height: 38px; padding: 5px 10px;
    font: inherit; font-size: 16px; color: var(--df-ink);
    background: var(--df-field); border: 1px solid var(--df-line); border-radius: 6px;
}
.df-grat-line:focus, .df-dates-add input:focus { outline: none; border-color: var(--df-gold); box-shadow: 0 0 0 2px var(--df-glow); background: var(--df-field-on); }
.df-grat-line::placeholder, .df-dates-add input::placeholder { color: var(--df-soft); opacity: 1; }
.df-widget.is-dark .df-dates-add input[type="date"] { color-scheme: dark; }
.df-grat-past { opacity: 0.7; font-size: 15px; }
.df-grat-past ul, .df-grat-earlier ul { margin: 2px 0 6px; padding-left: 22px; }
.df-grat-past .df-k, .df-grat-earlier .df-k { font-size: 13px; margin: 6px 0 0; }
.df-grat-earlier { font-size: 15px; }
.df-grat-earlier summary { cursor: pointer; color: var(--df-brown); font-size: 14px; }
.df-dates-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.df-dates-add .df-dates-name { flex: 1 1 100%; }
.df-dates-add .df-dates-date { flex: 1 1 150px; width: auto; }
.df-dates-add .df-check { min-height: 38px; align-items: center; font-size: 15px; }
.df-dates-add .df-btn { min-height: 38px; padding: 6px 18px; margin-left: auto; }
.df-dates-list { list-style: none; margin: 8px 0 0; padding: 0; }
.df-dates-item { display: flex; align-items: baseline; gap: 12px; padding: 5px 0; border-bottom: 1px dotted var(--df-line); font-size: 16px; }
.df-dates-item .df-ev-name { flex: 1 1 auto; min-width: 0; }
.df-dates-item .df-ev-name small { display: block; font-size: 12.5px; color: var(--df-soft); }
.df-dates-item .df-todo-del { align-self: center; }
.df-dates-item:hover .df-todo-del { opacity: 1; }
.df-dates-item.is-today .df-ev-name { font-weight: bold; color: var(--df-brown); }
.df-dates-item.is-past { opacity: 0.55; }
/* localhost only */
.df-dock-local { color: #ffb4a3 !important; border-left: 1px dashed rgba(246, 231, 184, 0.35); }
.df-totem { display: flex; align-items: center; gap: 14px; }
.df-totem-pic { flex: 0 0 auto; width: 72px; height: 72px; object-fit: contain; }
.df-meteors { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------------------------------------------------------------- Ramapani Retreats */
.df-rcaption { font-style: italic; color: var(--df-brown); }
.df-rfilters { display: flex; flex-wrap: wrap; gap: 6px; }
.df-chip { border: 1px solid var(--df-line); background: transparent; color: var(--df-ink); border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 13.5px; cursor: pointer; }
.df-chip[aria-pressed="true"] { background: var(--df-brown); border-color: var(--df-brown); color: var(--df-tile-text, #fff); }
.df-widget.is-dark .df-chip[aria-pressed="true"] { color: #1b1436; }
.df-rlist { list-style: none; margin: 4px 0 0; padding: 0; }
.df-rcard { border: 1px solid var(--df-line); border-radius: 10px; margin: 0 0 8px; background: var(--df-field); overflow: hidden; }
.df-rcard.is-today { border-color: var(--df-gold); }
.df-rcard-head { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; padding: 9px 12px; border: 0; background: transparent; color: var(--df-ink); font: inherit; text-align: left; cursor: pointer; }
.df-rcard-head:hover { background: var(--df-wash); }
.df-rflag { grid-column: 1 / -1; font-size: 11.5px; font-weight: bold; letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-brown); }
.df-rtitle { font-size: 17px; font-weight: bold; }
.df-rstate { align-self: center; font-size: 13.5px; font-weight: bold; color: var(--df-brown); }
.df-rcard.is-locked .df-rstate { color: var(--df-soft); font-weight: normal; }
.df-rmeta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--df-soft); }
.df-chal { display: inline-flex; align-items: center; gap: 5px; }
.df-chal-pips { display: inline-flex; gap: 2px; }
.df-chal-pips i { width: 6px; height: 10px; border-radius: 2px; background: var(--df-line); }
.df-chal--1 .is-lit, .df-chal--2 .is-lit { background: #5c9b5a; }
.df-chal--3 .is-lit, .df-chal--4 .is-lit { background: #d29a2c; }
.df-chal--5 .is-lit, .df-chal--6 .is-lit { background: #c0503a; }
.df-rbadge { padding: 1px 8px; border-radius: 999px; font-size: 12px; border: 1px solid currentColor; }
.df-rbadge--free { color: #4f8a4d; } .df-rbadge--patreon { color: #3f7aa6; } .df-rbadge--purchase { color: #b07a1c; } .df-rbadge--radiance { color: #8a4fa6; } .df-rbadge--dev { color: #9c2f1f; }
.df-widget.is-dark .df-rbadge { filter: brightness(1.6); }
.df-rprog { font-size: 12px; color: var(--df-brown); } .df-rprog.is-done { font-weight: bold; }
.df-rcard-body { padding: 0 12px 12px; font-size: 15px; }
.df-rcard-body > * + * { margin-top: 6px; }
.df-ractions { margin-top: 10px !important; }

/* the quick set-up in the wizard */
.df-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.df-quick-pick { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px; border: 1px solid #e6dcc8; border-radius: 10px; background: #fffdf8; color: #4b4032; font: inherit; cursor: pointer; }
.df-quick-pick:hover, .df-quick-pick:focus-visible { border-color: #8b5e3c; box-shadow: 0 0 0 2px rgba(217, 166, 90, 0.55); }
.df-quick-pick b { color: #8b5e3c; font-size: 16px; }
.df-quick-pick small { font-size: 13px; color: #6a645c; line-height: 1.35; }
.df-wiz-quick { background: #f6efe0; border-radius: 8px; padding: 8px 12px; }

/* Age of Brahma: the four ages of a mahayuga, with a marker for now */
.df-yugas { position: relative; display: flex; height: 22px; margin: 10px 0 4px; border-radius: 6px; overflow: hidden; border: 1px solid var(--df-line); font-size: 11.5px; }
.df-yugas span { display: flex; align-items: center; justify-content: center; color: var(--df-ink); background: var(--df-wash); border-right: 1px solid var(--df-line); white-space: nowrap; overflow: hidden; }
.df-yugas span:last-of-type { border-right: 0; }
.df-yugas span.is-now { background: var(--df-gold); color: #2b2118; font-weight: bold; }
.df-yugas i { position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -1px; background: var(--df-brown); }

/* ---------------------------------------------------------------- the timer */
.df-tmodes, .df-tpresets, .df-tbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.df-tclock { margin: 6px 0 4px !important; text-align: center; font-size: 46px; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; color: var(--df-ink); }
.df-tclock.is-over { color: #c0503a; }
.df-widget.is-dark .df-tclock.is-over { color: #ff9a85; }
.df-tbar { margin-bottom: 8px; }
.df-tset { display: flex; gap: 8px; }
.df-tinput { flex: 1 1 auto; min-width: 0; min-height: 36px; padding: 5px 10px; font: inherit; font-size: 15px; color: var(--df-ink); background: var(--df-field); border: 1px solid var(--df-line); border-radius: 6px; }
.df-tinput:focus { outline: none; border-color: var(--df-gold); box-shadow: 0 0 0 2px var(--df-glow); background: var(--df-field-on); }
.df-tinput::placeholder { color: var(--df-soft); opacity: 1; }
.df-tbtns { justify-content: center; margin-top: 8px !important; }
.df-tbtns .df-btn { min-height: 40px; padding: 6px 18px; }
.df-tbtns .df-btn:disabled { opacity: 0.4; cursor: default; }
.df-tlaps { list-style: none; margin: 8px 0 0; padding: 0; max-height: 180px; overflow-y: auto; }
.df-tlaps li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; padding: 3px 0; border-bottom: 1px dotted var(--df-line); font-variant-numeric: tabular-nums; font-size: 15px; }

/* the wizard's first page */
.df-wiz-hero { margin: 18px 0 6px !important; text-align: center; font-size: 30px; line-height: 1.25; color: #4b4032; }
.df-wiz-begin { text-align: center; margin: 16px 0 26px !important; }
.df-wiz-big { min-height: 56px; padding: 12px 56px; font-size: 21px; letter-spacing: 0.04em; }
.df-wiz-or { text-align: center; }

/* popups (Edit, colours, Add, the wizard): the home screen behind is blurred */
.df-sheet { -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.df-edit-sheet .df-form { padding: 0; background: transparent; border-radius: 0; }
.df-edit-sheet .df-form::before { display: none; }
.df-edit-title { padding-bottom: 10px; border-bottom: 1px solid #e6dcc8; }
