:root{
  --bg:#f5f7f9;
  --card:#ffffff;
  --text:#17212b;
  --muted:#667085;
  --line:#dde4e9;
  --accent:#176b87;
  --accent-dark:#104f64;
  --accent-soft:#e9f4f7;
  --navy:#102d3a;
  --green:#18794e;
  --shadow:0 12px 34px rgba(16,45,58,.055);
}

*{box-sizing:border-box}

html{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP","Yu Gothic",sans-serif;
  color:var(--text);
  background:var(--bg);
}

body{
  margin:0;
  background:var(--bg);
}

button,input,select{font:inherit}
button{cursor:pointer}

.wrap{
  width:min(1160px,calc(100% - 36px));
  margin-inline:auto;
}

.site-header{
  background:var(--navy);
}

.brand{
  display:inline-flex;
  flex-direction:column;
  gap:2px;
  padding:16px 0;
  color:#fff;
  text-decoration:none;
}

.brand strong{
  font-size:18px;
}

.brand span{
  font-size:9px;
  letter-spacing:.17em;
  opacity:.65;
}

main.wrap{
  padding-top:22px;
  padding-bottom:72px;
}

.breadcrumb{
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:32px;
  color:var(--muted);
  font-size:13px;
}

.breadcrumb a{
  color:var(--accent);
  text-decoration:none;
}

.hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:34px;
  margin-bottom:30px;
}

.eyebrow,
.section-kicker{
  margin:0 0 5px;
  color:var(--accent);
  font-size:11px;
  font-weight:800;
  letter-spacing:.15em;
}

.hero h1{
  margin:0 0 10px;
  font-size:clamp(34px,5vw,54px);
  letter-spacing:-.04em;
}

.hero-copy{
  margin:0;
  max-width:690px;
  color:var(--muted);
  line-height:1.8;
}

.trust-box{
  flex:0 0 360px;
  display:flex;
  gap:13px;
  align-items:flex-start;
  padding:17px 18px;
  border:1px solid #cfe4e9;
  border-radius:15px;
  background:#f7fcfd;
}

.trust-icon{
  flex:0 0 31px;
  height:31px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--accent);
  color:#fff;
  font-weight:900;
}

.trust-box div{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.trust-box strong{
  font-size:14px;
}

.trust-box small{
  color:var(--muted);
  line-height:1.5;
}

.preset-section{
  margin-bottom:20px;
}

.section-head h2,
.result-header h2{
  margin:0;
  font-size:20px;
}

.section-head{
  margin-bottom:12px;
}

.preset-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:9px;
}

.preset{
  min-height:68px;
  display:flex;
  flex-direction:column;
  gap:4px;
  align-items:flex-start;
  justify-content:center;
  padding:11px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:var(--text);
  text-align:left;
}

.preset strong{
  font-size:14px;
}

.preset small{
  color:var(--muted);
  font-size:11px;
}

.preset:hover{
  border-color:#a9cbd5;
}

.preset.active{
  border-color:var(--accent);
  background:var(--accent-soft);
}

.tool-grid{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(340px,.65fr);
  gap:20px;
  align-items:start;
}

.card,
.privacy-card,
.guide-card{
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--card);
  box-shadow:var(--shadow);
}

.result-card{
  padding:25px;
}

.settings-card{
  padding:25px;
}

.result-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin-bottom:17px;
}

.result-header p{
  margin:5px 0 0;
  color:var(--muted);
  font-size:12px;
}

.outline-btn{
  flex:none;
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
  color:var(--accent-dark);
  font-weight:700;
}

.outline-btn:hover{
  border-color:var(--accent);
}

.candidate-list{
  display:grid;
  gap:7px;
}

.candidate{
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fafbfc;
  transition:.15s ease;
}

.candidate:hover{
  border-color:#a9cbd5;
  background:#fff;
}

.candidate.selected{
  border-color:var(--accent);
  background:#f3fafc;
}

.candidate-number{
  color:#98a2b3;
  font-size:12px;
  text-align:center;
}

.candidate code{
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-all;
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;
  font-size:14px;
  line-height:1.5;
}

.copy-btn{
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  color:var(--accent-dark);
  font-size:12px;
  font-weight:800;
}

.copy-btn:hover{
  border-color:var(--accent);
}

.result-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-top:15px;
  padding-top:14px;
  border-top:1px solid var(--line);
}

.strength-info{
  color:var(--muted);
  font-size:12px;
}

.strength-info strong{
  color:var(--green);
}

