@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/roboto-400.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/roboto-500.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/roboto-700.woff2") format("woff2");
}

:root {
  color-scheme: light;
  font-family: "Roboto", Arial, sans-serif;
  color: #111827;
  background: #f3f4f6;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  min-height: 100%;
  background: #f3f4f6;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f3f4f6;
}

button,
input,
textarea {
  font: inherit;
}

.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: #ffffff;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 56px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.app-title,
.tool-title {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  color: #111827;
}

.page-content {
  padding: 20px 16px 32px;
}

.section-title {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
}

.service-list {
  display: grid;
  gap: 12px;
}

.service-card {
  min-height: 76px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #111827;
  text-decoration: none;
  background: #f8f9fa;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.service-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.service-card:active {
  transform: translateY(0);
}

.service-icon {
  position: relative;
  width: 40px;
  height: 46px;
  flex: 0 0 40px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  color: #2563eb;
  background: #dbeafe;
  border: 2px solid #3b82f6;
  border-radius: 5px;
}

.service-icon::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: #f8f9fa;
  border-bottom: 2px solid #3b82f6;
  border-left: 2px solid #3b82f6;
  border-bottom-left-radius: 3px;
}

.service-icon span {
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.service-name {
  flex: 1;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.service-arrow,
.back-arrow {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.service-arrow {
  margin-right: 3px;
  color: #6b7280;
  transform: rotate(45deg);
}

.tool-header {
  justify-content: space-between;
}

.tool-title {
  max-width: calc(100% - 136px);
  overflow: hidden;
  font-size: 18px;
  line-height: 26px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.back-link {
  width: 68px;
  min-height: 40px;
  margin: -6px 0 -6px -8px;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #4b5563;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
}

.back-link:hover {
  color: #2563eb;
  background: #f3f4f6;
}

.back-arrow {
  transform: rotate(-135deg);
}

.header-spacer {
  width: 68px;
}

.tool-card {
  padding: 16px;
  display: grid;
  gap: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: #374151;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.field textarea,
.field input {
  width: 100%;
  color: #111827;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field textarea {
  min-height: 300px;
  padding: 12px;
  line-height: 1.5;
  resize: vertical;
}

.field input {
  min-height: 44px;
  padding: 9px 12px;
}

.field textarea::placeholder {
  color: #9ca3af;
}

.field textarea:focus,
.field input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.field-hint {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 18px;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.button {
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.button-primary {
  color: #ffffff;
  background: #2563eb;
}

.button-primary:hover {
  background: #1d4ed8;
}

.button-secondary {
  color: #374151;
  background: #ffffff;
  border-color: #d1d5db;
}

.button-secondary:hover {
  background: #f3f4f6;
}

.service-card:focus-visible,
.back-link:focus-visible,
.button:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.35);
  outline-offset: 2px;
}

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

@media (max-width: 340px) {
  .tool-title {
    font-size: 16px;
  }

  .button-row {
    grid-template-columns: 1fr;
  }
}

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