@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #f0f1f2;
  --surface: #ffffff;
  --text: #191b20;
  --muted: #636871;
  --line: #d9dbe0;
  --green: #0c9f6f;
  --green-dark: #0a845c;
  --blue: #2b77e5;
  --black: #060707;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Be Vietnam Pro", "Noto Sans", sans-serif;
}

body.space-tools-theme {
  --bg: #eef8f8;
  --surface: #ffffff;
  --text: #10242a;
  --muted: #3f5e66;
  --line: #c9dce3;
  --green: #0f9f9a;
  --green-dark: #0a847f;
  --blue: #0d6d8b;
  --black: #0d2530;
  background:
    radial-gradient(circle at 12% 0%, #d6f5f4, transparent 44%),
    radial-gradient(circle at 95% 8%, #d9ecff, transparent 38%),
    var(--bg);
}

body.space-tools-theme .topbar {
  background: #f7fcfc;
  border-bottom: 1px solid #cbe4e9;
}

body.space-tools-theme .brand-icon {
  background: linear-gradient(135deg, #0c7d83, #0d2530);
}

body.space-tools-theme .header-blog-link {
  border-color: #cae4ea;
  background: #f2fafb;
  color: #0d6d8b;
}

body.space-tools-theme .tools-menu-list {
  border-color: #c6e1e8;
  background: #fcfeff;
}

body.space-tools-theme .platform-tabs {
  border-color: #b6dce7;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.space-tools-theme .tab.active {
  background: linear-gradient(135deg, #0f9f9a, #0d6d8b);
}

body.space-tools-theme .downloader-card {
  border-color: #b6dce7;
  background: #fbfefe;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.topbar-inner {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
}

.brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #000;
  color: #fff;
  display: grid;
  place-items: center;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-blog-link {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid #dbe1ea;
  background: #f8fafc;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 700;
}

.tools-menu {
  position: relative;
}

.tools-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.tools-menu > summary::-webkit-details-marker {
  display: none;
}

.tools-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 35;
  min-width: 200px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d7e3e9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.tools-menu-list a {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #0f172a;
  font-weight: 600;
  background: #f8fafc;
}

.tools-menu-list a:hover {
  background: #edf7fb;
  color: #0d6d8b;
}

.tools-menu:not([open]) .tools-menu-list {
  display: none;
}

.lang-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
}

.lang-control label {
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
}

#language-select {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: #111827;
  cursor: pointer;
}

#language-select:focus {
  outline: none;
}

.container {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 34px 22px 38px;
}

.hero {
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 68px);
  font-weight: 800;
  line-height: 1.05;
}

.hero h1 em {
  color: var(--green);
  font-style: normal;
}

.hero p {
  margin: 16px 0 0;
  color: #666b73;
  font-size: clamp(18px, 2vw, 34px);
}

.platform-tabs {
  margin: 28px auto 0;
  width: min(860px, 100%);
  background: #fff;
  border: 2px solid #e4e7ec;
  border-radius: 22px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tab {
  border: 0;
  border-radius: 16px;
  min-height: 68px;
  background: transparent;
  color: #8b9097;
  font: inherit;
  font-size: clamp(22px, 1.3vw, 28px);
  font-weight: 700;
  cursor: pointer;
}

.tab.active {
  background: #000;
  color: #fff;
}

.tab:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.downloader-card {
  margin-top: 18px;
  background: var(--surface);
  border: 2px solid #bdd7ff;
  border-radius: 24px;
  padding: 16px;
}

.card-tag {
  margin: 0;
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 18px;
  border-radius: 18px;
  background: var(--black);
  color: #fff;
  letter-spacing: 1.5px;
  font-size: clamp(16px, 1.1vw, 22px);
  font-weight: 800;
}

.quick-form {
  margin-top: 2px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.input-wrap {
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

input {
  flex: 1;
  width: 100%;
  border: 0;
  border-radius: 16px;
  min-height: 72px;
  padding: 0 18px;
  font: inherit;
  font-size: clamp(18px, 1.25vw, 24px);
  color: var(--text);
  background: #f7f8fa;
}

input::placeholder {
  color: #a8adb4;
}

input:focus {
  outline: 3px solid rgba(43, 119, 229, 0.25);
}

.paste-btn {
  border: 0;
  border-radius: 14px;
  min-height: 56px;
  min-width: 130px;
  padding: 0 16px;
  background: #111827;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.paste-btn:hover {
  background: #0b1220;
}

.paste-btn.is-clear {
  background: #dc2626;
}

.paste-btn.is-clear:hover {
  background: #b91c1c;
}

.quick-submit {
  border: 0;
  border-radius: 16px;
  min-height: 72px;
  min-width: 260px;
  padding: 0 26px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: clamp(18px, 1.35vw, 28px);
  font-weight: 700;
  cursor: pointer;
}

.quick-submit:hover {
  filter: brightness(0.96);
}

.status {
  min-height: 32px;
  margin: 10px 4px 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
}

.mobile-save-note {
  margin: 0 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed #c7d2fe;
  background: #eef2ff;
  color: #1f2a44;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
}

.result-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.hidden {
  display: none;
}

.preview-card,
.action-card {
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 24px;
  padding: 14px;
}

.preview-media {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.62)),
    radial-gradient(circle at 30% 20%, #1f2937, #030712 70%);
}

.preview-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
  color: #fff;
}

.preview-overlay p {
  margin: 0;
  font-size: clamp(20px, 1.3vw, 30px);
  font-weight: 800;
}

.preview-overlay small {
  display: block;
  margin-top: 4px;
  color: #e5e7eb;
  font-size: clamp(14px, 1vw, 18px);
}

.action-card {
  padding: 16px;
}

.action-card h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(24px, 1.4vw, 34px);
}

