:root {
  --paper: #f5f3ed;
  --paper-strong: #fbfaf6;
  --ink: #242925;
  --muted: #737b73;
  --line: #d8dbd2;
  --bead: #cc603b;
  --sage: #78867a;
  --display: "Trebuchet MS", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "Cascadia Code", monospace;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 0;
}

body.logged-out { height: 100dvh; min-height: 0; overflow: hidden; }

body[data-view="home"],
body[data-view="editor"] {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
}

.topbar {
  position: relative;
  top: auto;
  z-index: 5;
  flex: 0 0 auto;
  min-height: 64px;
  padding: 9px 18px;
  background: var(--paper-strong);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px #222a2008;
}

.brand { gap: 10px; }
.brand-mark {
  width: auto;
  min-width: 66px;
  padding: 0 8px;
  font-size: 11px;
  letter-spacing: 0;
  border-radius: 10px;
  background: var(--ink);
  box-shadow: inset 0 -4px 0 var(--bead);
}
.brand strong { font-family: var(--display); font-size: 15px; }
.brand small { color: #858980; font-size: 10px; letter-spacing: .02em; }
.toolbar { max-width: none; gap: 5px; }
.topbar button { height: 32px; padding: 0 10px; border-radius: 7px; font-size: 12px; }
.account-label { padding: 0 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.login-dialog { width: min(410px, calc(100vw - 28px)); max-width: none; border: 1px solid var(--line); border-radius: 14px; padding: 22px; color: var(--ink); background: var(--paper-strong); box-shadow: 0 24px 90px #17201836; text-align: center; }
.login-dialog::backdrop { background: #17201876; backdrop-filter: blur(3px); }
.login-dialog-head { display: flex; align-items: center; justify-content: space-between; }
.login-dialog h2 { margin: 0; font: 700 20px var(--display); }
.login-dialog-head button { width: 28px; height: 28px; padding: 0; font-size: 19px; }
.login-dialog-copy { margin: 14px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.login-code-panel { display: grid; place-items: center; width: 226px; min-height: 248px; margin: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.login-code-panel img { display: block; width: 210px; height: 210px; object-fit: contain; }
.login-code-panel img[hidden] { display: none; }
.login-code-panel strong { margin: 4px 0; font-size: 13px; }
.login-code-panel.is-scanned img { display: none; }
.login-code-panel.is-scanned { min-height: 248px; color: #356e50; background: #f1f8f2; }
.login-code-panel.is-scanned strong { font-size: 22px; }
.login-dialog-status { min-height: 20px; margin: 13px 0; color: var(--muted); font-size: 12px; }
.login-mini-entry { display: flex; align-items: center; gap: 12px; margin: 14px 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; text-align: left; }
.login-mini-entry img { width: 62px; height: 62px; object-fit: contain; background: white; }
.login-mini-entry span { color: var(--muted); font-size: 11px; line-height: 1.6; }
#login-refresh { width: 100%; }
.primary { border-color: var(--ink); background: var(--ink); }
.primary:hover:not(:disabled) { border-color: #35483c; background: #35483c; }

.login-screen {
  height: 100dvh;
  min-height: 0;
  padding: 20px;
  background: radial-gradient(circle at 18% 16%, #f0dfc5 0, transparent 31%), linear-gradient(140deg, #f3f0e7, #e9ece4);
}
.logged-out .login-screen {
  background-image: linear-gradient(rgba(250, 247, 240, .16), rgba(250, 247, 240, .16)), url('/assets/mard-login-background.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.login-card { border-radius: 18px; border-color: #deded2; box-shadow: 0 22px 70px #30372a17; }
.login-mark { width: 88px; height: 56px; padding: 0 8px; font-size: 13px; box-shadow: inset 0 -5px 0 var(--bead); }
.eyebrow { color: var(--bead); font: 700 10px/1.3 var(--mono); letter-spacing: .14em; }
.login-qr { border-radius: 12px; border-color: #d7d9d0; }
.login-button { border-radius: 8px; }
.login-miniprogram-entry { display: flex; align-items: center; gap: 13px; margin: 12px 0; padding: 9px 11px; border: 1px solid #e4e4dc; border-radius: 10px; background: #f7f6f0; text-align: left; }
.login-miniprogram-code { display: grid; flex: 0 0 76px; width: 76px; height: 76px; place-items: center; border: 1px solid #dedfd6; border-radius: 7px; background: white; }
.login-miniprogram-qr { display: block; width: 70px; height: 70px; object-fit: contain; }
.login-miniprogram-state { display: grid; justify-items: center; gap: 5px; padding: 5px; color: var(--muted); font-size: 9px; text-align: center; }
.login-miniprogram-copy strong { display: block; margin-bottom: 4px; font-size: 12px; }
.login-miniprogram-copy p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.login-miniprogram-state.error { color: #b34a38; }
.loading-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #d5dbd1; border-top-color: var(--bead); border-radius: 50%; animation: list-spin .75s linear infinite; }

.home-page {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  width: min(100%, 1560px);
  margin: 0 auto;
  padding: 14px clamp(12px, 2vw, 22px);
  color: var(--ink);
}
.home-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  align-items: start;
}
body.is-logged-in .home-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.library-shelf {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-strong);
  box-shadow: 0 6px 18px #252b2208;
}
.library-title { margin: 0 2px 10px; padding: 4px 1px 10px; border-bottom: 1px solid var(--line); font: 700 14px var(--display); }
.library-shelf[hidden] { display: none; }
.home-pattern-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 1px 3px 2px 1px;
  scrollbar-width: thin;
  scrollbar-color: #c5c9be transparent;
}
.home-pattern-list.is-empty { display: block; }
.home-pattern-card {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid #e0e1d9;
  border-radius: 9px;
  background: #fffefa;
  text-align: left;
  white-space: normal;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.home-pattern-card:hover:not(:disabled) { transform: translateY(-1px); border-color: #a9b3a7; background: #fffefa; box-shadow: 0 5px 14px #252b220c; }
.pattern-card-badge {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid #dbded4;
  border-radius: 6px;
  background: #f2f2eb;
  image-rendering: pixelated;
}
.pattern-card-details { position: absolute; right: 8px; bottom: 8px; left: 8px; display: grid; min-width: 0; gap: 2px; height: 24%; padding: 5px 24px 4px 7px; border-top: 1px solid #e0e1d9; border-radius: 0 0 5px 5px; background: #fffefa; }
.pattern-card-title { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.pattern-card-meta { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pattern-card-arrow { position: absolute; right: 16px; bottom: 17px; color: var(--bead); font-size: 18px; }
.pattern-card-skeleton { position: relative; min-width: 0; min-height: 0; aspect-ratio: 1; padding: 8px; border: 1px solid #e8e9e3; border-radius: 9px; background: #fbfaf6; }
.skeleton-block { background: linear-gradient(100deg, #eeeee8 25%, #f8f8f3 43%, #eeeee8 62%); background-size: 220% 100%; animation: list-shimmer 1.15s ease-in-out infinite; }
.skeleton-thumb { display: block; width: 100%; height: 100%; border-radius: 6px; }
.skeleton-copy { position: absolute; right: 8px; bottom: 8px; left: 8px; display: grid; gap: 8px; height: 24%; padding: 8px; background: #fbfaf6; }
.skeleton-line { height: 8px; border-radius: 8px; }
.skeleton-line:first-child { width: 72%; height: 10px; }
.skeleton-line:last-child { width: 92%; }
.pattern-list-status { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; color: var(--muted); font-size: 11px; }
.pattern-list-load-more { grid-column: 1 / -1; justify-self: center; min-width: 150px; height: 32px; border-style: dashed; color: #526056; font-size: 11px; }
.pattern-list-end { grid-column: 1 / -1; padding: 8px; color: #92988f; font-size: 10px; text-align: center; }
@keyframes list-spin { to { transform: rotate(360deg); } }
@keyframes list-shimmer { to { background-position-x: -220%; } }
.home-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 88px;
  padding: 18px 20px;
  border-bottom: 1px solid #e8e8e0;
}
.home-empty strong { font: 700 15px var(--display); }
.home-empty p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.empty-create-button { min-width: 104px; height: 34px; }

#editor-page.layout {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-height: 0;
  height: auto;
  grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
  gap: 11px;
  padding: 10px 13px 12px;
  overflow: hidden;
}
.panel, .workspace { min-height: 0; border-color: var(--line); border-radius: 10px; background: var(--paper-strong); box-shadow: 0 4px 16px #252b2208; }
.settings { height: 100%; min-height: 0; padding: 12px; overflow: auto; scrollbar-width: none; }
body.bead-mode .settings > :not(.bead-panel) { display: none; }
body.bead-mode #editor-toolbar > :not(#go-home-button):not(#bead-mode-button):not(#download-png-button) { display: none; }
body.bead-mode .board-toolbar > :not(#board-caption):not(#center-board-button):not(.zoom-control) { display: none; }
body.bead-mode .board-toolbar .zoom-control { margin-left: auto; }
body.bead-mode .canvas-scroll { cursor: grab; }
body.bead-mode .hint { display: none; }
.bead-panel h2 { margin: 1px 0 8px; font: 700 18px var(--display); }
.bead-panel > p { margin: 0 0 16px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.bead-board-size { display: grid; gap: 7px; margin-bottom: 10px; color: #5d675f; font-size: 11px; }
.bead-board-size > div { display: flex; align-items: center; gap: 6px; }
.bead-board-size input, .bead-tile-jump input { width: 64px; height: 32px; padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; background: #fffefa; color: var(--ink); font: 12px var(--mono); }
.bead-board-size button, .bead-tile-nav button { height: 30px; padding: 0 8px; font-size: 10px; }
.bead-board-size button { margin-left: auto; }
.bead-tile-nav { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.bead-tile-nav strong { flex: 1; text-align: center; color: #35483c; font: 700 11px/1.5 var(--mono); }
.bead-tile-jump { display: flex; align-items: center; justify-content: space-between; margin: 0 0 11px; color: var(--muted); font-size: 10px; }
.bead-tile-jump input { width: 70px; height: 28px; }
.bead-cell-location { margin-bottom: 14px; padding: 11px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fffefa; font-size: 11px; line-height: 1.5; }
.bead-cell-location.has-cell { border-color: #a9bdae; color: #285d40; background: #edf5ed; font: 700 12px/1.5 var(--mono); }
#bead-show-all { width: 100%; height: 36px; margin-bottom: 9px; text-align: left; }
#bead-show-all.active, .bead-color.active { border-color: #516c58; background: #e9f0e9; color: #213d2a; }
.bead-colors { display: grid; gap: 4px; }
.bead-color { display: flex; align-items: center; width: 100%; height: 38px; gap: 9px; padding: 0 9px; text-align: left; }
.bead-color i { flex: none; width: 20px; height: 20px; border: 1px solid #0002; border-radius: 5px; }
.bead-color strong { font: 700 12px var(--mono); }
.bead-color span { margin-left: auto; color: var(--muted); font-size: 11px; }
.bead-location { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.bead-location h3 { margin: 0 0 4px; font: 700 13px var(--display); }
.bead-location p { margin: 0 0 11px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.bead-corners { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bead-corners div { display: grid; gap: 4px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: #fffefa; }
.bead-corners span { color: var(--muted); font-size: 10px; }
.bead-corners b { font: 700 12px var(--mono); }
.settings::-webkit-scrollbar, .palette::-webkit-scrollbar { display: none; }
.panel-title { margin-bottom: 9px; font-family: var(--display); }
.settings > label { margin: 8px 0; }
.dimensions { margin: 8px 0; }
.stats { margin: 10px 0; padding: 9px 6px; }
.materials-heading { margin: 11px 0 7px; }
.materials { margin-bottom: 8px; }
.palette-heading { margin: 9px 0 7px; }
.palette { display: block; max-height: none; overflow: visible; scrollbar-width: none; }
.palette-group { border-top: 1px solid #e4e5dd; }
.palette-group:last-child { border-bottom: 1px solid #e4e5dd; }
.palette-group summary { display: flex; align-items: center; gap: 8px; min-height: 34px; color: #525c54; font: 700 11px var(--mono); cursor: pointer; list-style: none; }
.palette-group summary::-webkit-details-marker { display: none; }
.palette-group summary::after { content: '＋'; margin-left: auto; color: #8b9288; font: 12px var(--mono); }
.palette-group[open] summary::after { content: '−'; }
.palette-group-count { color: #899087; font: 10px var(--display); }
.palette-group-colors { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; padding: 2px 0 7px; }
.swatch { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 34px; padding: 2px 0; border: 1px solid transparent; border-radius: 5px; background: transparent; }
.swatch-color { width: 16px; height: 16px; border: 1px solid #0003; border-radius: 50%; }
.swatch-code { color: #525851; font-size: 8px; line-height: 1; }
.swatch.active .swatch-color { outline: 2px solid #35483c; outline-offset: 1px; }
.workspace { width: 100%; height: 100%; overflow: hidden; }
.board-toolbar { flex: 0 0 auto; gap: 5px; min-height: 0; padding: 7px 9px; border-bottom-color: var(--line); font-size: 11px; }
.board-toolbar button { height: 27px; padding: 0 8px; border-radius: 6px; font-size: 10px; }
.region-selection-status { color: #755128; font-size: 10px; white-space: nowrap; }
.region-selection-status[hidden], #region-cancel-button[hidden] { display: none; }
.board-toolbar .zoom-control { gap: 5px; font-size: 10px; }
.zoom-control input { width: 92px; }
.brush-size { gap: 2px; height: 27px; border-radius: 6px; }
.brush-size button { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; }
.brush-size button i { display: block; width: 5px; height: 5px; border-radius: 50%; background: #69766b; }
.brush-size button[data-brush="2"] i { width: 7px; height: 7px; }
.brush-size button[data-brush="3"] i { width: 9px; height: 9px; }
.brush-size button[data-brush="4"] i { width: 11px; height: 11px; }
.brush-size button[data-brush="5"] i { width: 13px; height: 13px; }
.canvas-scroll {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  touch-action: none;
  background-color: #eeeee7;
  background-image: radial-gradient(#d6d9d0 .65px, transparent .65px);
  background-size: 14px 14px;
}
.canvas-scroll canvas { position: absolute; left: 50%; top: 50%; max-width: none; max-height: none; margin: 0; border-color: #cfd3ca; box-shadow: 0 6px 22px #252b2214; touch-action: none; }
.hint { flex: 0 0 auto; padding: 7px 11px; border-top: 1px solid #e6e7df; color: #777f76; font-size: 10px; }
body[data-tool="move"] .canvas-scroll, .canvas-scroll.pan-ready { cursor: grab; }
.canvas-scroll.is-panning, .canvas-scroll.is-panning #board { cursor: grabbing; }
.ai-image-dialog { width: min(560px, calc(100vw - 28px)); max-height: min(88dvh, 820px); overflow: auto; border: 1px solid #d8dbd2; border-radius: 14px; padding: 22px; color: var(--ink); background: var(--paper-strong); box-shadow: 0 24px 90px #17201836; }
.ai-image-dialog::backdrop { background: #17201876; backdrop-filter: blur(3px); }
.ai-image-dialog h2 { margin: 0 0 6px; font: 700 20px var(--display); }
.ai-image-dialog .dialog-copy { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.ai-image-dialog label { margin-top: 12px; }
.ai-image-dialog textarea, .ai-image-dialog select { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); font: inherit; }
.ai-image-dialog textarea { padding: 9px 10px; resize: vertical; }
.ai-image-dialog select { height: 34px; padding: 0 8px; }
.ai-image-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.image-generation-status { min-height: 20px; margin: 12px 0; color: var(--muted); font-size: 11px; }
.generated-image-preview { display: block; width: min(100%, 420px); max-height: 42dvh; object-fit: contain; margin: 0 auto 14px; border: 1px solid var(--line); border-radius: 8px; background: #efeee8; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 15px; }
.logout-dialog { width: min(440px, calc(100vw - 28px)); max-width: none; border: 1px solid var(--line); border-radius: 14px; padding: 22px; color: var(--ink); background: var(--paper-strong); box-shadow: 0 24px 90px #17201836; }
.logout-dialog::backdrop { background: #17201876; backdrop-filter: blur(3px); }
.logout-dialog h2 { margin: 0 0 8px; font: 700 18px var(--display); }
.logout-dialog p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.logout-dialog .dialog-actions { margin-top: 20px; }
.share-dialog { width: min(440px, calc(100vw - 28px)); max-width: none; max-height: min(88dvh, 760px); overflow: auto; border: 1px solid var(--line); border-radius: 14px; padding: 22px; color: var(--ink); background: var(--paper-strong); box-shadow: 0 24px 90px #17201836; }
.share-dialog::backdrop { background: #17201876; backdrop-filter: blur(3px); }
.share-dialog h2 { margin: 0 0 7px; font: 700 20px var(--display); }
.share-dialog label { display: block; margin: 12px 0; color: var(--ink); font-size: 12px; font-weight: 650; }
.share-dialog input { display: block; box-sizing: border-box; width: 100%; height: 36px; margin-top: 6px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); font: inherit; }
.share-status { min-height: 1.5em; margin: 10px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.share-result { display: grid; justify-items: center; gap: 8px; margin: 12px auto 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.share-qr { width: 168px; height: 168px; object-fit: contain; }
.share-result strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-result code { padding: 6px 10px; border-radius: 6px; background: #f1f0e9; font-size: 17px; letter-spacing: 2px; }
.share-result button { min-height: 30px; }
.share-dialog .dialog-actions { margin-top: 18px; }
button:focus-visible, summary:focus-visible { outline: 2px solid #a94f31; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .loading-spinner, .skeleton-block { animation-duration: 2.5s; }
}

@media (max-height: 760px) {
  .login-screen { overflow: auto; }
  .login-card { padding-top: 20px; padding-bottom: 20px; }
  .login-card .eyebrow { margin-top: 12px; }
  .login-copy { margin-top: 8px; margin-bottom: 12px; }
  .login-qr { width: 190px; height: 190px; }
  .login-qr img { width: 176px; height: 176px; }
  .login-status { margin: 10px 0; }
  .login-miniprogram-entry { margin: 8px 0; }
}

@media (max-width: 1050px) {
  .topbar { align-items: center; flex-direction: row; }
  .toolbar { max-width: none; justify-content: flex-end; }
  #editor-page.layout { grid-template-columns: 210px minmax(0, 1fr); }
  .home-pattern-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
  .settings { height: 100%; min-height: 0; }
  .workspace { min-height: 0; }
}
@media (max-width: 720px) {
  .topbar { gap: 8px; padding: 8px 10px; }
  .brand { gap: 7px; }
  .brand-mark { width: auto; min-width: 58px; height: 32px; padding: 0 6px; font-size: 10px; }
  .brand-mark.login-mark { width: 88px; min-width: 88px; height: 56px; padding: 0 8px; font-size: 13px; }
  .brand small { display: none; }
  .toolbar { gap: 3px; }
  .topbar button { height: 30px; padding: 0 7px; font-size: 10px; }
  .account-label { display: none; }
  body.is-logged-in .home-columns { grid-template-columns: 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .library-shelf { padding: 7px; }
  .home-pattern-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
  .home-empty { flex-wrap: wrap; padding: 16px; }
  #editor-page.layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(125px, 31%) minmax(0, 1fr); gap: 7px; padding: 7px; }
  .settings { padding: 8px; }
  .settings .panel-title { margin-bottom: 5px; }
  .settings > label { display: inline-block; width: 31%; vertical-align: top; }
  .dimensions { display: inline-flex; width: 67%; margin: 4px 0 8px; }
  .dimensions label { width: 64px; }
  .stats { display: none; }
  .palette-heading { margin: 3px 0 5px; }
  .palette { max-height: none; }
  .palette-group-colors { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .materials-heading { display: flex; }
  .materials { display: grid; }
  .board-toolbar { max-height: none; overflow: visible; }
  .board-toolbar .zoom-control { margin-left: 0; }
  .hint { display: none; }
}
@media (max-height: 620px) and (min-width: 721px) {
  #editor-page.layout { padding-top: 6px; padding-bottom: 6px; }
  .settings { padding: 8px; }
  .palette { max-height: none; }
  .board-toolbar { padding: 5px 8px; }
  .hint { padding: 5px 9px; }
}
@media print {
  body { height: auto; overflow: visible !important; }
  .home-page, .login-screen { display: none !important; }
}
