/* Tidehold's painted UI kit (22masterra, 2026-10-02; master plan T-H1). The painted elements in ui/ (art/tidehold/ui) laid over the
   game's existing flat styles as 9-slices: the wooden-framed parchment panel for sheets and panels, the parchment tile for cards, glossy
   painted buttons (cream, green "go", gold, red) and the gold medallion. Loaded after index.html's own styles, and it only repaints:
   every border width, padding and size stays index.html's (border-color goes transparent and the painted frame is drawn inward over
   the existing padding with border-image-width), so nothing moves and no layout or test changes. */

/* panels and sheets: the carved wooden frame round a parchment centre */
.panel { background: none; border-color: transparent; box-shadow: 0 8px 24px rgba(20, 30, 40, .32); border-image: url(ui/panel.webp) 44 fill / 16px stretch; }
#where, #quest, #place, #toast, #seeds, .money.panel { border-image-width: 9px; }

/* cards, ship cards, notices: the parchment tile */
.card, .shipcard, .notice, .expand, .capcard { background: none; border-color: transparent; box-shadow: 0 2px 4px rgba(61, 36, 20, .22); border-image: url(ui/card.webp) 26 fill / 8px stretch; }
.card.locked { filter: grayscale(.55) brightness(.95); }

/* buttons: painted and glossy; cream for everyday actions, green for the main one */
button { background: none; border-color: transparent; box-shadow: none; border-image: url(ui/btn.webp) 40 46 46 46 fill / 8px 11px 10px 11px stretch; }
button.go { border-image-source: url(ui/btn_go.webp); text-shadow: 0 1.5px 0 #2f6b18, 0 0 3px rgba(0, 0, 0, .25); }
button:active:not(:disabled) { box-shadow: none; filter: brightness(.95); }
button:focus-visible { outline: 3px solid #f5b83d; outline-offset: 2px; }

/* the round ones stay round: the medallion for the level, a red close cross, the green Build disc */
#lvl { background: url(ui/badge.webp) center / 100% 100% no-repeat; border-color: transparent; }
#sheet h2 .x { border-image-source: url(ui/btn_red.webp); color: #fff; }
.fab { border-image: none; background: url(ui/btn_go.webp) center / 150% 125% no-repeat; }

/* the views: the current one in gold */
#dock .views button.on { border-image-source: url(ui/btn_gold.webp); }
/* a chosen tab or option: the painted skin hides the plain backgrounds index.html gives them, so the skin itself shows the choice
   (the build sheet's chosen tab was white text on the cream button) */
.seg button.on { border-image-source: url(ui/btn_go.webp); }
.tabs button.on, .row button.on { border-image-source: url(ui/btn_gold.webp); }

/* the dock's painted icons are in ui/dock (game.js); the red count pips are painted too, a round glossy pip stretched round the count */
#dock button .dot, #btn-daily .dot { background: none; border-color: transparent; border-image: url(ui/dock/pip.webp) 48% fill / 9px stretch; text-shadow: 0 1px 0 #7a1f12; }
/* "tap again to be sure": the red skin, so the second tap is a deliberate one */
button.warn { border-image-source: url(ui/btn_red.webp); color: #fff; text-shadow: 0 1px 0 #7a1f12; }
/* a button you can't press yet: greyed as well as faded (a faded green Deliver still read as green) */
button:disabled { filter: grayscale(.9); opacity: .55; }