.action-card h2 span {
  color: #10b981;
}

.mode-btn {
  margin-top: 12px;
  width: 100%;
  min-height: 70px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-size: clamp(18px, 1.2vw, 26px);
  font-weight: 700;
  cursor: pointer;
}

.mode-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.mode-btn.nowm {
  background: var(--green);
  color: #fff;
}

.mode-btn.nowm:hover:not(:disabled) {
  background: var(--green-dark);
}

.mode-btn.hd {
  background: #000;
  color: #fff;
}

.mode-btn.mp3 {
  background: #fff;
  color: #111827;
  border: 3px solid #dfe3e8;
}

.author-card {
  margin-top: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: #f3f4f6;
}

.author-label {
  margin: 0;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  font-weight: 700;
}

.author-name {
  margin: 4px 0 0;
  font-size: clamp(18px, 1.2vw, 24px);
  font-weight: 700;
}

.guide-section {
  margin-top: 22px;
}

.guide-card {
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 24px;
  padding: 18px;
}

.guide-card h2 {
  margin: 0;
  font-size: clamp(24px, 1.5vw, 34px);
}

.guide-intro {
  margin: 10px 0 0;
  color: #636871;
  font-size: clamp(16px, 1vw, 20px);
}

.guide-card h3 {
  margin: 18px 0 8px;
  font-size: clamp(18px, 1.15vw, 24px);
}

.guide-list {
  margin: 0;
  padding-left: 20px;
  color: #374151;
}

.guide-list li {
  margin: 6px 0;
  line-height: 1.45;
}

.steps {
  display: grid;
  gap: 10px;
}

.steps article {
  border: 1px solid #e8eaee;
  border-radius: 14px;
  padding: 12px;
  background: #fbfcfd;
}

.steps h4 {
  margin: 0;
  font-size: clamp(16px, 1.05vw, 20px);
}

.steps p {
  margin: 6px 0 0;
  color: #4b5563;
}

.faq-section,
.seo-links-section {
  margin-top: 18px;
}

.faq-card,
.seo-links-section {
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 24px;
  padding: 18px;
}

.faq-card h2,
.seo-links-section h2 {
  margin: 0;
  font-size: clamp(22px, 1.45vw, 32px);
}

.faq-item {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eceff3;
}

.faq-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.faq-item h3 {
  margin: 0;
  font-size: clamp(18px, 1.2vw, 24px);
}

.faq-item p {
  margin: 8px 0 0;
  color: #4b5563;
  line-height: 1.55;
}

.seo-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.seo-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #d8dde6;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  background: #f8fafc;
}

.seo-links a:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.seo-note {
  margin: 12px 0 0;
  color: #6b7280;
  line-height: 1.5;
}

.space-tools-section {
  margin-top: 18px;
}

.space-yen-section {
  margin-top: 20px;
}

.space-yen-card {
  background: #fff;
  border: 1px solid #cfe2e8;
  border-radius: 22px;
  padding: 18px;
}

.space-yen-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.space-yen-badge {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #c7dbe2;
  background: #f4fbfd;
  color: #23545e;
  font-weight: 700;
}

.space-yen-title {
  margin: 12px 0 0;
  font-size: clamp(28px, 3vw, 44px);
}

.space-yen-title strong {
  color: #0d6d8b;
}

.space-yen-meta {
  margin: 8px 0 0;
  color: #4e6871;
  font-weight: 600;
}

.space-yen-convert-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  gap: 10px;
  align-items: end;
}

.space-yen-field {
  display: grid;
  gap: 6px;
}

.space-yen-field label {
  color: #3f5e66;
  font-size: 13px;
  font-weight: 700;
}

