:root {
  font-family:'Avenir Next','Segoe UI',Arial,sans-serif;
  color:#25334b;
  background:#f2f5f9;
  font-synthesis:none;
  --blue:#2459db;
  --muted:#637086;
  --line:#e1e7ef;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
}
button,select,textarea {
  font:inherit;
}
button,select {
  cursor:pointer;
}
button {
  transition:background .15s;
}
button:disabled {
  cursor:default;
  opacity:.5;
}
button:focus-visible,select:focus-visible,a:focus-visible,textarea:focus-visible {
  outline:3px solid #e39924;
  outline-offset:4px;
}
.header {
  max-width:1240px;
  margin:auto;
  padding:26px 40px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid var(--line);
}
.brand {
  display:flex;
  align-items:center;
  gap:10px;
  color:#243755;
  text-decoration:none;
  font-weight:750;
  font-size:20px;
  letter-spacing:-.6px;
}
.brand-icon {
  background:var(--blue);
  color:white;
  width:35px;
  height:35px;
  border-radius:9px;
  display:grid;
  place-items:center;
  font-size:23px;
}
.local-badge {
  display:flex;
  gap:8px;
  align-items:center;
  color:var(--muted);
  font-size:12px;
}
.local-badge span {
  width:6px;
  height:6px;
  border-radius:50%;
  background:#43896d;
}
main {
  max-width:1240px;
  margin:auto;
  padding:0 40px;
}
.intro {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:44px 0 35px;
}
h1 {
  font-size:clamp(34px,4vw,48px);
  line-height:1.12;
  letter-spacing:-1.8px;
  margin:0 0 18px;
  font-weight:730;
}
.intro p {
  color:var(--muted);
  font-size:15px;
  line-height:1.65;
  margin:0;
}
.intro-note {
  display:flex;
  align-items:center;
  gap:18px;
  padding-right:25px;
}
.intro-note>span {
  font-size:66px;
  color:#9cafcf;
  font-weight:300;
}
.intro-note p {
  font-size:13px;
}
.intro-note strong {
  font-weight:500;
  color:#364969;
}
.workspace {
  display:grid;
  grid-template-columns:300px minmax(0,1fr);
  gap:30px;
  align-items:start;
}
.controls {
  padding:27px 24px;
  background:#e7edf7;
  border-radius:12px;
}
.controls h2 {
  font-size:19px;
  margin:0 0 25px;
  letter-spacing:-.4px;
}
label {
  display:block;
  font-size:13px;
  font-weight:600;
  margin:20px 0 9px;
}
select {
  width:100%;
  padding:12px 30px 12px 12px;
  border:1px solid #ccd6e6;
  border-radius:6px;
  background:white;
  color:#243755;
  min-height:47px;
}
.hint {
  font-size:11px;
  color:#52627a;
  line-height:1.6;
  margin:12px 0 22px;
}
.primary,.secondary {
  border-radius:6px;
  border:1px solid var(--blue);
  padding:12px 18px;
  font-size:13px;
  font-weight:600;
  min-height:44px;
}
.primary {
  color:white;
  background:var(--blue);
}
.primary:hover {
  background:#1949bd;
}
.secondary {
  background:white;
  color:#254b97;
  border-color:#cbd7ec;
}
.secondary:hover {
  background:#edf3ff;
}
.generate {
  width:100%;
  padding:13px 8px;
}
.generate span {
  font-size:19px;
  vertical-align:-1px;
  margin-right:5px;
}
.disclaimer {
  display:flex;
  gap:9px;
  margin-top:27px;
  padding-top:23px;
  border-top:1px solid #ced8e9;
  font-size:12px;
  line-height:1.65;
  color:#53637b;
}
.disclaimer>span {
  font-size:17px;
}
.disclaimer p {
  margin:0;
}
.storage-note {
  font-size:11px;
  line-height:1.6;
  color:#65748b;
  margin:22px 0 0;
}
.result {
  background:white;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 8px 30px #23395406;
}
.result-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:20px 27px;
  border-bottom:1px solid var(--line);
  gap:15px;
}
.result-header h2 {
  font-size:15px;
  font-weight:600;
  margin:0;
}
.country-tag {
  font-size:12px;
  color:#526581;
  background:#f2f5fa;
  padding:6px 10px;
  border-radius:20px;
}
.field-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  margin:0;
}
.field {
  position:relative;
  padding:20px 50px 19px 27px;
  border-bottom:1px solid var(--line);
  min-width:0;
}
.field:nth-child(even) {
  border-right:1px solid var(--line);
}
.field:last-child {
  grid-column:1/-1;
}
.field-label {
  font-size:11px;
  color:var(--muted);
  margin-bottom:8px;
}
.field-value {
  margin:0;
  font-size:14px;
  font-weight:500;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
  line-height:1.5;
}
.full-address {
  grid-column:1/-1;
  background:#f8faff;
  padding-top:23px;
  padding-bottom:23px;
  border-left:4px solid var(--blue);
  padding-left:23px;
}
.full-address .field-value {
  font-size:18px;
  line-height:1.55;
  letter-spacing:-.2px;
}
.copy-field {
  position:absolute;
  right:15px;
  top:25px;
  border:0;
  background:transparent;
  color:#617795;
  font-size:22px;
  min-width:36px;
  min-height:36px;
  border-radius:5px;
}
.copy-field:hover {
  background:#e6edfa;
  color:var(--blue);
}
.card-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:18px 24px;
}
.library {
  margin-top:42px;
}
.library-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid #ccd7e7;
  gap:10px;
}
.tabs {
  display:flex;
  gap:26px;
}
.tabs button {
  border:0;
  border-bottom:3px solid transparent;
  padding:14px 0;
  background:none;
  color:#637086;
  font-weight:600;
  font-size:15px;
}
.tabs button[aria-selected=true] {
  color:var(--blue);
  border-bottom-color:var(--blue);
}
.tabs span {
  font-size:11px;
  background:#e1e8f2;
  border-radius:12px;
  padding:3px 7px;
  margin-left:5px;
}
.library-note {
  font-size:11px;
  color:var(--muted);
}
.collection-row {
  display:flex;
  gap:18px;
  align-items:center;
  padding:17px 8px;
  border-bottom:1px solid var(--line);
}
.row-flag {
  font-size:25px;
}
.open-card {
  flex:1;
  min-width:0;
  text-align:left;
  border:0;
  background:none;
  padding:3px 0;
  color:#34445f;
}
.open-card strong {
  font-size:13px;
  font-weight:600;
  display:block;
  overflow-wrap:anywhere;
}
.open-card span {
  display:block;
  font-size:11px;
  color:var(--muted);
  margin-top:6px;
}
.open-card:hover strong {
  color:var(--blue);
}
.row-action {
  border:1px solid #ccd7e7;
  border-radius:5px;
  background:transparent;
  color:#42597d;
  padding:8px 12px;
  font-size:11px;
  min-height:36px;
}
.row-action:hover {
  background:#e6edf8;
}
.empty {
  padding:35px 15px;
  font-size:14px;
  color:var(--muted);
  text-align:center;
  line-height:1.7;
}
footer {
  padding:30px 0;
  display:flex;
  justify-content:space-between;
  gap:15px;
  color:#748198;
  font-size:11px;
}
.warning {
  padding:15px 20px;
  border-radius:8px;
  background:#fff3d7;
  color:#694d17;
  line-height:1.5;
  font-size:13px;
}
#toast {
  position:fixed;
  bottom:26px;
  left:50%;
  transform:translateX(-50%);
  max-width:90vw;
  padding:12px 22px;
  background:#253c60;
  color:white;
  box-shadow:0 4px 20px #1233;
  border-radius:8px;
  font-size:13px;
  opacity:0;
  pointer-events:none;
}
#toast.visible {
  opacity:1;
}
dialog {
  border:1px solid var(--line);
  border-radius:12px;
  padding:26px;
  width:min(520px,90vw);
  color:#25334b;
}
dialog::backdrop {
  background:#1a2c4b88;
}
dialog h2 {
  font-size:20px;
}
dialog p {
  font-size:14px;
  line-height:1.6;
}
textarea {
  width:100%;
  height:220px;
  border:1px solid #b8c7dc;
  padding:12px;
  margin-bottom:16px;
  border-radius:5px;
  resize:vertical;
}
dialog form {
  text-align:right;
}
[hidden] {
  display:none!important;
}
@media(max-width:850px) {
  .workspace {
    grid-template-columns:250px minmax(0,1fr);
    gap:20px;
  }
  .intro-note {
    display:none;
  }
  .field {
    padding-left:20px;
  }
  .full-address {
    padding-left:16px;
  }
  .field-grid {
    grid-template-columns:1fr;
  }
  .field:nth-child(even) {
    border-right:0;
  }
  .card-actions {
    flex-wrap:wrap;
  }
  .card-actions button {
    flex:1;
  }
  .header,main {
    padding-left:24px;
    padding-right:24px;
  }
}
@media(max-width:620px) {
  .header {
    padding:18px 20px;
  }
  .brand {
    font-size:18px;
  }
  .local-badge {
    font-size:0;
    gap:0;
  }
  .local-badge span {
    width:8px;
    height:8px;
  }
  main {
    padding:0 20px;
  }
  .intro {
    padding:32px 0 25px;
  }
  h1 {
    font-size:36px;
  }
  .intro p {
    font-size:13px;
  }
  .workspace {
    grid-template-columns:1fr;
    gap:20px;
  }
  .controls {
    padding:22px;
  }
  .controls h2 {
    margin-bottom:18px;
  }
  .disclaimer {
    margin-top:18px;
    padding-top:18px;
  }
  .storage-note {
    margin-top:12px;
  }
  .library-note {
    display:none;
  }
  .tabs {
    gap:22px;
  }
  .tabs button {
    font-size:14px;
  }
  .collection-row {
    gap:10px;
    padding:15px 0;
  }
  .row-flag {
    font-size:20px;
  }
  .row-action {
    padding:8px;
  }
  .open-card strong {
    font-size:12px;
  }
  .result-header {
    padding:18px 20px;
  }
  .full-address .field-value {
    font-size:17px;
  }
  footer {
    flex-direction:column;
    gap:8px;
    line-height:1.5;
  }
  .card-actions {
    padding:16px;
  }
  .library {
    margin-top:26px;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    transition:none!important;
    scroll-behavior:auto!important;
  }
}

.card-note {
  margin: 0;
  padding: 13px 27px;
  color: #694d17;
  background: #fff3d7;
  font-size: 12px;
  line-height: 1.6;
  border-bottom: 1px solid var(--line);
}

.address-language { display: flex; flex-wrap: wrap; gap: 10px 22px; border: 0; margin: 18px 26px 7px; padding: 0; }
.address-language legend { font-size: 12px; color: var(--muted, #66758b); margin-bottom: 9px; }
.address-language label { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; padding: 6px 0; margin: 0; }
.address-language input { accent-color: #2563eb; width: 17px; height: 17px; margin: 0; }
.language-hint { font-size: 12px; color: #66758b; line-height: 1.5; margin: 0 26px 20px; }
