:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #202124;
  background: #f7f7f7;
}

* { box-sizing: border-box; }

body { margin: 0; padding: 24px; }

.tool-header, main, .site-footer { max-width: 920px; margin-inline: auto; }

.tool-header { margin-bottom: 12px; }

.tool-home-link { color: #1a73e8; text-decoration: none; }
.tool-home-link:hover { text-decoration: underline; }

main {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
  padding: 32px;
}

.intro { max-width: 760px; }
.top-bar { align-items: center; display: flex; gap: 16px; justify-content: space-between; }
.language-switcher { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-btn { background: #fff; border: 1px solid #c7c7c7; border-radius: 5px; cursor: pointer; font: inherit; padding: 7px 10px; }
.lang-btn.selected { background: #202124; border-color: #202124; color: #fff; }
.eyebrow { color: #1a73e8; font-size: .85rem; font-weight: 700; letter-spacing: .08em; margin: 0 0 6px; text-transform: uppercase; }
h1 { margin: 0 0 10px; font-size: 2rem; }
h2 { margin: 0 0 14px; font-size: 1.35rem; }
.intro > p:last-child { color: #5f6368; line-height: 1.55; margin: 0 0 28px; }
.privacy-promise { background: #f0faf3; border: 1px solid #b9d8c4; border-radius: 6px; color: #245337; line-height: 1.5; margin: 0 0 28px; padding: 14px 16px; }

.field-label, label { display: block; font-weight: 600; }
input[type=file] { display: none; }
.file-input-wrapper { align-items: center; display: flex; gap: 10px; margin: 8px 0 24px; }
.file-input-button, .primary-button, .download-button { border: 0; border-radius: 6px; cursor: pointer; font: inherit; font-weight: 600; padding: 12px 16px; text-decoration: none; }
.file-input-button { background: #f1f3f4; color: #202124; }
.file-input-button:hover { background: #e2e5e8; }
.file-input-label { background: #fffde7; border: 1px solid #e6e1aa; border-radius: 5px; color: #4d4a26; flex: 1; overflow: hidden; padding: 12px; text-overflow: ellipsis; white-space: nowrap; }

.controls { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.controls label { font-size: .95rem; }
select, input[type=number] { border: 1px solid #c7c7c7; border-radius: 5px; display: block; font: inherit; margin-top: 8px; padding: 10px; width: 100%; }
input[type=range] { display: block; margin-top: 12px; width: 100%; }
output { color: #1a73e8; float: right; }
.control-note { color: #5f6368; font-size: .9rem; margin: 22px 0 16px; }
.primary-button, .download-button { background: #1a73e8; color: #fff; }
.primary-button:hover, .download-button:hover { background: #1558b0; }
.primary-button:disabled { cursor: wait; opacity: .65; }

.result { border-top: 1px solid #e5e5e5; margin-top: 32px; padding-top: 28px; }
.summary { background: #f3f8fe; border-radius: 6px; display: flex; flex-wrap: wrap; gap: 12px 24px; line-height: 1.5; margin-bottom: 18px; padding: 14px; }
.summary strong { display: block; }
#preview { border: 1px solid #ddd; display: block; height: auto; margin-bottom: 16px; max-height: 520px; max-width: 100%; }
.site-footer { color: #5f6368; padding: 22px 0; text-align: center; }
.site-footer a { color: inherit; }

@media (max-width: 650px) {
  body { padding: 12px; }
  main { padding: 22px 18px; }
  h1 { font-size: 1.6rem; }
  .controls { grid-template-columns: 1fr; }
  .top-bar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .file-input-wrapper { align-items: stretch; flex-direction: column; }
  .file-input-button { text-align: left; }
}
