/* Settings screen, shared by every theme. It is built from the theme's own pieces (.bar, .u-title, .tools/.tool,
   .lessons/.lesson, .paper-card), so each theme dresses it in its own look; this file only adds what is new. */
body[data-view="settings"] .themebtn { display: none; }
#settings-view .bar { margin-right: 0; }
#settings-view .u-title { display: block; width: max-content; max-width: 100%; }
#settings-view .u-title:first-of-type { margin-top: 10px; }
.modes { grid-template-columns: repeat(3, 1fr); margin-bottom: 4px; }
.modes .tool { height: 62px; }
.modes .tool .ic { width: 20px; height: 20px; }
.modes .tool .tl { font-size: .78rem; }

#settings-view [hidden] { display: none !important; }    /* a theme's display: grid must not show a closed list */

/* Theme: a button showing the current theme; it opens the list of themes below it */
.pickrow { display: grid; margin-bottom: 12px; }
.pickrow > .lesson { min-width: 0; min-height: 78px; flex-direction: row; align-items: center; cursor: pointer; }
.pickrow > [aria-expanded="true"] { outline: 2.5px solid var(--pick, currentColor); outline-offset: 3px; }
.skin-pick .chev { flex: none; margin-left: auto; transition: transform .2s; }
.pickrow > [aria-expanded="true"] .chev { transform: rotate(180deg); }

/* Install: a card on the home screen, a row in Settings, and the screen that asks for the app icon */
.paper-card.inst-card { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 10px 12px 12px; }   /* at the very top of the home screen */
body[data-view="home"] .themebtn { translate: 0 var(--inst-push, 0px); }   /* below the install card */
.inst-card img, .inst-row img { display: block; flex: none; width: 44px; height: 44px; }
.inst-t { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; text-align: left; }
.inst-t b { font-size: .95rem; }
.inst-t span { font-size: .78rem; opacity: .75; }
.inst-card .btn { flex: none; width: auto; height: 40px; min-height: 0; padding: 0 16px; font-size: .86rem; }
.inst-card .inst-x { flex: none; width: 34px; height: 34px; }
.inst-card .inst-x .ic { width: 16px; height: 16px; }
#instSec .lessons { grid-template-columns: minmax(0, 1fr); }
#instSec .lesson { min-height: 74px; flex-direction: row; align-items: center; }
.paper-card.inst-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 12px 0 6px; padding: 22px 0 16px; }
.inst-preview img { display: block; width: 76px; height: 76px; }
.inst-preview span { font-size: .92rem; font-weight: 600; }
.btn.inst-go { display: flex; width: 100%; margin: 4px 0 10px; }
.btn.inst-go:disabled { opacity: .55; cursor: default; }

.icon-hint { margin: 0 2px 12px; font-size: .8rem; line-height: 1.45; opacity: .78; }
.tools.appicons { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 8px; }
.appicons .tool { height: auto; gap: 5px; padding: 9px 2px 7px; cursor: pointer; }
.appicons .tool img { display: block; width: 40px; height: 40px; }
.appicons .tool .tl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.appicons .tool[aria-pressed="true"] { outline: 2.5px solid var(--pick, currentColor); outline-offset: 2px; }

.skins { margin-bottom: 4px; }
.skins > .lesson { min-width: 0; }     /* long notes must not widen the list past the screen */
.skin-opt { cursor: pointer; }
#settings-view .sw {   /* a tiny preview: page colour, a card and the accent */
  position: relative; flex: none; width: 48px; height: 48px; overflow: hidden; border-radius: 14px;
  background: var(--s-bg); box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .32);
}
#settings-view .sw::before {
  content: ""; position: absolute; left: 10px; top: 13px; right: -8px; bottom: -8px; border-radius: 8px;
  background: var(--s-card); box-shadow: 0 0 0 1px rgba(128, 128, 128, .25);
}
#settings-view .sw::after {
  content: ""; position: absolute; left: 17px; top: 21px; width: 20px; height: 6px; border-radius: 3px;
  background: var(--s-acc); box-shadow: 0 10px 0 -1px var(--s-acc2);
}
.skin-opt .go { opacity: 0; transition: opacity .15s; }
.skin-opt.on .go { opacity: 1; }
.skin-opt.on { outline: 2.5px solid var(--pick, currentColor); outline-offset: 3px; }
.skin-opt .lm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.soon { margin: 26px 0 8px; text-align: center; }
.soon .soon-t { display: block; margin-bottom: 4px; font-weight: 800; font-size: 1.02rem; }
.soon p { margin: 0; line-height: 1.5; font-size: .9rem; opacity: .82; }
.soon .ver { display: block; margin-top: 10px; font-size: .74rem; opacity: .6; letter-spacing: .04em; }
@media (prefers-reduced-motion: reduce) { .skin-opt .go, #settings-view .chev { transition: none; } }
