/* symbols reference page */
.sy { --sy-font: "Inter", "Noto Sans Math", "Noto Sans Symbols 2", "STIX Two Math", "Cambria Math", "Segoe UI Symbol", "Apple Symbols", system-ui, sans-serif;
  --tile-w: 86px; --tile-h: 92px; }

/* find, mode, compose, sets, recent */
.sy-top { padding: 14px 16px 12px; display: grid; gap: 10px; position: sticky; top: calc(var(--fb-top, 0px) + 8px); z-index: 5; }
.sy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sy-q { position: relative; flex: 1 1 320px; display: flex; align-items: center; }
.sy-q svg { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; }
.sy-q input { width: 100%; height: 40px; padding: 0 40px 0 36px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); font-size: 15px; outline: none; }
.sy-q input:focus { border-color: var(--text-2); }
.sy-q input::-webkit-search-cancel-button { cursor: pointer; }
.sy-kbd { position: absolute; right: 10px; font: 500 11px/1 var(--font); color: var(--text-3); border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; pointer-events: none; }
.sy-q input:focus ~ .sy-kbd, .sy-q input:not(:placeholder-shown) ~ .sy-kbd { display: none; }
@media (hover: none) { .sy-kbd { display: none; } }

.sy-compose { display: flex; gap: 8px; align-items: center; }
.sy-cl { font-size: 12.5px; color: var(--text-3); flex: none; }
.sy-compose input { flex: 1 1 auto; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2);
  font: 400 15px/1 var(--sy-font); outline: none; }
.sy-compose input:focus { border-color: var(--text-2); background: var(--surface); }
.sy-compose.on input { border-color: var(--sel); background: var(--surface); }
.sy-compose .btn, .sy-compose .ghost { flex: none; }

.sy-sets { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.sy-sets button { border: 1px solid transparent; background: var(--fill-1); color: var(--text-2); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.sy-sets button:hover { color: var(--text); }
.sy-sets button[aria-pressed="true"] { background: var(--surface); border-color: var(--line-2); color: var(--text); font-weight: 500; }
.sy-sets .sy-cn { color: var(--text-3); font-weight: 400; margin-left: 5px; }
.sy-sets .sy-cs { display: none; }

.sy-recent[hidden] { display: none; }
.sy-recent { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sy-rl { font-size: 12.5px; color: var(--text-3); }
.sy-rc { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.sy-rc button { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer;
  font: 400 17px/1 var(--sy-font); color: var(--text); }
.sy-rc button:hover, .sy-rc button:focus-visible { border-color: var(--text-2); outline: none; }
.sy-rc button.sy-fd { display: inline-grid; place-items: center; padding: 0 5px; }
.sy-rc button.sy-fd svg { display: block; }
.sy-ia .sy-star { margin-left: auto; }
.sy-rc .sp, .sy-t .sp { font: 600 9.5px/1 var(--font); letter-spacing: .04em; color: var(--text-3); border: 1px dashed var(--line-2); border-radius: 3px; padding: 3px 4px; }

/* the grid of sets and tiles, and the details panel beside it */
.sy-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.sy-main { display: grid; gap: 22px; min-width: 0; }
.sy-set h2 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.sy-set .sy-note { margin: 0 0 8px; max-width: 760px; }
.sy-grp { margin-top: 10px; }
.sy-grp h3 { font-size: 12px; font-weight: 500; color: var(--text-3); margin: 0 0 6px; text-transform: none; }
.sy-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile-w), 1fr)); gap: 6px; }
.sy-t { width: 100%; min-width: var(--tile-w); height: var(--tile-h); display: grid; grid-template-rows: 54px 1fr; justify-items: center; align-items: center; padding: 4px 7px 6px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; color: var(--text); position: relative; }
.sy-t:hover { border-color: var(--line-2); background: var(--surface-2); }
.sy-t:focus-visible, .sy-t.cur { outline: none; border-color: var(--sel); box-shadow: 0 0 0 1px var(--sel); }
.sy-t .g { font: 400 30px/1 var(--sy-font); white-space: pre; }
.sy-t .l { font-size: 11px; line-height: 13px; color: var(--text-2); text-align: center; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; align-self: start; max-width: 100%; }
.sy-t.flash { animation: sy-flash .5s ease-out; }
@keyframes sy-flash { 0% { background: var(--sel-bg-2); } 100% { background: var(--surface); } }
@media (prefers-reduced-motion: reduce) { .sy-t.flash { animation: none; } }
.sy-empty { color: var(--text-2); font-size: 13.5px; padding: 18px 2px; }
.sy-count { font-size: 12.5px; color: var(--text-3); font-weight: 400; margin-left: 8px; }

