:root {
  color-scheme:light;
  font-family:Arial,Helvetica,sans-serif;
  color:#181819;
  background:#fcfcfc;
  font-synthesis:none;
  --muted:#929295;
  --tile:#eee;
  --line:#e9e9e9;
  --font:clamp(10px,.8vw,13px)
}

* {
  box-sizing:border-box
}

body {
  margin:0;
  min-width:320px;
  min-height:100svh;
  display:grid;
  place-items:center;
  padding:7vh 7vw;
  font-size:var(--font);
  -webkit-font-smoothing:antialiased
}

button,input,select {
  font:inherit
}

button {
  border:0;
  color:inherit;
  cursor:pointer;
  background:none;
  -webkit-tap-highlight-color:transparent
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline:2px solid #484849;
  outline-offset:3px
}

button:disabled {
  opacity:.45;
  cursor:wait
}

button {
  transition:background .18s,opacity .18s,transform .18s
}

button:active {
  transform:scale(.96)
}

[hidden] {
  display:none!important
}

.workshop {
  display:flex;
  width:min(86vw,1520px);
  height:80svh;
  max-height:980px;
  min-height:490px;
  background:#fff;
  border:5px solid #c4c4c4;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 30px 55px #0004,0 7px 18px #0002,0 0 0 1px #b6b6b6
}

.sidebar {
  width:12.5%;
  min-width:114px;
  flex-shrink:0;
  display:flex;
  flex-direction:column;
  padding:0 13px 17px 15px;
  overflow:hidden
}

.brand {
  height:58px;
  width:32px;
  display:grid;
  place-items:center;
  padding:0;
  flex-shrink:0
}

.rosette {
  display:block;
  font-family:Arial,sans-serif;
  font-size:30px;
  font-weight:900;
  line-height:1
}

.brand:hover {
  opacity:.6
}

.side-scroll {
  min-height:0;
  overflow-y:auto;
  scrollbar-width:none;
  flex:1
}

.side-section {
  margin:0 0 20px
}

.side-section h2 {
  font-size:inherit;
  font-weight:400;
  color:#929295;
  margin:0 0 8px
}

.side-section>button,.categories button {
  display:flex;
  align-items:center;
  gap:5px;
  padding:5px 0;
  font-size:inherit;
  text-align:left;
  line-height:1.1;
  min-height:23px;
  width:100%;
  color:#666
}

.side-section>button:hover,.categories button:hover {
  color:#000;
  transform:translateX(2px)
}

.side-section button[aria-pressed=true] {
  color:#101010;
  font-weight:600
}

.badge:empty {
  display:none
}

.badge {
  font-size:9px;
  background:#eee;
  padding:1px 4px;
  border-radius:5px
}

.style-picker {
  display:flex;
  align-items:center;
  gap:3px;
  margin-left:-3px
}

.style-picker button {
  width:33px;
  aspect-ratio:1;
  border-radius:9px;
  border:1px solid transparent;
  padding:2px
}

.style-picker button:hover {
  background:#eee
}

.style-picker button[aria-pressed=true] {
  border-color:#c6c6c6;
  background:#f3f3f3;
  box-shadow:0 0 0 2px #eee
}

.style-picker canvas {
  display:block;
  width:100%;
  height:100%;
  pointer-events:none
}

.angle-picker {
  width:48px;
  height:48px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  grid-template-rows:repeat(3,1fr);
  gap:2px;
  padding:2px
}

.angle-picker button {
  width:100%;
  height:100%;
  padding:0;
  border-radius:50%;
  background:#ddd;
  position:relative;
  box-shadow:0 0 0 4px transparent
}

.angle-picker button:hover {
  background:#aaa;
  transform:scale(1.15)
}

.angle-picker button[aria-pressed=true] {
  background:#181819
}

.angle-picker button[aria-pressed=true]::after {
  content:'↙';
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:white;
  font-size:10px;
  line-height:1
}

.angle-picker button[data-angle="8"] {
  transform:scale(.9)
}

.angle-picker button[data-angle="5"] {
  grid-area:1/1;
  transform:translate(2px,2px)
}