.text-btn{
  border:0;
  background:none;
  color:var(--accent);
  font-size:12px;
  font-weight:750;
}

.notice{
  min-height:18px;
  padding-top:8px;
  color:var(--green);
  font-size:12px;
}

.compact{
  margin-bottom:20px;
}

.setting-block{
  padding-bottom:20px;
  border-bottom:1px solid var(--line);
}

.setting-title-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.setting-title-row label{
  font-weight:750;
}

.number-box{
  display:flex;
  align-items:center;
  gap:5px;
  color:var(--muted);
  font-size:12px;
}

.number-box input{
  width:72px;
  padding:7px;
  border:1px solid var(--line);
  border-radius:8px;
  text-align:right;
}

input[type=range]{
  width:100%;
  margin:18px 0 3px;
  accent-color:var(--accent);
}

.range-label{
  display:flex;
  justify-content:space-between;
  color:#98a2b3;
  font-size:10px;
}

.char-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:20px;
}

.char-option{
  display:flex;
  gap:10px;
  align-items:center;
  padding:11px;
  border:1px solid var(--line);
  border-radius:10px;
}

.char-option input,
.check-row input{
  width:19px;
  height:19px;
  accent-color:var(--accent);
}

.char-option span,
.check-row span{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.char-option strong,
.check-row strong{
  font-size:13px;
}

.char-option small,
.check-row small,
.field-row small{
  color:var(--muted);
  font-size:10px;
}

.advanced{
  margin-top:20px;
  padding-top:18px;
  border-top:1px solid var(--line);
}

.advanced summary{
  color:var(--accent-dark);
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.advanced-body{
  display:grid;
  gap:17px;
  margin-top:18px;
}

.check-row{
  display:flex;
  gap:10px;
  align-items:flex-start;
}

.field-row{
  display:grid;
  gap:8px;
}

.field-row>span{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.field-row strong{
  font-size:13px;
}

.field-row input,
.field-row select{
  width:100%;
  min-width:0;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
}

.privacy-card{
  display:flex;
  gap:17px;
  margin-top:24px;
  padding:22px;
  background:#f8fcfd;
}

.privacy-mark{
  flex:0 0 35px;
  height:35px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--accent);
  color:#fff;
  font-weight:900;
}

.privacy-card h2,
.guide-card h2,
.faq h2{
  margin:0 0 7px;
  font-size:18px;
}

.privacy-card p,
.guide-card p,
.faq p{
  margin:0;
  color:var(--muted);
  line-height:1.8;
}

.guide-card{
  margin-top:18px;
  padding:22px;
}

.guide-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px;
  margin-top:17px;
}

.guide-grid article{
  border-left:3px solid var(--accent-soft);
  padding-left:14px;
}

.guide-grid strong{
  font-size:13px;
}

.guide-grid p{
  margin-top:5px;
  font-size:12px;
}

.faq{
  margin-top:34px;
}

.faq details{
  padding:15px 0;
  border-bottom:1px solid var(--line);
}

.faq summary{
  cursor:pointer;
  font-weight:700;
}

.faq p{
  padding-top:10px;
  font-size:13px;
}

.site-footer{
  border-top:1px solid var(--line);
  padding:25px 0;
  color:var(--muted);
  font-size:12px;
}

.site-footer .wrap{
  display:flex;
  justify-content:space-between;
}

.site-footer a{
  color:var(--accent);
  text-decoration:none;
}

code{
  font-size:.92em;
}

@media(max-width:850px){

  .hero{
    display:block;
  }

  .trust-box{
    width:100%;
    margin-top:20px;
  }

  .preset-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .tool-grid{
    grid-template-columns:1fr;
  }

  .guide-grid{
    grid-template-columns:1fr;
  }

}

@media(max-width:520px){

  .wrap{
    width:min(100% - 24px,1160px);
  }

  .hero h1{
    font-size:38px;
  }

  .preset-grid{
    grid-template-columns:1fr 1fr;
  }

  .result-card,
  .settings-card{
    padding:17px;
  }

  .result-header{
    display:block;
  }

  .outline-btn{
    width:100%;
    margin-top:13px;
  }

  .candidate{
    grid-template-columns:25px minmax(0,1fr);
  }

  .candidate .copy-btn{
    grid-column:2;
    width:100%;
  }

  .char-grid{
    grid-template-columns:1fr 1fr;
  }

  .privacy-card{
    align-items:flex-start;
  }

}

/* Password text should behave like normal selectable text */
.candidate code {
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
}

.candidate-number {
  -webkit-user-select: none;
  user-select: none;
}

/* ChatGPT-like password copy button */
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: #202124;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  transition: transform .12s ease, background .12s ease;
}

