* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: #172026;
  background: #eef2f4;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

.page {
  width: min(100%, 560px);
  min-height: var(--app-height, 100dvh);
  margin: 0 auto;
  background: #f9fbfc;
}

.login-view,
.input-view {
  min-height: var(--app-height, 100dvh);
  padding: 18px;
}

.login-view {
  display: grid;
  align-items: center;
}

.login-box {
  display: grid;
  gap: 14px;
}

h1 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.2;
}

label {
  display: grid;
  gap: 7px;
  font-size: 15px;
  font-weight: 650;
}

input,
textarea,
button {
  width: 100%;
  border-radius: 8px;
  font: inherit;
}

input,
textarea {
  border: 1px solid #c8d3d8;
  background: #fff;
  color: #172026;
}

input {
  min-height: 48px;
  padding: 0 12px;
}

button {
  min-height: 50px;
  border: 0;
  color: #fff;
  background: #146c5c;
  font-weight: 750;
  box-shadow: 0 6px 14px rgba(20, 108, 92, 0.18);
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
  touch-action: manipulation;
}

button.is-pressing,
button:active {
  transform: scale(0.98);
  filter: brightness(0.94);
  box-shadow: 0 3px 8px rgba(20, 108, 92, 0.18);
}

.secondary {
  color: #172026;
  background: #dfe7ea;
  box-shadow: 0 6px 14px rgba(62, 78, 88, 0.12);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check input {
  width: 20px;
  min-height: 20px;
}

.input-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  height: var(--app-height, 100dvh);
  overflow: hidden;
  padding: 14px 14px 0;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
}

.status {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 750;
}

.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.red {
  background: #d7322d;
}

.green {
  background: #188b55;
}

.status-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.link-button {
  width: auto;
  min-height: 34px;
  padding: 0 8px;
  color: #50606a;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
}

.voice-box {
  min-height: 0;
  padding: 14px;
  resize: none;
  line-height: 1.65;
  font-size: 18px;
  overflow: auto;
}

.action-bar {
  display: grid;
  grid-row: 4;
  grid-template-columns: 1fr !important;
  grid-auto-flow: row;
  grid-auto-rows: auto;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: #f9fbfc;
  padding-bottom: env(safe-area-inset-bottom);
}

.send-button,
.action-bar button {
  display: block;
  width: 100%;
  min-height: 54px;
}

.send-button {
  font-size: 18px;
}

.send-button.is-flashing {
  animation: sendFlash 420ms ease;
}

.link-button.is-flashing {
  animation: linkFlash 360ms ease;
}

.hint {
  grid-row: 3;
  min-height: 22px;
  margin: 0;
  color: #50606a;
  font-size: 14px;
}

@keyframes sendFlash {
  0% {
    background: #146c5c;
  }
  45% {
    background: #1f9c73;
    box-shadow: 0 0 0 5px rgba(31, 156, 115, 0.16);
  }
  100% {
    background: #146c5c;
  }
}

@keyframes linkFlash {
  0% {
    background: transparent;
  }
  45% {
    background: rgba(80, 96, 106, 0.12);
  }
  100% {
    background: transparent;
  }
}