.angle-picker button[data-angle="4"] {
  grid-area:1/2
}

.angle-picker button[data-angle="3"] {
  grid-area:1/3;
  transform:translate(-2px,2px)
}

.angle-picker button[data-angle="6"] {
  grid-area:2/1
}

.angle-picker button[data-angle="8"] {
  grid-area:2/2
}

.angle-picker button[data-angle="2"] {
  grid-area:2/3
}

.angle-picker button[data-angle="7"] {
  grid-area:3/1;
  transform:translate(2px,-2px)
}

.angle-picker button[data-angle="0"] {
  grid-area:3/2
}

.angle-picker button[data-angle="1"] {
  grid-area:3/3;
  transform:translate(-2px,-2px)
}

.sidebar-footer {
  display:flex;
  flex-direction:column;
  gap:5px;
  padding-top:16px
}

.sidebar-footer button {
  text-align:left;
  padding:0;
  color:#999;
  font-size:.86em;
  line-height:1.2
}

.sidebar-footer button:hover {
  color:#111
}

.library {
  min-width:0;
  flex:1;
  display:flex;
  flex-direction:column;
  padding-right:8px
}

.library-header {
  display:flex;
  align-items:center;
  min-height:58px;
  gap:14px;
  padding:0 10px 0 2px
}

.icon-count {
  margin:0;
  white-space:nowrap
}

.search {
  display:flex;
  align-items:center;
  gap:8px;
  background:#f5f5f5;
  border-radius:20px;
  width:32%;
  min-width:160px;
  padding:7px 12px;
  margin-left:auto;
  margin-right:auto
}

.search svg {
  width:12px;
  height:12px;
  fill:none;
  stroke:#8f8f8f;
  stroke-width:1.5;
  flex-shrink:0
}

.search input {
  width:100%;
  min-width:0;
  border:0;
  background:none;
  outline:0;
  color:#252525;
  font-size:.95em
}

.search input::placeholder {
  color:#a1a1a1
}

.search:focus-within {
  box-shadow:0 0 0 1px #aaa
}

.search input:focus-visible {
  outline:0
}

.search kbd {
  font:inherit;
  color:#a5a5a5;
  font-size:.85em;
  white-space:nowrap
}

.profile {
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  padding:0
}

.profile .rosette {
  font-size:31px
}

.profile:hover {
  transform:rotate(35deg)
}

.gallery-scroll {
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#ccc transparent;
  min-height:0;
  flex:1;
  padding:0 6px 9px 0
}

.gallery {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:7px
}

.icon-card {
  position:relative;
  width:100%;
  aspect-ratio:1;
  display:block;
  border-radius:4px;
  background:var(--tile);
  padding:0;
  overflow:hidden;
  isolation:isolate;
  transition:background .2s,box-shadow .2s
}

.icon-card:hover {
  background:#e6e6e6;
  box-shadow:inset 0 0 0 1px #d4d4d4
}

.icon-card:active {
  transform:scale(.985)
}

.icon-card canvas {
  width:100%;
  height:100%;
  display:block;
  pointer-events:none;
  transition:transform .35s cubic-bezier(.2,.8,.2,1)
}

.icon-card:hover canvas {
  transform:translateY(-3px) scale(1.025)
}

.icon-card::after {
  content:attr(data-name);
  position:absolute;
  bottom:9px;
  left:10px;
  right:10px;
  text-align:left;
  color:#555;
  font-size:10px;
  opacity:0;
  transform:translateY(3px);
  transition:opacity .2s,transform .2s;
  pointer-events:none;
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden
}

.icon-card:hover::after,.icon-card:focus-visible::after {
  opacity:1;
  transform:translateY(0)
}

.icon-card[data-saved=true]::before {
  content:'';
  position:absolute;
  top:9px;
  right:9px;
  width:4px;
  height:4px;
  border-radius:50%;
  background:#555
}

.empty-state {
  text-align:center;
  padding:15vh 20px;
  color:#aaa
}

.empty-mark {
  font-size:36px
}