.copy-btn:hover {
  background: #111;
  transform: translateY(-1px);
}

.copy-btn.copied {
  background: #176b87;
}

.copy-icon {
  font-size: 13px;
  line-height: 1;
}

@media(max-width:600px) {
  .copy-btn {
    min-height: 36px;
    padding: 7px 11px;
  }

  .copy-label {
    font-size: 0;
  }

  .copy-label::after {
    content: "コピー";
    font-size: 12px;
  }
}

/* Candidate visual hierarchy */
.candidate-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.candidate code {
  font-size: 15px;
  color: #1f2933;
}

.candidate-number {
  color: #b2bcc6;
}

.recommend-badge {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f4f7;
  color: #176b87;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.copy-btn.primary-copy {
  background: #202124;
  color: #fff;
  border: 0;
}

.copy-btn.secondary-copy {
  background: #fff;
  color: #344054;
  border: 1px solid #d7dde3;
}

.copy-btn.secondary-copy:hover {
  background: #202124;
  color: #fff;
  border-color: #202124;
}

.hero-copy,
.result-header p,
.trust-box small,
.char-option small,
.check-row small,
.field-row small {
  color: #596575;
}

@media(max-width:600px) {
  .candidate-main {
    gap: 6px;
    flex-wrap: wrap;
  }

  .recommend-badge {
    order: -1;
  }
}

/* Recommended badge: float above without consuming password width */
.candidate:first-child {
  position: relative;
  padding-top: 25px;
}

.candidate:first-child .recommend-badge {
  position: absolute;
  top: 6px;
  left: 68px;
  z-index: 1;
}

/* Badge no longer consumes horizontal space */
.candidate:first-child .candidate-main {
  display: block;
}


/* =========================================================
   Desktop v0.3
   Goal: show all 10 password candidates without scrolling
   ========================================================= */

@media (min-width: 851px) {

  /* Compress the upper area slightly */
  main.wrap {
    padding-top: 16px;
  }

  .breadcrumb {
    margin-bottom: 18px;
  }

  .hero {
    margin-bottom: 16px;
  }

  .hero h1 {
    font-size: 48px;
    margin-bottom: 7px;
  }

  .trust-box {
    padding: 13px 16px;
  }

  .preset-section {
    margin-bottom: 12px;
  }

  .preset {
    min-height: 56px;
    padding: 8px 13px;
  }

  /* Settings becomes a compact horizontal bar */
  .tool-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .settings-card {
    order: -1;
    display: grid;
    grid-template-columns:
      155px
      minmax(220px, .8fr)
      minmax(390px, 1.4fr)
      auto;
    gap: 15px;
    align-items: center;
    padding: 14px 20px;
  }

  .settings-card .compact {
    margin: 0;
  }

  .settings-card .compact h2 {
    font-size: 17px;
  }

  .settings-card .setting-block {
    padding: 0;
    border-bottom: 0;
  }

  .setting-title-row label {
    font-size: 13px;
  }

  .number-box input {
    width: 60px;
    padding: 5px 6px;
  }

  .settings-card input[type=range] {
    margin: 9px 0 1px;
  }

  .char-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 0;
  }

  .char-option {
    padding: 8px;
    gap: 7px;
  }

  .char-option strong {
    font-size: 12px;
  }

  .advanced {
    margin: 0;
    padding: 0 0 0 13px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .advanced summary {
    white-space: nowrap;
    font-size: 12px;
  }

  .advanced[open] {
    grid-column: 1 / -1;
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .advanced[open] .advanced-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Candidate area uses full width */
  .result-card {
    padding: 17px 20px;
  }

  .result-header {
    margin-bottom: 10px;
  }

  .result-header p {
    margin-top: 2px;
  }

  /* 10 passwords = 2 columns x 5 rows */
  .candidate-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
  }

  .candidate {
    min-width: 0;
    grid-template-columns: 27px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 7px 8px;
    min-height: 46px;
  }

  .candidate code {
    white-space: nowrap;
    font-size: 13px;
  }

  /* Recommended badge floats at far left and consumes no password width */
  .candidate:first-child {
    position: relative;
    padding-top: 22px;
  }

  .candidate:first-child .recommend-badge {
    position: absolute;
    top: 4px;
    left: 8px;
    z-index: 2;
    padding: 2px 7px;
  }

  /* Only No.1 gets the full copy label */
  .copy-btn {
    min-height: 34px;
    padding: 6px 10px;
  }

  .secondary-copy .copy-label {
    font-size: 0;
  }

  .secondary-copy .copy-label::after {
    content: "コピー";
    font-size: 12px;
  }

  .result-footer {
    margin-top: 9px;
    padding-top: 9px;
  }
}

