/* 眼鏡AI（色づかいは元の website_test と同じ） */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: #f0f8ff;
  color: #333;
  text-align: center;
  line-height: 1.6;
}
a { color: #1565c0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top { display: flex; align-items: center; justify-content: space-between; max-width: 900px; margin: 0 auto; padding: 14px 16px; }
.brand { font-weight: 800; letter-spacing: .08em; color: #333; text-decoration: none; }
.home { font-size: .9em; text-decoration: none; }

.container {
  max-width: 900px;
  margin: 0 auto 24px;
  background: #fff;
  padding: 28px 20px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .1);
}
@media (min-width: 640px) { .container { padding: 30px; } }
h1 { color: #2c3e50; margin: 0 0 10px; }
h2 { font-size: 1.1rem; }
.lead { color: #666; }
.privacy { font-size: .9em; color: #2e7d32; background: #edf7ee; border-radius: 10px; padding: 8px 12px; display: inline-block; }
.small { font-size: .85em; }
.muted { color: #777; }
.note { margin-top: 24px; text-align: left; }

.upload-area { border: 2px dashed #b0c4de; padding: 30px 16px; margin: 20px 0; border-radius: 10px; background: #fafafa; }
.btn, .link-btn { font: inherit; cursor: pointer; }
.btn {
  display: inline-block;
  background: #ff7f50;
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  border-radius: 25px;
  transition: background .3s;
}
.btn:hover { background: #ff6347; }
#file:focus-visible + .small, .btn:focus-within { outline: 2px solid #ff7f50; }
.loading { color: #ff7f50; font-weight: bold; }
.error { color: #c62828; font-weight: bold; }

.diagnostic-res {
  background: #e3f2fd;
  border: 2px solid #90caf9;
  color: #1565c0;
  padding: 15px;
  border-radius: 10px;
  font-size: 1.15em;
  margin: 10px 0 20px;
}
.main-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.preview-panel, .selection-panel { flex: 1 1 300px; min-width: 0; }
.result-img { max-width: 100%; height: auto; border-radius: 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, .2); }
.actions { margin: 14px 0 6px; }
.download-btn {
  display: inline-block;
  background: #00bfff;
  color: #fff;
  text-decoration: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-weight: bold;
}
.link-btn { background: none; border: 0; color: #999; font-size: .9em; text-decoration: underline; }

.glasses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 15px; }
.glass-item {
  font: inherit;
  border: 2px solid #eee;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: .2s;
  background: #fff;
  color: #333;
}
.glass-item:hover, .glass-item:focus-visible { border-color: #ff7f50; transform: translateY(-2px); }
.glass-item[aria-pressed="true"] { border-color: #ff7f50; box-shadow: 0 0 0 2px rgba(255, 127, 80, .35); }
.glass-item img { width: 100%; height: 50px; object-fit: contain; }
.glass-item span { display: block; }
.glass-item.recommended { border-color: #ffd54f; background: #fffde7; box-shadow: 0 0 8px rgba(255, 213, 79, .5); }
.badge { font-size: .8em; color: #f9a825; font-weight: bold; }

.foot { font-size: .85em; color: #777; padding: 8px 16px 32px; }
