/* 配色は Drunker の画面と同じ（70年代レトロ、フラット）。 */
:root {
  --bg: #efe4cf;       /* クリームの背景 */
  --frame: #e6d8bd;    /* 区切りのエリア */
  --panel: #f6eedd;    /* カード */
  --line: #cdb894;     /* 枠線 */
  --text: #2b211a;     /* こげ茶の文字 */
  --muted: #8a755b;
  --accent: #e8742a;   /* オレンジ */
  --teal: #3f9f8a;
  --mustard: #c8901c;
  --screen: #2b231d;   /* 波形画面のこげ茶 */
  --radius: 6px;
  --logo: Georgia, "Bitstream Charter", "DejaVu Serif", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", sans-serif;
  line-height: 1.7;
}

a { color: inherit; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.logo { white-space: nowrap; font-family: var(--logo); font-weight: 700; font-style: italic; font-size: 1.6rem; text-decoration: none; text-transform: uppercase; letter-spacing: 0.01em; }
.logo span { color: var(--accent); }
nav { display: flex; gap: 6px; }
nav a { white-space: nowrap; }
nav a { text-decoration: none; color: var(--text); font-weight: 700; font-size: 0.85rem; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
nav a:hover { border-color: var(--accent); }
nav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 日本語 / English の切り替え。html の lang に合わせて、もう一方の言語の文を隠す */
html[lang="en"] [data-lang="ja"], html:not([lang="en"]) [data-lang="en"] { display: none !important; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex: none; }
.lang-switch button { font: inherit; font-weight: 700; font-size: 0.78rem; padding: 5px 10px; border: 0; background: var(--panel); color: var(--muted); cursor: pointer; }
.lang-switch button + button { border-left: 1px solid var(--line); }
.lang-switch button:hover { color: var(--accent); }
html:not([lang="en"]) .lang-switch [data-set-lang="ja"], html[lang="en"] .lang-switch [data-set-lang="en"] { background: var(--text); color: var(--bg); cursor: default; }
header nav { margin-left: auto; }

.hero { padding: 40px 0 24px; }
.hero .screen {
  background: var(--screen);
  border-radius: var(--radius);
  padding: 72px 24px;
  text-align: center;
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
.hero .screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(239, 228, 207, 0.08) 1px, transparent 1px);
  background-size: 12.5% 100%;
  pointer-events: none;
}
.hero .lane { position: absolute; left: 12px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; }
.hero .lane.top { top: 8px; color: var(--accent); }
.hero .lane.bottom { bottom: 8px; color: #5cb8a2; }
.hero h1 {
  position: relative;
  font-family: var(--logo);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.1rem, 9vw, 5.2rem);
  margin: 0 0 8px;
  color: var(--bg);
}
.hero h1 span { color: var(--accent); }
.hero p { position: relative; color: #d6c4a1; font-size: 1.05rem; margin: 0 auto 28px; max-width: 560px; }
.hero .actions { position: relative; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

section { padding: 32px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
h2 { font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0; }
.more { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 700; }
.more:hover { color: var(--accent); }
.page-title { padding: 48px 0 0; }
.page-title h1 { font-family: var(--logo); font-style: italic; margin: 0; font-size: 2.4rem; }
.page-title p { color: var(--muted); margin: 4px 0 0; }

.area { background: var(--frame); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.thumb, .embed { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; object-fit: cover; background: var(--screen); }
img.thumb, video.thumb { aspect-ratio: auto; height: auto; }
.embed.audio { aspect-ratio: auto; height: 166px; }
.placeholder { display: grid; place-items: center; font-family: var(--logo); font-style: italic; font-weight: 700; font-size: 3.4rem; color: var(--accent); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 1.15rem; }
.card p { white-space: pre-line; margin: 0 0 10px; color: var(--muted); font-size: 0.95rem; flex: 1; }
.meta { display: flex; justify-content: space-between; align-items: center; }
.badge { font-size: 0.72rem; font-weight: 700; color: #fff; background: var(--teal); border-radius: var(--radius); padding: 1px 8px; }
.price { font-weight: 700; }
.empty { color: var(--muted); margin: 0; }

.btn { display: inline-block; text-align: center; text-decoration: none; font-weight: 700; font-size: 0.9rem; letter-spacing: 0.03em; padding: 10px 20px; border-radius: var(--radius); background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.btn:hover { background: #d4641e; }
.btn.ghost { background: transparent; border-color: #d6c4a1; color: var(--bg); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.disabled { background: var(--frame); border-color: var(--line); color: var(--muted); cursor: default; }

.about { max-width: 720px; }
.about p { color: var(--muted); }
.about h2 { margin-top: 32px; }
.links { display: flex; gap: 8px; flex-wrap: wrap; }
.links a { text-decoration: none; font-weight: 700; font-size: 0.85rem; padding: 6px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.links a:hover { border-color: var(--accent); color: var(--accent); }

footer { border-top: 1px solid var(--line); padding: 24px 0; margin-top: 40px; color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

@media (max-width: 820px) {
  /* スマホ: ロゴ、メニュー、言語ボタンの順に縦に並べる */
  header .wrap { flex-direction: column; }
  header nav { margin-left: 0; }
  .lang-switch button { font-size: 0.72rem; padding: 3px 10px; }
}

@media (max-width: 400px) {
  .logo { font-size: 1.35rem; }
  nav { gap: 4px; }
  nav a { padding: 5px 8px; font-size: 0.8rem; }
}

@media (max-width: 560px) {
  .hero .screen { padding: 56px 16px; }
}

/* サイト名の「sound works」部分 */
.logo small { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.12em; font-style: italic; }
.hero h1 small { display: block; font-size: 0.32em; letter-spacing: 0.3em; color: #d6c4a1; margin-top: 4px; }

/* お問い合わせフォーム */
.contact { display: flex; flex-direction: column; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.contact label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 0.9rem; }
.contact input, .contact select, .contact textarea { font: inherit; font-weight: 400; color: var(--text); background: #fffaf0; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; width: 100%; }
.contact input:focus, .contact select:focus, .contact textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.contact textarea { resize: vertical; }
.contact .req { display: inline-block; font-size: 0.7rem; color: #fff; background: var(--accent); border-radius: var(--radius); padding: 0 6px; margin-left: 4px; }
.contact .btn { align-self: flex-start; cursor: pointer; font-family: inherit; }
.contact .btn:disabled { opacity: 0.6; cursor: default; }
.contact .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 0; font-weight: 700; color: var(--teal); }
.form-status.error { color: #c0392b; }
.note { font-size: 0.85rem; }

/* 商品の詳細ページ */
.back { display: inline-block; margin-top: 24px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.back:hover { color: var(--accent); }
.detail-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 16px 0 8px; }
.detail-media { background: var(--frame); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.detail-media .thumb { border-radius: 4px; }
.detail-info { display: flex; flex-direction: column; gap: 10px; }
.detail-info .meta { justify-content: flex-start; gap: 12px; }
.detail-info h1 { font-family: var(--logo); font-style: italic; font-weight: 700; text-transform: uppercase; font-size: clamp(2.2rem, 7vw, 3.4rem); line-height: 1.1; margin: 0; }
.detail-info .lead { white-space: pre-line; margin: 0; color: var(--text); }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn.outline { background: transparent; border-color: var(--line); color: var(--text); }
.btn.outline:hover { border-color: var(--accent); color: var(--accent); }
.detail-section { padding: 24px 0 0; }
.detail-section h2 { margin-bottom: 12px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.feature-grid .card p { margin: 0; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.specs dt { font-weight: 700; }
.specs dd { margin: 0; color: var(--muted); }
@media (max-width: 820px) {
  .detail-top { grid-template-columns: 1fr; gap: 20px; }
}

/* 無料版の紹介と比較表 */
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge.free { background: var(--mustard); }
.tag-free { align-self: flex-start; font-size: 0.72rem; font-weight: 700; color: var(--mustard); border: 1px solid var(--mustard); border-radius: var(--radius); padding: 0 8px; }
#free { scroll-margin-top: 140px; }
.free-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.free-top .thumb { border-radius: 4px; }
.free-top h3 { margin: 0; font-family: var(--logo); font-style: italic; text-transform: uppercase; font-size: 1.8rem; line-height: 1.1; }
.compare-wrap { margin-top: 16px; overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.92rem; }
.compare th, .compare td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.compare tbody th { text-align: left; font-weight: 700; }
.compare thead th { font-family: var(--logo); font-style: italic; text-transform: uppercase; font-size: 1.1rem; }
.compare .free-col { background: rgba(200, 144, 28, 0.08); }
.compare .yes { color: var(--teal); font-weight: 800; font-size: 1.1rem; }
.compare .no { color: var(--line); font-weight: 800; }
.compare tfoot th, .compare tfoot td { border-bottom: 0; }
.compare tfoot .btn { padding: 8px 14px; font-size: 0.85rem; }
.compare-note { color: var(--muted); margin: 12px 0 0; }
@media (max-width: 820px) {
  .free-top { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 560px) {
  .compare { font-size: 0.82rem; }
  .compare th, .compare td { padding: 8px 6px; }
  .compare thead th { font-size: 0.95rem; }
  .compare tfoot .btn { padding: 6px 8px; font-size: 0.75rem; }
}
