:root {
  color-scheme: light;
  --ink: #202d25;
  --muted: #647166;
  --paper: #f4f5ed;
  --line: #d6dcd0;
  --green: #21543c;
  --lime: #ddf99e;
  --field: #123b2f;
  font:
    15px/1.5 'Apple SD Gothic Neo',
    'Malgun Gothic',
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.48;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #739840;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
}
h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}
[hidden] {
  display: none !important;
}
header {
  border-bottom: 1px solid var(--line);
  background: #fafbf5;
}
.bar,
main {
  max-width: 1168px;
  margin: auto;
  padding-inline: 34px;
}
.bar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.8px;
}
.brand img {
  width: 32px;
  height: 32px;
  margin-right: 2px;
}
.brand span {
  font-weight: 550;
  color: #42634d;
}
.bar nav {
  display: flex;
  align-self: stretch;
  gap: 27px;
}
.bar nav a {
  display: grid;
  place-items: center;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  padding: 3px 1px 0;
  font-weight: 650;
  font-size: 14px;
}
.bar nav a[aria-current='page'] {
  border-color: var(--green);
  color: var(--green);
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 32px 0 22px;
}
.heading h1 {
  font-size: clamp(31px, 4vw, 43px);
  line-height: 1.25;
  letter-spacing: -2.8px;
  font-weight: 850;
}
#measure .heading {
  align-items: center;
}
#measure .heading h1 {
  flex-shrink: 0;
}
.support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #b87821;
  border-radius: 9px;
  background: #ffd071;
  color: #482d0d;
  box-shadow: 0 2px 0 #bd853a;
  font-weight: 750;
  line-height: 1.35;
  word-break: keep-all;
}
.support-btn:hover {
  background: #ffc253;
}
.heading > span,
.sub,
.screen-label,
.screen-foot,
.row-label,
.catalog-line,
.timer-settings,
footer {
  font-size: 13px;
}
.heading > span,
.sub,
.row-label,
footer {
  color: var(--muted);
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 19px;
  align-items: start;
}
.stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.panel {
  background: #fdfef9;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 2px 2px #23341e05;
}
.card {
  padding: 22px 24px;
}
.card-head,
.timer-settings,
.console-top,
.screen-foot,
.item-title,
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-head {
  margin-bottom: 18px;
}
.card-head h2 {
  font-size: 20px;
  letter-spacing: -1px;
  line-height: 1.3;
}
.timer {
  overflow: hidden;
}
.console {
  position: relative;
  isolation: isolate;
  padding: 19px 25px 14px;
  background: #173f32;
  color: #e4f5d3;
}
.console:before {
  content: '';
  z-index: -1;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 45%, #62804a44, transparent 42%),
    radial-gradient(#cde8ad1a 0.85px, transparent 1px);
  background-size:
    auto,
    7px 7px;
}
.console-top {
  font: 600 12px/1.5 system-ui;
  color: #b4ccab;
}
.digital {
  padding: 13px 0 12px;
}
.screen-label {
  color: #c1d6b8;
  margin-bottom: 2px;
}
.digital output {
  display: block;
  color: #e7ffb8;
  font:
    550 clamp(39px, 5.2vw, 75px)/1.1 ui-monospace,
    'SFMono-Regular',
    Menlo,
    Consolas,
    monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.085em;
}
.screen-foot {
  min-height: 28px;
  padding-top: 8px;
  border-top: 1px solid #d4e4c42c;
  color: #c3d7b6;
  font-variant-numeric: tabular-nums;
}
.timer-settings {
  flex-wrap: wrap;
  padding: 18px 23px 10px;
}
.timer-options {
  display: flex;
  gap: 12px;
}
.alarm-fields {
  display: grid;
  gap: 8px;
}
.alarm-fields select,
.alarm-fields input {
  width: 100%;
}
.alarm-fields input[type='range'] {
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--green);
}
#ringing-alarm form {
  display: grid;
  gap: 16px;
}
.seg {
  display: inline-flex;
  background: #eaf0e4;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}
.seg button {
  padding: 5px 11px;
  color: #62735f;
  font-size: 13px;
  font-weight: 650;
  border-radius: 5px;
}
.seg button[aria-pressed='true'] {
  color: #284e33;
  background: #fff;
  box-shadow: 0 1px 4px #20371e24;
}
.text-btn {
  padding: 3px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #9bb59b;
}
.actions {
  display: flex;
  gap: 7px;
  padding: 0 23px 18px;
}
.primary,
.secondary,
.small-btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  line-height: 1.45;
}
.primary {
  background: var(--green);
  color: #fff;
}
.primary:hover:enabled {
  background: #173f2d;
}
.secondary,
.small-btn {
  background: #f0f4e9;
  border: 1px solid var(--line);
  color: var(--green);
}
.small-btn {
  font-size: 13px;
  padding: 5px 9px;
}
.actions #start {
  flex: 1;
}
.actions #start:before {
  content: '▶';
  font-size: 11px;
  margin-right: 8px;
}
.actions #start[data-status='running']:before {
  content: 'Ⅱ';
}
.wide {
  width: 100%;
}
.catalog-line {
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin: -3px 0 15px;
  color: #4c684b;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #739458;
}
.card label,
.field-label,
.row-label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 6px;
}
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: white;
  border: 1px solid #cbd4c6;
  border-radius: 7px;
  padding-left: 12px;
}
.search:focus-within {
  border-color: var(--green);
}
.search input {
  border: 0;
  background: transparent;
  width: 100%;
  padding: 10px 10px 10px 1px;
  min-width: 0;
}
.search i {
  display: block;
  width: 13px;
  height: 13px;
  border: 1.6px solid #6a7d68;
  border-radius: 100%;
  position: relative;
}
.search i:after {
  content: '';
  position: absolute;
  width: 6px;
  height: 1.6px;
  background: #6a7d68;
  transform: rotate(45deg);
  right: -4px;
  bottom: -2px;
}
input,
textarea,
select {
  min-width: 0;
  border: 1px solid #ccd5c8;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 8px 10px;
  line-height: 1.5;
}
input::placeholder,
textarea::placeholder {
  color: #90998e;
}
input[type='number'] {
  appearance: textfield;
  -moz-appearance: textfield;
}
input::-webkit-inner-spin-button {
  appearance: none;
}
.stats-grid {
  display: grid;
  grid-template-columns: minmax(54px, 0.65fr) repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  align-items: center;
}
.stats-grid > b {
  font-size: 13px;
  color: var(--muted);
}
.stats-grid input {
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.stats-grid > label {
  margin: 0;
}
.exp-summary {
  margin: 12px 0 16px;
  font-variant-numeric: tabular-nums;
}
.exp-stages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.exp-stages > div {
  display: grid;
  align-content: start;
  gap: 3px;
}
.exp-stages small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.exp-stages progress {
  width: 100%;
  height: 7px;
  accent-color: var(--green);
}
#settlement {
  margin-bottom: 18px;
}
#hunt-memo {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  resize: vertical;
}
.choices:empty,
#selected-map:empty {
  display: none;
}
.choices {
  margin-top: 7px;
  max-height: 245px;
  overflow: auto;
}
#drops {
  max-height: min(245px, 40vh);
}
.choices > button,
.choice-list > button {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  width: 100%;
  padding: 7px 9px;
  border-bottom: 1px solid #e6eadf;
}
.monster-group > summary {
  cursor: pointer;
  padding: 6px 9px;
  color: var(--green);
}
.spawn-list {
  margin-left: 14px;
  border-left: 2px solid var(--line);
}
.choices > button:hover,
.choice-list > button:hover,
.chips button:hover {
  background: #eaf2e2;
}
.choices small {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.choices p,
.hint,
.empty-items,
.record-meta {
  color: var(--muted);
  font-size: 13px;
}
.choices p {
  padding: 6px 1px;
}
.row-label {
  margin-top: 13px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chips button,
.count {
  background: #eaf1e2;
  border-radius: 7px;
  padding: 4px 9px;
  font-size: 12px;
  color: #375c3b;
}
.chips button {
  display: flex;
  align-items: center;
  gap: 4px;
}
.chips button[aria-pressed='true'] {
  box-shadow: inset 0 0 0 1px #6f9365;
}
.chips img,
.choices img,
.item-title img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
}
.picked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 0 1px;
  color: var(--green);
  font-weight: 650;
}
.empty-items {
  padding: 17px 0 1px;
}
.item {
  padding-top: 13px;
  margin-top: 13px;
  border-top: 1px solid var(--line);
}
.item-name {
  display: grid;
  gap: 2px;
  margin-right: auto;
  overflow-wrap: anywhere;
}
.item-name .text-btn {
  justify-self: start;
  text-align: start;
}
.item-fields,
.form-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.item-fields label,
.form-row label {
  font-size: 12px;
  flex: 1;
  min-width: 0;
  color: #586653;
}
.item-fields {
  flex-wrap: wrap;
}
.item-fields label {
  flex-basis: 4.5rem;
}
.item-fields input,
.form-row input,
.form-row select {
  width: 100%;
  display: block;
  margin-top: 3px;
}
.status-note,
.warning,
#notice {
  color: #895126;
  background: #fff3da;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  margin: 8px 0;
}
#notice {
  max-width: 1100px;
  margin: 8px auto;
}
footer {
  margin: 26px 0 0;
  padding: 17px 0 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  width: min(410px, 92vw);
  color: var(--ink);
  background: #fcfdf8;
}
dialog::backdrop {
  background: #12271966;
}
dialog .card-head {
  margin-bottom: 13px;
}
#dialog-body h3 {
  font-size: 15px;
}
#dialog-body > h3 {
  margin-bottom: 4px;
}
.world-recommendations {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.world-recommendations button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
}
.world-recommendations button:hover:enabled {
  background: #e3edd8;
}
.selection-source,
.saved-choice small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.source-options {
  padding: 2px 9px 6px;
  color: var(--green);
  font-size: 12px;
}
.source-options summary {
  cursor: pointer;
}
.source-options > .choice-list {
  border-left: 2px solid var(--line);
}
.source-order,
.saved-combinations:not(:empty),
.combo-editor {
  display: grid;
  gap: 8px;
}
.saved-combinations:not(:empty) {
  margin-bottom: 16px;
}
.source-order {
  list-style: none;
  margin: 0;
  padding: 0;
}
.source-order li,
.saved-choice,
.combo-save {
  display: flex;
  align-items: center;
  gap: 8px;
}
.source-order li {
  background: #eaf1e2;
  padding: 5px 9px;
  border-radius: 6px;
}
.source-order li > span,
.saved-choice > button:first-child,
.combo-save input {
  flex: 1;
  min-width: 0;
}
.saved-choice > button:first-child {
  text-align: left;
  overflow-wrap: anywhere;
}
.combo-save input {
  width: 100%;
}
.version-add {
  align-items: end;
}
.combo-editor .dialog-actions {
  margin-top: 0;
}
.combo-editor p:empty {
  display: none;
}
.close {
  font-size: 24px;
  line-height: 1;
}
.presets {
  display: flex;
  gap: 6px;
  margin: 14px 0;
}
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
}
.records-grid {
  display: grid;
  gap: 10px;
}
#more-records {
  margin-top: 12px;
}
.record {
  padding: 16px 20px;
}
.record .between {
  flex-wrap: wrap;
}
.record h2 {
  font-size: 18px;
}
.record p {
  margin-top: 5px;
}
.record-memo {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.record-memo h3 {
  color: var(--green);
  font-size: 14px;
}
.record-memo p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.record-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 20px;
  margin: -16px -20px 16px;
  padding-right: 20px;
  border-bottom: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  background: #f6f8f0;
}
.record-duration {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 16px 20px;
  border-radius: 14px 0 0 0;
  background: var(--field);
  color: #c1d6b8;
  font-size: 12px;
}
.record-duration time {
  color: #e7ffb8;
  font: 550 32px/1.1 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.record-duration time span {
  color: #c1d6b8;
  font-size: .75em;
}
.record-place {
  padding-block: 12px;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .record-heading {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 12px;
    padding-right: 12px;
  }
  .record-duration {
    grid-row: span 2;
    padding: 12px;
  }
  .record-duration time {
    font-size: 24px;
  }
  .record-place {
    padding-block: 12px 0;
  }
  .record-heading > button {
    justify-self: start;
    margin-bottom: 12px;
  }
}
.settlement-totals {
  max-width: 36rem;
  margin-top: 12px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.settlement-totals > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 4px 0;
}
.settlement-totals dd {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 0 6px;
  overflow-wrap: anywhere;
}
.settlement-totals small {
  color: var(--muted);
  font-weight: normal;
}
.settlement-totals > div:last-child {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--green);
  font-weight: 700;
}
.settlement-item-title {
  margin: 14px 0 4px;
  font-size: 14px;
}
.settlement-items {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.settlement-items li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.settlement-items img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  image-rendering: pixelated;
}
.item-quantity,
.settlement-items small {
  color: var(--muted);
}
.sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
@media (max-width: 760px) {
  .bar,
  main {
    padding-inline: 16px;
  }
  .bar {
    min-height: 59px;
  }
  .brand {
    font-size: 15px;
    gap: 5px;
  }
  .brand img {
    width: 27px;
    height: 27px;
  }
  .bar nav {
    gap: 14px;
  }
  .bar nav a {
    font-size: 13px;
  }
  .heading {
    padding: 23px 0 16px;
  }
  .support-btn {
    gap: 5px;
    padding: 7px 10px;
    font-size: 13px;
  }
  .columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .columns > .stack,
  .columns > aside {
    display: contents;
  }
  .timer {
    order: 0;
  }
  .columns aside section:first-child {
    order: 1;
  }
  .columns > div.stack > .card:nth-child(2) {
    order: 2;
  }
  .columns .inventory-panel {
    order: 3;
  }
  .columns > div.stack > .card:last-child {
    order: 4;
  }
  .columns {
    gap: 13px;
  }
  .digital output {
    font-size: clamp(44px, 9.8vw, 72px);
  }
  .card {
    padding: 17px 18px;
  }
  .heading > span {
    font-size: 12px;
  }
  .console {
    padding: 16px 20px 12px;
  }
  .actions {
    padding: 0 17px 15px;
  }
  .timer-settings {
    padding: 14px 17px 9px;
  }
  .digital {
    padding: 12px 0;
  }
  .stats-grid {
    gap: 8px;
  }
  .brand span {
    white-space: nowrap;
  }
}
@media (max-width: 400px) {
  .brand span {
    display: none;
  }
}
@media (max-width: 370px) {
  .actions {
    flex-wrap: wrap;
  }
  .screen-foot {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
