*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:not(:disabled),
[role="button"],
a {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4,
strong {
  font-weight: 680;
}

h1,
h2,
h3 {
  letter-spacing: -0.026em;
  line-height: 1.12;
}

p {
  color: var(--ink-600);
}

ul,
ol {
  margin: 0;
  padding: 0;
}

button,
input,
textarea,
select,
a {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  box-shadow: 0 0 0 4px var(--focus);
  border-color: var(--tea-600) !important;
}

::selection {
  background: var(--tea-200);
  color: var(--tea-900);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--ink-200);
  border: 3px solid transparent;
  border-radius: var(--radius-pill);
  background-clip: content-box;
}

.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;
}

.icon {
  flex: 0 0 auto;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 680;
  line-height: 1;
  text-align: center;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}

.button:not(:disabled):active {
  transform: translateY(1px) scale(.99);
}

.button-primary {
  background: var(--tea-800);
  color: #fff;
  box-shadow: 0 8px 20px rgba(75, 84, 56, .18);
}

.button-primary:hover {
  background: var(--tea-900);
  box-shadow: 0 10px 24px rgba(75, 84, 56, .24);
}

.button-secondary {
  background: var(--surface);
  color: var(--ink-800);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.button-secondary:hover {
  background: var(--ink-50);
  border-color: var(--ink-300);
}

.button-ghost {
  min-height: 40px;
  background: transparent;
  color: var(--ink-700);
  border-color: transparent;
}

.button-ghost:hover {
  background: var(--ink-100);
}

.button-dark {
  background: var(--ink-950);
  color: #fff;
}

.button-dark:hover {
  background: #15120f;
}

.button-danger {
  background: var(--red-700);
  color: #fff;
}

.button-small {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 13px;
}

.button-large {
  min-height: 52px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 15px;
}

.button-full {
  width: 100%;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--tea-800);
  font-size: 14px;
  font-weight: 680;
}

.text-link:hover {
  color: var(--tea-900);
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  background: var(--surface);
  color: var(--ink-600);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.icon-button:not(:disabled):hover {
  background: var(--ink-50);
  color: var(--ink-900);
  border-color: var(--ink-300);
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink-900);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}

input,
select {
  min-height: 48px;
  padding: 0 13px;
}

select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236f6358' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

textarea {
  min-height: 110px;
  padding: 12px 13px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-400);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink-300);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