.sy-insp { position: sticky; top: calc(var(--insp-top, 230px) + var(--fb-top, 0px)); padding: 16px 16px 14px; display: grid; gap: 10px; }
.sy-ih { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; }
.sy-ig { width: 76px; height: 76px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; font: 400 44px/1 var(--sy-font); background: var(--surface-2); cursor: pointer; color: var(--text); padding: 0 6px; }
.sy-ig:hover { border-color: var(--line-2); }
.sy-ig .sp { font-size: 12px; }
.sy-in { font-weight: 600; font-size: 14px; }
.sy-im { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.sy-im + .sy-im { color: var(--text-3); font-size: 12.5px; }
.sy-dl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 10px; margin: 0; font-size: 13px; align-items: center; }
.sy-dl dt { color: var(--text-3); font-size: 12px; padding: 6px 0; border-top: 1px solid var(--line); white-space: nowrap; }
.sy-dl dd { margin: 0; padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; min-width: 0; }
.sy-dl dd.c { padding: 3px 0; text-align: right; }
.sy-dl dt:first-of-type, .sy-dl dt:first-of-type + dd, .sy-dl dt:first-of-type + dd + dd { border-top: 0; }
.sy-dl code { font: 500 12.5px/1.35 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--text); }
.sy-dl .muted { color: var(--text-3); }
.sy-cp { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; font-size: 12px; padding: 3px 9px; cursor: pointer; color: var(--text-2); }
.sy-cp:hover { border-color: var(--text-2); color: var(--text); }
.sy-ia { display: flex; gap: 8px; flex-wrap: wrap; }
.sy-ix { display: none; }

.sy-help { margin: -4px 0 0; }
.sy-help kbd, .sy-toast kbd { font: 500 11px/1 var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; background: var(--surface); color: var(--text-2); }

.sy-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--on-accent); padding: 9px 14px; border-radius: 9px; font-size: 13px;
  z-index: 40; display: flex; gap: 12px; align-items: center; width: max-content; max-width: calc(100vw - 32px); box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.sy-toast .tg { font: 400 17px/1 var(--sy-font); }
.sy-toast button { border: 0; background: color-mix(in srgb, var(--surface) 14%, transparent); color: var(--on-accent); border-radius: 6px; padding: 4px 9px; font-size: 12.5px; cursor: pointer; }
.sy-toast[hidden] { display: none; }

/* below 1000 px the details become a sheet opened from the toast or a long press */
@media (max-width: 999px) {
  .sy-body { grid-template-columns: minmax(0, 1fr); }
  .sy-insp { position: fixed; left: 8px; right: 8px; bottom: 8px; top: auto; z-index: 45; max-height: 78vh; overflow: auto; box-shadow: 0 8px 32px rgba(0,0,0,.22); display: none; }
  .sy-insp.open { display: grid; }
  .sy-ix { display: block; position: absolute; right: 8px; top: 8px; }
  .sy-ih { padding-right: 40px; }
}
@media (max-width: 760px) {
  .sy-top { position: static; }
  .sy { --tile-w: 78px; --tile-h: 88px; }
  .sy-t .g { font-size: 27px; }
  .sy-tiles { gap: 5px; }
  .sy-compose { flex-wrap: wrap; }
  .sy-compose input { flex-basis: calc(100% - 44px); }
  .sy-mode { width: 100%; display: grid; }
  .sy-sets .sy-cf, .sy-sets .sy-cn { display: none; }
  .sy-sets .sy-cs { display: inline; }
}

/* drawing symbols (SVG library) */
.sy-dmode { display: none; }
.sy-draw .sy-mode { display: none; }
.sy-draw .sy-dmode { display: inline-grid; }
.sy-compose[hidden] { display: none; }
.sy-draw { --tile-w: 120px; }
.sy-dtiles { grid-template-columns: repeat(auto-fill, minmax(var(--tile-w), 1fr)); }
.sy-dt { height: auto; min-height: 128px; grid-template-rows: 76px auto; padding: 8px 8px 9px; gap: 6px; color: var(--ink); }
.sy-dt .g { width: 100%; height: 76px; display: grid; place-items: center; }
.sy-dt .g svg { max-width: 100%; max-height: 76px; overflow: visible; }
.sy-dt .l { color: var(--text-2); font-size: 11.5px; line-height: 14px; hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; word-break: normal; }
.sy-also { margin: 10px 0 0; font-size: 13px; color: var(--text-2); }
.sy-lnk { border: 0; background: none; padding: 0; color: var(--sel); text-decoration: underline; cursor: pointer; font: inherit; }
.sy-dprev { height: 168px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; padding: 12px; color: var(--ink); }
.sy-dprev svg { max-width: 100%; max-height: 144px; }
.sy-dm { font-size: 12.5px; }
.sy-ddl { grid-template-columns: auto minmax(0, 1fr); }
.sy-ddl dd { color: var(--text-2); }
.sy-da .btn, .sy-da .ghost { flex: 1 1 calc(50% - 4px); }
.sy-lib button { white-space: nowrap; }
@media (max-width: 760px) {
  .sy-draw { --tile-w: 102px; }
  .sy-lib, .sy-dmode { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .sy-draw .sy-dmode { display: grid; }
  .sy-dt { min-height: 114px; grid-template-rows: 62px auto; }
  .sy-dt .g { height: 62px; }
  .sy-dt .g svg { max-height: 62px; }
  .sy-dprev { height: 140px; }
}
@media (max-width: 999px) { .sy-insp .sy-dprev { margin-top: 30px; } }
.sy-dt .sy-ds { display: block; color: var(--text-3); font-size: 10.5px; margin-top: 2px; }