.empty-state p {
  font-size:14px;
  color:#555
}

.empty-state button {
  padding:8px 14px;
  background:#f1f1f1;
  border-radius:20px;
  color:#444
}

dialog {
  color:#181819;
  border:0;
  box-shadow:0 18px 75px #0003;
  padding:0
}

dialog::backdrop {
  background:#0009;
  backdrop-filter:blur(3px)
}

.editor {
  width:clamp(550px,40vw,780px);
  border-radius:11px;
  overflow:hidden;
  max-height:92svh;
  max-width:calc(100vw - 28px)
}

.editor[open] {
  animation:dialog-in .28s cubic-bezier(.2,.8,.2,1)
}

.editor-header {
  display:flex;
  align-items:center;
  gap:9px;
  height:36px;
  background:#f5f5f5;
  padding:0 12px
}

.close-button {
  width:18px;
  height:18px;
  padding:0;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#e7e7e7;
  color:#757575;
  line-height:1;
  font-size:16px
}

.close-button:hover {
  background:#d2d2d2;
  color:#111
}

.editor-body {
  display:grid;
  grid-template-columns:40% minmax(0,1fr);
  gap:24px;
  padding:22px 26px 26px
}

.icon-details {
  display:flex;
  flex-direction:column;
  min-width:0
}

.title-row {
  display:flex;
  align-items:center;
  gap:4px;
  min-height:26px
}

.title-row h1 {
  font-size:1.35em;
  line-height:1.1;
  font-weight:600;
  margin:0 3px 0 0;
  min-width:0;
  flex:1;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}

.small-pill {
  white-space:nowrap;
  border-radius:18px;
  background:#f4f4f4;
  padding:6px 8px;
  font-size:.95em
}

.small-pill:hover {
  background:#e7e7e7
}

.small-pill.outlined {
  background:#fff;
  border:1px solid #ededed;
  padding:5px 8px
}

.small-pill[aria-pressed=true] {
  background:#e1e1e1
}

.category-detail {
  margin-top:17px
}

.category-detail>span {
  color:#999;
  font-size:.9em
}

.category-detail p {
  margin:8px 0 0;
  font-size:.9em
}

.export-actions {
  margin-top:auto;
  display:flex;
  gap:5px;
  padding-top:30px
}

.export-actions button {
  border-radius:24px;
  background:#f3f3f3;
  padding:9px 10px;
  flex:1;
  white-space:nowrap
}

.export-actions button:hover {
  background:#e7e7e7
}

.export-actions kbd {
  font:inherit;
  color:#999;
  margin-left:4px
}

.export-actions button.dark,.dark {
  background:#171718;
  color:#fff
}

.export-actions button.dark:hover,.dark:hover {
  background:#363637
}

.export-actions span {
  margin-left:8px
}

.icon-controls {
  min-width:0
}

.preview-toolbar {
  display:flex;
  align-items:center;
  gap:7px;
  margin-bottom:9px;
  min-height:26px
}

.material-tabs {
  display:flex;
  border-radius:20px;
  background:#f5f5f5;
  padding:3px;
  flex:1
}

.material-tabs button {
  border-radius:17px;
  padding:5px 7px;
  color:#888;
  font-size:.95em;
  flex:1
}

.material-tabs button[aria-pressed=true] {
  background:white;
  color:#191919;
  box-shadow:0 1px 4px #00000006
}

.material-tabs button:hover {
  color:#111
}

.palette {
  display:flex;
  gap:3px;
  align-items:center;
  background:#f7f7f7;
  padding:4px 2px;
  border-radius:20px
}

.swatch {
  display:block;
  flex-shrink:0;
  width:17px;
  height:17px;
  border-radius:50%;
  border:0;
  padding:0;
  cursor:pointer
}

.swatch[aria-pressed=true] {
  box-shadow:0 0 0 1px white,0 0 0 2px #222
}

.swatch:hover {
  transform:scale(1.12)
}

.red {
  background:#dc2343
}

.orange {
  background:#f39308
}

.yellow {
  background:#f8c600
}

