:root {
  color-scheme: light;
  --ink: #232720;
  --muted: #595f54;
  --green: #135943;
  --paper: #fffdf7;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
body {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 100svh;
  margin: 0;
  padding: clamp(18px, 4.5vw, 64px) clamp(12px, 4vw, 54px);
  display: grid;
  align-items: center;
  color: var(--ink);
  font: 16px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse at 88% -10%, #ffffed 4%, #fff6dfb0 26%, transparent 55%),
    radial-gradient(ellipse at -3% 56%, #ffc77e 0%, #efd3af 27%, transparent 60%),
    linear-gradient(145deg, #a9a59c, #ded4c3 47%, #e0dfd7 81%, #bab9b0);
}
.ambient { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.ambient span { position: absolute; display: block; border-radius: 50%; }
.ambient span:nth-child(1) {
  width: 226px; height: 226px; top: -109px; right: -29px;
  background: radial-gradient(circle at 53% 70%, #fffff7, #fffbef 70%, #e7d2b2);
  box-shadow: 0 0 58px #fff7dbad;
}
.ambient span:nth-child(2) {
  width: 146px; height: 140px; top: 8%; left: -76px; transform: rotate(-30deg);
  background: radial-gradient(ellipse at 76% 25%, #f2eee5, #cdc6b9 52%, #aaa198 88%);
  box-shadow: inset -6px 5px 12px #fff8eb70, 10px 18px 34px #65544530;
}
.ambient span:nth-child(3) {
  width: 118px; height: 94px; bottom: -23px; right: 2%; transform: rotate(-32deg);
  background: radial-gradient(ellipse at 66% 19%, #93b594, #2d7357 47%, #174d3c 85%);
  box-shadow: inset -6px 5px 12px #d4f3c230, 10px 18px 34px #65544545;
}
.shell {
  width: min(1110px, 100%);
  margin: auto;
  padding: clamp(16px, 3vw, 36px);
  border-radius: 36px;
  border: 1px solid #fff9ee;
  background: linear-gradient(130deg, #ffffffc2, #eae8dfc7 63%, #faf5e7ca);
  backdrop-filter: blur(14px);
  box-shadow: 0 35px 80px #57482830, inset 0 1px 1px #fff;
}
.topbar {
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 16px 6px 11px;
  margin-bottom: clamp(15px, 2.5vw, 28px);
  border-radius: 999px;
  background: #fffdf4;
  border: 1px solid #fff;
  box-shadow: 0 6px 14px #664c2222, inset 0 -1px 2px #b4a0793d;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 750; letter-spacing: -.045em; }
.brand i {
  width: 33px; height: 33px; display: grid; place-items: center; border-radius: 12px;
  color: #fff8e9; font: 720 19px/1 Inter, -apple-system, sans-serif;
  background: linear-gradient(136deg, #297e62, #124936);
  box-shadow: inset 0 1px 1px #d8f7dc70, 0 3px 6px #254d3840;
}
.local { display: flex; align-items: center; gap: 7px; color: #325748; font-size: 12px; font-weight: 600; }
.local i { width: 7px; height: 7px; background: #3a8666; border-radius: 50%; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(12px, 2.1vw, 22px); }
.tile {
  min-width: 0;
  border: 1px solid #fffdf480;
  border-radius: 25px;
  box-shadow: 0 12px 26px #614b1220, inset 0 1px 1px #fff9;
}
.generator { padding: clamp(20px, 3.4vw, 38px); background: linear-gradient(146deg, #fffdf8, #f1eee6); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(36px, 5.8vw, 72px); line-height: .98; letter-spacing: -.058em; font-weight: 650; }
h1 span { color: var(--green); }
.intro p { margin: 14px 0 27px; color: var(--muted); font-size: 14px; }
h2 { font-size: 15px; font-weight: 650; letter-spacing: -.012em; }
.display {
  padding: 15px 17px;
  border-radius: 16px;
  border: 1px solid #d9d8cd;
  background: #fefcf5;
  box-shadow: inset 0 2px 5px #5e51310d;
}
.resulthead { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.resulthead h2, #grade { color: #4d584d; font-size: 11px; }
#grade { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 650; }
.meter { display: flex; align-items: end; gap: 2px; height: 12px; }
.meter i { width: 3px; border-radius: 1px; background: #c6cfc1; }
.meter i.on { background: #267355; }
#password {
  margin-top: 9px; min-height: 1.26em; overflow-wrap: anywhere;
  color: #1f362b; font: 600 clamp(22px, 3.15vw, 38px)/1.26 var(--mono); letter-spacing: -.055em;
}
#password .num { color: #1b694e; }
#password .sym { color: #875018; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 19px; }
button { cursor: pointer; font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, #password:focus-visible { outline: 2px solid #246e56; outline-offset: 4px; }
.actions button {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  min-height: 44px; padding: 8px 17px; border-radius: 999px;
  font-size: 13px; font-weight: 650; transition: transform .2s, box-shadow .2s;
}
.actions button:hover { transform: translateY(-2px); }
.actions button:active { transform: translateY(1px); }
#generate { color: #fffdf3; background: linear-gradient(135deg, #287c5f, #124b39); border: 1px solid #206449; box-shadow: inset 0 1px #f7ffe054, 0 5px 10px #18493343; }
#copy { color: #28483a; background: #fffdf5; border: 1px solid #dcd7c8; box-shadow: 0 3px 7px #5f50391b; }
.actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#status { display: block; height: 0; overflow: visible; color: #325e44; font-size: 11px; margin-top: 4px; }
.art {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(ellipse at 70% 4%, #fff1d9, transparent 65%),
    linear-gradient(152deg, #f5d6a8 7%, #ecac55 62%, #c77724);
  border-color: #fff4dd9e;
}
.art-light {
  position: absolute; inset: 0;
  background: linear-gradient(126deg, transparent 30%, #fffbe742 51%, transparent 57%);
  opacity: .6;
}
.orbit {
  position: absolute; z-index: -1; width: 127%; height: 43%; bottom: -17%; left: -18%;
  border-radius: 50%; transform: rotate(-24deg);
  box-shadow: 0 -2px 4px #fff1bdbd, 0 -12px 20px #ffdf9b73, inset 0 12px 23px #ffee9b72;
  background: linear-gradient(155deg, #ffa23942, transparent);
}
.knot-shadow { position: absolute; left: 25%; right: 25%; bottom: 17%; height: 9%; border-radius: 50%; background: #593b25; opacity: .3; filter: blur(13px); }
.art canvas { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 16px 12px #80521c52); }
.art-fleck {
  position: absolute; width: 22px; height: 22px; right: 14%; top: 13%; border-radius: 50%;
  background: radial-gradient(circle at 34% 23%, #fffee9, #efcb86 56%, #bb7736 98%);
  box-shadow: 3px 7px 8px #95622b40;
}
.length {
  grid-column: 2; grid-row: 2;
  padding: 20px 25px;
  color: #fffdf3;
  background: radial-gradient(ellipse at 100% 90%, #38967895, transparent 67%), linear-gradient(151deg, #20664f, #103e31);
  border-color: #377e66;
}
.length-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.length-value { display: flex; align-items: baseline; gap: 6px; }
.length-value output { font: 600 28px/1 var(--mono); letter-spacing: -.08em; }
.length-value span, .limits { font-size: 11px; color: #e0ebda; }
input[type=range] { width: 100%; height: 22px; margin: 13px 0 0; accent-color: #ffe9bd; cursor: pointer; }
.length input:focus-visible { outline-color: #ffebbd; }
.limits { display: flex; justify-content: space-between; font-family: var(--mono); margin-top: 2px; }
.characters { grid-column: 1; grid-row: 2; margin: 0; padding: 17px 23px 19px; background: linear-gradient(150deg, #fbfaf3, #eeece2); }
#types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
#types button {
  min-height: 55px; padding: 6px 3px; border: 1px solid #d4d5c7; border-radius: 13px;
  background: #fffdf6; color: #575e52; transition: background-color .2s, transform .2s;
}
#types button:hover { transform: translateY(-2px); }
#types button[aria-pressed=true] { background: #dfeade; border-color: #adbfac; color: #194b37; box-shadow: inset 0 1px #fcfff5; }
#types button strong { display: block; font: 650 16px/1.15 var(--mono); }
#types button small { display: block; margin-top: 2px; font-size: clamp(9px, 1.1vw, 11px); }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 10px; margin: 19px 5px 0; color: #4f594e; font-size: 11px; }
footer span:first-child { font-family: var(--mono); }
@media (max-width: 760px) {
  .workspace { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
  .tile { border-radius: 20px; }
  .length { padding: 19px; }
  .characters { padding: 15px; }
}
@media (max-width: 600px) {
  .shell { border-radius: 24px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .length, .characters { grid-column: auto; grid-row: auto; }
  .generator { padding: 22px 16px; }
  .intro p { margin-bottom: 18px; }
  h1 { font-size: clamp(31px, 8.4vw, 49px); }
  .display { padding: 12px; }
  .actions { gap: 6px; margin-top: 13px; }
  .actions button { padding: 8px 12px; font-size: 12px; }
  #status { height: auto; min-height: 0; }
  #status:empty { margin: 0; }
  #types button small { font-size: 10px; }
  .art { grid-row: 4; height: 175px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
