body {
  display: flex;
  flex-direction: column;
}
iframe {
  flex: 1 1 auto;
  height: auto;
}
#fnbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 12px;
  box-sizing: border-box;
  background: #fafafa;
  border-bottom: 1px solid #e5e5e5;
  font:
    13px/1 system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
  color: #555;
}
#fnbar .fn {
  font-weight: 600;
  color: #222;
  letter-spacing: 0.02em;
}
#fnbar .nt {
  flex: 1 1 auto;
  min-width: 0;
  color: #777;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#fnacct {
  position: relative;
  flex: 0 0 auto;
}
#fnbar button {
  font: inherit;
  color: #222;
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
}
#fnbar button:hover {
  border-color: #999;
}
#fnpop {
  position: absolute;
  top: 30px;
  right: 0;
  width: 300px;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  padding: 14px;
  color: #444;
  font-weight: 400;
  cursor: auto;
  display: none;
  z-index: 10;
}
#fnpop.open {
  display: block;
}
#fnpop h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
  margin: 0 0 4px;
}
#fnpop p {
  margin: 0 0 8px;
  color: #666;
  line-height: 1.45;
}
#fnpop .sec {
  margin-bottom: 14px;
}
#fnpop .sec:last-child {
  margin-bottom: 0;
}
#fnpop .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
#fnok {
  color: #2a8a55;
  font-size: 12px;
}
#fnmigrateout {
  margin-top: 10px;
}
.mhint {
  margin: 0 0 6px;
  color: #666;
  line-height: 1.45;
}
#fnmigratelink {
  flex: 1 1 auto;
  min-width: 0;
  font:
    12px/1.4 ui-monospace,
    Menlo,
    monospace;
  color: #222;
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  padding: 3px 6px;
}
#fnmigratemsg {
  display: block;
  margin-top: 6px;
  color: #2a8a55;
  font-size: 12px;
}

/* Respect the OS dark-mode preference. Same restrained, near-monochrome
   character as the light theme: charcoal bar, light-grey text, hairline
   borders. */
@media (prefers-color-scheme: dark) {
  #fnbar {
    background: #1c1c1e;
    border-bottom-color: #303032;
    color: #98989c;
  }
  #fnbar .fn {
    color: #ececee;
  }
  #fnbar .nt {
    color: #88888c;
  }
  #fnbar button {
    color: #e6e6e8;
    background: #2c2c2f;
    border-color: #46464a;
  }
  #fnbar button:hover {
    border-color: #6a6a6e;
  }
  #fnpop {
    background: #252528;
    border-color: #3a3a3e;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    color: #c2c2c6;
  }
  #fnpop h4 {
    color: #88888c;
  }
  #fnpop p {
    color: #a0a0a4;
  }
  #fnok {
    color: #5cbd83;
  }
  .mhint {
    color: #a0a0a4;
  }
  #fnmigratelink {
    color: #e6e6e8;
    background: #2c2c2f;
    border-color: #46464a;
  }
  #fnmigratemsg {
    color: #5cbd83;
  }
}
