html,body{background:#ccc;color:#000;font-size:14px;margin:0;padding:0;}
body{padding:0.5em 1em;min-height:100vh;}
.main-container{display:flex;gap:0.2em;align-items:flex-start;max-width:1600px;width:100%;margin:0 auto;}
.left-column{width:350px;flex-shrink:0;display:flex;flex-direction:column;gap:0.5em;align-items:center;}
.center-column{flex:1;display:flex;flex-direction:column;align-items:center;min-width:800px;gap:0.5em;}
.right-column{width:350px;min-width:280px;flex-shrink:0;display:flex;flex-direction:column;gap:0.5em;align-items:center;}
.top{display:flex;flex-direction:column;gap:0.5em;align-items:center;width:100%;}
.top>div,.badges,.links,.onair,.lotw-wrapper,.punchcard-wrapper,.oqrs-wrapper,.log-wrapper{border:2px solid #999;border-radius:12px;background:#ddd;width:100%;box-sizing:border-box;}
.top>div{text-align:center;display:flex;justify-content:center;align-items:center;overflow:hidden;}
.badges{display:flex;flex-wrap:wrap;align-items:start;justify-content:center;gap:1em;padding:0.8em;}
p{margin:0;}
p:not(:first-child){margin-block-start:0.6em;}
.links{text-align:center;padding:0.5em;}
.links h3{margin:0 0 0.3em 0;font-size:1.1em;color:#222;border-bottom:1px solid #999;padding-bottom:0.1em;}
.links p{display:grid;grid-template-columns:1fr 1fr;gap:0.5em 0.8em;align-items:start;}
.links a{display:block;word-break:break-word;text-decoration:none;background:#eee;color:#333;padding:0.4em 0.6em;line-height:1.3;text-align:center;border:1px solid #bbb;border-radius:6px;font-weight:500;box-shadow:0 1px 3px rgba(0,0,0,0.05);transition:transform 0.2s,background-color 0.2s,border-color 0.2s,box-shadow 0.2s;}
.links a:hover{color:#000;text-decoration:none;background:#fff;border-color:#777;transform:translateY(-2px);box-shadow:0 4px 8px rgba(0,0,0,0.12);}
.links a:active{transform:translateY(0);box-shadow:0 1px 2px rgba(0,0,0,0.08);}
.map:not(:first-child){margin-block-start:0.8em;}
.onair,.lotw-wrapper{padding:0;overflow:hidden;}
.onair>iframe{width:100%;height:205px;max-width:100%;border-radius:8px;border:none;display:block;}
.lotw-wrapper>iframe{width:100%;height:240px;max-width:100%;border-radius:8px;border:none;display:block;}
.punchcard-wrapper{overflow:hidden;padding:0;margin:0;}
.punchcard-wrapper>iframe{width:100%;min-width:800px;height:240px;border-radius:10px;border:none;margin:0;display:block;}
.oqrs-wrapper{overflow:hidden;padding:0;margin:0;}
.oqrs-wrapper>iframe{width:100%;min-width:800px;height:210px;border-radius:0 0 10px 10px;border:none;margin:0;display:block;}
.log-wrapper{overflow:hidden;padding:0;margin:0;}
.log-wrapper>iframe{width:100%;min-width:800px;height:440px;border-radius:0 0 10px 10px;border:none;margin:0;display:block;}
img{max-width:100%;border-radius:8px;display:block;}
.left-column .top>div:nth-child(1) img{width:346px;height:248px;object-fit:contain;}
.left-column .top>div:nth-child(2) img{width:346px;height:196px;object-fit:cover;}
.left-column .top>div:nth-child(1){height:252px;display:flex;align-items:center;justify-content:center;}
.left-column .top>div:nth-child(3) img{width:346px;height:286px;object-fit:cover;}
.left-column .top>div:nth-child(3){height:290px;display:flex;align-items:center;justify-content:center;}
.badges img{width:37px;height:78px;border-radius:4px;}
.center-column>div{margin:0;}

@media (max-width:1350px){
  .main-container{flex-wrap:wrap;justify-content:center;gap:1em;}
  .right-column{width:100%;order:3;display:flex;flex-direction:row;justify-content:center;gap:1em;flex-wrap:wrap;min-width:auto;min-height:auto;}
  .right-column>*{flex:1;min-width:250px;max-width:300px;}
}

@media (max-width:1150px){
  .main-container{flex-wrap:wrap;justify-content:center;gap:1em;}
  .center-column{min-width:100%;order:2;}
  .left-column{order:1;}
  .right-column{order:3;min-height:auto;}
}

@media (max-width:900px){
  .main-container{flex-direction:column;align-items:center;gap:0.8em;}
  .left-column,.center-column,.right-column{width:100%;}
  .right-column{flex-direction:column;gap:0.8em;align-items:center;}
  .right-column>*{max-width:100%;}
  .oqrs-wrapper>iframe,.log-wrapper>iframe,.punchcard-wrapper>iframe{min-width:auto;width:100%;}
  .links p{grid-template-columns:1fr;gap:0.3em;}
}

@media (max-width:600px){
  body{padding:0.3em;}
  .main-container{gap:0.3em;}
  .top{flex-direction:column;align-items:center;}
  .onair>iframe{width:100%;height:180px;min-height:180px;}
  .lotw-wrapper>iframe{width:100%;height:220px;min-height:220px;}
  .punchcard-wrapper>iframe{width:100%;height:200px;min-height:200px;}
  .oqrs-wrapper>iframe{width:100%;height:360px;min-height:360px;border-radius:0 0 8px 8px;}
  .log-wrapper>iframe{width:100%;height:440px;min-height:440px;border-radius:0 0 8px 8px;}
  .left-column .top>div:nth-child(1) img{width:100%;height:auto;max-width:100%;max-height:280px;object-fit:contain;}
  .left-column .top>div:nth-child(1){height:auto;min-height:250px;}
  .left-column .top>div:nth-child(2) img{width:100%;height:auto;max-width:100%;max-height:220px;object-fit:contain;}
  .left-column .top>div:nth-child(2){height:auto;min-height:200px;display:flex;align-items:center;justify-content:center;}
  .left-column .top>div:nth-child(3) img{width:100%;height:auto;max-width:100%;max-height:280px;object-fit:contain;}
  .left-column .top>div:nth-child(3){height:auto;min-height:250px;display:flex;align-items:center;justify-content:center;}
  .right-column{gap:0.3em;}
  .links,.badges{padding:0.5em;}
  .links a{padding:0.08em 0;line-height:1.4;}
  .center-column{gap:0.3em;}
  .right-column .onair,.right-column .lotw-wrapper{width:100%;}
  .links p{grid-template-columns:1fr;gap:0.2em;}
  .top>div,.badges,.links,.onair,.lotw-wrapper,.punchcard-wrapper,.oqrs-wrapper,.log-wrapper{border:2px solid #999;}
}

@media (prefers-color-scheme: dark){
  html,body{background:#121212;color:#e0e0e0;}
  .top>div,.badges,.links,.onair,.lotw-wrapper,.punchcard-wrapper,.oqrs-wrapper,.log-wrapper{border-color:#333;background:#1e1e1e;}
  .links h3{color:#fff;border-bottom-color:#333;}
  .links a{background:#2a2a2a;color:#ccc;border-color:#444;box-shadow:0 1px 3px rgba(0,0,0,0.3);}
  .links a:hover{background:#3a3a3a;color:#fff;border-color:#666;box-shadow:0 4px 12px rgba(0,0,0,0.5);}
  .log-wrapper iframe,.oqrs-wrapper iframe,.onair iframe,.lotw-wrapper iframe,.punchcard-wrapper iframe{filter:invert(0.9) hue-rotate(180deg);}
}