.space-yen-field input,
.space-yen-field select {
  width: 100%;
  min-height: 56px;
  border: 1px solid #cadde4;
  border-radius: 12px;
  padding: 0 12px;
  background: #fafdfe;
  color: #0f172a;
  font: inherit;
  font-size: 20px;
}

.space-yen-field input[readonly] {
  background: #f3fbfc;
}

.space-yen-swap {
  border: 0;
  min-height: 56px;
  min-width: 56px;
  border-radius: 999px;
  background: #e9f7f8;
  color: #0d6d8b;
  font-size: 28px;
  cursor: pointer;
}

.space-yen-swap:hover {
  background: #d9f1f3;
}

.space-tools-card,
.tool-card {
  background: #fff;
  border: 1px solid #d8e6eb;
  border-radius: 22px;
  padding: 18px;
}

.space-tools-card h2,
.tool-card h2 {
  margin: 0;
  font-size: clamp(24px, 1.6vw, 34px);
}

.space-tools-card > p {
  margin: 10px 0 0;
  color: #3f5e66;
}

.space-tools-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.space-tool-link {
  display: block;
  border: 1px solid #c9dce3;
  border-radius: 16px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #ffffff, #f7fcfd);
}

.space-tool-link h3 {
  margin: 0;
  font-size: 20px;
}

.space-tool-link p {
  margin: 8px 0 0;
  color: #4a6670;
  line-height: 1.5;
}

.space-tool-link:hover {
  border-color: #6ab6c5;
}

.tools-hero p {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.tool-card + .tool-card {
  margin-top: 16px;
}

.pdf-scan-form {
  display: grid;
  gap: 12px;
}

.pdf-upload-label {
  font-weight: 700;
  color: #1f3a43;
}

.scan-meta-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.scan-meta-grid div {
  border: 1px solid #e2ecf0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fbfdfe;
}

.scan-meta-grid span {
  color: #58737c;
}

.scan-indicator-list {
  margin: 10px 0 0;
  padding-left: 18px;
  line-height: 1.55;
}

.scan-indicator-list li + li {
  margin-top: 6px;
}

.scan-indicator-list li.is-risk {
  color: #b91c1c;
  font-weight: 600;
}

.risk-high {
  color: #b91c1c;
}

.risk-medium {
  color: #b45309;
}

.risk-low {
  color: #047857;
}

.scan-note {
  margin: 14px 0 0;
  color: #5c7077;
  line-height: 1.5;
}

.yen-rate-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.yen-source,
.yen-updated {
  margin: 0;
  color: #4b6169;
  line-height: 1.5;
}

.yen-rate-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.yen-rate-item {
  border: 1px solid #d6e4ea;
  border-radius: 14px;
  padding: 14px;
  background: #f9fcfd;
}

.yen-rate-item p {
  margin: 0;
  color: #4b6169;
  font-weight: 600;
}

.yen-rate-item h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 2vw, 34px);
}

.blog-home-section {
  margin-top: 18px;
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 24px;
  padding: 18px;
}

.blog-home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.blog-home-header h2 {
  margin: 0;
  font-size: clamp(24px, 1.5vw, 34px);
}

.blog-home-header a {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.blog-home-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.blog-home-card {
  border: 1px solid #e8eaef;
  border-radius: 16px;
  padding: 12px;
  background: #fbfcfe;
}

.blog-home-card h3 {
  margin: 6px 0 0;
  font-size: 20px;
  line-height: 1.35;
}

.blog-home-card h3 a {
  color: #111827;
  text-decoration: none;
}

.blog-home-card p {
  margin: 8px 0 0;
  color: #4b5563;
}

.blog-date {
  margin: 0;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
}

.blog-read {
  margin-top: 10px;
  display: inline-flex;
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
}

.blog-top-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.blog-top-links a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
}

.blog-hero h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 54px);
}

.blog-hero p {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: clamp(16px, 1.2vw, 22px);
}

.blog-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.blog-card {
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 18px;
  padding: 14px;
}

.blog-card h2 {
  margin: 8px 0 0;
  font-size: 22px;
  line-height: 1.35;
}

.blog-card h2 a {
  color: #111827;
  text-decoration: none;
}

.blog-card p {
  margin: 8px 0 0;
  color: #4b5563;
  line-height: 1.5;
}

.blog-detail-card {
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 20px;
  padding: 18px;
}

.blog-detail-card h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 3.4vw, 44px);
}

.blog-detail-card p {
  margin: 12px 0 0;
  line-height: 1.7;
  color: #374151;
}

.ad-section {
  margin: 16px 0;
}

