/* Player preferences (prefs.mjs). Loaded last so these win. */

/* Interface size: <html> carries zoom, which also scales viewport units, so the full-height frames divide it back out. */
html.ui-zoomed #app, html.ui-zoomed #app.journal-collapsed { height: calc(100dvh / var(--ui-zoom)) !important; }
html.ui-zoomed body.realm-on #app { height: calc((100dvh / var(--ui-zoom)) - var(--realm-h)) !important; }
html.ui-zoomed .dialog { max-height: calc((100dvh / var(--ui-zoom)) - 24px); max-width: calc((100vw / var(--ui-zoom)) - 16px); }
html.ui-zoomed .dialog:has(.landing) { height: calc(100dvh / var(--ui-zoom)); max-height: calc(100dvh / var(--ui-zoom)); max-width: 100%; }

/* Reduce motion (in-game switch; the device setting is already honoured by each stylesheet). */
html.pref-reduce-motion *, html.pref-reduce-motion *::before, html.pref-reduce-motion *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important;
  transition-duration: .01ms !important; scroll-behavior: auto !important;
}
html.pref-reduce-motion .float { animation: none !important; opacity: 0 !important; }

html.pref-no-floats .float { display: none !important; }
html.pref-no-flashes .fx-flash { display: none !important; }

/* Chat */
.dock-name { color: var(--nc, #dbcbb8); }
.dock-name:hover { color: var(--nc, #e0d3c4); filter: brightness(1.15); }
html.pref-chat-plain .dock-name { color: #dbcbb8; }
.dock-title {
  display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px solid #5a4236; border-radius: 4px;
  background: #2a1d17; color: #c9a77c; font-size: .78em; font-weight: 600; line-height: 1.45; letter-spacing: .02em; vertical-align: 1px;
}
html.pref-chat-plain .dock-title { border-color: transparent; background: none; color: #8f7a68; padding: 0; }
html.pref-chat-no-titles .dock-title { display: none; }
html.pref-chat-no-time .dock-chat time { display: none; }
html[data-chat-size="s"] .dock-chat, html[data-chat-size="s"] .dock-line { font-size: 11.5px; }
html[data-chat-size="l"] .dock-chat, html[data-chat-size="l"] .dock-line { font-size: 15px; line-height: 1.45; }

/* Settings controls */
.st-row.st-stack { flex-direction: column; align-items: stretch; gap: 8px; }
.st-row > .st-seg { display: flex; flex-wrap: wrap; gap: 5px; }
.st-row .st-seg button { flex: 1 1 0; width: auto; min-height: 32px; min-width: 52px; padding: 4px 8px; font-size: 12px; white-space: nowrap; }
.st-seg button.on { border-color: #b8875a; background: #4a2e22; color: #f2dfc2; box-shadow: inset 0 0 0 1px #b8875a55; }
.st-row > .st-links { display: flex; gap: 6px; flex-shrink: 0; }
.st-links a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border: 1px solid #6b4a3a; border-radius: 6px; background: #2a1d17; color: #ead7bd; font-size: 12px; text-decoration: none; }
.st-links a:hover { border-color: #b8875a; color: #f6e5cc; }
.ac-agree { align-items: flex-start; margin-top: 4px; font-size: 13px; line-height: 1.4; }
.ac-agree a { color: #e3b98a; }
