:root {
  color-scheme: light dark;
  --bg: #0f1220;
  --card: #005577;
  --card-border: #2b3155;
  --text: #eef0fb;
  --muted: #9aa2c7;
  --accent: #00aaff;
  --accent-2: #00ff00;
  --danger: #ff8b8b;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f3fb;
    --card: #ffffff;
    --card-border: #e2e4f5;
    --text: #1c1f33;
    --muted: #666d94;
    --accent: #00aaff;
    --accent-2: #00ff00;
    --danger: #d1435a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* ここから下は gir / p-memo とヘッダー・フッター・プロダクト一覧モーダルの
   見た目を揃えるための共通スタイル(同じCSSをこのサイト用に合わせて配置)。 */
header {
  width: 100%;
  min-height: 75px;
  background: #00ff00;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
}
header h1 {
  margin: 0;
  font-size: clamp(1rem, 4vw, 1.2rem);
  min-width: 0;
  overflow-wrap: anywhere;
}
nav > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 0;
  padding: 0;
}
nav > ul > li {
  list-style: none;
}
nav > ul > li:not(:last-child) {
  margin-right: 15px;
}
nav > ul > li > a {
  color: #fff;
  text-decoration: none;
  transition: all 0.3s;
}
nav > ul > li > a:hover {
  color: #000;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: #00aaff;
  text-underline-offset: 10px
}

main.upload-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(0,150,255,.20), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(0,255,0,.18), transparent 40%),
    var(--bg);
}

footer {
  width: 100%;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
footer > div {
  padding: 15px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
}
footer li {
  padding: 0;
  margin: 0;
  list-style: none;
}
footer h3 {
  color: #00aaff;
}
footer ul {
  margin: 0;
  padding: 0;
}
footer a {
  color: #aaff00;
  transition: all 0.3s;
}
footer a:hover {
  color: #00ff00;
}

/* プロダクト一覧モーダル */
.modal {
  display: none;
  z-index: 666;
}
.modal:target {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal > div {
  animation: modal-show 0.3s linear 0s;
}
@keyframes modal-show {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal > div > a {
  position: relative;
  display: block;
}
.modal > div > a::before {
  position: fixed;
  top: 0;
  left: 0;
  content: "";
  background-color: rgba(0,0,0,0.4);
  width: 100%;
  height: 100%;
  z-index: -1;
}
.modal > div > div {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #fff;
}
.modal > div > div > span {
  position: relative;
  width: 70vw;
  background: #77ff00;
  min-height: 20px;
  font-size: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border-bottom: 2px solid #00ffff;
  color: #fff;
  word-break: break-all;
}
.modal > div > div > div {
  position: relative;
  width: 70vw;
  height: 60vh;
  border-radius: 0px;
  overflow: hidden;
  cursor: default;
  padding: 15px;
  overflow: auto;
  color: #fff;
}

.center {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
}
.yokoori {
  display: flex;
  flex-wrap: wrap;
}
.app_link {
  text-decoration: none;
  color: #fff000;
  transition: all 0.1s;
  display: block;
}
.app_link:hover {
  color: #fff000;
}
.app_link:active {
  background-color: rgba(10,255,10,0.2);
  color: #ffffff;
}
.app_box-1 {
  height: 40px;
  padding: 5px;
  background-color: #ccc;
  border-radius: 5px;
}
.app_name {
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  text-shadow: 1px 1px #000;
}
.app_wrapper {
  text-align: center;
  margin: 15px;
  width: 50px;
  height: 80px;
  display: inline-block;
}
.card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
  text-align: center;
  animation: rise .35s ease-out;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
h1 { font-size: 1.15rem; margin: 0 0 8px; }
p { color: var(--muted); line-height: 1.6; margin: 0 0 16px; }
p.filename { color: var(--text); font-weight: 600; word-break: break-all; }
p.quote {
  font-style: italic;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 14px;
  text-align: left;
  margin: 0 0 20px;
}
.msg.error { color: var(--danger); }
label {
  display: block;
  text-align: left;
  font-size: .85rem;
  color: var(--muted);
  margin: 0 0 6px;
}
.field { margin-bottom: 16px; }
input[type="file"] {
  display: block;
  width: 100%;
  margin-bottom: 16px;
  color: var(--text);
}
input[type="text"], select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text);
  margin-bottom: 12px;
  text-align: center;
  font-size: 1rem;
}
button, a.btn {
  display: inline-block;
  width: 100%;
  border: none;
  cursor: pointer;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
button:hover, a.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124,140,255,.35);
}
form { margin: 0; }
#count {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 8px 0 18px;
  color: var(--accent);
  animation: pulse 1s ease-in-out infinite;
  font-variant-numeric: tabular-nums;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
#status { font-size: .9rem; color: var(--muted); margin-top: 14px; }
.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--card-border);
  overflow: hidden;
  margin-top: 18px;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: width .2s ease;
}
#progressLabel { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