.ad-placeholder {
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  min-height: 96px;
  display: grid;
  place-items: center;
  color: #64748b;
  background: #f8fafc;
  font-weight: 600;
}

.legal-nav-card {
  margin-top: 18px;
  border: 1px solid #e2e5ea;
  background: #fff;
  border-radius: 20px;
  padding: 18px;
}

.legal-nav-card h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 2.2vw, 34px);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legal-links a {
  text-decoration: none;
  border: 1px solid #d5d9e2;
  border-radius: 999px;
  padding: 10px 16px;
  color: #111827;
  background: #f8fafc;
  font-weight: 600;
}

.site-footer {
  margin-top: 24px;
  border-top: 1px solid #d8dde6;
  background: #fff;
}

.site-footer-inner {
  padding-top: 16px;
  padding-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  text-decoration: none;
  border: 1px solid #d5d9e2;
  border-radius: 999px;
  padding: 8px 14px;
  color: #111827;
  background: #f8fafc;
  font-weight: 600;
}

.site-footer p {
  margin: 14px 0 0;
  color: #4b5563;
  line-height: 1.55;
}

.legal-card {
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 20px;
  padding: 18px;
}

.legal-card h1 {
  margin: 0;
  font-size: clamp(32px, 3.6vw, 50px);
}

.legal-updated {
  margin: 12px 0 0;
  color: #6b7280;
  font-weight: 600;
}

.legal-intro {
  margin: 12px 0 0;
  color: #374151;
  line-height: 1.65;
}

.legal-section {
  margin-top: 18px;
}

.legal-section h2 {
  margin: 0;
  font-size: clamp(22px, 2vw, 30px);
}

.legal-section ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #374151;
  line-height: 1.65;
}

.legal-section li + li {
  margin-top: 8px;
}

.contact-card {
  margin-top: 18px;
  border: 1px solid #e2e5ea;
  border-radius: 16px;
  padding: 16px;
  background: #f9fafb;
}

.contact-card h2 {
  margin: 0;
}

.contact-email {
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  color: #2563eb;
}

.blog-ad-card {
  display: grid;
  align-items: center;
  min-height: 150px;
}

.cookie-banner {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  background: #111827;
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.35);
}

.cookie-banner p {
  margin: 0;
  line-height: 1.5;
}

.cookie-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.cookie-actions a {
  color: #bfdbfe;
  font-weight: 600;
  text-decoration: none;
}

.cookie-actions button {
  border: 0;
  border-radius: 10px;
  min-height: 38px;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  background: #10b981;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 1200px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .preview-media {
    aspect-ratio: 16 / 9;
  }

  .blog-home-grid,
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }

  .yen-rate-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar-inner,
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-right {
    width: 100%;
    justify-content: flex-end;
    align-items: flex-start;
  }

  .brand {
    font-size: 19px;
  }

  .brand-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .hero h1 {
    font-size: clamp(28px, 9.4vw, 58px);
  }

  .hero p {
    font-size: clamp(16px, 4.8vw, 24px);
  }

  .tab {
    min-height: 52px;
    font-size: clamp(16px, 4vw, 22px);
  }

  .card-tag {
    height: 46px;
    font-size: clamp(16px, 4.3vw, 28px);
  }

  .quick-form {
    grid-template-columns: 1fr;
  }

  input,
  .paste-btn,
  .quick-submit,
  .mode-btn {
    min-height: 56px;
    font-size: clamp(16px, 4.8vw, 22px);
  }

  .quick-submit {
    min-width: 0;
  }

  .mobile-save-note {
    font-size: 13px;
  }

  .guide-card {
    border-radius: 18px;
    padding: 14px;
  }

  .legal-card,
  .legal-nav-card,
  .faq-card,
  .seo-links-section {
    border-radius: 18px;
    padding: 14px;
  }

  .blog-home-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .space-tools-grid,
  .scan-meta-grid {
    grid-template-columns: 1fr;
  }

  .yen-rate-header {
    flex-direction: column;
    align-items: stretch;
  }

  .yen-rate-header .paste-btn {
    width: 100%;
  }

  .space-yen-top {
    flex-direction: column;
    align-items: stretch;
  }

  .space-yen-top .paste-btn {
    width: 100%;
  }

  .space-yen-convert-grid {
    grid-template-columns: 1fr;
  }

  .space-yen-swap {
    width: 100%;
    border-radius: 12px;
  }
}

@media (max-width: 640px) {
  .top-right {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .header-blog-link {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
  }

  .tools-menu {
    flex: 1;
  }

  .tools-menu > summary {
    width: 100%;
    justify-content: center;
  }

  .tools-menu-list {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .lang-control {
    width: auto;
  }

  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 12px;
  }

  .cookie-actions {
    justify-content: space-between;
  }
}