/* Native selectable password text field */
.password-field {
  width: 100%;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #dfe5ea;
  border-radius: 7px;
  background: #fff;
  color: #1f2933;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.4;
  outline: none;
  cursor: text;
}

.password-field:hover {
  border-color: #b8c6ce;
}

.password-field:focus {
  border-color: #176b87;
  box-shadow: 0 0 0 2px rgba(23,107,135,.10);
}

.candidate-main {
  min-width: 0;
}

/* =========================================================
   Candidate polish
   - readonly input behaves like text
   - recommended badge does not change row height
   ========================================================= */

/* Make password input look like ordinary text */
.password-field {
  width: 100%;
  min-width: 0;
  padding: 3px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1f2933;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
  outline: none;
  cursor: text;
}

.password-field:hover {
  border: 0;
  background: transparent;
}

.password-field:focus {
  border: 0;
  background: rgba(255,255,255,.72);
  box-shadow: 0 0 0 2px rgba(23,107,135,.12);
  border-radius: 5px;
  padding-left: 5px;
}

/* No extra height for No.1 */
.candidate:first-child {
  position: relative;
  padding-top: 7px;
}

/* Float badge over the top border like a label */
.candidate:first-child .recommend-badge {
  position: absolute;
  top: 0;
  left: 10px;
  transform: translateY(-50%);
  z-index: 3;

  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f4f7;
  color: #176b87;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

/* Keep every candidate row the same height */
@media (min-width: 851px) {
  .candidate {
    min-height: 52px;
  }
}

/* =========================================================
   EIN Network Tools - Green identity
   ========================================================= */

:root {
  --accent: #2f7d57;
  --accent-dark: #1d5b3d;
  --accent-soft: #e8f4ed;
  --navy: #173b2b;
  --green: #237a4b;
}

/* Header */
.site-header {
  background: #173b2b;
}

/* Active / security accents */
.trust-icon,
.privacy-mark {
  background: #2f7d57;
}

.preset.active {
  border-color: #2f7d57;
  background: #e8f4ed;
}

input[type=range],
.char-option input,
.check-row input {
  accent-color: #2f7d57;
}

/* Labels */
.eyebrow,
.section-kicker {
  color: #26704d;
}

.advanced summary,
.breadcrumb a,
.text-btn,
.site-footer a {
  color: #26704d;
}

/* Recommended */
.recommend-badge {
  background: #e4f3ea;
  color: #236a48;
}

/* Selected candidate */
.candidate.selected {
  border-color: #45a072;
  background: #f2faf5;
}

/* Password input focus */
.password-field:focus {
  box-shadow: 0 0 0 2px rgba(47,125,87,.13);
}

/* Copy success */
.copy-btn.copied {
  background: #2f7d57;
}

/* Strength */
.strength-info strong {
  color: #237a4b;
}

/* Trust/info boxes */
.trust-box,
.privacy-card {
  border-color: #cee4d7;
  background: #f5faf7;
}

/* =========================================================
   Mobile: password first, copy button secondary
   ========================================================= */

@media (max-width: 600px) {

  .candidate {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 11px 10px;
  }

  .candidate-main {
    min-width: 0;
  }

  .password-field {
    font-size: 15px;
    padding: 5px 0;
  }

  .candidate .copy-btn {
    grid-column: auto;
    width: 42px;
    min-width: 42px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 10px;
  }

  .copy-label,
  .secondary-copy .copy-label {
    display: none;
  }

  .copy-icon {
    font-size: 15px;
  }

  /* No.1 also stays compact on mobile */
  .copy-btn.primary-copy {
    background: #202124;
  }

  .candidate:first-child {
    padding-top: 17px;
  }

  .candidate:first-child .recommend-badge {
    top: 1px;
    left: 10px;
  }
}

/* =========================================================
   Password readability polish
   ========================================================= */

/* PC: make generated passwords easier to read */
@media (min-width: 851px) {
  .password-field {
    font-size: 15px;
    font-weight: 500;
  }
}

/* Mobile: compact but obvious COPY button */
@media (max-width: 600px) {

  .candidate .copy-btn,
  .candidate .copy-btn.primary-copy,
  .candidate .copy-btn.secondary-copy {
    width: auto;
    min-width: 66px;
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;

    background: #fff;
    color: #245c40;
    border: 1px solid #c9d8cf;
  }

  .candidate .copy-btn:hover {
    background: #f2f8f4;
    color: #173b2b;
    border-color: #78aa8d;
    transform: none;
  }

  /* Hide the unfamiliar icon */
  .copy-icon {
    display: none;
  }

  /* Show a clear text label */
  .copy-label,
  .secondary-copy .copy-label {
    display: inline;
    font-size: 12px;
    font-weight: 800;
  }

  /* Cancel older pseudo-label rule */
  .copy-label::after,
  .secondary-copy .copy-label::after {
    content: none;
  }

  .password-field {
    font-size: 15px;
  }
}

/* =========================================================
   Responsive overflow fix
   ========================================================= */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.wrap,
.tool-grid,
.settings-card,
.result-card,
.candidate-list,
.candidate,
.candidate-main {
  min-width: 0;
}

/* Mid-size PC / tablet: do not force the wide 2-column layout */
@media (min-width: 851px) and (max-width: 1099px) {

  .settings-card {
    grid-template-columns: 130px minmax(180px, .8fr) minmax(0, 1.4fr);
  }

  .settings-card .advanced {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 10px 0 0;
  }

  .candidate-list {
    grid-template-columns: 1fr;
  }

  .candidate {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }
}

/* Wide desktop only: 2 columns x 5 rows */
@media (min-width: 1100px) {
  .candidate-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   EIN green v2 + candidate responsive tuning
   ========================================================= */

:root {
  --navy: #1f6648;
  --accent: #3f9568;
  --accent-dark: #28704d;
  --accent-soft: #eaf5ee;
  --green: #2f875b;
}

.site-header {
  background: #1f6648;
}

.trust-icon,
.privacy-mark {
  background: #3f9568;
}

.eyebrow,
.section-kicker,
.advanced summary,
.breadcrumb a,
.text-btn,
.site-footer a {
  color: #2d7f56;
}

.preset.active {
  border-color: #49a574;
  background: #edf7f1;
}

.recommend-badge {
  background: #e6f4eb;
  color: #28754f;
}

.candidate.selected {
  border-color: #55aa7b;
  background: #f2faf5;
}

input[type=range],
.char-option input,
.check-row input {
  accent-color: #3f9568;
}

/* Candidate list can use 2 columns much earlier */
@media (min-width: 760px) {

  .candidate-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
  }

  .candidate {
    grid-template-columns: 27px minmax(0, 1fr) auto;
    min-width: 0;
  }

  /* Keep secondary copy buttons compact */
  .secondary-copy {
    min-width: 64px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Only very narrow screens use one column */
@media (max-width: 759px) {
  .candidate-list {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Real smartphone fix
   Keep password visible, copy button compact
   ========================================================= */

@media (max-width: 600px) {

  .candidate {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 68px;
    gap: 7px;
    align-items: center;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .candidate-main {
    min-width: 0;
    width: 100%;
  }

  .password-field {
    width: 100%;
    min-width: 0;
    font-size: 14px;
    padding: 4px 0;
  }

  .candidate .copy-btn,
  .candidate .copy-btn.primary-copy,
  .candidate .copy-btn.secondary-copy {
    width: 68px;
    min-width: 68px;
    max-width: 68px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 999px;
    background: #fff;
    color: #28704d;
    border: 1px solid #bfd4c7;
  }

  .copy-icon {
    display: none !important;
  }

  .copy-label {
    display: none !important;
  }

  .candidate .copy-btn::after {
    content: "コピー";
    display: inline;
    font-size: 12px;
    font-weight: 800;
  }

  .candidate .copy-btn.copied::after {
    content: "完了";
  }

  .candidate:first-child {
    padding-top: 17px;
  }

  .candidate:first-child .recommend-badge {
    top: 1px;
    left: 10px;
  }
}

/* Mobile recommended badge visibility fix */
@media (max-width: 600px) {

  .candidate {
    overflow: visible;
  }

  .candidate-list {
    overflow: visible;
  }

  .candidate:first-child {
    padding-top: 11px;
    margin-top: 9px;
  }

  .candidate:first-child .recommend-badge {
    top: -9px;
    left: 12px;
    transform: none;
    z-index: 5;
  }
}

/* Prevent iPhone/WebKit auto zoom when password field gets focus */
@media (max-width: 600px) {
  .password-field {
    font-size: 16px;
  }
}