.green {
  background:#75ca38
}

.blue {
  background:#0eb3d1
}

.black {
  background:#202123
}

.rainbow {
  position:relative;
  background:conic-gradient(#e64351,#ecd239,#5fbf55,#37bac4,#8772c4,#e64351);
  overflow:hidden
}

.rainbow input {
  position:absolute;
  inset:0;
  opacity:0;
  width:100%;
  height:100%;
  cursor:pointer
}

.preview-stage {
  aspect-ratio:1;
  position:relative;
  border-radius:11px;
  background:#f4f4f4;
  overflow:hidden
}

.preview-stage.checker {
  background-color:#fff;
  background-image:conic-gradient(#e8e8e8 25%,transparent 0 50%,#e8e8e8 0 75%,transparent 0);
  background-size:18px 18px
}

.preview-stage>canvas {
  display:block;
  width:100%;
  height:100%;
  touch-action:pan-y;
  cursor:grab
}

.preview-stage>canvas:active {
  cursor:grabbing
}

.preview-stage .angle-picker {
  position:absolute;
  bottom:9px;
  left:9px;
  width:43px;
  height:43px
}

.thumbnails {
  display:grid;
  grid-template-columns:repeat(9,minmax(0,1fr));
  gap:3px;
  margin-top:7px
}

.thumbnail {
  aspect-ratio:1;
  border-radius:6px;
  background:#f3f3f3;
  padding:0;
  border:1px solid #e5e5e5;
  overflow:hidden
}

.thumbnail:hover {
  background:#e9e9e9
}

.thumbnail[aria-pressed=true] {
  border-color:#181818;
  box-shadow:0 0 0 .5px #181818
}

.thumbnail canvas {
  display:block;
  width:100%;
  height:100%;
  pointer-events:none
}

.rename-form {
  margin-top:16px;
  display:grid;
  gap:9px
}

.rename-form label {
  display:grid;
  gap:4px;
  color:#888;
  font-size:10px
}

.rename-form input,.rename-form select {
  min-width:0;
  width:100%;
  border:1px solid #ddd;
  border-radius:5px;
  background:#fafafa;
  padding:7px;
  color:#222
}

.rename-form .small-pill {
  justify-self:start;
  padding-inline:13px
}

.info-dialog {
  max-width:340px;
  border-radius:12px;
  padding:28px;
  font-size:13px;
  line-height:1.6
}

.info-dialog .close-button {
  position:absolute;
  top:12px;
  right:12px
}

.info-dialog h2 {
  font-size:16px;
  margin:0 0 10px
}

.info-dialog p {
  margin:0;
  color:#777
}

.toast {
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translate(-50%,12px);
  border-radius:30px;
  padding:11px 18px;
  background:#181819;
  color:#fff;
  font-size:12px;
  pointer-events:none;
  opacity:0;
  transition:opacity .2s,transform .2s;
  z-index:10;
  white-space:nowrap
}

.toast.visible {
  opacity:1;
  transform:translate(-50%,0)
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}

@keyframes dialog-in {
  from {
    opacity:0;
    transform:translateY(10px) scale(.97)
  }
  to {
    opacity:1;
    transform:none
  }
}

@media(min-width:1600px) {
  .editor-body {
    gap:30px;
    padding:28px 32px 32px
  }
  .editor-header {
    height:44px
  }
  .preview-toolbar {
    gap:10px
  }
  .swatch {
    width:21px;
    height:21px
  }
  .palette {
    gap:4px
  }
  .small-pill {
    padding:7px 9px
  }
  .small-pill.outlined {
    padding:6px 9px
  }
  .sidebar {
    padding-left:20px
  }
  .side-section {
    margin-bottom:24px
  }
  .side-section>button,.categories button {
    min-height:27px
  }
  .brand,.library-header {
    height:65px;
    min-height:65px
  }
}

@media(max-width:850px) {
  body {
    padding:4vh 4vw
  }
  .workshop {
    width:92vw;
    height:88svh;
    border-width:4px
  }
  .sidebar {
    min-width:105px;
    padding-left:12px;
    padding-right:8px
  }
  .library-header {
    min-height:48px
  }
  .brand {
    height:48px
  }
  .gallery {
    gap:5px;
    grid-template-columns:repeat(4,minmax(0,1fr))
  }
  .side-section {
    margin-bottom:16px
  }
  .side-section>button,.categories button {
    min-height:22px
  }
  .search {
    width:50%
  }
}

@media(max-width:560px) {
  body {
    padding:12px;
    background:#f4f4f4
  }
  .workshop {
    width:100%;
    height:calc(100svh - 24px);
    min-height:450px;
    border-width:2px;
    border-radius:8px;
    box-shadow:0 12px 30px #0002
  }
  .sidebar {
    min-width:84px;
    width:84px;
    padding-left:9px;
    padding-right:6px
  }
  .sidebar .brand {
    height:47px
  }
  .side-section>button,.categories button {
    font-size:10px
  }
  .side-section {
    margin-bottom:17px
  }
  .style-picker button {
    width:24px;
    border-radius:6px
  }
  .sidebar-footer {
    gap:6px;
    font-size:9px;
    padding-bottom:4px
  }
  .library {
    padding-right:3px
  }
  .library-header {
    padding-right:4px;
    gap:7px;
    flex-wrap:wrap;
    padding-block:9px;
    min-height:73px
  }
  .icon-count {
    font-size:10px;
    order:1
  }
  .profile {
    order:2;
    margin-left:auto;
    width:20px;
    height:20px
  }
  .profile .rosette {
    font-size:23px
  }
  .search {
    order:3;
    width:100%;
    min-width:0;
    padding:6px 9px;
    margin:0
  }
  .search kbd {
    display:none
  }
  .gallery {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:5px
  }
  .gallery-scroll {
    padding-right:3px
  }
  .editor {
    min-width:0;
    width:calc(100vw - 28px);
    max-height:92svh;
    overflow:auto
  }
  .editor-body {
    grid-template-columns:1fr;
    padding:17px;
    gap:16px
  }
  .icon-details {
    display:contents
  }
  .title-row {
    grid-row:1
  }
  .title-row h1 {
    font-size:16px
  }
  .title-row .small-pill {
    font-size:10px;
    padding:7px 10px
  }
  .category-detail {
    display:none
  }
  .icon-controls {
    grid-row:2
  }
  .export-actions {
    grid-row:4;
    margin:0;
    padding-top:0
  }
  .export-actions button {
    padding:12px
  }
  .rename-form {
    grid-row:3;
    margin:0
  }
  .preview-toolbar {
    gap:10px
  }
  .material-tabs button {
    font-size:10px;
    padding:7px 9px
  }
  .swatch {
    width:18px;
    height:18px
  }
  .palette {
    gap:3px
  }
  .editor-header {
    height:35px
  }
  .thumbnail {
    border-radius:5px
  }
  .info-dialog {
    max-width:calc(100vw - 40px)
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important
  }
}

@media(min-width:561px) {
  .sidebar {
    font-size:clamp(8px,1.2vh,12px);
    padding-bottom:1.3em
  }
  .sidebar .brand {
    height:5.3em;
    min-height:5.3em
  }
  .sidebar .side-section {
    margin-bottom:1.35em
  }
  .sidebar .side-section h2 {
    margin-bottom:.55em
  }
  .sidebar .side-section>button,.sidebar .categories button {
    min-height:1.7em;
    padding:.28em 0;
    line-height:1.1
  }
  .sidebar .style-picker button {
    width:3.1em
  }
  .sidebar .angle-picker {
    width:4.5em;
    height:4.5em
  }
  .sidebar .sidebar-footer {
    padding-top:1.5em;
    gap:.4em
  }
  .sidebar .sidebar-footer button {
    font-size:.85em
  }
}

.rosette {
  width:25px;
  height:25px;
  display:block
}

.brand .rosette {
  width:22px;
  height:22px
}

.profile .rosette {
  width:27px;
  height:27px
}

dialog::backdrop {
  backdrop-filter:blur(1.5px)
}

