:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172b36;
  background: #edf3f3;
  font-synthesis: none;
  line-height: 1.4;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100svh; padding: 16px; display: grid; place-items: center; }
.card { width: 100%; max-width: 590px; min-width: 0; padding: 24px; background: #fff; border: 1px solid #dce6e6; border-radius: 20px; box-shadow: 0 18px 65px #254c4c0b; }
h1 { font-size: clamp(22px, 4.5vw, 28px); letter-spacing: -.6px; line-height: 1.15; margin: 0; }
.ip-card { margin: 16px 0; padding: 12px 14px; background: #eef6f5; border: 1px solid #d5e8e5; border-radius: 12px; }
.ip-label { display: block; color: #476c67; font-size: 12px; }
code { display: block; overflow-wrap: anywhere; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 20px; color: #154c45; margin-top: 4px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { font-weight: 600; margin-bottom: 8px; font-size: 14px; }
.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.option { display: flex; align-items: flex-start; gap: 7px; min-height: 48px; padding: 12px 9px; border: 1px solid #dce3e6; border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.option:hover { border-color: #82b7af; }
.option:has(input:checked) { border-color: #218279; background: #f3f9f7; }
input[type="radio"] { flex-shrink: 0; width: 16px; height: 16px; margin: 2px 0 0; accent-color: #17776b; }
.option strong { display: block; font-size: 14px; font-weight: 600; }
.option small { display: block; margin-top: 4px; color: #64757d; font-size: 12px; }
.hint { margin: 10px 0 14px; font-size: 12px; color: #64757d; }
.button { width: 100%; min-height: 44px; display: flex; justify-content: center; align-items: center; gap: 16px; padding: 10px 14px; border: none; border-radius: 10px; background: #176d61; color: white; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
.button:hover { background: #105b51; }
:focus-visible { outline: 3px solid #62b5a6; outline-offset: 3px; }
.secondary { background: #edf4f2; color: #176d61; margin-top: 10px; }
.secondary:hover { background: #dfeee8; }
footer { border-top: 1px solid #e8eeee; margin-top: 14px; padding-top: 10px; font-size: 11px; color: #6c7e85; }
.notice { min-width: 0; text-align: center; }
.notice h2 { font-size: 22px; margin: 8px 0; }
.notice p { margin: 8px 0; font-size: 14px; color: #62737c; }
.check { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #e8f5ef; color: #176d61; font-size: 22px; }
.error h2 { color: #984927; }
.comment-label { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.comment-label span { color: #64757d; font-weight: 400; font-size: 12px; }
textarea { display: block; width: 100%; resize: vertical; min-height: 54px; padding: 7px 10px; margin-bottom: 12px; border: 1px solid #dce3e6; border-radius: 10px; font: inherit; font-size: 16px; line-height: 1.2; color: #172b36; background: #fff; }
.saved-comment { max-height: 72px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; padding: 8px; background: #f3f7f6; border-radius: 10px; }
.undo { color: #984927; background: #fff1e9; margin-top: 12px; }
.undo:hover { background: #ffe4d4; }
@media (max-width: 480px) {
  body { padding: 10px; }
  .card { padding: 16px; border-radius: 16px; }
  .options { gap: 6px; }
  .option { align-items: center; justify-content: center; gap: 5px; padding: 10px 4px; }
  .option strong { font-size: 12px; }
  .option small { display: none; }
  code { font-size: 18px; }
}
@media (max-height: 600px) {
  body { padding: 8px; }
  .card { padding: 14px; }
  .ip-card { margin: 10px 0; padding: 8px 10px; }
  .hint { margin: 8px 0 10px; }
  footer { margin-top: 10px; padding-top: 8px; }
}
@media (max-width: 360px) {
  .option { flex-direction: column; gap: 3px; padding: 6px 2px; }
  .comment-label span { font-size: 11px; }
}
/* Short landscape screens keep the form beside the address. */
@media (min-width: 640px) and (max-height: 500px) {
  .card { max-width: 860px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); column-gap: 24px; align-items: start; }
  .card > header { grid-column: 1; grid-row: 1; }
  .card > .ip-card { grid-column: 1; grid-row: 2; }
  .card > form, .card > .notice { grid-column: 2; grid-row: 1 / 4; }
  .card > footer { grid-column: 1; grid-row: 3; }
  .option small { display: none; }
  .option { align-items: center; }
}
